Skip to content

Commit 4fad230

Browse files
committed
Fix variable defaults to accommodate AWS ASGs not launching instances when block device is unecrypted but AMI is encrypted. Also fix change to s3 object attributes in terraform provider.
1 parent f04009e commit 4fad230

File tree

5 files changed

+15
-25
lines changed

5 files changed

+15
-25
lines changed

modules/agent-nodepool/variables.tf

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,8 @@ variable "ssh_authorized_keys" {
5454
variable "block_device_mappings" {
5555
description = "Node pool block device mapping configuration"
5656
type = map(string)
57-
58-
default = {
59-
"size" = 30
60-
type = "gp2"
57+
default = {
58+
size = "30"
6159
}
6260
}
6361

@@ -70,8 +68,7 @@ variable "extra_cloud_config_config" {
7068
variable "extra_block_device_mappings" {
7169
description = "Used to specify additional block device mapping configurations"
7270
type = list(map(string))
73-
default = [
74-
]
71+
default = []
7572
}
7673

7774
variable "asg" {

modules/nodepool/variables.tf

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -61,18 +61,13 @@ variable "vpc_security_group_ids" {
6161
}
6262

6363
variable "block_device_mappings" {
64-
type = map(string)
65-
66-
default = {
67-
"size" = 30
68-
type = "gp2"
69-
}
64+
type = map(string)
65+
default = {}
7066
}
7167

7268
variable "extra_block_device_mappings" {
73-
type = list(map(string))
74-
default = [
75-
]
69+
type = list(map(string))
70+
default = []
7671
}
7772

7873
variable "asg" {

modules/statestore/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ data "aws_iam_policy_document" "getter" {
5050
effect = "Allow"
5151
actions = ["s3:GetObject"]
5252
resources = [
53-
"${aws_s3_bucket.bucket.arn}/${aws_s3_object.token.id}",
53+
"${aws_s3_bucket.bucket.arn}/${aws_s3_object.token.key}",
5454
]
5555
}
5656
}

modules/statestore/outputs.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ output "bucket" {
33
}
44

55
output "token_object" {
6-
value = aws_s3_object.token.id
6+
value = aws_s3_object.token.key
77
}
88

99
output "kubeconfig_put_policy" {
@@ -13,7 +13,7 @@ output "kubeconfig_put_policy" {
1313
output "token" {
1414
value = {
1515
bucket = aws_s3_object.token.bucket
16-
object = aws_s3_object.token.id
16+
object = aws_s3_object.token.key
1717
policy_document = data.aws_iam_policy_document.getter.json
1818
bucket_arn = aws_s3_bucket.bucket.arn
1919
}

variables.tf

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
variable "cluster_name" {
2-
description = "Name of the rkegov cluster to create"
2+
description = "Name of the rke2 cluster to create"
33
type = string
44
}
55

@@ -60,17 +60,15 @@ variable "iam_permissions_boundary" {
6060
variable "block_device_mappings" {
6161
description = "Server pool block device mapping configuration"
6262
type = map(string)
63-
default = {
64-
"size" = 30
65-
"encrypted" = false
63+
default = {
64+
size = "30"
6665
}
6766
}
6867

6968
variable "extra_block_device_mappings" {
7069
description = "Used to specify additional block device mapping configurations"
7170
type = list(map(string))
72-
default = [
73-
]
71+
default = []
7472
}
7573

7674
variable "extra_security_group_ids" {
@@ -141,7 +139,7 @@ variable "metadata_options" {
141139
default = {
142140
http_endpoint = "enabled"
143141
http_tokens = "required" # IMDS-v2
144-
http_put_response_hop_limit = 2 # allow pods to use IMDS as well
142+
http_put_response_hop_limit = 3 # ACME DNS via cert-manager challenge seems to require 3
145143
instance_metadata_tags = "disabled"
146144
}
147145
description = "Instance Metadata Options"

0 commit comments

Comments
 (0)