v0.12.9
1st version:
resource "aws_iot_topic_rule" "rule" {
name = "test"
enabled = true
sql = "SELECT * FROM 'topic/test'"
sql_version = "2015-10-08"
}
2nd version:
resource "aws_iot_topic_rule" "rule" {
name = "testx"
enabled = true
sql = "SELECT * FROM 'topic/test'"
sql_version = "2015-10-08"
}
Terraform should recreate the iot topic rule resource. Aws do not accept name changing on iot topic rule.
The plan shows the update in place, instead of recreating.
aws_iot_topic_rule.rule: Refreshing state... [id=test]
------------------------------------------------------------------------
An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
~ update in-place
Terraform will perform the following actions:
# aws_iot_topic_rule.rule will be updated in-place
~ resource "aws_iot_topic_rule" "rule" {
arn = "arn:aws:iot:us-west-2:718908640141:rule/test"
enabled = true
id = "test"
~ name = "test" -> "testx"
sql = "SELECT * FROM 'topic/test'"
sql_version = "2015-10-08"
}
Plan: 0 to add, 1 to change, 0 to destroy.
terraform applyterraform applyThe following error will occur:
aws_iot_topic_rule.rule: Modifying... [id=test]
Error: UnauthorizedException: Access to topic rule 'testx' was denied
status code: 401, request id: b3ee192e-ae35-4505-8286-b842797db6f4
on topic.tf line 1, in resource "aws_iot_topic_rule" "rule":
1: resource "aws_iot_topic_rule" "rule" {
The fix for this has been merged and will release with version 2.46.0 of the Terraform AWS Provider, Thursday next week. Thanks to @fabiomatavelli for the implementation. 👍
This has been released in version 2.46.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.
For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks!
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!