-
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
Binary Authorization issue for google-beta provider with terraform version 0.12.14. #5219
Binary Authorization issue for google-beta provider with terraform version 0.12.14. #5219
Comments
@RaniHirave can you post the full debug log? Thanks |
@RaniHirave I can't repo it. Can you run below commands to see what you have?
|
@edwardmedia This is working with command line but when do the same using terraform code and uses a example given in official document I am getting above error. |
I am uses the same example code given at below link. |
Let me know if you need any further information from my end. |
@RaniHirave I'd like you to run two |
I have ran the above two command and output is below. ➜ gcloud kms keyrings describe test-attestor-key-ring --location=global createTime: '2019-12-05T05:44:58.116454932Z' Also I am using 'google-beta' provider |
@RaniHirave I can't repro this issue. Have you enabled |
@RaniHirave @edwardmedia I just ran into the same error while following the same example. The solution for me was to change the crypto key version definition to this:
After adding this and running terraform plan, no errors. |
Now I can repro the issue |
@stephenashank I just ran the same solution that is After adding this and running terraform apply, I am getting below error. Error: Invalid index resource "google_binary_authorization_attestor" "attestor":
The given key does not identify an element in this collection value. Error: Invalid index resource "google_binary_authorization_attestor" "attestor":
The given key does not identify an element in this collection value. |
@RaniHirave If you run terraform apply a second time, it should work. Otherwise I have a work around that works in one apply command on the other issue here: #5552 (comment) |
Hi folks. The fix should be available in the v3.9 releases of the TPG and TPGB providers next week. With it, you should be able to implement the original example without any modifications. |
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! |
Terraform Version
0.12.14
Affected Resource(s)
Binary Authorization Attestor Kms
Terraform Configuration Files
Issue Description
I am getting below error.
Error: Invalid index
resource "google_binary_authorization_attestor" "attestor":
public_key_pem = data.google_kms_crypto_key_version.version.public_key[0].pem
|----------------
| data.google_kms_crypto_key_version.version.public_key is empty list of object
The given key does not identify an element in this collection value.
Error: Invalid index
resource "google_binary_authorization_attestor" "attestor":
signature_algorithm = data.google_kms_crypto_key_version.version.public_key[0].algorithm
|----------------
| data.google_kms_crypto_key_version.version.public_key is empty list of object
The given key does not identify an element in this collection value.
The text was updated successfully, but these errors were encountered: