hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.8k stars 9.15k forks source link

[Bug]: `aws_s3_bucket_website_configuration` `routing_rules` does not detect its change. #27400

Open kv5h opened 1 year ago

kv5h commented 1 year ago

Terraform Core Version

1.3.1

AWS Provider Version

4.36.1

Affected Resource(s)

Expected Behavior

When content of routing_rules is changed, it should be detected.

Actual Behavior

Even when content of routing_rules is changed, plan operation says No changes..

Relevant Error/Panic Output Snippet

No response

Terraform Configuration Files

resource "aws_s3_bucket_website_configuration" "s3" {
  bucket = xxx
  index_document {
    suffix = "index.html"
  }
  error_document {
    key = "error.html"
  }
  routing_rules = file("${path.module}/routing_rules.json")
}

routing_rules.json:

(null)

and

[{
    "Condition": {
        "KeyPrefixEquals": "docs/"
    },
    "Redirect": {
        "ReplaceKeyPrefixWith": ""
    }
}]

Steps to Reproduce

First, create aws_s3_bucket_website_configuration resource with json file below:

[{
    "Condition": {
        "KeyPrefixEquals": "docs/"
    },
    "Redirect": {
        "ReplaceKeyPrefixWith": ""
    }
}]

Then, run plan with json file below (result is No changes.):

(null)

Furthermore, just commenting out the line of routing_rules = file("${path.module}/routing_rules.json") also results in No changes..

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

No response

github-actions[bot] commented 1 year ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue

github-actions[bot] commented 5 days ago

Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label.

If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you!