Skip to content

Commit

Permalink
infra/gcp/k8s-infra-public-pii: fix post-deployment issue of 2031.
Browse files Browse the repository at this point in the history
Fix of a typo in the service name
Ensure bucket k8s-infra-artifacts-gsclogs is not deleted with Terraoform
Remove non-working IAM binding

Signed-off-by: Arnaud Meukam <[email protected]>
  • Loading branch information
ameukam committed Jun 14, 2021
1 parent 3877257 commit 94f48fe
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions infra/gcp/clusters/projects/k8s-infra-public-pii/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ resource "google_project_service" "project" {
for_each = toset([
"bigquery.googleapis.com",
"bigqueryreservation.googleapis.com",
"bigquerytransfer.googleapis.com",
"bigquerydatatransfer.googleapis.com",
"storage-component.googleapis.com"
])

Expand Down Expand Up @@ -83,7 +83,7 @@ resource "google_storage_bucket" "audit-logs-gcs" {

// NOTE: Prevent the bucket from being deleted
lifecycle {
prevent_destroy = false
prevent_destroy = true
}
}

Expand All @@ -102,7 +102,7 @@ resource "google_storage_bucket_iam_policy" "analytics_objectadmin_policy" {
policy_data = data.google_iam_policy.storage_policy_objectadmin.policy_data
}

data "google_iam_policy" "storage_policy_legacybucketwriter" {
/* data "google_iam_policy" "storage_policy_legacybucketwriter" {
binding {
role = "roles/storage.legacyBucketWriter"
members = [
Expand All @@ -114,7 +114,7 @@ data "google_iam_policy" "storage_policy_legacybucketwriter" {
resource "google_storage_bucket_iam_policy" "analytics_legacybucketwriter_policy" {
bucket = google_storage_bucket.audit-logs-gcs.name
policy_data = data.google_iam_policy.storage_policy_legacybucketwriter.policy_data
}
} */

// Allow ready-only access to [email protected]
resource "google_storage_bucket_iam_member" "artificats-gcs-logs" {
Expand Down

0 comments on commit 94f48fe

Please sign in to comment.