Skip to content
This repository has been archived by the owner on Aug 5, 2020. It is now read-only.

Remove CreatedBy tag #6

Merged
merged 1 commit into from
Aug 19, 2019
Merged

Remove CreatedBy tag #6

merged 1 commit into from
Aug 19, 2019

Conversation

suzannehamilton
Copy link
Contributor

@suzannehamilton suzannehamilton commented Aug 19, 2019

Remove global CreatedBy tag from every resource. This was intended to store the user who ran Terraform to create the resource, but it was actually updated every time we ran Terraform, causing a lot of churn and overwriting the original value.

We couldn't find a way to add the tag on resource creation and freeze it, so it seems better to remove it.

Terraform will eventually be run by a Terraform user in CI, so the CreatedBy tag wouldn't be so useful anyway.

Remove global `CreatedBy` tag from every resource. This was intended
to store the user who ran Terraform to create the resource, but it was
actually updated every time we ran Terraform, causing a lot of churn
and overwriting the original value.

We couldn't find a way to add the tag on resource creation and freeze
it, so it seems better to remove it.

Terraform will eventually be run by a Terraform user in CI, so the
`CreatedBy` tag wouldn't be so useful anyway.
@suzannehamilton
Copy link
Contributor Author

Closing this while I try a different solution.

@suzannehamilton
Copy link
Contributor Author

suzannehamilton commented Aug 19, 2019

Reopening because I still couldn't find a clean solution.

You can prevent tag overwriting with:

lifecycle {
  ignore_changes = [
    tags["CreatedBy"]
  ]
}

but you have to remember to add it to every resource.

According to this Terraform issue, there might be a solution in later Terraform versions. For now it seems easier to get rid of this field and add it back in Beta if we really need it.

Copy link
Contributor

@TomJKing TomJKing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine

@suzannehamilton suzannehamilton merged commit 2b3930e into master Aug 19, 2019
@suzannehamilton suzannehamilton deleted the remove-created-by branch August 19, 2019 10:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants