-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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_iap_web_backend_service_iam_policy parsing forward slash in web_backend_service #8902
Comments
Apologies if this behavior is as intended and isn't actually a bug! I couldn't find documentation on the legal formatting of |
@justin-yan you might want to use a reference to the backendservice (resource or data source) instead. Here is an example that you might want to take look. resource "google_iap_web_backend_service_iam_policy" "policy" {
project = "myprojectname"
web_backend_service = data.google_compute_backend_service.baz.name
#web_backend_service = google_compute_backend_service.default.name
policy_data = data.google_iam_policy.policy.policy_data
}
data "google_compute_backend_service" "baz" {
name = "foobar"
}
resource "google_compute_backend_service" "default" {
name = "backend-service"
health_checks = [tolist(data.google_compute_backend_service.baz.health_checks)[0]]
} |
Thanks for the suggestion! I tried adding the following:
But I get
The backend services are not themselves managed by terraform, and I'm not entirely sure how to introspect the values produced by the
|
Deepest apologies: After taking a closer look at the documentation for the This is totally user error/inexperience on my part - thanks for taking the time to look at the issue! |
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! |
Community Note
modular-magician
user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned tohashibot
, a community member has claimed the issue already.Terraform Version
Affected Resource(s)
google_iap_web_backend_service_iam_policy
Terraform Configuration Files
I've changed the projectname and the member domain, but this otherwise is the config we're using.
Expected Behavior
terraform apply
should create an IAP permission policy for the backendservicedefault/sps
.Actual Behavior
I get the following error:
It looks like including a forward slash in
web_backend_service
(e.g.default/sps
) results in the project being set todefault
instead ofmyprojectname
. Removing the forward slash, with saydefault-sps
, seems to resolve the project and service name correctly.Steps to Reproduce
terraform apply
References
namespace/servicename
) so I would like to manage the IAP permissions with this terraform config.The text was updated successfully, but these errors were encountered: