Last active
July 14, 2022 12:00
-
-
Save soerenmartius/cc3991fe6a2d18d564aeb5afd4c0fc65 to your computer and use it in GitHub Desktop.
Terramate provider definition in providers.hcl.tm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# File: /projects/providers.tm.hcl | |
globals { | |
# The default project_id to configure the provider with. | |
# The provider_id can be set at any level in the hierarchy. | |
# If no project_id the provider fallbacks are used. | |
terraform_google_provider_project = tm_try(global.project_id, null) | |
# The default region to configure | |
terraform_google_provider_region = "europe-north1" | |
# Version constraints (can be overridden at lower levels, e.g. stack level) | |
terraform_google_provider_version = "4.0" | |
terraform_version = "1.2.3" | |
} | |
# Create a provider config in every stack reachable from this config. | |
# The file is prefixed with _terramate_generated to make the generated nature | |
# of it more visible | |
generate_hcl "_terramate_generated_providers.tf" { | |
content { | |
# The provider configuration | |
provider "google" { | |
project = global.terraform_google_provider_project | |
region = global.terraform_google_provider_region | |
} | |
# Provider version constraints | |
terraform { | |
required_providers { | |
google = { | |
source = "hashicorp/google" | |
version = global.terraform_google_provider_version | |
} | |
} | |
} | |
# Terraform version constraints | |
terraform { | |
required_version = global.terraform_version | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment