Skip to content
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

Create Maps API Key with Terraform #128

Open
cmorabito-woolpert opened this issue Apr 4, 2024 · 0 comments
Open

Create Maps API Key with Terraform #128

cmorabito-woolpert opened this issue Apr 4, 2024 · 0 comments

Comments

@cmorabito-woolpert
Copy link
Contributor

API Keys can now be managed with Terraform via API Keys API. This could eliminate the need to manually create an API Key during project setup.

Reference: https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/apikeys_key

  • Enable API Keys API (apikeys.googleapis.com)
  • Define a new google_apikeys_key resource
    • Restrict the key's api_targets to the following:
      • Geocoding API
      • Maps JavaScript API
      • Places API
      • Static Maps API
    • Do not set any other restrictions
  • Store the key_string output value in the existing maps_api_key secret

After defining an google_apikeys_key resource:

  • Remove the manual "Create a Google Maps API Key" step in Project Setup doc
  • Remove the maps_api_key input variable from Terraform and Deployment doc
  • Include upgrade note that after deploying this version, users can delete their previous manually-created key
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant