From 15e7d46ef3bee4a8affdae0abe66a654412a36cd Mon Sep 17 00:00:00 2001 From: Michael DAmato Date: Tue, 13 Dec 2022 19:55:28 -0500 Subject: [PATCH] testing 2 --- .github/workflows/terraform.yml | 2 +- main.tf | 2 +- modules/agent-nodepool/variables.tf | 4 ++-- modules/nodepool/main.tf | 12 ++++++------ modules/nodepool/variables.tf | 2 +- variables.tf | 4 ++-- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/terraform.yml b/.github/workflows/terraform.yml index 638e0fb..d6df430 100644 --- a/.github/workflows/terraform.yml +++ b/.github/workflows/terraform.yml @@ -23,4 +23,4 @@ jobs: # Checks that all Terraform configuration files adhere to a canonical format - name: Terraform Format - run: terraform fmt --recursive -check + run: terraform fmt -recursive -check diff --git a/main.tf b/main.tf index 307de39..c3a7287 100644 --- a/main.tf +++ b/main.tf @@ -24,7 +24,7 @@ resource "random_string" "uid" { special = false lower = true upper = false - numeric = true + numeric = true } # diff --git a/modules/agent-nodepool/variables.tf b/modules/agent-nodepool/variables.tf index f89b6e1..6f4af77 100644 --- a/modules/agent-nodepool/variables.tf +++ b/modules/agent-nodepool/variables.tf @@ -96,8 +96,8 @@ variable "extra_security_group_ids" { } variable "metadata_options" { - type = map - default = { + type = map(any) + default = { http_endpoint = "enabled" http_tokens = "required" # IMDS-v2 http_put_response_hop_limit = 2 # allow pods to use IMDS as well diff --git a/modules/nodepool/main.tf b/modules/nodepool/main.tf index bd01060..921c2d6 100644 --- a/modules/nodepool/main.tf +++ b/modules/nodepool/main.tf @@ -11,10 +11,10 @@ resource "aws_security_group" "this" { # Launch template # resource "aws_launch_template" "this" { - name = "${var.name}-rke2-nodepool" - image_id = var.ami - instance_type = var.instance_type - user_data = var.userdata + name = "${var.name}-rke2-nodepool" + image_id = var.ami + instance_type = var.instance_type + user_data = var.userdata metadata_options { http_endpoint = var.metadata_options["http_endpoint"] @@ -25,8 +25,8 @@ resource "aws_launch_template" "this" { network_interfaces { associate_public_ip_address = var.associate_public_ip_address - delete_on_termination = true - security_groups = var.vpc_security_group_ids + delete_on_termination = true + security_groups = var.vpc_security_group_ids } block_device_mappings { diff --git a/modules/nodepool/variables.tf b/modules/nodepool/variables.tf index a547d04..d6974f9 100644 --- a/modules/nodepool/variables.tf +++ b/modules/nodepool/variables.tf @@ -99,7 +99,7 @@ variable "min_elb_capacity" { } variable "metadata_options" { - type = map + type = map(any) description = "Instance Metadata Options" } diff --git a/variables.tf b/variables.tf index 6ff5477..1a52377 100644 --- a/variables.tf +++ b/variables.tf @@ -119,8 +119,8 @@ variable "controlplane_access_logs_bucket" { } variable "metadata_options" { - type = map - default = { + type = map(any) + default = { http_endpoint = "enabled" http_tokens = "required" # IMDS-v2 http_put_response_hop_limit = 2 # allow pods to use IMDS as well