-
Notifications
You must be signed in to change notification settings - Fork 9.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: aws_autoscaling_group - Provider produced inconsistent final plan #10297
Comments
This is the below error message I am getting after running the This is a bug in the provider, which should be reported in the provider's own
issue tracker.
Error: Provider produced inconsistent final plan
When expanding the plan for module.eks.aws_autoscaling_group.workers[0] to
include new values learned so far during apply, provider "aws" produced an
invalid new value for .initial_lifecycle_hook: planned set element
cty.ObjectVal(map[string]cty.Value{"default_result":cty.UnknownVal(cty.String),
"heartbeat_timeout":cty.UnknownVal(cty.Number),
"lifecycle_transition":cty.UnknownVal(cty.String),
"name":cty.UnknownVal(cty.String),
"notification_metadata":cty.UnknownVal(cty.String),
"notification_target_arn":cty.UnknownVal(cty.String),
"role_arn":cty.UnknownVal(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.
Following versions I am using
|
I am also running into this issue. Any guidance? |
I'm running into this while applying a codebuild resource:
From the following resource:
|
Looks very similar to #10615 Sometimes just running |
This happened to me because I was using both The documentation mentions:
The error is gone if I don't specify the two, but it took a little sleuthing to piece this together. |
I'm getting a similar error applying dynamic canonical ids aqquired from a list in an SSM Param to S3 buckets. Error: Provider produced inconsistent final plan When expanding the plan for This is a bug in the provider, which should be reported in the provider's own I initially got the error using aws provider 2.53, upgraded to 2.56 and still occurs. Edit - Was able to get it working 2 ways:
The dynamic section on the S3 in question that was hashed out:
|
I'm getting the same error in the same resource:
|
I've seen this as well, but I think it's because I'm using a value from However, since Terraform knows that the values won't be known until they're available, it should proceed without throwing the warning. Here's the actual output:
This is the output of
|
I'm receiving the same error as posted above. Also using a value from Error Output:
Versions used:
|
This issue is still happening.... Terraform v0.13.1
|
@fred97855 for the |
I got this after I set 'default_tag' in provider and applied against EKS cluster.
next run showed:
|
Hey y'all 👋 Thank you for taking the time to file this issue and for the continued discussion! Given that there's been a number of AWS provider releases since it was initially filed, can anyone confirm whether you're still experiencing this behavior? |
@justinretzolk I have not seen this problem in quite some time. For the record, we are mostly on |
Hey, i can confirm we're still facing this issue :
Another kind of error that we're facing:
These errors are only happening when we're creating an aws_eks_cluster (which takes roughly 13min), an aws_launch_template and the aws_autoscaling_group on the same run. (3 resources) Once the EKS cluster is created (and the failure of the apply), we can relaunch a terraform apply and create the launch template and the autoscaling group without any issues. By the way : we're using the latest version of the provider ("3.69.0") and terraform version 1.1.0 |
Hi ... seeing what looks like the same issue creating a DDB stream / aws_lambda_event_source_mapping
repeat apply and it works the second time |
I also receiving similar error when deploying ALB and S3 as log bucket. when run it again this will not happend.
AWS Provide version - 4.24.0 |
i also got an error when create iam policy for ec2 role. Error: Provider produced inconsistent final plan when expanding the plan for aws_iam_policy.this[xx] to include new values learned so far during apply, provider "registry.terraform.io/hashicorp/aws" produced an invalid new value for policy: was cty.StringVal(xx), but now cty.StringVal(xx). This is a bug in the provider, which should be reported in the provider's own issue tracker. It was good when ran terraform from local machine but the error occurred when deployed via bamboo pipeline. Any advice will be much appreciated. Versions on my local machine: |
Hi @Aussie007 - After attempting a reproduction based on part of your original configuration, I believe this may have been caused by both Logic was added to properly detect this conflict at plan time in #12927 (v3.0.0), which means the original configuration can't be applied at all: $ terraform plan
data.aws_availability_zones.available: Reading...
data.aws_ami.amzn-ami-minimal-hvm-ebs: Reading...
data.aws_availability_zones.available: Read complete after 0s [id=us-west-2]
data.aws_ami.amzn-ami-minimal-hvm-ebs: Read complete after 0s [id=ami-080838fe2601dc7f2]
╷
│ Error: Conflicting configuration arguments
│
│ with aws_autoscaling_group.example,
│ on main.tf line 51, in resource "aws_autoscaling_group" "example":
│ 51: availability_zones = [data.aws_availability_zones.available.names[0], data.aws_availability_zones.available.names[1], data.aws_availability_zones.available.names[2]]
│
│ "availability_zones": conflicts with vpc_zone_identifier Show Terraform Configurationterraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 4.0"
}
}
}
provider "aws" {}
data "aws_availability_zones" "available" {}
data "aws_ami" "amzn-ami-minimal-hvm-ebs" {
most_recent = true
owners = ["amazon"]
filter {
name = "name"
values = ["amzn-ami-minimal-hvm-*"]
}
filter {
name = "root-device-type"
values = ["ebs"]
}
}
resource "aws_vpc" "example" {
cidr_block = "10.1.0.0/16"
}
resource "aws_subnet" "example1" {
vpc_id = aws_vpc.example.id
cidr_block = "10.1.1.0/24"
}
resource "aws_subnet" "example2" {
vpc_id = aws_vpc.example.id
cidr_block = "10.1.2.0/24"
}
resource "aws_launch_configuration" "example" {
name = "jb-test"
image_id = data.aws_ami.amzn-ami-minimal-hvm-ebs.id
instance_type = "t2.micro"
}
resource "aws_autoscaling_group" "example" {
name_prefix = "jb-test"
availability_zones = [data.aws_availability_zones.available.names[0], data.aws_availability_zones.available.names[1], data.aws_availability_zones.available.names[2]]
desired_capacity = 1
max_size = 1
min_size = 1
health_check_type = "EC2"
health_check_grace_period = 0
vpc_zone_identifier = [aws_subnet.example1.id, aws_subnet.example2.id]
launch_configuration = aws_launch_configuration.example.id
lifecycle {
create_before_destroy = true
}
}
I'll leave this open for now to allow time for a response to the reproduction. However, in the absence of an ongoing issue with the |
For those who have separately commented with "inconsistent final plan" errors (this is an error that can happen with any resource), we'd ask that you please open a new issue with a complete configuration and relevant logs. This will allow us to keep the discussion in this issue limited to the |
With no confirmation of ongoing issues, this will be closed via #12927. As mentioned in the previous comment - for those with "inconsistent final plan" errors on attributes other than |
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. |
Community Note
Terraform Version
v0.12.6
Affected Resource(s)
Expected Behavior
terraform apply should finish with no errors
Actual Behavior
Error: Provider produced inconsistent final plan
When expanding the plan for
module.eks_stack.aws_autoscaling_group.as_node_group to include new values
learned so far during apply, provider "aws" produced an invalid new value for
.availability_zones: was known, but now unknown.
This is a bug in the provider, which should be reported in the provider's own
issue tracker.
Steps to Reproduce
terraform apply
Important Factoids
This completes OK on running a second terraform apply
References
This issue was originally raised in the terraform GitHub, but then following an update of terraform, the error produced mentioned an issue with provider.
I was advised to then open an issue with the provider.
Ref:
hashicorp/terraform#21012
The text was updated successfully, but these errors were encountered: