alphagov / re-request-an-aws-account

:partly_sunny: An interface for requesting AWS accounts
https://request-an-aws-account.gds-reliability.engineering/
1 stars 0 forks source link

Eng 290 sanitise tags #348

Closed CorinWilkins closed 4 months ago

CorinWilkins commented 4 months ago

Does 2 things

heathd commented 4 months ago

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

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 commented 4 months ago

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.