Skip to content

Commit

Permalink
fix: add a default value for potentially empty tags
Browse files Browse the repository at this point in the history
  • Loading branch information
jakeyheath committed Oct 3, 2023
1 parent 3288d8b commit fed7aa3
Show file tree
Hide file tree
Showing 18 changed files with 297 additions and 307 deletions.
22 changes: 11 additions & 11 deletions templates/templates/common/aws_provider.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ provider "aws" {
# var.tags should be considered deprecated
default_tags {
tags = {
TFC_RUN_ID = var.TFC_RUN_ID
TFC_WORKSPACE_NAME = var.TFC_WORKSPACE_NAME
TFC_WORKSPACE_SLUG = var.TFC_WORKSPACE_SLUG
TFC_CONFIGURATION_VERSION_GIT_BRANCH = var.TFC_CONFIGURATION_VERSION_GIT_BRANCH
TFC_CONFIGURATION_VERSION_GIT_COMMIT_SHA = var.TFC_CONFIGURATION_VERSION_GIT_COMMIT_SHA
TFC_CONFIGURATION_VERSION_GIT_TAG = var.TFC_CONFIGURATION_VERSION_GIT_TAG
TFC_PROJECT_NAME = var.TFC_PROJECT_NAME
project = var.tags.project
env = var.tags.env
service = var.tags.service
owner = var.tags.owner
TFC_RUN_ID = coalesce(var.TFC_RUN_ID, "unknown")
TFC_WORKSPACE_NAME = coalesce(var.TFC_WORKSPACE_NAME, "unknown")
TFC_WORKSPACE_SLUG = coalesce(var.TFC_WORKSPACE_SLUG, "unknown")
TFC_CONFIGURATION_VERSION_GIT_BRANCH = coalesce(var.TFC_CONFIGURATION_VERSION_GIT_BRANCH, "unknown")
TFC_CONFIGURATION_VERSION_GIT_COMMIT_SHA = coalesce(var.TFC_CONFIGURATION_VERSION_GIT_COMMIT_SHA, "unknown")
TFC_CONFIGURATION_VERSION_GIT_TAG = coalesce(var.TFC_CONFIGURATION_VERSION_GIT_TAG, "unknown")
TFC_PROJECT_NAME = coalesce(var.TFC_PROJECT_NAME, "unknown")
project = coalesce(var.tags.project, "unknown")
env = coalesce(var.tags.env, "unknown")
service = coalesce(var.tags.service, "unknown")
owner = coalesce(var.tags.owner, "unknown")
managedBy = "terraform"
}
}
Expand Down
22 changes: 11 additions & 11 deletions testdata/tfe_config/terraform/accounts/account/fogg.tf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 11 additions & 11 deletions testdata/tfe_config/terraform/envs/staging/comp1/fogg.tf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 11 additions & 11 deletions testdata/tfe_config/terraform/global/fogg.tf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 11 additions & 11 deletions testdata/tfe_config/terraform/tfe/fogg.tf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 0 additions & 10 deletions testdata/tfe_config/terraform/tfe/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
# Auto-generated by fogg. Do not edit
# Make improvements in fogg, so that everyone can benefit.

output "cluster_id" {
value = module.aws-aurora-postgres.cluster_id
sensitive = false
}

output "cluster_resource_id" {
value = module.aws-aurora-postgres.cluster_resource_id
sensitive = false
}

output "database_name" {
value = module.aws-aurora-postgres.database_name
sensitive = false
Expand Down
Loading

0 comments on commit fed7aa3

Please sign in to comment.