Change Tag only if there is any other change

38 views
Skip to first unread message

Tiger Peng

unread,
Jun 8, 2021, 12:24:41 PM6/8/21
to Terraform
I'd like to use something a below to create/mange common tags for all resources in project. For the common_var_tag, I'd like it be applied only there is any other changs. So the sources are tag with who and when the changes are mad. Is there way to do it?

locals {
    common_var_tags = {
        ChangedBy = module.data.caller_arn
        ChangedAt = timestamp()
    }


    common_fix_tags = {
        Project.  = "Project"
        Owner     = "Tiger Peng"
        Team      = "DevOps"
 
        CreatedAt = "2021-06-08" 
     } 
}

Alexandra Freeman

unread,
Jun 21, 2021, 10:31:27 AM6/21/21
to Terraform
Hello and thank you for your question!
On June 3, 2019 HashiCorp launched Discuss, a forum to facilitate dialogue within the HashiCorp community. This format allows answers to be more readily searched and indexed, making it easier to find answers to existing questions and to share knowledge with each other. Please direct all questions and conversations to the discussion forum. We look forward to collaborating with you there!

Cheers!

Reply all
Reply to author
Forward
0 new messages