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 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
Copy link