Skip to content

Commit

Permalink
Include testing copy_tag false and true
Browse files Browse the repository at this point in the history
Update documention to include copy_tag option
  • Loading branch information
Chris Greatbanks committed Nov 13, 2018
1 parent 7dfc47c commit a1437ca
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 3 additions & 2 deletions aws/resource_aws_dlm_lifecycle_policy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func TestAccAWSDlmLifecyclePolicy_Full(t *testing.T) {
resource.TestCheckResourceAttr(resourceName, "policy_details.0.schedule.0.create_rule.0.times.0", "21:42"),
resource.TestCheckResourceAttr(resourceName, "policy_details.0.schedule.0.retain_rule.0.count", "10"),
resource.TestCheckResourceAttr(resourceName, "policy_details.0.schedule.0.tags_to_add.tf-acc-test-added", "full"),
resource.TestCheckResourceAttr(resourceName, "policy_details.0.schedule.0.copy_tags", "true"),
resource.TestCheckResourceAttr(resourceName, "policy_details.0.schedule.0.copy_tags", "false"),
resource.TestCheckResourceAttr(resourceName, "policy_details.0.target_tags.tf-acc-test", "full"),
),
},
Expand Down Expand Up @@ -243,7 +243,7 @@ resource "aws_dlm_lifecycle_policy" "full" {
tf-acc-test-added = "full"
}
copy_tags = true
copy_tags = false
}
target_tags {
Expand Down Expand Up @@ -300,6 +300,7 @@ resource "aws_dlm_lifecycle_policy" "full" {
tags_to_add {
tf-acc-test-added = "full-updated"
}
copy_tags = true
}
Expand Down
3 changes: 3 additions & 0 deletions website/docs/r/dlm_lifecycle_policy.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ resource "aws_dlm_lifecycle_policy" "example" {
tags_to_add {
SnapshotCreator = "DLM"
}
copy_tags = false
}
target_tags {
Expand Down Expand Up @@ -85,6 +87,7 @@ The following arguments are supported:

#### Schedule arguments

* `copy_tags` - (Optional) Copy all user-defined tags on a source volume to snapshots of the volume created by this policy.
* `create_rule` - (Required) See the [`create_rule`](#create-rule-arguments) block. Max of 1 per schedule.
* `name` - (Required) A name for the schedule.
* `retain_rule` - (Required) See the [`create_rule`](#create-rule-arguments) block. Max of 1 per schedule.
Expand Down

0 comments on commit a1437ca

Please sign in to comment.