Skip to content

Commit

Permalink
Merge pull request #6747 from quercy/master
Browse files Browse the repository at this point in the history
Add support for aws_ssm_maintenance_window import and documentation
  • Loading branch information
bflad committed Dec 12, 2018
2 parents 49ea8aa + 0ed0007 commit 3303a51
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
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{
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
```

0 comments on commit 3303a51

Please sign in to comment.