-
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
google_project_service_identity's member attribute is not found #19970
Comments
Hi @esn89! I noticed you are assigning the following value for the
This is not an expected value for the
On the other hand you are trying to assign the value of your
I suggest you check this link of terraform registry and read the documentation to understand how these resources work. |
Hi @ggtisc I am simply following this example: https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/project_service_identity#example-usage---service-identity-basic The project service identity does have an attribute called "member": https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/project_service_identity#member Which should give: With this, I can then pass it to: https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/google_project_iam#member/members |
In summary, you must use one of the formats that I mentioned before with its appropriate prefix depending on what type of member you need. I again invite you to review the documentation for a better understanding of how resources and the API work |
I did have a read over that, and I'd assume that "attributes" are things that I can see after Would it be fair to say then, that this would yield some outputs after application? output "storage_service_email" {
value = google_project_service_identity.storage_service_agent.email
}
output "storage_service_member" {
value = google_project_service_identity.storage_service_agent.member
} Furthermore, I dug around for examples and I have even tried using |
Could you share your updated code to confirm that it has the valid format explained in the official documentation? |
I have it done like so: resource "google_project_service_identity" "storage_service_agent" {
provider = google-beta
project = data.google_project.this_project.project_id
service = "storage.googleapis.com"
}
output "storage_service_email" {
value = google_project_service_identity.storage_service_agent.email
}
output "storage_service_member" {
value = google_project_service_identity.storage_service_agent.member
} The outputs do not show anything |
Thanks! I'm going to explain in other words, please read it carefully. According to the documentation I shared a couple of times, the
Note that in each example it needs to be used the corresponding It is not allowed to use a google_project_service_identity as you are trying to use. These are the unique allowed options according to the documentation that I'm sharing again here. |
I'm experiencing the same problem. The Therefore, the example in comment #19970 should work, suggesting a potential issue with the |
Community Note
Terraform Version & Provider Version(s)
Terraform v1.8.3
on linux amd64
Affected Resource(s)
The `google_project_iam_member", when planned always show:
Here is what the plan looks like:
Terraform Configuration
Debug Output
No response
Expected Behavior
It should be planned and applied with the member field populated.
Actual Behavior
member is not found.
Steps to reproduce
terraform apply
Important Factoids
No response
References
No response
The text was updated successfully, but these errors were encountered: