Skip to content

Commit

Permalink
Merge pull request #11 from ops-guru/workload_identity
Browse files Browse the repository at this point in the history
Add workload identity
  • Loading branch information
marko7460 authored Oct 23, 2019
2 parents 8cd7a3c + 75e52b9 commit 7e67e47
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions application/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ module "gke" {
subnetwork = data.terraform_remote_state.infra-host-project.outputs.subnets_self_links[1]
master_ipv4_cidr_block = "10.0.1.0/28"
region = var.region
identity_namespace = "${data.terraform_remote_state.infra-service-project.outputs.project_id}.svc.id.goog"
node_metadata = "GKE_METADATA_SERVER"
master_authorized_networks_config = [{
cidr_blocks = [{
cidr_block = data.terraform_remote_state.infra-host-project.outputs.subnets_ips[0]
Expand Down
3 changes: 2 additions & 1 deletion modules/gke/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,8 @@ variable "node_pools_oauth_scopes" {
type = map(any)
default = {
all = [
"https://www.googleapis.com/auth/cloud-platform"
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/service.management.readonly",
]
microservices = []
}
Expand Down
3 changes: 3 additions & 0 deletions security/iam.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ locals {
gke_cluster = [
"roles/storage.objectCreator",
"roles/storage.objectViewer",
"roles/logging.logWriter",
"roles/monitoring.metricWriter",
"roles/monitoring.viewer",
]
}

Expand Down

0 comments on commit 7e67e47

Please sign in to comment.