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/aws_ssm_maintenance_window_task: Fix name/desc validation #7186

Merged
merged 2 commits into from
Feb 14, 2019

Conversation

YakDriver
Copy link
Member

Fixes #6715

Changes proposed in this pull request:

  • r/aws_ssm_maintenance_window_task: Allow name and description arguments to be optional and not fail validation. Test with and without name and description arguments.

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccAWSSSMMaintenanceWindowTask_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -parallel 20 -run=TestAccAWSSSMMaintenanceWindowTask_ -timeout 120m
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
=== RUN   TestAccAWSSSMMaintenanceWindowTask_basic
=== PAUSE TestAccAWSSSMMaintenanceWindowTask_basic
=== RUN   TestAccAWSSSMMaintenanceWindowTask_updateForcesNewResource
=== PAUSE TestAccAWSSSMMaintenanceWindowTask_updateForcesNewResource
=== CONT  TestAccAWSSSMMaintenanceWindowTask_basic
=== CONT  TestAccAWSSSMMaintenanceWindowTask_updateForcesNewResource
--- PASS: TestAccAWSSSMMaintenanceWindowTask_basic (137.73s)
--- PASS: TestAccAWSSSMMaintenanceWindowTask_updateForcesNewResource (167.05s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	167.123s

@ghost ghost added size/XS 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 Jan 17, 2019
@bflad bflad added the bug Addresses a defect in current functionality. label Jan 25, 2019
@Dkochkerian
Copy link

Hi Guys, which provider version is this bug fixed in

@YakDriver
Copy link
Member Author

None, yet.

@YakDriver
Copy link
Member Author

According to the AWS docs:

@bflad bflad added this to the v1.59.0 milestone Feb 14, 2019
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.

LGTM, thanks so much for this fix @YakDriver 🚀

Previous output from updated acceptance testing:

--- FAIL: TestAccAWSSSMMaintenanceWindowTask_basic (158.62s)
    testing.go:538: Step 0 error: Error applying: 1 error occurred:
        	* aws_ssm_maintenance_window_task.target: 1 error occurred:
        	* aws_ssm_maintenance_window_task.target: InvalidParameter: 2 validation error(s) found.
        - minimum field size of 1, RegisterTaskWithMaintenanceWindowInput.Description.
        - minimum field size of 3, RegisterTaskWithMaintenanceWindowInput.Name.





--- FAIL: TestAccAWSSSMMaintenanceWindowTask_updateForcesNewResource (231.62s)
    testing.go:538: Step 0 error: Error applying: 1 error occurred:
        	* aws_ssm_maintenance_window_task.target: 1 error occurred:
        	* aws_ssm_maintenance_window_task.target: InvalidParameter: 2 validation error(s) found.
        - minimum field size of 1, RegisterTaskWithMaintenanceWindowInput.Description.
        - minimum field size of 3, RegisterTaskWithMaintenanceWindowInput.Name.

Output from acceptance testing with updated code:

--- PASS: TestAccAWSSSMMaintenanceWindowTask_updateForcesNewResource (155.51s)
--- PASS: TestAccAWSSSMMaintenanceWindowTask_basic (228.65s)

@bflad bflad merged commit 150a425 into hashicorp:master Feb 14, 2019
bflad added a commit that referenced this pull request Feb 14, 2019
@bflad
Copy link
Contributor

bflad commented Feb 14, 2019

This has been released in version 1.59.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

@YakDriver YakDriver deleted the bad_vladiator branch February 15, 2019 13:06
@Dkochkerian
Copy link

Looks like this issue is back.

Just checked on my end, works with aws provider 2.11.0, but breaks starting 2.12.0.
Please verify and fix.

@AndrewCi
Copy link

Any fix upcoming for issue #4408 ?

@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/XS 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.

resource/aws_ssm_maintenance_window_task: Name/Description validation errors
4 participants