diff --git a/examples/osdu/main.tf b/examples/osdu/main.tf index aecac4d2f115a83ba80e0acb6fda458378706d79..15f6f01b1c2767a232318d2d82611eae44f8453e 100644 --- a/examples/osdu/main.tf +++ b/examples/osdu/main.tf @@ -98,17 +98,11 @@ module "osdu_k8s" { composer_name = module.osdu.composer_name composer_location = module.osdu.composer_location airflow_url = module.osdu.airflow_url - airflow_sa = module.osdu.airflow_sa - workflow_account = module.osdu.workflow_sa - infra_bootstrap_sa = module.osdu.infra_bootstrap_sa postgresql_password = module.osdu.postgresql_password elastic_enabled = module.osdu.elastic_enabled elastic_port = module.osdu.elastic_port elastic_pass = module.osdu.elastic_password sql_connection_name = module.osdu.sql_connection_name - bootstrap_sa = module.osdu.datafier_sa - policy_bootstrap_sa = module.osdu.policy_bootstrap_sa - storage_sa_email = module.osdu.storage_sa_email ingress_domain = module.osdu.ingress_domain services_namespace = module.osdu.service_namespace policy_enabled = var.policy_enabled diff --git a/examples/simple_osdu/main.tf b/examples/simple_osdu/main.tf index 530a97382ab6a9b43ed2880f6293fc8ef2cc255c..9697bd2bc539e484d3e3f4b1c77711a6a87d898b 100644 --- a/examples/simple_osdu/main.tf +++ b/examples/simple_osdu/main.tf @@ -57,30 +57,15 @@ module "osdu_k8s" { project_id = var.project_id admin_user_email = var.admin_user_email - database_id = module.osdu.database_id - tier = module.osdu.tier - autoscaling = module.osdu.autoscaling - data_partition_name = module.osdu.data_partition_name - cluster_endpoint = module.osdu.gke_host + ingress_domain = module.osdu.ingress_domain + elastic_pass = module.osdu.elastic_password + postgresql_password = module.osdu.postgresql_password cluster_name = module.osdu.gke_name - cluster_location = module.osdu.gke_location - dag_bucket = module.osdu.dag_bucket - composer_name = module.osdu.composer_name - composer_location = module.osdu.composer_location airflow_url = module.osdu.airflow_url - airflow_sa = module.osdu.airflow_sa - workflow_account = module.osdu.workflow_sa - infra_bootstrap_sa = module.osdu.infra_bootstrap_sa - postgresql_password = module.osdu.postgresql_password - elastic_enabled = module.osdu.elastic_enabled - elastic_port = module.osdu.elastic_port - elastic_pass = module.osdu.elastic_password + cluster_endpoint = module.osdu.gke_host + composer_name = module.osdu.composer_name + dag_bucket = module.osdu.dag_bucket sql_connection_name = module.osdu.sql_connection_name - bootstrap_sa = module.osdu.datafier_sa - policy_bootstrap_sa = module.osdu.policy_bootstrap_sa - storage_sa_email = module.osdu.storage_sa_email - ingress_domain = module.osdu.ingress_domain - services_namespace = module.osdu.service_namespace providers = { helm = helm diff --git a/modules/osdu_k8s/helm_entitlements.tf b/modules/osdu_k8s/helm_entitlements.tf index 9e7c9810a763a6a3ca4d662531003ab5941a40e5..fcb7c2e8c77b5ecf27a5f26c9df9e133c39780ef 100644 --- a/modules/osdu_k8s/helm_entitlements.tf +++ b/modules/osdu_k8s/helm_entitlements.tf @@ -15,6 +15,10 @@ * limitations under the License. */ +locals { + airflow_service_account = var.airflow_sa == "" ? "airflow-sa@${var.project_id}.iam.gserviceaccount.com" : var.airflow_sa +} + resource "helm_release" "entitlements" { depends_on = [ helm_release.partition, @@ -58,7 +62,7 @@ resource "helm_release" "entitlements" { } set { name = "data.airflowComposerEmail" - value = var.airflow_sa + value = local.airflow_service_account } set { name = "data.sqlConnectionString" diff --git a/modules/osdu_k8s/helm_storage.tf b/modules/osdu_k8s/helm_storage.tf index b631bc3efa38f1cc14bcb78a6cce55b606b98fd6..5bc8b11da59d9b1f6af28a94e61ee490f12bdcdc 100644 --- a/modules/osdu_k8s/helm_storage.tf +++ b/modules/osdu_k8s/helm_storage.tf @@ -15,6 +15,10 @@ * limitations under the License. */ +locals { + storage_service_account = var.storage_sa_email == "" ? "wi-storage-gc@${var.project_id}.iam.gserviceaccount.com" : var.storage_sa_email +} + resource "helm_release" "storage" { name = "storage" @@ -47,7 +51,7 @@ resource "helm_release" "storage" { } set { name = "data.storageServiceAccountEmail" - value = var.storage_sa_email + value = local.storage_service_account } set { name = "data.bootstrapServiceAccountName" diff --git a/modules/osdu_k8s/inputs.tf b/modules/osdu_k8s/inputs.tf index c17ad9d4a92bdeccdf77ab6f15618426c034c9e5..a79e5a0eb1deb201136b3c755917df90438338a8 100644 --- a/modules/osdu_k8s/inputs.tf +++ b/modules/osdu_k8s/inputs.tf @@ -48,7 +48,7 @@ variable "cluster_endpoint" { variable "cluster_location" { description = "GKE cluster location" type = string - default = "" + default = "us-central1-b" } variable "cluster_name" { @@ -60,7 +60,7 @@ variable "cluster_name" { variable "composer_location" { description = "Location of the external composer" type = string - default = "" + default = "us-central1" } variable "composer_name" { @@ -131,7 +131,7 @@ variable "upgrade" { variable "workflow_account" { description = "Workflow service SA name" type = string - default = "" + default = "wi-workflow-gc" } # --- End of Global inputs --- # @@ -139,6 +139,7 @@ variable "workflow_account" { variable "elastic_enabled" { description = "Enable Elasticsearch installation" type = bool + default = true } variable "elastic_host" { @@ -156,7 +157,7 @@ variable "elastic_pass" { variable "elastic_port" { description = "Elastic port" type = string - default = "" + default = "9200" } variable "elastic_user" { @@ -184,7 +185,7 @@ variable "airflow_sa" { variable "bootstrap_sa" { description = "Service bootstrap SA name" type = string - default = "" + default = "datafier" } variable "crs-catalog_sa" { @@ -196,13 +197,13 @@ variable "crs-catalog_sa" { variable "infra_bootstrap_sa" { description = "Infra bootstrap SA name" type = string - default = "" + default = "infra-bootstrap" } variable "policy_bootstrap_sa" { description = "Policy bootstrap SA name" type = string - default = "" + default = "policy-bootstrap" } variable "postgresql_password" {