We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is your feature request related to a problem? Please describe. When using Terratag with existing tags Terratag override my tags See example main.tf -
resource "aws_s3_bucket" "example" { bucket = "my-tf-test-bucket" tags = { Name = "My bucket" Environment = "Dev" } } terraform { required_providers { aws = { source = "hashicorp/aws" version = "~> 5.0" } } } provider "aws" { region = "us-east-1" }
Terratag command -
> /opt/terratag -tags="{\"Name\":\"By Terratag\"}" -rename=false
Results with this file
resource "aws_s3_bucket" "example" { bucket = "my-tf-test-bucket" tags = merge({ "Name" = "My bucket" "Environment" = "Dev" }, local.terratag_added_main) } terraform { required_providers { aws = { source = "hashicorp/aws" version = "~> 5.0" } } } provider "aws" { region = "us-east-1" } locals { terratag_added_main = {"Name"="By Terratag"} }
Plan results in
+ tags = { + "Environment" = "Dev" + "Name" = "By Terratag" } + tags_all = { + "Environment" = "Dev" + "Name" = "By Terratag" }
Describe the solution you'd like Flag that enables a different behaviour of merging tags instead of overriding tags, meaning the plan will result in
+ tags = { + "Environment" = "Dev" + "Name" = "My bucket" } + tags_all = { + "Environment" = "Dev" + "Name" = "My bucket" }
As Name exists in our Terraform configuration
Name
Describe alternatives you've considered
Additional context
The text was updated successfully, but these errors were encountered:
TomerHeber
Successfully merging a pull request may close this issue.
Is your feature request related to a problem? Please describe.
When using Terratag with existing tags Terratag override my tags
See example
main.tf -
Terratag command -
Results with this file
Plan results in
Describe the solution you'd like
Flag that enables a different behaviour of merging tags instead of overriding tags, meaning the plan will result in
As
Name
exists in our Terraform configurationDescribe alternatives you've considered
Additional context
The text was updated successfully, but these errors were encountered: