Skip to content

Commit caa34cc

Browse files
committed
update docs
1 parent 91e84e2 commit caa34cc

File tree

6 files changed

+18
-10
lines changed

6 files changed

+18
-10
lines changed

.pre-commit-config.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,6 @@ repos:
2222
- id: terraform-docs-go
2323
name: "Step Functions terraform module docs"
2424
args: ["-c", "modules/.terraform-docs.yml", "markdown", "modules/step-functions"]
25+
- id: terraform-docs-go
26+
name: "UI terraform module docs"
27+
args: ["-c", "modules/.terraform-docs.yml", "markdown", "modules/ui"]

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ This module consists of submodules that can be used separately as well:
1010
- resources to deploy Metaflow flows on Step Functions processing ([`metaflow-step-functions`](./modules/step-functions))
1111
- Metaflow UI([`metaflow-ui`](./modules/ui))
1212

13+
![modules diagram](./docs/terraform_modules.png)
14+
1315
You can either use this high-level module, or submodules individually. See each module's corresponding `README.md` for more details.
1416

1517
This module requires an Amazon VPC to be set up by the module user beforehand. The output of the project `infra` is an example configuration of an Amazon VPC that can be passed to this module.

docs/terraform_modules.png

595 KB
Loading

modules/ui/README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# UI
22

3-
Metaflow operational UI
3+
Metaflow operational UI. This module deploys the UI as a set of Fargate tasks. It connects to an existing RDS instance, that can be created by Metaflow [`datastore`](../datastore) module.
4+
5+
The services are deployed behind an AWS ALB, and the module will output the ALB DNS name. Note that the UI is deployed with no auth by default, you can limit the users by IP by using `ui_cidr_allow_list` parameter.
46

57
<!-- BEGIN_TF_DOCS -->
68
## Inputs
@@ -26,9 +28,9 @@ Metaflow operational UI
2628
| <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 |
2729
| <a name="input_subnet1_id"></a> [subnet1\_id](#input\_subnet1\_id) | First private subnet used for availability zone redundancy | `string` | n/a | yes |
2830
| <a name="input_subnet2_id"></a> [subnet2\_id](#input\_subnet2\_id) | Second private subnet used for availability zone redundancy | `string` | n/a | yes |
31+
| <a name="input_ui_allow_list"></a> [ui\_allow\_list](#input\_ui\_allow\_list) | A list of CIDRs the UI will be available to | `list(string)` | <pre>[<br> "0.0.0.0/0"<br>]</pre> | no |
2932
| <a name="input_ui_backend_container_image"></a> [ui\_backend\_container\_image](#input\_ui\_backend\_container\_image) | Container image for UI backend | `string` | `"netflixoss/metaflow_metadata_service:2.1.0"` | no |
30-
| <a name="input_ui_static_container_image"></a> [ui\_static\_container\_image](#input\_ui\_static\_container\_image) | Container image for UI static app | `string` | `"public.ecr.aws/outerbounds/metaflow_ui:v1.0.1"` | no |
31-
| <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 |
33+
| <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` | `"public.ecr.aws/outerbounds/metaflow_ui:v1.0.1"` | no |
3234

3335
## Outputs
3436

modules/ui/ec2.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ resource "aws_security_group" "ui_lb_security_group" {
4444
from_port = 443
4545
to_port = 443
4646
protocol = "tcp"
47-
cidr_blocks = ["0.0.0.0/0"]
47+
cidr_blocks = var.cidr_allow_list
4848
description = "Allow public HTTPS"
4949
}
5050

modules/ui/variables.tf

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,6 @@ variable "subnet2_id" {
7676
description = "Second private subnet used for availability zone redundancy"
7777
}
7878

79-
variable "vpc_cidr_block" {
80-
type = string
81-
description = "The VPC CIDR block that we'll access list on our Metadata Service API to allow all internal communications"
82-
}
83-
8479
variable "certificate_arn" {
8580
type = string
8681
description = "SSL certificate ARN"
@@ -112,5 +107,11 @@ variable "ui_backend_container_image" {
112107
variable "ui_static_container_image" {
113108
type = string
114109
default = "public.ecr.aws/outerbounds/metaflow_ui:v1.0.1"
115-
description = "Container image for UI static app"
110+
description = "Container image for the UI frontend app"
111+
}
112+
113+
variable "ui_allow_list" {
114+
type = list(string)
115+
description = "A list of CIDRs the UI will be available to"
116+
default = ["0.0.0.0/0"]
116117
}

0 commit comments

Comments
 (0)