Skip to content

Commit

Permalink
testing 2
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael DAmato authored and Michael DAmato committed Dec 14, 2022
1 parent d99c99a commit 15e7d46
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/terraform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ resource "random_string" "uid" {
special = false
lower = true
upper = false
numeric = true
numeric = true
}

#
Expand Down
4 changes: 2 additions & 2 deletions modules/agent-nodepool/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions modules/nodepool/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand All @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion modules/nodepool/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ variable "min_elb_capacity" {
}

variable "metadata_options" {
type = map
type = map(any)
description = "Instance Metadata Options"
}

4 changes: 2 additions & 2 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 15e7d46

Please sign in to comment.