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 task_parameters ordering differences #9364

Merged

Conversation

bflad
Copy link
Contributor

@bflad bflad commented Jul 16, 2019

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" comments, they generate extra noise for pull request followers and do not help prioritize the request

Closes #3218

Release note for CHANGELOG:

* resource/aws_ssm_maintenance_window_task: Prevent `task_parameters` ordering differences

Previously (before code update):

--- FAIL: TestAccAWSSSMMaintenanceWindowTask_TaskParameters (12.95s)
    testing.go:568: Step 0 error: After applying this step, the plan was not empty:

        DIFF:

        UPDATE: aws_ssm_maintenance_window_task.test
...
          task_parameters.#:            "3" => "3"
          task_parameters.0.name:       "commandLine" => "sourceType"
          task_parameters.0.values.#:   "1" => "1"
          task_parameters.0.values.0:   "date" => "s3"
          task_parameters.1.name:       "sourceInfo" => "sourceInfo"
          task_parameters.1.values.#:   "1" => "1"
          task_parameters.1.values.0:   "https://s3.amazonaws.com/bucket" => "https://s3.amazonaws.com/bucket"
          task_parameters.2.name:       "sourceType" => "commandLine"
          task_parameters.2.values.#:   "1" => "1"
          task_parameters.2.values.0:   "s3" => "date"

Output from acceptance testing:

--- PASS: TestAccAWSSSMMaintenanceWindowTask_TaskParameters (18.13s)
--- PASS: TestAccAWSSSMMaintenanceWindowTask_TaskInvocationStepFunctionParameters (126.33s)
--- PASS: TestAccAWSSSMMaintenanceWindowTask_basic (127.14s)
--- PASS: TestAccAWSSSMMaintenanceWindowTask_updateForcesNewResource (157.65s)
--- PASS: TestAccAWSSSMMaintenanceWindowTask_TaskInvocationRunCommandParameters (158.38s)
--- PASS: TestAccAWSSSMMaintenanceWindowTask_TaskInvocationAutomationParameters (178.09s)
--- PASS: TestAccAWSSSMMaintenanceWindowTask_TaskInvocationLambdaParameters (233.40s)

…rdering differences

Reference: #3218

Previously (before code update):

```
--- FAIL: TestAccAWSSSMMaintenanceWindowTask_TaskParameters (12.95s)
    testing.go:568: Step 0 error: After applying this step, the plan was not empty:

        DIFF:

        UPDATE: aws_ssm_maintenance_window_task.test
...
          task_parameters.#:            "3" => "3"
          task_parameters.0.name:       "commandLine" => "sourceType"
          task_parameters.0.values.#:   "1" => "1"
          task_parameters.0.values.0:   "date" => "s3"
          task_parameters.1.name:       "sourceInfo" => "sourceInfo"
          task_parameters.1.values.#:   "1" => "1"
          task_parameters.1.values.0:   "https://s3.amazonaws.com/bucket" => "https://s3.amazonaws.com/bucket"
          task_parameters.2.name:       "sourceType" => "commandLine"
          task_parameters.2.values.#:   "1" => "1"
          task_parameters.2.values.0:   "s3" => "date"
```

Output from acceptance testing:

```
--- PASS: TestAccAWSSSMMaintenanceWindowTask_TaskParameters (18.13s)
--- PASS: TestAccAWSSSMMaintenanceWindowTask_TaskInvocationStepFunctionParameters (126.33s)
--- PASS: TestAccAWSSSMMaintenanceWindowTask_basic (127.14s)
--- PASS: TestAccAWSSSMMaintenanceWindowTask_updateForcesNewResource (157.65s)
--- PASS: TestAccAWSSSMMaintenanceWindowTask_TaskInvocationRunCommandParameters (158.38s)
--- PASS: TestAccAWSSSMMaintenanceWindowTask_TaskInvocationAutomationParameters (178.09s)
--- PASS: TestAccAWSSSMMaintenanceWindowTask_TaskInvocationLambdaParameters (233.40s)
```
@bflad bflad added bug Addresses a defect in current functionality. service/ssm Issues and PRs that pertain to the ssm service. labels Jul 16, 2019
@bflad bflad requested a review from a team July 16, 2019 18:00
@ghost ghost added size/M Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Jul 16, 2019
Copy link
Member

@nywilken nywilken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 👍

--- PASS: TestAccAWSSSMMaintenanceWindowTask_TaskParameters

@nywilken nywilken added this to the v2.20.0 milestone Jul 19, 2019
@nywilken nywilken merged commit 1ae564f into master Jul 19, 2019
@nywilken nywilken deleted the b-aws_ssm_maintenance_window_task-task_parameters-ordering branch July 19, 2019 15:14
nywilken added a commit that referenced this pull request Jul 19, 2019
@ghost
Copy link

ghost commented Nov 2, 2019

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!

@ghost ghost locked and limited conversation to collaborators Nov 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/ssm Issues and PRs that pertain to the ssm service. size/M Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multiple task_parameter blocks in aws_ssm_maintenance_window_task do not apply in idempotent manner
2 participants