Remove unused code, update output, fix GCE.
This commit is contained in:
parent
84e5cbea68
commit
cfad0aac9d
|
@ -50,11 +50,11 @@ module "test-vm" {
|
|||
type = "pd-ssd"
|
||||
size = 10
|
||||
}
|
||||
encryption = {
|
||||
encryption = var.cmek_encryption ? {
|
||||
encrypt_boot = true
|
||||
disk_encryption_key_raw = null
|
||||
kms_key_self_link = var.cmek_encryption ? module.kms[var.regions.primary].keys["key"].id : null
|
||||
}
|
||||
} : null
|
||||
metadata = { startup-script = local.startup-script }
|
||||
tags = ["ssh"]
|
||||
}
|
||||
|
|
|
@ -54,31 +54,6 @@ locals {
|
|||
"serviceAccount:${module.project.service_accounts.robots.sql}"
|
||||
]
|
||||
}
|
||||
|
||||
# # VPC / Shared VPC variables
|
||||
# network_subnet_selflink = try(
|
||||
# module.vpc[0].subnets["${var.region}/subnet"].self_link,
|
||||
# var.network_config.subnet_self_link
|
||||
# )
|
||||
# shared_vpc_bindings = {
|
||||
# "roles/compute.networkUser" = [
|
||||
# "robot-df", "sa-df-worker"
|
||||
# ]
|
||||
# }
|
||||
# # reassemble in a format suitable for for_each
|
||||
# shared_vpc_bindings_map = {
|
||||
# for binding in flatten([
|
||||
# for role, members in local.shared_vpc_bindings : [
|
||||
# for member in members : { role = role, member = member }
|
||||
# ]
|
||||
# ]) : "${binding.role}-${binding.member}" => binding
|
||||
# }
|
||||
# shared_vpc_project = try(var.network_config.host_project, null)
|
||||
# shared_vpc_role_members = {
|
||||
# robot-df = "serviceAccount:${module.project.service_accounts.robots.dataflow}"
|
||||
# sa-df-worker = module.service-account-df.iam_email
|
||||
# }
|
||||
# use_shared_vpc = var.network_config != null
|
||||
}
|
||||
|
||||
module "project" {
|
||||
|
|
|
@ -19,6 +19,11 @@ output "connection_names" {
|
|||
value = module.db.connection_names
|
||||
}
|
||||
|
||||
output "bucket" {
|
||||
description = "Cloud storage bucket to import/export data from Cloud SQL."
|
||||
value = module.gcs.name
|
||||
}
|
||||
|
||||
output "ips" {
|
||||
description = "IP address of each instance."
|
||||
value = module.db.ips
|
||||
|
@ -37,3 +42,11 @@ output "demo_commands" {
|
|||
"03_psql" = "psql 'host=127.0.0.1 port=5432 sslmode=disable dbname=${var.postgres_database} user=postgres'"
|
||||
}
|
||||
}
|
||||
|
||||
output "service_accounts" {
|
||||
description = "Service Accounts."
|
||||
value = {
|
||||
"gcs" = module.service-account-gcs.email
|
||||
"sql" = module.service-account-sql.email
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue