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

Add support for aws_ssm_maintenance_window import and documentation #6747

Merged
merged 2 commits into from
Dec 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions aws/resource_aws_ssm_maintenance_window.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ func resourceAwsSsmMaintenanceWindow() *schema.Resource {
Read: resourceAwsSsmMaintenanceWindowRead,
Update: resourceAwsSsmMaintenanceWindowUpdate,
Delete: resourceAwsSsmMaintenanceWindowDelete,
Importer: &schema.ResourceImporter{
quercy marked this conversation as resolved.
Show resolved Hide resolved
State: schema.ImportStatePassthrough,
},

Schema: map[string]*schema.Schema{
"name": {
Expand Down
5 changes: 5 additions & 0 deletions aws/resource_aws_ssm_maintenance_window_target_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ func TestAccAWSSSMMaintenanceWindowTarget_basic(t *testing.T) {
resource.TestCheckResourceAttr("aws_ssm_maintenance_window_target.target", "targets.1.values.1", "acceptance_test2"),
),
},
{
ResourceName: "aws_ssm_maintenance_window.foo",
ImportState: true,
ImportStateVerify: true,
},
},
})
}
Expand Down
6 changes: 6 additions & 0 deletions website/docs/r/ssm_maintenance_window.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,9 @@ The following arguments are supported:
In addition to all arguments above, the following attributes are exported:

* `id` - The ID of the maintenance window.

## Import
SSM Maintenance Windows can be imported using the `maintenance window id`, e.g.
```
$ terraform import aws_ssm_maintenance_window.imported-window mw-0123456789
```