Skip to content

Commit 7f899b1

Browse files
authored
Enable internal traffic from multiple VPCs (#34)
* Enable internal traffic from multiple VPCs * Update README and examples * Fix variable type * Fix examples * Bump examples
1 parent e6c49f3 commit 7f899b1

File tree

8 files changed

+16
-16
lines changed

8 files changed

+16
-16
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ module "metaflow" {
6161
enable_step_functions = false
6262
subnet1_id = module.vpc.public_subnets[0]
6363
subnet2_id = module.vpc.public_subnets[1]
64-
vpc_cidr_block = module.vpc.vpc_cidr_block
64+
vpc_cidr_blocks = module.vpc.vpc_cidr_blocks
6565
vpc_id = module.vpc.vpc_id
6666
6767
tags = {
@@ -117,7 +117,7 @@ You can find a more complete example that uses this module but also includes set
117117
| <a name="input_ui_allow_list"></a> [ui\_allow\_list](#input\_ui\_allow\_list) | List of CIDRs we want to grant access to our Metaflow UI Service. Usually this is our VPN's CIDR blocks. | `list(string)` | `[]` | no |
118118
| <a name="input_ui_certificate_arn"></a> [ui\_certificate\_arn](#input\_ui\_certificate\_arn) | SSL certificate for UI. If set to empty string, UI is disabled. | `string` | `""` | no |
119119
| <a name="input_ui_static_container_image"></a> [ui\_static\_container\_image](#input\_ui\_static\_container\_image) | Container image for the UI frontend app | `string` | `""` | no |
120-
| <a name="input_vpc_cidr_block"></a> [vpc\_cidr\_block](#input\_vpc\_cidr\_block) | The VPC CIDR block that we'll access list on our Metadata Service API to allow all internal communications | `string` | n/a | yes |
120+
| <a name="input_vpc_cidr_blocks"></a> [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 |
121121
| <a name="input_vpc_id"></a> [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 |
122122

123123
## Outputs

examples/eks/metaflow.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ module "metaflow-common" {
4242

4343
module "metaflow-metadata-service" {
4444
source = "outerbounds/metaflow/aws//modules/metadata-service"
45-
version = "0.3.2"
45+
version = "0.7.0"
4646

4747
resource_prefix = local.resource_prefix
4848
resource_suffix = local.resource_suffix
@@ -60,7 +60,7 @@ module "metaflow-metadata-service" {
6060
s3_bucket_arn = module.metaflow-datastore.s3_bucket_arn
6161
subnet1_id = module.vpc.private_subnets[0]
6262
subnet2_id = module.vpc.private_subnets[1]
63-
vpc_cidr_block = module.vpc.vpc_cidr_block
63+
vpc_cidr_blocks = [module.vpc.vpc_cidr_block]
6464

6565
standard_tags = local.tags
6666
}

examples/minimal/minimal_example.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@ module "vpc" {
3838

3939
module "metaflow" {
4040
source = "outerbounds/metaflow/aws"
41-
version = "0.5.2"
41+
version = "0.7.0"
4242

4343
resource_prefix = local.resource_prefix
4444
resource_suffix = local.resource_suffix
4545

4646
enable_step_functions = false
4747
subnet1_id = module.vpc.public_subnets[0]
4848
subnet2_id = module.vpc.public_subnets[1]
49-
vpc_cidr_block = module.vpc.vpc_cidr_block
49+
vpc_cidr_blocks = [module.vpc.vpc_cidr_block]
5050
vpc_id = module.vpc.vpc_id
5151

5252
tags = {

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ module "metaflow-metadata-service" {
3232
s3_bucket_arn = module.metaflow-datastore.s3_bucket_arn
3333
subnet1_id = var.subnet1_id
3434
subnet2_id = var.subnet2_id
35-
vpc_cidr_block = var.vpc_cidr_block
35+
vpc_cidr_blocks = var.vpc_cidr_blocks
3636

3737
standard_tags = var.tags
3838
}

modules/metadata-service/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ If the `access_list_cidr_blocks` variable is set, only traffic originating from
3535
| <a name="input_standard_tags"></a> [standard\_tags](#input\_standard\_tags) | The standard tags to apply to every AWS resource. | `map(string)` | n/a | yes |
3636
| <a name="input_subnet1_id"></a> [subnet1\_id](#input\_subnet1\_id) | First private subnet used for availability zone redundancy | `string` | n/a | yes |
3737
| <a name="input_subnet2_id"></a> [subnet2\_id](#input\_subnet2\_id) | Second private subnet used for availability zone redundancy | `string` | n/a | yes |
38-
| <a name="input_vpc_cidr_block"></a> [vpc\_cidr\_block](#input\_vpc\_cidr\_block) | The VPC CIDR block that we'll access list on our Metadata Service API to allow all internal communications | `string` | n/a | yes |
38+
| <a name="input_vpc_cidr_blocks"></a> [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 |
3939

4040
## Outputs
4141

modules/metadata-service/ec2.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ resource "aws_security_group" "metadata_service_security_group" {
77
from_port = 8080
88
to_port = 8080
99
protocol = "tcp"
10-
cidr_blocks = [var.vpc_cidr_block]
10+
cidr_blocks = var.vpc_cidr_blocks
1111
description = "Allow API calls internally"
1212
}
1313

1414
ingress {
1515
from_port = 8082
1616
to_port = 8082
1717
protocol = "tcp"
18-
cidr_blocks = [var.vpc_cidr_block]
18+
cidr_blocks = var.vpc_cidr_blocks
1919
description = "Allow API calls internally"
2020
}
2121

modules/metadata-service/variables.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ variable "subnet2_id" {
105105
description = "Second private subnet used for availability zone redundancy"
106106
}
107107

108-
variable "vpc_cidr_block" {
109-
type = string
110-
description = "The VPC CIDR block that we'll access list on our Metadata Service API to allow all internal communications"
108+
variable "vpc_cidr_blocks" {
109+
type = list(string)
110+
description = "The VPC CIDR blocks that we'll access list on our Metadata Service API to allow all internal communications"
111111
}

variables.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ variable "subnet2_id" {
108108
description = "Second subnet used for availability zone redundancy"
109109
}
110110

111-
variable "vpc_cidr_block" {
112-
type = string
113-
description = "The VPC CIDR block that we'll access list on our Metadata Service API to allow all internal communications"
111+
variable "vpc_cidr_blocks" {
112+
type = list(string)
113+
description = "The VPC CIDR blocks that we'll access list on our Metadata Service API to allow all internal communications"
114114
}
115115

116116
variable "vpc_id" {

0 commit comments

Comments
 (0)