You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Specifying name_prefix instead of name as a parameter to an aws_cloudwatch_event_rule causes the provider to create the resource twice. One of them, however, will be orphaned by Terraform and will not be tracked in the state, leaving the Rule configured with CloudWatch even after a destroy operation until manually deleted by the user.
Terraform Version
Terraform v0.11.7
provider.aws v1.18.0
Affected Resource(s)
aws_cloudwatch_event_rule
Terraform Configuration Files
resource"aws_cloudwatch_event_rule""ebs_backup" {
name_prefix="ebs-backup-"# note: using "name" instead cures the problemdescription="Back up ${var.volume_name} every ${var.frequency}"schedule_expression="rate(${var.frequency})"is_enabled="${var.enable_event_rule}"
}
Expected Behavior
A single CloudWatch Event Rule should be created with the specified name prefix.
Actual Behavior
Two CloudWatch Event Rules are created with the specified name prefix.
Steps to Reproduce
Declare a resource similar to the one above and apply it.
The text was updated successfully, but these errors were encountered:
Summary
Specifying
name_prefix
instead ofname
as a parameter to anaws_cloudwatch_event_rule
causes the provider to create the resource twice. One of them, however, will be orphaned by Terraform and will not be tracked in the state, leaving the Rule configured with CloudWatch even after a destroy operation until manually deleted by the user.Terraform Version
Terraform v0.11.7
Affected Resource(s)
Terraform Configuration Files
Expected Behavior
A single CloudWatch Event Rule should be created with the specified name prefix.
Actual Behavior
Two CloudWatch Event Rules are created with the specified name prefix.
Steps to Reproduce
Declare a resource similar to the one above and apply it.
The text was updated successfully, but these errors were encountered: