Skip to content

Commit 9d7b34b

Browse files
authored
Allow to change UI image in high level module (#17)
* Allow to change UI image in high level module * Update readme to include ui docker image
1 parent ca3d5d3 commit 9d7b34b

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
@@ -113,6 +113,7 @@ You can find a more complete example that uses this module but also includes set
113113
| <a name="input_subnet2_id"></a> [subnet2\_id](#input\_subnet2\_id) | Second subnet used for availability zone redundancy | `string` | n/a | yes |
114114
| <a name="input_tags"></a> [tags](#input\_tags) | aws tags | `map(string)` | n/a | yes |
115115
| <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 |
116+
| <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 |
116117
| <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 |
117118
| <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 |
118119

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
@@ -54,6 +54,7 @@ module "metaflow-ui" {
5454
subnet1_id = var.subnet1_id
5555
subnet2_id = var.subnet2_id
5656
ui_backend_container_image = local.metadata_service_container_image
57+
ui_static_container_image = local.ui_static_container_image
5758

5859
METAFLOW_DATASTORE_SYSROOT_S3 = module.metaflow-datastore.METAFLOW_DATASTORE_SYSROOT_S3
5960
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.2"
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
@@ -30,7 +30,7 @@ The services are deployed behind an AWS ALB, and the module will output the ALB
3030
| <a name="input_subnet2_id"></a> [subnet2\_id](#input\_subnet2\_id) | Second private subnet used for availability zone redundancy | `string` | n/a | yes |
3131
| <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 |
3232
| <a name="input_ui_backend_container_image"></a> [ui\_backend\_container\_image](#input\_ui\_backend\_container\_image) | Container image for UI backend | `string` | `""` | no |
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 |
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` | `""` | no |
3434

3535
## Outputs
3636

modules/ui/variables.tf

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

107107
variable "ui_static_container_image" {
108108
type = string
109-
default = "public.ecr.aws/outerbounds/metaflow_ui:v1.0.1"
109+
default = ""
110110
description = "Container image for the UI frontend app"
111111
}
112112

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,12 @@ variable "metadata_service_container_image" {
7373
description = "Container image for metadata service"
7474
}
7575

76+
variable "ui_static_container_image" {
77+
type = string
78+
default = ""
79+
description = "Container image for the UI frontend app"
80+
}
81+
7682
variable "tags" {
7783
description = "aws tags"
7884
type = map(string)

0 commit comments

Comments
 (0)