Terraform v1.14.8
on darwin_arm64
+ provider registry.terraform.io/hashicorp/aws v6.41.0
+ provider registry.terraform.io/hashicorp/dns v3.5.0
Creating the multi-tenant distribution exits with an error after successfully creating the resource but importing it with a tainted state
╷
│ Error: Provider produced inconsistent result after apply
│
│ When applying changes to aws_cloudfront_multitenant_distribution.content, provider "provider[\"registry.terraform.io/hashicorp/aws\"]" produced an unexpected new value: .origin: planned set
│ element cty.ObjectVal(map[string]cty.Value{"connection_attempts":cty.NumberIntVal(3), "connection_timeout":cty.NumberIntVal(10),
│ "custom_header":cty.ListValEmpty(cty.Object(map[string]cty.Type{"header_name":cty.String, "header_value":cty.String})),
│ "custom_origin_config":cty.ListValEmpty(cty.Object(map[string]cty.Type{"http_port":cty.Number, "https_port":cty.Number, "ip_address_type":cty.String, "origin_keepalive_timeout":cty.Number,
│ "origin_protocol_policy":cty.String, "origin_read_timeout":cty.Number, "origin_ssl_protocols":cty.Set(cty.String)})),
│ "domain_name":cty.StringVal("bucketname-{{region}}.s3.{{s3_region}}.amazonaws.com"), "id":cty.StringVal("shared"), "origin_access_control_id":cty.NullVal(cty.String),
│ "origin_path":cty.StringVal(""), "origin_shield":cty.ListValEmpty(cty.Object(map[string]cty.Type{"enabled":cty.Bool, "origin_shield_region":cty.String})),
│ "response_completion_timeout":cty.NullVal(cty.Number), "vpc_origin_config":cty.ListValEmpty(cty.Object(map[string]cty.Type{"origin_keepalive_timeout":cty.Number, "origin_read_timeout":cty.Number,
│ "vpc_origin_id":cty.String}))}) does not correlate with any element in actual.
│
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.
There are multiple origins pointing to the same s3 bucket with different origin_paths due to how our current setup works.
Terraform and AWS Provider Version
Affected Resource(s) or Data Source(s)
aws_cloudfront_multitenant_distributionExpected Behavior
Create a multi-tenant cloudfront distribution
Actual Behavior
Creating the multi-tenant distribution exits with an error after successfully creating the resource but importing it with a tainted state
Relevant Error/Panic Output
Sample Terraform Configuration
Click to expand configuration
Steps to Reproduce
Provider produced inconsistent result after applyerrorDebug Logging
Click to expand log output
GenAI / LLM Assisted Development
n/a
Important Facts and References
There are multiple origins pointing to the same s3 bucket with different origin_paths due to how our current setup works.
Would you like to implement a fix?
No