From 948a83a7502e9e3ed7d8f602841887794865797a Mon Sep 17 00:00:00 2001 From: Ryan Haney <25014745+thathaneydude@users.noreply.github.com> Date: Thu, 6 Jun 2024 17:08:10 -0500 Subject: [PATCH] updating example and removing unnecessary locals --- data.tf | 12 ------------ examples/deployment/main.tf | 20 ++++++++++++++------ variables.tf | 1 - 3 files changed, 14 insertions(+), 19 deletions(-) diff --git a/data.tf b/data.tf index d0f173f..7fbe5f8 100644 --- a/data.tf +++ b/data.tf @@ -1,15 +1,3 @@ -locals { - enrichment_payload = { - "cloud_enrichment.enable" : "true" - "cloud_enrichment.cloud_provider" : var.enrichment_cloud_provider_name - "cloud_enrichment.bucket_name" : var.enrichment_bucket_name - "cloud_enrichment.bucket_region" : var.enrichment_bucket_region - } - - full_enrichment_payload = var.enrichment_storage_account_name == "" ? local.enrichment_payload : merge(local.enrichment_payload, { "cloud_enrichment.azure_storage_account" : var.enrichment_storage_account_name }) - -} - data "cloudinit_config" "config" { gzip = var.gzip_config base64_encode = var.base64_encode_config diff --git a/examples/deployment/main.tf b/examples/deployment/main.tf index 3e259e2..4f700b3 100644 --- a/examples/deployment/main.tf +++ b/examples/deployment/main.tf @@ -7,9 +7,13 @@ locals { mon_cidr = "10.3.0.0/24" mon_gateway = "10.3.0.1" - enrichment_cloud_provider = "azure" - enrichment_storage_account_name = "account-foo" - enrichment_storage_container_name = "bucket-bar" + + # Enrichment + enrichment_enabled = "" + enrichment_cloud_provider = "" + enrichment_storage_account_name = "account-foo" + enrichment_bucket_name = "bucket-bar" + enrichment_s3_bucket_region = "us-east-1" } module "sensor_config" { @@ -24,9 +28,13 @@ module "sensor_config" { subnetwork_monitoring_gateway = local.mon_gateway # Optional - Enrichment Service - enrichment_cloud_provider_name = local.enrichment_cloud_provider - enrichment_storage_container_name = local.enrichment_storage_container_name + enrichment_enabled = local.enrichment_enabled + enrichment_cloud_provider_name = local.enrichment_cloud_provider + enrichment_bucket_name = local.enrichment_bucket_name - # Optional - Enrichment Service Azure + # Optional - Enrichment Service Azure Only enrichment_storage_account_name = local.enrichment_storage_account_name + + # Optional - Enrichment Service AWS Only + enrichment_bucket_region = local.enrichment_s3_bucket_region } diff --git a/variables.tf b/variables.tf index 3f88a45..6396553 100644 --- a/variables.tf +++ b/variables.tf @@ -87,7 +87,6 @@ variable "enrichment_storage_account_name" { default = "" } - # Enrichment Service -- AWS variable "enrichment_bucket_region" { description = "(optional) the region for the s3 enrichment bucket"