-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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/aws_ssm_maintenance_window_task: Prevent ValidationException error on update when priority is not set or 0 #17885
Conversation
… error on update when priority is not set or 0 Reference: #17871 Priority is optional, but it is currently configured in every test configuration which is why this was not found before. To minimize the changes to verify this bug and timebox effort as part of triage, submitting one preferred style test that covers the behavior. Previously: ``` === CONT TestAccAWSSSMMaintenanceWindowTask_Description resource_aws_ssm_maintenance_window_task_test.go:114: Step 3/3 error: Error running apply: exit status 1 Error: Error updating Maintenance Window (mw-02f66f1bc3df08b83) Task (4c1a1e3e-c449-4e2d-882c-5f8a23a2104d): ValidationException: Value null at 'Priority' failed to satisfy constraint: Member must not be null status code: 400, request id: fc15f736-7e53-49bb-8d5d-11f35ba98a30 on terraform_plugin_test.tf line 58, in resource "aws_ssm_maintenance_window_task" "test": 58: resource "aws_ssm_maintenance_window_task" "test" { --- FAIL: TestAccAWSSSMMaintenanceWindowTask_Description (22.29s) ``` Output from acceptance testing in AWS Commercial: ``` --- PASS: TestAccAWSSSMMaintenanceWindowTask_basic (36.64s) --- PASS: TestAccAWSSSMMaintenanceWindowTask_Description (36.65s) --- PASS: TestAccAWSSSMMaintenanceWindowTask_disappears (20.12s) --- PASS: TestAccAWSSSMMaintenanceWindowTask_emptyNotificationConfig (21.04s) --- PASS: TestAccAWSSSMMaintenanceWindowTask_noRole (21.13s) --- PASS: TestAccAWSSSMMaintenanceWindowTask_TaskInvocationAutomationParameters (49.73s) --- PASS: TestAccAWSSSMMaintenanceWindowTask_TaskInvocationLambdaParameters (39.99s) --- PASS: TestAccAWSSSMMaintenanceWindowTask_TaskInvocationRunCommandParameters (50.76s) --- PASS: TestAccAWSSSMMaintenanceWindowTask_TaskInvocationRunCommandParametersCloudWatch (53.64s) --- PASS: TestAccAWSSSMMaintenanceWindowTask_TaskInvocationStepFunctionParameters (23.05s) --- PASS: TestAccAWSSSMMaintenanceWindowTask_updateForcesNewResource (36.64s) ``` Output from acceptance testing in AWS GovCloud (US): ``` --- PASS: TestAccAWSSSMMaintenanceWindowTask_basic (48.68s) --- PASS: TestAccAWSSSMMaintenanceWindowTask_Description (45.57s) --- PASS: TestAccAWSSSMMaintenanceWindowTask_disappears (28.64s) --- PASS: TestAccAWSSSMMaintenanceWindowTask_emptyNotificationConfig (28.72s) --- PASS: TestAccAWSSSMMaintenanceWindowTask_noRole (28.97s) --- PASS: TestAccAWSSSMMaintenanceWindowTask_TaskInvocationAutomationParameters (52.58s) --- PASS: TestAccAWSSSMMaintenanceWindowTask_TaskInvocationLambdaParameters (49.44s) --- PASS: TestAccAWSSSMMaintenanceWindowTask_TaskInvocationRunCommandParameters (54.30s) --- PASS: TestAccAWSSSMMaintenanceWindowTask_TaskInvocationRunCommandParametersCloudWatch (60.93s) --- PASS: TestAccAWSSSMMaintenanceWindowTask_TaskInvocationStepFunctionParameters (31.03s) --- PASS: TestAccAWSSSMMaintenanceWindowTask_updateForcesNewResource (46.25s) ```
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 🚀 🚀
Output from acceptance testing in AWS Commercial:
--- PASS: TestAccAWSSSMMaintenanceWindowTask_emptyNotificationConfig (20.09s)
--- PASS: TestAccAWSSSMMaintenanceWindowTask_disappears (21.43s)
--- PASS: TestAccAWSSSMMaintenanceWindowTask_noRole (22.38s)
--- PASS: TestAccAWSSSMMaintenanceWindowTask_TaskInvocationStepFunctionParameters (22.81s)
--- PASS: TestAccAWSSSMMaintenanceWindowTask_updateForcesNewResource (35.46s)
--- PASS: TestAccAWSSSMMaintenanceWindowTask_Description (35.99s)
--- PASS: TestAccAWSSSMMaintenanceWindowTask_TaskInvocationLambdaParameters (37.79s)
--- PASS: TestAccAWSSSMMaintenanceWindowTask_basic (38.46s)
--- PASS: TestAccAWSSSMMaintenanceWindowTask_TaskInvocationAutomationParameters (40.73s)
--- PASS: TestAccAWSSSMMaintenanceWindowTask_TaskInvocationRunCommandParameters (41.01s)
--- PASS: TestAccAWSSSMMaintenanceWindowTask_TaskInvocationRunCommandParametersCloudWatch (48.84s)
Output from acceptance testing in AWS GovCloud (US):
--- PASS: TestAccAWSSSMMaintenanceWindowTask_disappears (15.51s)
--- PASS: TestAccAWSSSMMaintenanceWindowTask_TaskInvocationStepFunctionParameters (15.64s)
--- PASS: TestAccAWSSSMMaintenanceWindowTask_noRole (15.66s)
--- PASS: TestAccAWSSSMMaintenanceWindowTask_emptyNotificationConfig (15.67s)
--- PASS: TestAccAWSSSMMaintenanceWindowTask_Description (27.73s)
--- PASS: TestAccAWSSSMMaintenanceWindowTask_updateForcesNewResource (27.98s)
--- PASS: TestAccAWSSSMMaintenanceWindowTask_basic (28.54s)
--- PASS: TestAccAWSSSMMaintenanceWindowTask_TaskInvocationAutomationParameters (31.33s)
--- PASS: TestAccAWSSSMMaintenanceWindowTask_TaskInvocationLambdaParameters (31.62s)
--- PASS: TestAccAWSSSMMaintenanceWindowTask_TaskInvocationRunCommandParameters (31.79s)
--- PASS: TestAccAWSSSMMaintenanceWindowTask_TaskInvocationRunCommandParametersCloudWatch (34.95s)
This has been released in version 3.31.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! |
Community Note
Closes #17871
Priority is optional, but it is currently configured in every test configuration which is why this was not found before. To minimize the changes to verify this bug and timebox effort as part of triage, submitting one preferred style test that covers the behavior.
Previously:
Output from acceptance testing in AWS Commercial:
Output from acceptance testing in AWS GovCloud (US):