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

Support extension of configurations to other profiles #8002

Open
2 tasks
electriquo opened this issue Jun 27, 2023 · 1 comment
Open
2 tasks

Support extension of configurations to other profiles #8002

electriquo opened this issue Jun 27, 2023 · 1 comment
Labels
configuration feature-request A feature should be added or improved. p2 This is a standard priority issue

Comments

@electriquo
Copy link

electriquo commented Jun 27, 2023

Describe the feature

Support base/general configuration (e.g. within the default profile), where other profiles may extend and override by referencing the base configuration.

Use Case

Using multi-account architecture, AWS CLI configuration file include many profiles.
Rather the configuring each profile with the same configuration or have a small difference between each profile, if a profile could reference another profile then extend and override some configuration, it will ease and declutter the configuration file.

Proposed Solution

Each profile can reference a list of other profiles, to apply/merge configuration from each referenced profile in the order they were specified. If a profile did not reference any other profiles, then apply the base/default configuration (which can come from the default profile).

[default]
# default configuration
output = json
region = us-east-1

[profile foo]
# use the default configuration if there is no reference to other profile
cli_timestamp_format = iso8601

[profile bar]
output = text
region = us-east-2

[profile baz]
extends = foo,bar

For instance, giving the configuration above, the following configuration will be equivalent

[default]
# default configuration
output = json
region = us-east-1

[profile foo]
output = json
region = us-east-1
cli_timestamp_format = iso8601

[profile bar]
output = text
region = us-east-2

[profile baz]
output = text
region = us-east-2
cli_timestamp_format = iso8601

Other Information

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CLI version used

2.12.1

Environment details (OS name and version, etc.)

Ubuntu 22.04.2 LTS

@electriquo electriquo added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Jun 27, 2023
@tim-finnigan tim-finnigan changed the title (short issue description) Support extension of configurations to other profiles Jun 27, 2023
@tim-finnigan
Copy link
Contributor

Thanks @foolioo for creating this feature request. We encourage others to 👍 the issue if interested in this, and to comment here with any additional info on use cases. I'll also share what I commented in the original issue you opened for more background:

you can use source_profile to source credentials from another profile but that does not source other configurations as noted in #3334.

@tim-finnigan tim-finnigan added configuration p2 This is a standard priority issue and removed needs-triage This issue or PR still needs to be triaged. labels Jun 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
configuration feature-request A feature should be added or improved. p2 This is a standard priority issue
Projects
None yet
Development

No branches or pull requests

2 participants