Skip to content

Commit 1637251

Browse files
ruialLimess
authored andcommitted
Allow to change UI image in high level module (outerbounds#17)
* Allow to change UI image in high level module * Update readme to include ui docker image
1 parent a99e06e commit 1637251

File tree

8 files changed

+20
-2
lines changed

8 files changed

+20
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ pre-commit run --all-files
7171
| <a name="input_ui_certificate_arn"></a> [ui\_certificate\_arn](#input\_ui\_certificate\_arn) | SSL certificate for UI. If no certificate arn is provided, HTTP will be used. | `string` | `null` | no |
7272
| <a name="input_ui_cidr_allow_list"></a> [ui\_cidr\_allow\_list](#input\_ui\_cidr\_allow\_list) | A list of CIDRs the UI will be available to | `list(string)` | <pre>[<br> "0.0.0.0/0"<br>]</pre> | no |
7373
| <a name="input_ui_external_alb"></a> [ui\_external\_alb](#input\_ui\_external\_alb) | Whether the UI ALB is external or internal. | `bool` | `true` | no |
74+
| <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 |
7475
| <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 |
7576
| <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 |
7677

locals.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,9 @@ locals {
1616
module.metaflow-common.default_metadata_service_container_image :
1717
var.metadata_service_container_image
1818
)
19+
ui_static_container_image = (
20+
var.ui_static_container_image == "" ?
21+
module.metaflow-common.default_ui_static_container_image :
22+
var.ui_static_container_image
23+
)
1924
}

main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ module "metaflow-ui" {
5959
ui_backend_container_image = local.metadata_service_container_image
6060
ui_allow_list = var.ui_cidr_allow_list
6161
ui_external_alb = var.ui_external_alb
62+
ui_static_container_image = local.ui_static_container_image
6263

6364
METAFLOW_DATASTORE_SYSROOT_S3 = module.metaflow-datastore.METAFLOW_DATASTORE_SYSROOT_S3
6465
certificate_arn = var.ui_certificate_arn

modules/common/locals.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
locals {
22
default_metadata_service_container_image = "netflixoss/metaflow_metadata_service:v2.2.4"
3+
default_ui_static_container_image = "public.ecr.aws/outerbounds/metaflow_ui:v1.0.1"
34
}

modules/common/outputs.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
output "default_metadata_service_container_image" {
22
value = local.default_metadata_service_container_image
33
}
4+
5+
output "default_ui_static_container_image" {
6+
value = local.default_ui_static_container_image
7+
}

modules/ui/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ The services are deployed behind an AWS ALB, and the module will output the ALB
3232
| <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 |
3333
| <a name="input_ui_backend_container_image"></a> [ui\_backend\_container\_image](#input\_ui\_backend\_container\_image) | Container image for UI backend | `string` | `""` | no |
3434
| <a name="input_ui_external_alb"></a> [ui\_external\_alb](#input\_ui\_external\_alb) | Whether the UI ALB is external or internal. | `bool` | `true` | no |
35-
| <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.1.2"` | no |
35+
| <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 |
3636

3737
## Outputs
3838

modules/ui/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ variable "ui_backend_container_image" {
112112

113113
variable "ui_static_container_image" {
114114
type = string
115-
default = "public.ecr.aws/outerbounds/metaflow_ui:v1.1.2"
115+
default = ""
116116
description = "Container image for the UI frontend app"
117117
}
118118

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,12 @@ variable "postgres_engine_version" {
114114
default = "11"
115115
}
116116

117+
variable "ui_static_container_image" {
118+
type = string
119+
default = ""
120+
description = "Container image for the UI frontend app"
121+
}
122+
117123
variable "tags" {
118124
description = "aws tags"
119125
type = map(string)

0 commit comments

Comments
 (0)