Open Ezward opened 4 years ago
Updating from 0.11 to 0.12.17 "solved" it for me
FWIW, I've seen this on v0.12.26
and 2.67
of the AWS provider. I've also seen this same type of error on both listeners as well as the aws_lb
resource. Both had very valid ARNs and were tracked in another Terraform project without issue.
FWIW, I've seen this on
v0.12.26
and2.67
of the AWS provider. I've also seen this same type of error on both listeners as well as theaws_lb
resource. Both had very valid ARNs and were tracked in another Terraform project without issue.
I was able to work around the block with tf import
by using tf state mv -state-out to-move.json
in one project and tf state pull > to-update.json
, and then manually merging the resource in to-move.json
with the state in to-update.json
. Be sure to bump the serial int in to-update.json
. Then overwrite the project state (where you want to import the listener) with tf state push to-update.json
. Obviously, this is manual, error-prone, and could ruin your life, so YMMV.
Hey y'all 👋 Thank you for taking the time to file this issue and for the continued discussion around it! Given that there's been a number of AWS provider releases since the last update, can anyone confirm whether you're still experiencing this behavior?
Hi, I am getting this exact issue with provider version 3.68.0 and terraform v 1.0.10
Having the same error in terraform v1.1.7 and aws provider v4.2.0
I found the issue. After running apply with TF_LOG=DEBUG
i noticed that i was getting 403 response with the error
xxxxx is not authorized to perform: elasticloadbalancing:AddTags on resource
I removed tags = {Environment = "production"}
from my aws_lb
resource block and now it works
The error was misleading.
I agree with nullbytesoftware. The error is misleading. After running with TF_LOG=DEBUG I saw the message
HTTP/1.1 403 Forbidden ...
<Message>xxx is not authorized to perform: elasticloadbalancing:RemoveTags
After manually removing the ALB tags and running apply it worked as expected.
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 trying to import an existing alb listener into my terraform state. I've successfully initialized the state. I can plan against this state and it looks correct. I need import that alb listener because is already exists (my plan shows it being added, but that fails because it already exists). In hte code below I've obfuscated my account id.
I can describe the existing alb listener using the aws cli and that arn:
I use a single provider. I use a single region. I use two aws accounts, but not in the same state. I know this state is clearly pointing to the correct backend based on the output of plan.
Community Note
Terraform Version
Affected Resource(s)
Terraform Configuration Files
I've tried with this:
and with this:
Debug Output
Expected Behavior
It should import the aws_alb_listener into the state.
Actual Behavior
Tt did not import the aws_alb_listener into the state, but rather said the arn was invalid (which it is not), Set Debug Output section
Steps to Reproduce
Here, substitute a valid alb arn.
terraform import aws_alb_listener.server_80 "arn:aws:elasticloadbalancing:us-west-2:XXXXXXXXX:listener/app/june-ota-server-prod/200823d67612a997/43d40dbedf34579b"
0000