-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow brand new setup for google_developer_connect_connection (#12493)
- Loading branch information
1 parent
64d0948
commit 2c08e3c
Showing
4 changed files
with
61 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
mmv1/templates/terraform/examples/developer_connect_connection_new.tf.tmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
resource "google_developer_connect_connection" "{{$.PrimaryResourceId}}" { | ||
provider = google-beta | ||
location = "us-central1" | ||
connection_id = "{{index $.Vars "connection_name"}}" | ||
|
||
github_config { | ||
github_app = "FIREBASE" | ||
} | ||
|
||
depends_on = [google_project_iam_member.devconnect-secret] | ||
} | ||
|
||
output "next_steps" { | ||
description = "Follow the action_uri if present to continue setup" | ||
value = google_developer_connect_connection.{{$.PrimaryResourceId}}.installation_state | ||
} | ||
|
||
# Setup permissions. Only needed once per project | ||
resource "google_project_service_identity" "devconnect-p4sa" { | ||
provider = google-beta | ||
|
||
service = "developerconnect.googleapis.com" | ||
} | ||
|
||
resource "google_project_iam_member" "devconnect-secret" { | ||
provider = google-beta | ||
|
||
project = "{{index $.TestEnvVars "project"}}" | ||
role = "roles/secretmanager.admin" | ||
member = google_project_service_identity.devconnect-p4sa.member | ||
} |