Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added the launch_template_custom_user_data variable to the metaflow-computation #100

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions modules/computation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ To read more, see [the Metaflow docs](https://docs.metaflow.org/metaflow-on-aws/
| <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 |
| <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 |
| <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 |
| <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 |
| <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 |
| <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 |
| <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 |
Expand Down
3 changes: 3 additions & 0 deletions modules/computation/ec2.tf
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ resource "aws_launch_template" "cpu" {
http_put_response_hop_limit = var.launch_template_http_put_response_hop_limit
}

# Supply custom user data as a base64 encoded string.
user_data = var.launch_template_custom_user_data

tags = var.standard_tags
}

Expand Down
7 changes: 7 additions & 0 deletions modules/computation/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,10 @@ variable "launch_template_image_id" {
nullable = true
default = null
}

variable "launch_template_custom_user_data" {
type = string
description = "Custom user data script for the launch template provided as a base64-encoded string."
nullable = true
default = null
}
Loading