existing imagebuilder distribution can be updated in-place
Actual Behavior
terraform apply exits with error "Provider produced inconsistent final plan"
Relevant Error/Panic Output Snippet
╷
│ Error: Provider produced inconsistent final plan
│
│ When expanding the plan for
│ aws_imagebuilder_distribution_configuration.magento-web to include new
│ values learned so far during apply, provider
│ "registry.terraform.io/hashicorp/aws" produced an invalid new value for
│ .distribution: planned set element
│ cty.ObjectVal(map[string]cty.Value{"ami_distribution_configuration":cty.ListValEmpty(cty.Object(map[string]cty.Type{"ami_tags":cty.Map(cty.String),
│ "description":cty.String, "kms_key_id":cty.String,
│ "launch_permission":cty.List(cty.Object(map[string]cty.Type{"organization_arns":cty.Set(cty.String),
│ "organizational_unit_arns":cty.Set(cty.String),
│ "user_groups":cty.Set(cty.String), "user_ids":cty.Set(cty.String)})),
│ "name":cty.String, "target_account_ids":cty.Set(cty.String)})),
│ "container_distribution_configuration":cty.ListValEmpty(cty.Object(map[string]cty.Type{"container_tags":cty.Set(cty.String),
│ "description":cty.String,
│ "target_repository":cty.List(cty.Object(map[string]cty.Type{"repository_name":cty.String,
│ "service":cty.String}))})),
│ "fast_launch_configuration":cty.SetValEmpty(cty.Object(map[string]cty.Type{"account_id":cty.String,
│ "enabled":cty.Bool,
│ "launch_template":cty.List(cty.Object(map[string]cty.Type{"launch_template_id":cty.String,
│ "launch_template_name":cty.String, "launch_template_version":cty.String})),
│ "max_parallel_launches":cty.Number,
│ "snapshot_configuration":cty.List(cty.Object(map[string]cty.Type{"target_resource_count":cty.Number}))})),
│ "launch_template_configuration":cty.SetValEmpty(cty.Object(map[string]cty.Type{"account_id":cty.String,
│ "default":cty.Bool, "launch_template_id":cty.String})),
│ "license_configuration_arns":cty.SetValEmpty(cty.String),
│ "region":cty.NullVal(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.
Change terraform file so that an in-place update will be performed
Run terraform apply
Debug Output
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
~ update in-place
-/+ destroy and then create replacement
Terraform will perform the following actions:
aws_imagebuilder_distribution_configuration.magento-web will be updated in-place
~ resource "aws_imagebuilder_distribution_configuration" "magento-web" {
id = "arn:aws:imagebuilder:eu-west-1:330322201868:distribution-configuration/magento"
name = "magento"
tags = {}
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
Volunteering to Work on This Issue
If you are interested in working on this issue, please leave a comment.
If this would be your first contribution, please review the contribution guide.
Terraform Core Version
1.3.4
AWS Provider Version
4.39.0
Affected Resource(s)
Expected Behavior
existing imagebuilder distribution can be updated in-place
Actual Behavior
terraform apply exits with error "Provider produced inconsistent final plan"
Relevant Error/Panic Output Snippet
Terraform Configuration Files
resource "aws_imagebuilder_distribution_configuration" "magento-web" { name = "magento" tags = {} tags_all = {}
distribution { license_configuration_arns = [] region = var.aws_region
} }
Steps to Reproduce
Debug Output
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols: ~ update in-place -/+ destroy and then create replacement
Terraform will perform the following actions:
aws_imagebuilder_distribution_configuration.magento-web will be updated in-place
~ resource "aws_imagebuilder_distribution_configuration" "magento-web" { id = "arn:aws:imagebuilder:eu-west-1:330322201868:distribution-configuration/magento" name = "magento" tags = {}
(3 unchanged attributes hidden)
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
No