-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
S3 bucket Error: insufficient items for attribute "destination"; must have at least 1 #9048
Comments
Not sure if it is a generic error in the AWS provider or depending on the resource but the same happens with aws_cloudwatch_alarm resource:
Only happens after upgrading to terraform 0.12. |
I'm also seeing this on a resource "google_compute_region_instance_group_manager" "this" {
provider = "google-beta"
name = "${var.id}-${var.name}-instance-group"
base_instance_name = "${var.id}-${var.name}"
region = var.region
distribution_policy_zones = data.google_compute_zones.this.names
target_size = var.instance_count
wait_for_instances = true
version {
instance_template = google_compute_instance_template.this.self_link
name = "latest"
}
named_port {
name = "ui"
port = 6688
}
} Results in:
Terraform Considering the same error across 3 different resources, is this a generic issue with 0.12+? |
Hi, I noticed that deleting the .tfstate file allows |
I'm seeing the same with 0.12.4, but only when I forget to do this for beta resources: terraform import -provider=google-beta |
I was experiencing a similar issue with the resource
I worked around it by manually deleting those |
Any update on this and related issues of "insufficient items for attribute xyz"? This is making upgrading to TF 0.12 impossible. |
I have recently encountered this as well. It works in some workspaces but not others when they are functionally identical with their s3 resources. It is in a module and I have several buckers so I cannot determine if there is a specific bucket configuration associated with this. Reverting to previously known good states does not resolve this. This unfortunately has blocked all further terraform edits or applications. |
There are some upstream Terraform issues currently being fixed to cover this (e.g. hashicorp/terraform#22478). When there is an appropriate Terraform CLI or Terraform AWS Provider release that covers this issue, more information will be added here. |
We're having the same issue. Is there a workaround that we can use until this is fixed? |
+1 |
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! |
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
I have two buckets and each one has a replica. I have imported these buckets into a state. Now when I issue terraform plan to update buckets I get the mentioned error.
The error message doesn't make sense. The reported line of error changes.
I don't know what is wrong, but when I remove the bucket the error mentions, plan is generated succesfully. But the configuration for the other bucket is just copy and paste of the other one.
Terraform Version
Terraform v0.12.2
Affected Resource(s)
Terraform Configuration Files
Debug Output
https://gist.github.com/jira-zz/1d9fecf3de5c877bbb41a7f37e7a8a6d
Expected Behavior
terraform should generate a plan
Actual Behavior
Error: insufficient items for attribute "destination"; must have at least 1
on main.tf line 142, in resource "aws_s3_bucket" "ps-db-backups":
142: server_side_encryption_configuration {
Steps to Reproduce
terraform plan
The text was updated successfully, but these errors were encountered: