-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
resource/ssm_maintenance_window_target: name and description are optional #9165
Conversation
optional Fixes: hashicorp#8791 the name ane description fields were optional but we never implemented the d.GetOk(fieldName) on them. This just changes that to remove the validation errors The docs and the schema were already correct so this is a very simple change ``` ▶ acctests aws TestAccAWSSSMMaintenanceWindowTarget_ === RUN TestAccAWSSSMMaintenanceWindowTarget_basic === PAUSE TestAccAWSSSMMaintenanceWindowTarget_basic === RUN TestAccAWSSSMMaintenanceWindowTarget_noNameOrDescription === PAUSE TestAccAWSSSMMaintenanceWindowTarget_noNameOrDescription === RUN TestAccAWSSSMMaintenanceWindowTarget_validation === PAUSE TestAccAWSSSMMaintenanceWindowTarget_validation === RUN TestAccAWSSSMMaintenanceWindowTarget_update === PAUSE TestAccAWSSSMMaintenanceWindowTarget_update === CONT TestAccAWSSSMMaintenanceWindowTarget_basic === CONT TestAccAWSSSMMaintenanceWindowTarget_update === CONT TestAccAWSSSMMaintenanceWindowTarget_validation === CONT TestAccAWSSSMMaintenanceWindowTarget_noNameOrDescription --- PASS: TestAccAWSSSMMaintenanceWindowTarget_validation (4.60s) --- PASS: TestAccAWSSSMMaintenanceWindowTarget_noNameOrDescription (34.75s) --- PASS: TestAccAWSSSMMaintenanceWindowTarget_basic (34.95s) --- PASS: TestAccAWSSSMMaintenanceWindowTarget_update (51.77s) PASS ok github.com/terraform-providers/terraform-provider-aws/aws 51.842s ```
@bflad without this change in place, the |
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, thanks for fixing this @stack72 -- we may also want to double check that an update that removes name or description also works (since this new update logic would be doing the equivalent of params.Name = aws.String("")
), but this fix is important enough to get in on its own for now.
Output from acceptance testing:
--- PASS: TestAccAWSSSMMaintenanceWindowTarget_validation (2.12s)
--- PASS: TestAccAWSSSMMaintenanceWindowTarget_noNameOrDescription (13.89s)
--- PASS: TestAccAWSSSMMaintenanceWindowTarget_basic (13.90s)
--- PASS: TestAccAWSSSMMaintenanceWindowTarget_update (19.48s)
This has been released in version 2.17.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 for triage. Thanks! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Fixes: #8791
the name ane description fields were optional but we never implemented
the d.GetOk(fieldName) on them. This just changes that to remove the
validation errors
The docs and the schema were already correct so this is a very simple
change