Importing an "aws_cloudfront_distribution" sets "cache_behavior" rather than "ordered_cache_behavior" in the state. #5580
Labels
bug
Addresses a defect in current functionality.
service/cloudfront
Issues and PRs that pertain to the cloudfront service.
Milestone
This issue was originally opened by @james-robson as hashicorp/terraform#18693. It was migrated here as a result of the provider split. The original body of the issue is below.
Terraform Version
Terraform Configuration Files
}
Debug Output
Here is an example plan output which shows the issue:
Crash Output
N/A
Expected Behavior
When importing an "aws_cloudfront_distribution" using:
terraform import aws_cloudfront_distribution.example_distribution <DISTRIBUTION_ID>
the correct values should be saved to the state.
Actual Behavior
The cache behaviour is stored as the deprecated
cache_behavior
rather thanordered_cache_behavior
. This causes the first plan after import to show a change fromcache_behaviour
toordered_cache_behaviour
.Steps to Reproduce
terraform import aws_cloudfront_distribution.example_distribution <DISTRIBUTION_ID>
ordered_cache_behaviour
key and matching values to the import.terraform apply
.The text was updated successfully, but these errors were encountered: