From 47cff650988960c67fbd805b5f184cc6ba988a6b Mon Sep 17 00:00:00 2001 From: Utkarsh Kashyap <107147005+ob-uk@users.noreply.github.com> Date: Mon, 28 Nov 2022 19:27:02 -0800 Subject: [PATCH] Update `with_public_ip` description and examples (#44) * Fix linting error * Change description, example * Change description for metadata service * Change minimal example * Change other 2 examples * Bump version --- README.md | 3 ++- examples/eks_airflow/metaflow.tf | 7 ++++--- examples/eks_argo/metaflow.tf | 7 ++++--- examples/minimal/minimal_example.tf | 3 ++- modules/metadata-service/README.md | 2 +- modules/metadata-service/variables.tf | 2 +- variables.tf | 2 +- 7 files changed, 15 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index c9a4367..35eef1c 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,7 @@ module "metaflow" { subnet2_id = module.vpc.public_subnets[1] vpc_cidr_blocks = module.vpc.vpc_cidr_blocks vpc_id = module.vpc.vpc_id + with_public_ip = var.with_public_ip tags = { "managedBy" = "terraform" @@ -122,7 +123,7 @@ You can find a more complete example that uses this module but also includes set | [ui\_static\_container\_image](#input\_ui\_static\_container\_image) | Container image for the UI frontend app | `string` | `""` | no | | [vpc\_cidr\_blocks](#input\_vpc\_cidr\_blocks) | The VPC CIDR blocks that we'll access list on our Metadata Service API to allow all internal communications | `list(string)` | n/a | yes | | [vpc\_id](#input\_vpc\_id) | The id of the single VPC we stood up for all Metaflow resources to exist in. | `string` | n/a | yes | -| [with\_public\_ip](#input\_with\_public\_ip) | Use public IP in case if Metadata Service uses public subnets (by defualt private subnets are used). | `bool` | `false` | no | +| [with\_public\_ip](#input\_with\_public\_ip) | Enable public IP assignment for the Metadata Service. Typically you want this to be set to true if using public subnets as subnet1\_id and subnet2\_id, and false otherwise | `bool` | `false` | no | ## Outputs diff --git a/examples/eks_airflow/metaflow.tf b/examples/eks_airflow/metaflow.tf index 2ec8aae..80938a9 100644 --- a/examples/eks_airflow/metaflow.tf +++ b/examples/eks_airflow/metaflow.tf @@ -20,7 +20,7 @@ data "aws_availability_zones" "available" { module "metaflow-datastore" { source = "outerbounds/metaflow/aws//modules/datastore" - version = "0.7.1" + version = "0.8.0" force_destroy_s3_bucket = true @@ -37,12 +37,12 @@ module "metaflow-datastore" { module "metaflow-common" { source = "outerbounds/metaflow/aws//modules/common" - version = "0.7.1" + version = "0.8.0" } module "metaflow-metadata-service" { source = "outerbounds/metaflow/aws//modules/metadata-service" - version = "0.7.1" + version = "0.8.0" resource_prefix = local.resource_prefix resource_suffix = local.resource_suffix @@ -61,6 +61,7 @@ module "metaflow-metadata-service" { subnet1_id = module.vpc.private_subnets[0] subnet2_id = module.vpc.private_subnets[1] vpc_cidr_blocks = [module.vpc.vpc_cidr_block] + with_public_ip = var.with_public_ip standard_tags = local.tags } diff --git a/examples/eks_argo/metaflow.tf b/examples/eks_argo/metaflow.tf index 2ec8aae..80938a9 100644 --- a/examples/eks_argo/metaflow.tf +++ b/examples/eks_argo/metaflow.tf @@ -20,7 +20,7 @@ data "aws_availability_zones" "available" { module "metaflow-datastore" { source = "outerbounds/metaflow/aws//modules/datastore" - version = "0.7.1" + version = "0.8.0" force_destroy_s3_bucket = true @@ -37,12 +37,12 @@ module "metaflow-datastore" { module "metaflow-common" { source = "outerbounds/metaflow/aws//modules/common" - version = "0.7.1" + version = "0.8.0" } module "metaflow-metadata-service" { source = "outerbounds/metaflow/aws//modules/metadata-service" - version = "0.7.1" + version = "0.8.0" resource_prefix = local.resource_prefix resource_suffix = local.resource_suffix @@ -61,6 +61,7 @@ module "metaflow-metadata-service" { subnet1_id = module.vpc.private_subnets[0] subnet2_id = module.vpc.private_subnets[1] vpc_cidr_blocks = [module.vpc.vpc_cidr_block] + with_public_ip = var.with_public_ip standard_tags = local.tags } diff --git a/examples/minimal/minimal_example.tf b/examples/minimal/minimal_example.tf index f84b134..00c47c2 100644 --- a/examples/minimal/minimal_example.tf +++ b/examples/minimal/minimal_example.tf @@ -38,7 +38,7 @@ module "vpc" { module "metaflow" { source = "outerbounds/metaflow/aws" - version = "0.7.0" + version = "0.8.0" resource_prefix = local.resource_prefix resource_suffix = local.resource_suffix @@ -48,6 +48,7 @@ module "metaflow" { subnet2_id = module.vpc.public_subnets[1] vpc_cidr_blocks = [module.vpc.vpc_cidr_block] vpc_id = module.vpc.vpc_id + with_public_ip = var.with_public_ip tags = { "managedBy" = "terraform" diff --git a/modules/metadata-service/README.md b/modules/metadata-service/README.md index ae80492..862123c 100644 --- a/modules/metadata-service/README.md +++ b/modules/metadata-service/README.md @@ -36,7 +36,7 @@ If the `access_list_cidr_blocks` variable is set, only traffic originating from | [subnet1\_id](#input\_subnet1\_id) | First private subnet used for availability zone redundancy | `string` | n/a | yes | | [subnet2\_id](#input\_subnet2\_id) | Second private subnet used for availability zone redundancy | `string` | n/a | yes | | [vpc\_cidr\_blocks](#input\_vpc\_cidr\_blocks) | The VPC CIDR blocks that we'll access list on our Metadata Service API to allow all internal communications | `list(string)` | n/a | yes | -| [with\_public\_ip](#input\_with\_public\_ip) | Enable private IP by default | `bool` | `false` | no | +| [with\_public\_ip](#input\_with\_public\_ip) | Enable public IP assignment for the Metadata Service. Typically you want this to be set to true if using public subnets as subnet1\_id and subnet2\_id, and false otherwise | `bool` | `false` | no | ## Outputs diff --git a/modules/metadata-service/variables.tf b/modules/metadata-service/variables.tf index a8f6d31..717510c 100644 --- a/modules/metadata-service/variables.tf +++ b/modules/metadata-service/variables.tf @@ -113,5 +113,5 @@ variable "vpc_cidr_blocks" { variable "with_public_ip" { type = bool default = false - description = "Enable private IP by default" + description = "Enable public IP assignment for the Metadata Service. Typically you want this to be set to true if using public subnets as subnet1_id and subnet2_id, and false otherwise" } diff --git a/variables.tf b/variables.tf index 3cf03e4..c0d116a 100644 --- a/variables.tf +++ b/variables.tf @@ -163,5 +163,5 @@ variable "extra_ui_static_env_vars" { variable "with_public_ip" { type = bool default = false - description = "Enable public IP assignment for the Metadata Service" + description = "Enable public IP assignment for the Metadata Service. Typically you want this to be set to true if using public subnets as subnet1_id and subnet2_id, and false otherwise" }