-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
feat: Add App Config Feature Flag type #23719
Conversation
Feature Flags are now GA on AWS. Extend the Configuration Profile to expose the ability to set these values.
I think this change would satisfy #23720 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Welcome @ryancormack 👋
It looks like this is your first Pull Request submission to the Terraform AWS Provider! If you haven’t already done so please make sure you have checked out our CONTRIBUTING guide and FAQ to make sure your contribution is adhering to best practice and has all the necessary elements in place for a successful approval.
Also take a look at our FAQ which details how we prioritize Pull Requests for inclusion.
Thanks again, and welcome to the community! 😃
This is my first contribution to Terraform. I think I've ticked all the contributing requirements. If I've not got something quite right, I'm more than happy to fix a mistake. This is also my first time writing Go. The PR seems small, and I've followed the existing work. My only thought/consideration was using the default. This is the existing behaviour that happens on the AWS API. I'm unsure whether I should be exposing the default, or leaving it empty, and allowing the AWS API to take care of applying a default. Thanks |
@ryancormack Thanks for the contribution 🎉 👏.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀.
% make testacc TESTS=TestAccAppConfigConfigurationProfile_ PKG=appconfig ACCTEST_PARALLELISM=3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/appconfig/... -v -count 1 -parallel 3 -run='TestAccAppConfigConfigurationProfile_' -timeout 180m
=== RUN TestAccAppConfigConfigurationProfile_basic
=== PAUSE TestAccAppConfigConfigurationProfile_basic
=== RUN TestAccAppConfigConfigurationProfile_disappears
=== PAUSE TestAccAppConfigConfigurationProfile_disappears
=== RUN TestAccAppConfigConfigurationProfile_Validators_json
=== PAUSE TestAccAppConfigConfigurationProfile_Validators_json
=== RUN TestAccAppConfigConfigurationProfile_Validators_lambda
=== PAUSE TestAccAppConfigConfigurationProfile_Validators_lambda
=== RUN TestAccAppConfigConfigurationProfile_Validators_multiple
=== PAUSE TestAccAppConfigConfigurationProfile_Validators_multiple
=== RUN TestAccAppConfigConfigurationProfile_updateName
=== PAUSE TestAccAppConfigConfigurationProfile_updateName
=== RUN TestAccAppConfigConfigurationProfile_updateDescription
=== PAUSE TestAccAppConfigConfigurationProfile_updateDescription
=== RUN TestAccAppConfigConfigurationProfile_tags
=== PAUSE TestAccAppConfigConfigurationProfile_tags
=== CONT TestAccAppConfigConfigurationProfile_basic
=== CONT TestAccAppConfigConfigurationProfile_Validators_multiple
=== CONT TestAccAppConfigConfigurationProfile_tags
--- PASS: TestAccAppConfigConfigurationProfile_basic (19.45s)
=== CONT TestAccAppConfigConfigurationProfile_updateDescription
--- PASS: TestAccAppConfigConfigurationProfile_tags (44.72s)
=== CONT TestAccAppConfigConfigurationProfile_updateName
--- PASS: TestAccAppConfigConfigurationProfile_Validators_multiple (47.92s)
=== CONT TestAccAppConfigConfigurationProfile_Validators_json
--- PASS: TestAccAppConfigConfigurationProfile_updateDescription (31.96s)
=== CONT TestAccAppConfigConfigurationProfile_Validators_lambda
--- PASS: TestAccAppConfigConfigurationProfile_updateName (29.24s)
=== CONT TestAccAppConfigConfigurationProfile_disappears
--- PASS: TestAccAppConfigConfigurationProfile_disappears (15.54s)
--- PASS: TestAccAppConfigConfigurationProfile_Validators_json (42.86s)
--- PASS: TestAccAppConfigConfigurationProfile_Validators_lambda (78.26s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/appconfig 134.004s
Thanks @ewbankkit . I'm just testing the various behaviours with this App Config option locally now. I'm discovering some 'quirks' with the API. Some of the AWS docs don't appear to be fully complete, so I want to make sure I'm not doing anything unintended. Should I close the PR for this and re-open as a draft? |
@ryancormack You can use this PR to make additional changes; I dismissed the Approval. |
Show example differences for freeform and feature flags hosted configuration profile types
@ewbankkit The behaviour I was unsure about was fixed by your change to enable I've added some documentation to show example schemas for the two types of configuration profile versions now too. I think it's finished from me and is behaving as intended after that ForceNew. Thanks very much |
Thanks very much for the help and tidy up Kit 👍🏻 |
This functionality has been released in v4.6.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Feature Flags in App Config are now GA, https://aws.amazon.com/about-aws/whats-new/2022/03/aws-appconfig-feature-flags/
This Pull Request exposes the ability to set the Configuration Profile type to either Free Form, or Feature Flag, as per the AWS API docs, https://docs.aws.amazon.com/appconfig/2019-10-09/APIReference/API_CreateConfigurationProfile.html#appconfig-CreateConfigurationProfile-request-Type
I've marked the default value to be FreeForm. Whilst this isn't explicitly documented on AWS, this is the observed behaviour from creating an App Config Profile without setting this value. Using this default maintains backwards compatibility. The validation function uses the regex function documented by AWS
Community Note
Closes #23720
Output from acceptance testing: