-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for Google Identity-Aware Proxy Provider
Fixes #2
- Loading branch information
1 parent
0dc3cf9
commit 6ee0103
Showing
10 changed files
with
211 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,8 +33,51 @@ module "project" { | |
"compute.googleapis.com", | ||
"container.googleapis.com", | ||
"iam.googleapis.com", | ||
"iap.googleapis.com", | ||
"monitoring.googleapis.com", | ||
"servicenetworking.googleapis.com", | ||
"sqladmin.googleapis.com" | ||
] | ||
} | ||
|
||
# IAP Client Brand Resource | ||
# https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/iap_brand | ||
|
||
# Brands can only be created once for a Google Cloud project and the underlying Google API doesn't not support DELETE or PATCH methods. | ||
# Destroying a Terraform-managed Brand will remove it from state but will not delete it from Google Cloud. | ||
# If you need to delete the Brand, you must do so manually in the Google Cloud Console. | ||
|
||
resource "google_iap_brand" "this" { | ||
application_title = "Backstage (Cloud IAP Protected)" | ||
project = module.project.id | ||
|
||
# This email address can either be a user's address or a Google Groups alias. While service accounts also have an email address, | ||
# they are not actual valid email addresses, and cannot be used when creating a brand. However, a service account can be the owner | ||
# of a Google Group. | ||
|
||
support_email = "[email protected]" | ||
} | ||
|
||
# IAP Client Resource | ||
# https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/iap_client | ||
|
||
resource "google_iap_client" "this" { | ||
brand = google_iap_brand.this.name | ||
display_name = "Backstage" | ||
} | ||
|
||
# IAP Web IAM Binding Resource | ||
# https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/iap_web_iam | ||
|
||
resource "google_iap_web_iam_binding" "this" { | ||
|
||
members = [ | ||
"domain:osinfra.io" | ||
] | ||
|
||
project = module.project.id | ||
|
||
# Authoritative for a given role. | ||
|
||
role = "roles/iap.httpsResourceAccessor" | ||
} |
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,11 @@ | ||
# Output Values | ||
# https://www.terraform.io/language/values/outputs | ||
|
||
output "backstage_iap_client_id" { | ||
value = google_iap_client.this.client_id | ||
} | ||
|
||
output "backstage_iap_client_secret" { | ||
value = google_iap_client.this.secret | ||
sensitive = true | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,3 +59,6 @@ backstage: | |
periodSeconds: 10 | ||
successThreshold: 1 | ||
timeoutSeconds: 2 | ||
|
||
|
||
# We need to annotate the service for IAP |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
cloud_sql_host_project_id = "plt-lz-networking-tfcb-prod" | ||
remote_bucket = "plt-backstage-53a5-prod" |
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 |
---|---|---|
@@ -1 +1,2 @@ | ||
cloud_sql_host_project_id = "plt-lz-networking-tfd8-sb" | ||
remote_bucket = "plt-backstage-4312-sb" |
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