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: Add end_date, schedule_timezone, and start_date attributes #7040

Merged
merged 1 commit into from
Jan 7, 2019

Conversation

bflad
Copy link
Contributor

@bflad bflad commented Jan 5, 2019

Closes #6962
Closes #6980

Changes:

  • resource/aws_ssm_maintenance_window: Add end_date, schedule_timezone, and start_date attributes
  • resource/aws_ssm_maintenance_window: Refactor to call Read after Create
  • tests/resource/aws_ssm_maintenance_window: Refactor acceptance testing to test all attributes

Output from acceptance testing:

--- PASS: TestAccAWSSSMMaintenanceWindow_disappears (8.55s)
--- PASS: TestAccAWSSSMMaintenanceWindow_basic (14.14s)
--- PASS: TestAccAWSSSMMaintenanceWindow_Enabled (18.78s)
--- PASS: TestAccAWSSSMMaintenanceWindow_multipleUpdates (20.36s)
--- PASS: TestAccAWSSSMMaintenanceWindow_Cutoff (20.94s)
--- PASS: TestAccAWSSSMMaintenanceWindow_Duration (21.10s)
--- PASS: TestAccAWSSSMMaintenanceWindow_EndDate (28.64s)
--- PASS: TestAccAWSSSMMaintenanceWindow_Schedule (30.68s)
--- PASS: TestAccAWSSSMMaintenanceWindow_ScheduleTimezone (31.00s)
--- PASS: TestAccAWSSSMMaintenanceWindow_StartDate (32.63s)

… and start_date attributes

Changes:
* resource/aws_ssm_maintenance_window: Add `end_date`, `schedule_timezone`, and `start_date` attributes
* resource/aws_ssm_maintenance_window: Refactor to call Read after Create
* tests/resource/aws_ssm_maintenance_window: Refactor acceptance testing to test all attributes

Output from acceptance testing:

```
--- PASS: TestAccAWSSSMMaintenanceWindow_disappears (8.55s)
--- PASS: TestAccAWSSSMMaintenanceWindow_basic (14.14s)
--- PASS: TestAccAWSSSMMaintenanceWindow_Enabled (18.78s)
--- PASS: TestAccAWSSSMMaintenanceWindow_multipleUpdates (20.36s)
--- PASS: TestAccAWSSSMMaintenanceWindow_Cutoff (20.94s)
--- PASS: TestAccAWSSSMMaintenanceWindow_Duration (21.10s)
--- PASS: TestAccAWSSSMMaintenanceWindow_EndDate (28.64s)
--- PASS: TestAccAWSSSMMaintenanceWindow_Schedule (30.68s)
--- PASS: TestAccAWSSSMMaintenanceWindow_ScheduleTimezone (31.00s)
--- PASS: TestAccAWSSSMMaintenanceWindow_StartDate (32.63s)
```
@bflad bflad added enhancement Requests to existing resources that expand the functionality or scope. service/ssm Issues and PRs that pertain to the ssm service. labels Jan 5, 2019
@bflad bflad requested a review from a team January 5, 2019 05:36
@ghost ghost added size/XL Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. documentation Introduces or discusses updates to documentation. labels Jan 5, 2019
Copy link
Contributor

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

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

LGTM 👍


"end_date": {
Type: schema.TypeString,
Optional: true,
Copy link
Contributor

Choose a reason for hiding this comment

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

do you want some validation on these checking the date format?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The API parameter says it accepts ISO-8601 extended format, which has some slight differences with RFC3339, that would match our normal date validators. The time.RFC3339 format built into Go's standard library doesn't work with all ISO-8601 formats unfortunately.

It looks like we have ISO-8601 needs in other places where it is inconsistently handled, so I have created a technical debt issue to address all these at once (I would think preferably upstream in the provider SDK), but even a common solution in the provider itself is a good start: #7045


"start_date": {
Type: schema.TypeString,
Optional: true,
Copy link
Contributor

Choose a reason for hiding this comment

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

do you want some validation on these checking the date format?

@bflad bflad added this to the v1.55.0 milestone Jan 7, 2019
@bflad bflad merged commit 6ae3a27 into master Jan 7, 2019
@bflad bflad deleted the f-aws_ssm_maintenance_window-enhancements branch January 7, 2019 13:13
bflad added a commit that referenced this pull request Jan 7, 2019
@bflad
Copy link
Contributor Author

bflad commented Jan 10, 2019

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

@ghost
Copy link

ghost commented Apr 1, 2020

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 Apr 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. enhancement Requests to existing resources that expand the functionality or scope. service/ssm Issues and PRs that pertain to the ssm service. size/XL 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
2 participants