Skip to content
New issue

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

Eng 290 sanitise tags #348

Merged
merged 2 commits into from
Jul 10, 2024
Merged

Eng 290 sanitise tags #348

merged 2 commits into from
Jul 10, 2024

Conversation

CorinWilkins
Copy link
Collaborator

Does 2 things

  • ensures that tags conform to the allowed characters in tagging restrictions
  • removes the lifecycle policy for accounts created via the RAAT so that tags are managed by terraform.

@heathd
Copy link
Contributor

heathd commented Jul 10, 2024

Ruby code works as described but I don't understand the why behind f60bbf7

I think what's going on here is that we're manipulating a json object that represents some terraform. So I assume that this fragment:

        'lifecycle': {
          'ignore_changes': [
            'tags'
          ]
        }

is a special instruction to terraform to treat tags in a special way. A little more context/explanation in the commit message would be useful (unless you think it's obvious and most people on the team would know about this)

@CorinWilkins
Copy link
Collaborator Author

Ruby code works as described but I don't understand the why behind f60bbf7

I think what's going on here is that we're manipulating a json object that represents some terraform. So I assume that this fragment:

        'lifecycle': {
          'ignore_changes': [
            'tags'
          ]
        }

is a special instruction to terraform to treat tags in a special way. A little more context/explanation in the commit message would be useful (unless you think it's obvious and most people on the team would know about this)

Up until now this block has been telling terraform to ignore changes to account tags. Effectively meaning that once the account is created they aren't managed by terraform any more. However, with the changes we've made to bring the accounts into terraform and add our new billing-... tags we have had to remove these.

I will amend the commit to add the above detail.

- ensures that tag changes in terraform will be reflected in the infrastructure.

Up until now this block has been telling terraform to ignore changes to account tags. Effectively meaning that once the account is created they aren't managed by terraform any more. However, with the changes we've made to bring the accounts into terraform and add our new `billing-...` tags we have had to remove these.
This commit brings the terraform for newly created accounts into alignment with those that already exist.
@CorinWilkins CorinWilkins force-pushed the eng-290-sanitise-tags branch from f60bbf7 to 1625d79 Compare July 10, 2024 09:22
@CorinWilkins CorinWilkins merged commit 88e9812 into main Jul 10, 2024
1 check passed
@CorinWilkins CorinWilkins deleted the eng-290-sanitise-tags branch July 10, 2024 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants