bottlerocket-os / bottlerocket

An operating system designed for hosting containers
https://bottlerocket.dev
Other
8.81k stars 520 forks source link

Add migration for the new `aws-config` setting generator #4268

Closed ginglis13 closed 2 weeks ago

ginglis13 commented 1 month ago

Issue number:

n/a

Description of changes:

Add migration for the new aws_config setting generator.

Testing done:

Upgrade, non FIPS AMI, `settings.aws.config` null: ``` bash-5.1# apiclient get os bash-5.1# apiclient get settings.aws { "settings": { "aws": { "profile": "default", "region": "us-west-2" } } } ``` After upgrade: ``` bash-5.1# apiclient get os bash-5.1# apiclient get settings.aws { "settings": { "aws": { "config": "W2RlZmF1bHRdCnVzZV9maXBzX2VuZHBvaW50PWZhbHNl", "profile": "default", "region": "us-west-2" } } } ``` Downgrade (the setting remains): ``` bash-5.1# apiclient get settings.aws { "settings": { "aws": { "config": "W2RlZmF1bHRdCnVzZV9maXBzX2VuZHBvaW50PWZhbHNl", "profile": "default", "region": "us-west-2" } } } ```
Upgrade, non FIPS AMI, `settings.aws.config` already set: ``` bash-5.1# apiclient get os bash-5.1# apiclient get settings.aws { "settings": { "aws": { "config": "W2RlZmF1bHRdCnJldHJ5X21vZGU9c3RhbmRhcmQK", "profile": "default", "region": "us-west-2" } } } ``` After upgrade: ``` bash-5.1# apiclient get os bash-5.1# apiclient get settings.aws { "settings": { "aws": { "config": "W2RlZmF1bHRdCnJldHJ5X21vZGU9c3RhbmRhcmQK", "profile": "default", "region": "us-west-2" } } } ``` Downgrade (the setting remains): ``` bash-5.1# apiclient get settings.aws { "settings": { "aws": { "config": "W2RlZmF1bHRdCnJldHJ5X21vZGU9c3RhbmRhcmQK", "profile": "default", "region": "us-west-2" } } } ```

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.