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

resource/aws_ssm_maintenance_window_task: Prevent ValidationException error on update when priority is not set or 0 #17885

Merged
merged 3 commits into from
Mar 4, 2021

Commits on Mar 2, 2021

  1. resource/aws_ssm_maintenance_window_task: Prevent ValidationException…

    … 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)
    ```
    bflad committed Mar 2, 2021
    Configuration menu
    Copy the full SHA
    1b224f5 View commit details
    Browse the repository at this point in the history
  2. Update CHANGELOG for #17885

    bflad committed Mar 2, 2021
    Configuration menu
    Copy the full SHA
    f5e6c3d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    579b16b View commit details
    Browse the repository at this point in the history