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

Nodename #171

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 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
23 changes: 23 additions & 0 deletions 00-variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,29 @@ variable "cluster_id" {
type = number
}

variable "iam_instance_profile_controller" {
description = "IAM instance profile to attach to the instances."
type = string
default = null

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

}

variable "iam_instance_profile_worker" {
description = "IAM instance profile to attach to the instances."
type = string
default = null
}

variable metadata_options {
description = "Metadata to attach to the instances."
type = map(string)
default = {
http_endpoint = "enabled"
http_tokens = "required"
instance_metadata_tags = "disabled"
}
}

variable "cluster_architecture" {
default = "amd64"
description = "Cluster architecture. Choose 'arm64' or 'amd64'. If you choose 'arm64', ensure to also override the control_plane.instance_type and worker_groups.instance_type with an ARM64-based instance type like 'm7g.large'."
Expand Down
6 changes: 5 additions & 1 deletion 03-talos.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ module "talos_control_plane_nodes" {
subnet_id = element(data.aws_subnets.public.ids, count.index)
associate_public_ip_address = true
tags = merge(var.tags, local.cluster_required_tags)
metadata_options = var.metadata_options
iam_instance_profile = var.iam_instance_profile_controller

vpc_security_group_ids = [module.cluster_sg.security_group_id]

Expand All @@ -32,7 +34,9 @@ module "talos_worker_group" {
subnet_id = element(data.aws_subnets.public.ids, tonumber(trimprefix(each.key, "${each.value.name}.")))
associate_public_ip_address = true
tags = merge(each.value.tags, var.tags, local.cluster_required_tags)

metadata_options = var.metadata_options
iam_instance_profile = var.iam_instance_profile_worker

vpc_security_group_ids = [module.cluster_sg.security_group_id]

root_block_device = [
Expand Down