Open sarth6 opened 1 month ago
It looks like there isn't an API JSON guide for the google_apikeys_key resource, just this. This is necessary to confirm the scope and limitations of the allowed_referrers argument for this issue as well as its usage example.
Community Note
Terraform Version & Provider Version(s)
Terraform v1.9.4 on x86-64
Affected Resource(s)
google_apikeys_key
Terraform Configuration
Debug Output
No response
Expected Behavior
I should be able to use the maps API from any subdomain of example.com.
Actual Behavior
I can't use the maps API from any subdomain of example.com. Either the docs are wrong or the resource is bugged, the allowed_referrers field is not a regex currently (maybe it used to be?). Instead it's just a string with globing, as per the docs on the UI in GCP (Credentials Page):
In the end, this works:
Steps to reproduce
terraform apply
Important Factoids
No response
References
https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/apikeys_key
b/359945934