-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
terraform-plan with a google_project_iam_custom_role resource with an ALPHA stage incorrectly reports the stage as empty #1801
Comments
This seems to be a problem with the Google IAM API itself; although it's documented to return the stage, it currently isn't being returned in the JSON response. Doesn't seem to be a bug with the Terraform provider, but also unsure where this can be escalated to within Google 🙁 |
Until the API issue is resolved we've had to ignore the change:
Not ideal but keeps our plans clean in the meantime 😞 |
@danawillow was an issue filed with the upstream project? |
@sudoforge Seems like not. This one is still continuing… |
Hey all, I just took a look at the API docs and it looks like this is documented behavior, so not actually an upstream bug: https://cloud.google.com/iam/reference/rest/v1/projects.roles:
We should be able to fix this without too much effort on our end with a DiffSuppressFunc. Marking this as a bug instead of upstream so it gets handled appropriately. |
Interesting. I'd still expect the stage field to be included - the conditional omission is weird - but I digress. Using |
Fixed in #2370. |
add diffsuppress for iam custom role stage. fixes TPG hashicorp#1801
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. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks! |
Summary:
I have several
google_project_iam_custom_role
resources. Roles with a stage ofALPHA
are not handled correctly when runningterraform plan
.Terraform Version
Affected Resource(s)
Terraform Configuration Files
I've included the relevant code below.
Debug Output
There's nothing particularly useful shown in the debug log, and lots of resource names to redact, so I'm choosing not to include this publicly. If it is needed in order to determine the issue, I can provide it privately.
Expected Behavior
Given the above resource block, the expected behavior is no changes after importing the matching resource.
Actual Behavior
Note the empty
stage
value when runningterraform plan
. This occurs when the state has a value ofALPHA
for thestage
property, no matter what value it is being changed to.Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform plan
.Important Factoids
ALPHA
, as in the above example,terraform plan
andterraform apply
will always show this bug.References
N/A
The text was updated successfully, but these errors were encountered: