hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.84k stars 9.19k forks source link

fix: update approve_after_days validation in ssm patch baseline resource #39949

Closed stefanfreitag closed 2 weeks ago

stefanfreitag commented 2 weeks ago

Description

As described in #39917 the validation range for the approve_after_days setting is not matching the range described in the official docs (see References section).

The PR updates the range from 0-100 to 0-360. In addition, the documentation for the resource is updated.

Relations

Closes #39917

References

Output from Acceptance Testing

❯ make testacc TESTS=TestAccSSMPatchBaseline PKG=ssm
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.2 test ./internal/service/ssm/... -v -count 1 -parallel 5 -run='TestAccSSMPatchBaseline'  -timeout 360m
2024/10/30 19:58:29 Initializing Terraform AWS Provider...
=== RUN   TestAccSSMPatchBaselineDataSource_existingBaseline
=== PAUSE TestAccSSMPatchBaselineDataSource_existingBaseline
=== RUN   TestAccSSMPatchBaselineDataSource_newBaseline
=== PAUSE TestAccSSMPatchBaselineDataSource_newBaseline
=== RUN   TestAccSSMPatchBaseline_tags
=== PAUSE TestAccSSMPatchBaseline_tags
=== RUN   TestAccSSMPatchBaseline_tags_null
=== PAUSE TestAccSSMPatchBaseline_tags_null
=== RUN   TestAccSSMPatchBaseline_tags_EmptyMap
=== PAUSE TestAccSSMPatchBaseline_tags_EmptyMap
=== RUN   TestAccSSMPatchBaseline_tags_AddOnUpdate
=== PAUSE TestAccSSMPatchBaseline_tags_AddOnUpdate
=== RUN   TestAccSSMPatchBaseline_tags_EmptyTag_OnCreate
=== PAUSE TestAccSSMPatchBaseline_tags_EmptyTag_OnCreate
=== RUN   TestAccSSMPatchBaseline_tags_EmptyTag_OnUpdate_Add
=== PAUSE TestAccSSMPatchBaseline_tags_EmptyTag_OnUpdate_Add
=== RUN   TestAccSSMPatchBaseline_tags_EmptyTag_OnUpdate_Replace
=== PAUSE TestAccSSMPatchBaseline_tags_EmptyTag_OnUpdate_Replace
=== RUN   TestAccSSMPatchBaseline_tags_DefaultTags_providerOnly
=== PAUSE TestAccSSMPatchBaseline_tags_DefaultTags_providerOnly
=== RUN   TestAccSSMPatchBaseline_tags_DefaultTags_nonOverlapping
=== PAUSE TestAccSSMPatchBaseline_tags_DefaultTags_nonOverlapping
=== RUN   TestAccSSMPatchBaseline_tags_DefaultTags_overlapping
=== PAUSE TestAccSSMPatchBaseline_tags_DefaultTags_overlapping
=== RUN   TestAccSSMPatchBaseline_tags_DefaultTags_updateToProviderOnly
=== PAUSE TestAccSSMPatchBaseline_tags_DefaultTags_updateToProviderOnly
=== RUN   TestAccSSMPatchBaseline_tags_DefaultTags_updateToResourceOnly
=== PAUSE TestAccSSMPatchBaseline_tags_DefaultTags_updateToResourceOnly
=== RUN   TestAccSSMPatchBaseline_tags_DefaultTags_emptyResourceTag
=== PAUSE TestAccSSMPatchBaseline_tags_DefaultTags_emptyResourceTag
=== RUN   TestAccSSMPatchBaseline_tags_DefaultTags_emptyProviderOnlyTag
=== PAUSE TestAccSSMPatchBaseline_tags_DefaultTags_emptyProviderOnlyTag
=== RUN   TestAccSSMPatchBaseline_tags_DefaultTags_nullOverlappingResourceTag
=== PAUSE TestAccSSMPatchBaseline_tags_DefaultTags_nullOverlappingResourceTag
=== RUN   TestAccSSMPatchBaseline_tags_DefaultTags_nullNonOverlappingResourceTag
=== PAUSE TestAccSSMPatchBaseline_tags_DefaultTags_nullNonOverlappingResourceTag
=== RUN   TestAccSSMPatchBaseline_tags_ComputedTag_OnCreate
=== PAUSE TestAccSSMPatchBaseline_tags_ComputedTag_OnCreate
=== RUN   TestAccSSMPatchBaseline_tags_ComputedTag_OnUpdate_Add
=== PAUSE TestAccSSMPatchBaseline_tags_ComputedTag_OnUpdate_Add
=== RUN   TestAccSSMPatchBaseline_tags_ComputedTag_OnUpdate_Replace
=== PAUSE TestAccSSMPatchBaseline_tags_ComputedTag_OnUpdate_Replace
=== RUN   TestAccSSMPatchBaseline_tags_IgnoreTags_Overlap_DefaultTag
=== PAUSE TestAccSSMPatchBaseline_tags_IgnoreTags_Overlap_DefaultTag
=== RUN   TestAccSSMPatchBaseline_tags_IgnoreTags_Overlap_ResourceTag
=== PAUSE TestAccSSMPatchBaseline_tags_IgnoreTags_Overlap_ResourceTag
=== RUN   TestAccSSMPatchBaseline_basic
=== PAUSE TestAccSSMPatchBaseline_basic
=== RUN   TestAccSSMPatchBaseline_disappears
=== PAUSE TestAccSSMPatchBaseline_disappears
=== RUN   TestAccSSMPatchBaseline_operatingSystem
=== PAUSE TestAccSSMPatchBaseline_operatingSystem
=== RUN   TestAccSSMPatchBaseline_approveUntilDateParam
=== PAUSE TestAccSSMPatchBaseline_approveUntilDateParam
=== RUN   TestAccSSMPatchBaseline_approveAfterDaysParam
=== PAUSE TestAccSSMPatchBaseline_approveAfterDaysParam
=== RUN   TestAccSSMPatchBaseline_sources
=== PAUSE TestAccSSMPatchBaseline_sources
=== RUN   TestAccSSMPatchBaseline_approvedPatchesNonSec
=== PAUSE TestAccSSMPatchBaseline_approvedPatchesNonSec
=== RUN   TestAccSSMPatchBaseline_approvalRuleEmpty
=== PAUSE TestAccSSMPatchBaseline_approvalRuleEmpty
=== RUN   TestAccSSMPatchBaseline_rejectPatchesAction
=== PAUSE TestAccSSMPatchBaseline_rejectPatchesAction
=== CONT  TestAccSSMPatchBaselineDataSource_existingBaseline
=== CONT  TestAccSSMPatchBaseline_tags_DefaultTags_nullOverlappingResourceTag
=== CONT  TestAccSSMPatchBaseline_rejectPatchesAction
=== CONT  TestAccSSMPatchBaseline_approvalRuleEmpty
=== CONT  TestAccSSMPatchBaseline_approvedPatchesNonSec
--- PASS: TestAccSSMPatchBaselineDataSource_existingBaseline (26.55s)
=== CONT  TestAccSSMPatchBaseline_sources
--- PASS: TestAccSSMPatchBaseline_rejectPatchesAction (40.97s)
=== CONT  TestAccSSMPatchBaseline_approveAfterDaysParam
--- PASS: TestAccSSMPatchBaseline_approvedPatchesNonSec (41.16s)
=== CONT  TestAccSSMPatchBaseline_approveUntilDateParam
--- PASS: TestAccSSMPatchBaseline_tags_DefaultTags_nullOverlappingResourceTag (44.28s)
=== CONT  TestAccSSMPatchBaseline_operatingSystem
--- PASS: TestAccSSMPatchBaseline_approvalRuleEmpty (66.80s)
=== CONT  TestAccSSMPatchBaseline_disappears
--- PASS: TestAccSSMPatchBaseline_approveAfterDaysParam (27.67s)
=== CONT  TestAccSSMPatchBaseline_basic
--- PASS: TestAccSSMPatchBaseline_sources (57.52s)
=== CONT  TestAccSSMPatchBaseline_tags_IgnoreTags_Overlap_ResourceTag
--- PASS: TestAccSSMPatchBaseline_disappears (30.80s)
=== CONT  TestAccSSMPatchBaseline_tags_IgnoreTags_Overlap_DefaultTag
--- PASS: TestAccSSMPatchBaseline_approveUntilDateParam (57.90s)
=== CONT  TestAccSSMPatchBaseline_tags_ComputedTag_OnUpdate_Replace
--- PASS: TestAccSSMPatchBaseline_operatingSystem (58.78s)
=== CONT  TestAccSSMPatchBaseline_tags_ComputedTag_OnUpdate_Add
--- PASS: TestAccSSMPatchBaseline_basic (63.93s)
=== CONT  TestAccSSMPatchBaseline_tags_ComputedTag_OnCreate
--- PASS: TestAccSSMPatchBaseline_tags_ComputedTag_OnUpdate_Replace (71.66s)
=== CONT  TestAccSSMPatchBaseline_tags_DefaultTags_nullNonOverlappingResourceTag
--- PASS: TestAccSSMPatchBaseline_tags_ComputedTag_OnUpdate_Add (71.36s)
=== CONT  TestAccSSMPatchBaseline_tags_EmptyTag_OnUpdate_Replace
--- PASS: TestAccSSMPatchBaseline_tags_ComputedTag_OnCreate (47.84s)
=== CONT  TestAccSSMPatchBaseline_tags_DefaultTags_emptyProviderOnlyTag
--- PASS: TestAccSSMPatchBaseline_tags_IgnoreTags_Overlap_DefaultTag (84.05s)
=== CONT  TestAccSSMPatchBaseline_tags_DefaultTags_emptyResourceTag
--- PASS: TestAccSSMPatchBaseline_tags_IgnoreTags_Overlap_ResourceTag (101.62s)
=== CONT  TestAccSSMPatchBaseline_tags_DefaultTags_updateToResourceOnly
--- PASS: TestAccSSMPatchBaseline_tags_DefaultTags_nullNonOverlappingResourceTag (42.52s)
=== CONT  TestAccSSMPatchBaseline_tags_DefaultTags_updateToProviderOnly
--- PASS: TestAccSSMPatchBaseline_tags_DefaultTags_emptyProviderOnlyTag (40.61s)
=== CONT  TestAccSSMPatchBaseline_tags_DefaultTags_overlapping
--- PASS: TestAccSSMPatchBaseline_tags_DefaultTags_emptyResourceTag (41.04s)
=== CONT  TestAccSSMPatchBaseline_tags_DefaultTags_nonOverlapping
--- PASS: TestAccSSMPatchBaseline_tags_EmptyTag_OnUpdate_Replace (71.59s)
=== CONT  TestAccSSMPatchBaseline_tags_DefaultTags_providerOnly
--- PASS: TestAccSSMPatchBaseline_tags_DefaultTags_updateToResourceOnly (65.44s)
=== CONT  TestAccSSMPatchBaseline_tags_EmptyMap
--- PASS: TestAccSSMPatchBaseline_tags_DefaultTags_updateToProviderOnly (68.72s)
=== CONT  TestAccSSMPatchBaseline_tags_EmptyTag_OnUpdate_Add
--- PASS: TestAccSSMPatchBaseline_tags_EmptyMap (52.11s)
=== CONT  TestAccSSMPatchBaseline_tags_EmptyTag_OnCreate
--- PASS: TestAccSSMPatchBaseline_tags_DefaultTags_overlapping (113.59s)
=== CONT  TestAccSSMPatchBaseline_tags_AddOnUpdate
--- PASS: TestAccSSMPatchBaseline_tags_DefaultTags_nonOverlapping (115.61s)
=== CONT  TestAccSSMPatchBaseline_tags
--- PASS: TestAccSSMPatchBaseline_tags_EmptyTag_OnCreate (77.39s)
=== CONT  TestAccSSMPatchBaseline_tags_null
--- PASS: TestAccSSMPatchBaseline_tags_EmptyTag_OnUpdate_Add (103.65s)
=== CONT  TestAccSSMPatchBaselineDataSource_newBaseline
--- PASS: TestAccSSMPatchBaseline_tags_DefaultTags_providerOnly (149.91s)
--- PASS: TestAccSSMPatchBaseline_tags_AddOnUpdate (69.21s)
--- PASS: TestAccSSMPatchBaselineDataSource_newBaseline (29.46s)
--- PASS: TestAccSSMPatchBaseline_tags_null (46.43s)
--- PASS: TestAccSSMPatchBaseline_tags (132.69s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/ssm        471.222s
github-actions[bot] commented 2 weeks ago

Community Note

Voting for Prioritization

For Submitters

jar-b commented 2 weeks ago

Thanks for your contribution, @stefanfreitag! 👍

stefanfreitag commented 2 weeks ago

Thanks for updating the PR :) Always good to see how/ where to improve!

github-actions[bot] commented 2 weeks ago

This functionality has been released in v5.74.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. Thank you!