You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+62-2
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,67 @@ This module consists of submodules that can be used separately as well:
16
16
17
17
You can either use this high-level module, or submodules individually. See each module's corresponding `README.md` for more details.
18
18
19
-
You can find a complete example that uses this module but also includes setting up VPC and other non-Metaflow-specific parts of infra [in this repo](https://github.com/outerbounds/metaflow-tools/tree/master/aws/terraform).
19
+
Here's a minimal end-to-end example of using this module with VPC:
20
+
```terraform
21
+
# Random suffix for this deployment
22
+
resource "random_string" "suffix" {
23
+
length = 8
24
+
special = false
25
+
upper = false
26
+
}
27
+
28
+
locals {
29
+
resource_prefix = "metaflow"
30
+
resource_suffix = random_string.suffix.result
31
+
}
32
+
33
+
data "aws_availability_zones" "available" {
34
+
}
35
+
36
+
# VPC infra using https://github.com/terraform-aws-modules/terraform-aws-vpc
37
+
module "vpc" {
38
+
source = "terraform-aws-modules/vpc/aws"
39
+
version = "3.13.0"
40
+
41
+
name = "${local.resource_prefix}-${local.resource_suffix}"
# The module will generate a Metaflow config in JSON format, write it to a file
73
+
resource "local_file" "metaflow_config" {
74
+
content = module.metaflow.metaflow_profile_json
75
+
filename = "./metaflow_profile.json"
76
+
}
77
+
```
78
+
79
+
You can find a more complete example that uses this module but also includes setting up sagemaker notebooks and other non-Metaflow-specific parts of infra [in this repo](https://github.com/outerbounds/metaflow-tools/tree/master/aws/terraform).
20
80
21
81
<!-- BEGIN_TF_DOCS -->
22
82
## Modules
@@ -52,7 +112,7 @@ You can find a complete example that uses this module but also includes setting
52
112
| <aname="input_subnet1_id"></a> [subnet1\_id](#input\_subnet1\_id)| First subnet used for availability zone redundancy |`string`| n/a | yes |
53
113
| <aname="input_subnet2_id"></a> [subnet2\_id](#input\_subnet2\_id)| Second subnet used for availability zone redundancy |`string`| n/a | yes |
| <aname="input_ui_certificate_arn"></a> [ui\_certificate\_arn](#input\_ui\_certificate\_arn)| SSL certificate for UI|`string`|n/a|yes|
115
+
| <aname="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|
56
116
| <aname="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 |
57
117
| <aname="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 |
0 commit comments