Skip to content

Commit

Permalink
Merge branch 'aman/otel-stackdriver-support' into aman/issue_99
Browse files Browse the repository at this point in the history
  • Loading branch information
amanpruthi authored Jun 13, 2024
2 parents e99b386 + f58bd63 commit 39ff9de
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 11 deletions.
8 changes: 4 additions & 4 deletions modules/app_gke/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@ resource "google_container_node_pool" "default" {
]

dynamic "workload_metadata_config" {
for_each = var.create_workload_identity == true ? [1] : []
content {
mode = "GKE_METADATA"
for_each = var.create_workload_identity == true ? [1] : []
content {
mode = "GKE_METADATA"
}
}
}

shielded_instance_config {
enable_secure_boot = true
Expand Down
1 change: 0 additions & 1 deletion modules/service_accounts/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ resource "google_project_iam_member" "secretmanager_admin" {
role = "roles/secretmanager.admin"
}


####### service account for kms and gcs cross project access
resource "google_service_account" "kms_gcs_sa" {
count = var.create_workload_identity == true ? 1 : 0
Expand Down
2 changes: 0 additions & 2 deletions modules/service_accounts/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
output "service_account" {
value = google_service_account.main

description = "The service account."
}


output "sa_account_email" {
value = var.create_workload_identity == true ? google_service_account.kms_gcs_sa[0].email : null
}
Expand Down
4 changes: 1 addition & 3 deletions modules/service_accounts/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ variable "bucket_name" {
variable "create_workload_identity" {
description = "Flag to indicate whether to create a workload identity for the service account."
type = bool
default = false
}

variable "kms_gcs_sa_name" {
Expand All @@ -30,5 +29,4 @@ variable "stackdriver_sa_name" {
variable "enable_stackdriver" {
description = "Flag to indicate whether to enable workload identity for the service account."
type = bool
default = false
}
}
3 changes: 2 additions & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -273,4 +273,5 @@ variable "enable_stackdriver" {
variable "stackdriver_sa_name" {
type = string
default = "wandb-stackdriver"
}
}

0 comments on commit 39ff9de

Please sign in to comment.