Gallery
  • Introduction to Gallery
  • Getting Started
    • Link Your Cloud Provider
    • Create a Template
    • Build an Environment
  • Cloud Integrations
    • AWS
    • GCP
    • Other Cloud Providers
  • Gallery CLI
    • Setup
      • Installation
      • Authentication
  • Build System
    • Overview
    • Project Builds
      • Build Jobs
      • Build Stages
      • .gallery-deploy.yml Docs
    • Terraform
      • Variables
      • Mapping URLs/Configs
      • Using Cached Services
  • Cached Services
    • Overview
    • Defining Cached Services
  • Examples
    • Flask Elastic Beanstalk Quickstart
  • Resources
    • Environments
      • Managing your Environments
      • Environment Teardown
      • Environment Settings
Powered by GitBook
On this page

Was this helpful?

  1. Build System
  2. Terraform

Variables

Gallery injects a terraform object that includes variables that help you integrate with your software development workflow, and with gallery credentials helpers. You are still responsible for declaring any terraform variables that your code uses (in a vars.tf file, for example), however, Gallery will inject a gallery.tfvars file that will include values for any variables defined in the schema below.

If you define a gallery_info variable within your own terraform configuration, you can specify any subset of the fields that are in this schema.

variable "gallery_info" {
    type = object({
        artifacts = object({
            # Any jobs that define artifacts will be listed in the object
            # below. For example, if you have a build job called
            # `build`, the block will look like the following:
            build = string
        })
        
        # A unique identifier for the environment, use to uniquify
        # any identifiers for environment objects
        env_name = string
        
        # If the job is triggered through a git commit/PR, the sha
        # will be listed, otherwise it will be an empty string
        git_sha = string
        
        # The git branch name, or an empty string if not triggered
        # through a commit/PR
        git_branch = string
    })
}

PreviousTerraformNextMapping URLs/Configs

Last updated 3 years ago

Was this helpful?