Skip to content

Commit 5db3da4

Browse files
author
Angel Pizarro
committed
Added the launch_template_custom_user_data variable to the metaflow-computation submodule. Addresses issue outerbounds#99
1 parent ee7093c commit 5db3da4

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

modules/computation/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ To read more, see [the Metaflow docs](https://docs.metaflow.org/metaflow-on-aws/
2121
| <a name="input_compute_environment_max_vcpus"></a> [compute\_environment\_max\_vcpus](#input\_compute\_environment\_max\_vcpus) | Maximum VCPUs for Batch Compute Environment [16-96] | `number` | n/a | yes |
2222
| <a name="input_compute_environment_min_vcpus"></a> [compute\_environment\_min\_vcpus](#input\_compute\_environment\_min\_vcpus) | Minimum VCPUs for Batch Compute Environment [0-16] for EC2 Batch Compute Environment (ignored for Fargate) | `number` | n/a | yes |
2323
| <a name="input_iam_partition"></a> [iam\_partition](#input\_iam\_partition) | IAM Partition (Select aws-us-gov for AWS GovCloud, otherwise leave as is) | `string` | `"aws"` | no |
24+
| <a name="input_launch_template_custom_user_data"></a> [launch\_template\_custom\_user\_data](#input\_launch\_template\_custom\_user\_data) | Custom user data script for the launch template provided as a base64-encoded string. | `string` | `null` | no |
2425
| <a name="input_launch_template_http_endpoint"></a> [launch\_template\_http\_endpoint](#input\_launch\_template\_http\_endpoint) | Whether the metadata service is available. Can be 'enabled' or 'disabled' | `string` | `"enabled"` | no |
2526
| <a name="input_launch_template_http_put_response_hop_limit"></a> [launch\_template\_http\_put\_response\_hop\_limit](#input\_launch\_template\_http\_put\_response\_hop\_limit) | The desired HTTP PUT response hop limit for instance metadata requests. Can be an integer from 1 to 64 | `number` | `2` | no |
2627
| <a name="input_launch_template_http_tokens"></a> [launch\_template\_http\_tokens](#input\_launch\_template\_http\_tokens) | Whether or not the metadata service requires session tokens, also referred to as Instance Metadata Service Version 2 (IMDSv2). Can be 'optional' or 'required' | `string` | `"optional"` | no |

modules/computation/ec2.tf

+3
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ resource "aws_launch_template" "cpu" {
3434
http_put_response_hop_limit = var.launch_template_http_put_response_hop_limit
3535
}
3636

37+
# Supply custom user data as a base64 encoded string.
38+
user_data = var.launch_template_custom_user_data
39+
3740
tags = var.standard_tags
3841
}
3942

modules/computation/variables.tf

+7
Original file line numberDiff line numberDiff line change
@@ -102,3 +102,10 @@ variable "launch_template_image_id" {
102102
nullable = true
103103
default = null
104104
}
105+
106+
variable "launch_template_custom_user_data" {
107+
type = string
108+
description = "Custom user data script for the launch template provided as a base64-encoded string."
109+
nullable = true
110+
default = null
111+
}

0 commit comments

Comments
 (0)