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

r/ssm_maintainance_window_target - remove from state if deleted #16478

Merged

Conversation

DrFaust92
Copy link
Collaborator

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" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Closes #16451

Release note for CHANGELOG:

resource_aws_ssm_maintainance_window_target - remove from state if deleted
resource_aws_ssm_maintainance_window_target - add plan time validation to `targets.key`, `targets.values`, `owner_information`.

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccAWSSSMMaintenanceWindowTarget_'
--- PASS: TestAccAWSSSMMaintenanceWindowTarget_validation (9.44s)
--- PASS: TestAccAWSSSMMaintenanceWindowTarget_disappears_window (35.48s)
--- PASS: TestAccAWSSSMMaintenanceWindowTarget_disappears (39.88s)
--- PASS: TestAccAWSSSMMaintenanceWindowTarget_basic (47.08s)
--- PASS: TestAccAWSSSMMaintenanceWindowTarget_noNameOrDescription (47.48s)
--- PASS: TestAccAWSSSMMaintenanceWindowTarget_resourceGroup (47.54s)
--- PASS: TestAccAWSSSMMaintenanceWindowTarget_update (89.70s)

@DrFaust92 DrFaust92 requested a review from a team as a code owner November 28, 2020 19:04
@ghost ghost added size/M Managed by automation to categorize the size of a PR. service/ssm Issues and PRs that pertain to the ssm service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Nov 28, 2020
@DrFaust92 DrFaust92 added the bug Addresses a defect in current functionality. label Nov 28, 2020
@ewbankkit
Copy link
Contributor

Verified acceptance tests:

$ make testacc TEST=./aws TESTARGS='-run=TestAccAWSSSMMaintenanceWindowTarget_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSSSMMaintenanceWindowTarget_ -timeout 120m
=== RUN   TestAccAWSSSMMaintenanceWindowTarget_basic
=== PAUSE TestAccAWSSSMMaintenanceWindowTarget_basic
=== RUN   TestAccAWSSSMMaintenanceWindowTarget_noNameOrDescription
=== PAUSE TestAccAWSSSMMaintenanceWindowTarget_noNameOrDescription
=== RUN   TestAccAWSSSMMaintenanceWindowTarget_validation
=== PAUSE TestAccAWSSSMMaintenanceWindowTarget_validation
=== RUN   TestAccAWSSSMMaintenanceWindowTarget_update
=== PAUSE TestAccAWSSSMMaintenanceWindowTarget_update
=== RUN   TestAccAWSSSMMaintenanceWindowTarget_resourceGroup
=== PAUSE TestAccAWSSSMMaintenanceWindowTarget_resourceGroup
=== RUN   TestAccAWSSSMMaintenanceWindowTarget_disappears
=== PAUSE TestAccAWSSSMMaintenanceWindowTarget_disappears
=== RUN   TestAccAWSSSMMaintenanceWindowTarget_disappears_window
=== PAUSE TestAccAWSSSMMaintenanceWindowTarget_disappears_window
=== CONT  TestAccAWSSSMMaintenanceWindowTarget_basic
=== CONT  TestAccAWSSSMMaintenanceWindowTarget_resourceGroup
=== CONT  TestAccAWSSSMMaintenanceWindowTarget_disappears_window
=== CONT  TestAccAWSSSMMaintenanceWindowTarget_disappears
=== CONT  TestAccAWSSSMMaintenanceWindowTarget_validation
=== CONT  TestAccAWSSSMMaintenanceWindowTarget_update
=== CONT  TestAccAWSSSMMaintenanceWindowTarget_noNameOrDescription
2020/11/29 17:54:10 [WARN] Got error running Terraform: 2020/11/29 17:54:08 [DEBUG] Using modified User-Agent: Terraform/0.12.26 HashiCorp-terraform-exec/0.10.0

Error: invalid value for name (Only alphanumeric characters, hyphens, dots & underscores allowed)

  on config828337723/terraform_plugin_test.tf line 10, in resource "aws_ssm_maintenance_window_target" "test":
  10:   name              = "Bäd Name!@#$%^"


--- PASS: TestAccAWSSSMMaintenanceWindowTarget_validation (5.97s)
--- PASS: TestAccAWSSSMMaintenanceWindowTarget_disappears_window (18.60s)
--- PASS: TestAccAWSSSMMaintenanceWindowTarget_disappears (22.74s)
--- PASS: TestAccAWSSSMMaintenanceWindowTarget_basic (23.73s)
--- PASS: TestAccAWSSSMMaintenanceWindowTarget_resourceGroup (25.95s)
--- PASS: TestAccAWSSSMMaintenanceWindowTarget_noNameOrDescription (26.05s)
--- PASS: TestAccAWSSSMMaintenanceWindowTarget_update (38.57s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	38.641s

Co-authored-by: Kit Ewbank <Kit_Ewbank@hotmail.com>
@bflad bflad self-assigned this Dec 2, 2020
@bflad bflad added this to the v3.20.0 milestone Dec 2, 2020
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

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

Looks good, thank you, @DrFaust92 🚀

Output from acceptance testing:

--- PASS: TestAccAWSSSMMaintenanceWindowTarget_validation (5.21s)
--- PASS: TestAccAWSSSMMaintenanceWindowTarget_disappears_window (14.93s)
--- PASS: TestAccAWSSSMMaintenanceWindowTarget_disappears (17.64s)
--- PASS: TestAccAWSSSMMaintenanceWindowTarget_basic (17.72s)
--- PASS: TestAccAWSSSMMaintenanceWindowTarget_resourceGroup (18.33s)
--- PASS: TestAccAWSSSMMaintenanceWindowTarget_noNameOrDescription (18.74s)
--- PASS: TestAccAWSSSMMaintenanceWindowTarget_update (27.98s)

@bflad bflad merged commit 7e2fb86 into hashicorp:master Dec 2, 2020
bflad added a commit that referenced this pull request Dec 2, 2020
@ghost
Copy link

ghost commented Dec 3, 2020

This has been released in version 3.20.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!

@ghost
Copy link

ghost commented Jan 1, 2021

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 as resolved and limited conversation to collaborators Jan 1, 2021
@DrFaust92 DrFaust92 deleted the r/ssm_maint_win_target_remove_state branch April 15, 2021 10:37
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.

AWS SSM DoesNotExistException for missing Maintenance Window Target
3 participants