Skip to content

Commit b019641

Browse files
authored
Merge branch 'main' into dependabot/github_actions/actions/github-script-8
2 parents f31b7f6 + 62d8580 commit b019641

31 files changed

Lines changed: 665 additions & 328 deletions

File tree

.github/workflows/manual.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
token: ${{secrets.GITHUB_TOKEN}}
2020
fetch-depth: 0
2121
- id: aws-creds
22-
uses: aws-actions/configure-aws-credentials@v4
22+
uses: aws-actions/configure-aws-credentials@v5
2323
with:
2424
role-to-assume: ${{env.AWS_ROLE}}
2525
role-session-name: ${{github.run_id}}

.github/workflows/release.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ jobs:
8585
token: ${{secrets.GITHUB_TOKEN}}
8686
fetch-depth: 0
8787
- id: aws-creds
88-
uses: aws-actions/configure-aws-credentials@v4
88+
uses: aws-actions/configure-aws-credentials@v5
8989
with:
9090
role-to-assume: ${{env.AWS_ROLE}}
9191
role-session-name: ${{github.run_id}}-TestOneBasic
@@ -127,7 +127,7 @@ jobs:
127127
token: ${{secrets.GITHUB_TOKEN}}
128128
fetch-depth: 0
129129
- id: aws-creds
130-
uses: aws-actions/configure-aws-credentials@v4
130+
uses: aws-actions/configure-aws-credentials@v5
131131
with:
132132
role-to-assume: ${{env.AWS_ROLE}}
133133
role-session-name: ${{github.run_id}}-TestProdBasic
@@ -169,7 +169,7 @@ jobs:
169169
token: ${{secrets.GITHUB_TOKEN}}
170170
fetch-depth: 0
171171
- id: aws-creds
172-
uses: aws-actions/configure-aws-credentials@v4
172+
uses: aws-actions/configure-aws-credentials@v5
173173
with:
174174
role-to-assume: ${{env.AWS_ROLE}}
175175
role-session-name: ${{github.run_id}}-TestThreeBasic
@@ -212,7 +212,7 @@ jobs:
212212
token: ${{secrets.GITHUB_TOKEN}}
213213
fetch-depth: 0
214214
- id: aws-creds
215-
uses: aws-actions/configure-aws-credentials@v4
215+
uses: aws-actions/configure-aws-credentials@v5
216216
with:
217217
role-to-assume: ${{env.AWS_ROLE}}
218218
role-session-name: ${{github.run_id}}-TestDownstreamBasic
@@ -254,7 +254,7 @@ jobs:
254254
token: ${{secrets.GITHUB_TOKEN}}
255255
fetch-depth: 0
256256
- id: aws-creds
257-
uses: aws-actions/configure-aws-credentials@v4
257+
uses: aws-actions/configure-aws-credentials@v5
258258
with:
259259
role-to-assume: ${{env.AWS_ROLE}}
260260
role-session-name: ${{github.run_id}}-TestDownstreamSplitrole
@@ -300,7 +300,7 @@ jobs:
300300
token: ${{secrets.GITHUB_TOKEN}}
301301
fetch-depth: 0
302302
- id: aws-creds
303-
uses: aws-actions/configure-aws-credentials@v4
303+
uses: aws-actions/configure-aws-credentials@v5
304304
with:
305305
role-to-assume: ${{env.AWS_ROLE}}
306306
role-session-name: ${{github.run_id}}-cleanup

examples/downstream/versions.tf

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
terraform {
22
required_version = ">= 1.5.0"
33
required_providers {
4-
local = {
5-
source = "hashicorp/local"
6-
version = ">= 2.5"
7-
}
84
random = {
95
source = "hashicorp/random"
106
version = ">= 3.5.1"

examples/downstream_splitrole/versions.tf

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
terraform {
22
required_version = ">= 1.5.0"
33
required_providers {
4-
local = {
5-
source = "hashicorp/local"
6-
version = ">= 2.5"
7-
}
84
random = {
95
source = "hashicorp/random"
106
version = ">= 3.5.1"

examples/one/versions.tf

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
terraform {
22
required_version = ">= 1.5.0"
33
required_providers {
4-
local = {
5-
source = "hashicorp/local"
6-
version = ">= 2.5"
7-
}
84
random = {
95
source = "hashicorp/random"
106
version = ">= 3.5.1"

examples/prod/versions.tf

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
terraform {
22
required_version = ">= 1.5.0"
33
required_providers {
4-
local = {
5-
source = "hashicorp/local"
6-
version = ">= 2.5"
7-
}
84
random = {
95
source = "hashicorp/random"
106
version = ">= 3.5.1"

examples/three/main.tf

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -64,20 +64,20 @@ locals {
6464
indirect_access = true
6565
initial = true
6666
}
67-
# "rancherB" = {
68-
# type = "all-in-one"
69-
# size = "xxl"
70-
# os = local.os
71-
# indirect_access = true
72-
# initial = false
73-
# }
74-
# "rancherC" = {
75-
# type = "all-in-one"
76-
# size = "xxl"
77-
# os = local.os
78-
# indirect_access = true
79-
# initial = false
80-
# }
67+
"rancherB" = {
68+
type = "all-in-one"
69+
size = "xxl"
70+
os = local.os
71+
indirect_access = true
72+
initial = false
73+
}
74+
"rancherC" = {
75+
type = "all-in-one"
76+
size = "xxl"
77+
os = local.os
78+
indirect_access = true
79+
initial = false
80+
}
8181
}
8282
local_file_path = var.file_path
8383
runner_ip = chomp(data.http.myip.response_body) # "runner" is the server running Terraform

examples/three/modules/tls/versions.tf

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
terraform {
22
required_version = ">= 1.5.0"
33
required_providers {
4-
local = {
5-
source = "hashicorp/local"
6-
version = ">= 2.5"
7-
}
84
tls = {
95
source = "hashicorp/tls"
106
version = ">= 4.0.5"

flake.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

modules/cluster/main.tf

Lines changed: 70 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,39 @@ module "deploy_initial_node" {
136136
depends_on = [
137137
data.aws_availability_zones.available,
138138
]
139-
for_each = local.initial_node
140-
deploy_path = each.value.deploy_path
141-
data_path = each.value.deploy_path
142-
template_path = "${path.module}/node_template"
139+
for_each = local.initial_node
140+
deploy_path = each.value.deploy_path
141+
data_path = each.value.deploy_path
142+
# if any of this changes, update/redeploy
143+
deploy_trigger = md5(join("-", [
144+
each.key,
145+
md5(base64encode(jsonencode(each.value))),
146+
local.identifier,
147+
local.owner,
148+
local.acme_server_url,
149+
local.project_name,
150+
local.ip_family,
151+
md5(base64encode(jsonencode(data.aws_availability_zones.available.names))),
152+
md5(base64encode(jsonencode(local.project_subnet_names))),
153+
md5(base64encode(jsonencode(local.project_load_balancer_access_cidrs))),
154+
local.domain,
155+
local.zone,
156+
local.skip_cert,
157+
data.aws_availability_zones.available.names[0],
158+
md5(base64encode(jsonencode(values(local.target_groups)))),
159+
md5(base64encode(jsonencode(local.server_access_addresses))),
160+
local.username,
161+
local.ssh_key,
162+
local.install_method,
163+
local.download,
164+
local.rke2_version,
165+
]))
166+
template_files = [
167+
join("/", [path.module, "node_template", "main.tf"]),
168+
join("/", [path.module, "node_template", "outputs.tf"]),
169+
join("/", [path.module, "node_template", "variables.tf"]),
170+
join("/", [path.module, "node_template", "versions.tf"]),
171+
]
143172
inputs = <<-EOT
144173
identifier = "${local.identifier}"
145174
owner = "${local.owner}"
@@ -229,10 +258,39 @@ module "deploy_additional_nodes" {
229258
data.aws_availability_zones.available,
230259
module.deploy_initial_node,
231260
]
232-
for_each = local.additional_nodes
233-
deploy_path = each.value.deploy_path
234-
data_path = each.value.deploy_path
235-
template_path = "${path.module}/node_template"
261+
for_each = local.additional_nodes
262+
deploy_path = each.value.deploy_path
263+
data_path = each.value.deploy_path
264+
# if any of this changes, update/redeploy
265+
deploy_trigger = md5(join("-", [
266+
each.key,
267+
md5(base64encode(jsonencode(each.value))),
268+
local.identifier,
269+
local.owner,
270+
local.acme_server_url,
271+
local.project_name,
272+
local.ip_family,
273+
md5(base64encode(jsonencode(data.aws_availability_zones.available.names))),
274+
md5(base64encode(jsonencode(local.project_subnet_names))),
275+
md5(base64encode(jsonencode(local.project_load_balancer_access_cidrs))),
276+
local.domain,
277+
local.zone,
278+
local.skip_cert,
279+
data.aws_availability_zones.available.names[0],
280+
md5(base64encode(jsonencode(values(local.target_groups)))),
281+
md5(base64encode(jsonencode(local.server_access_addresses))),
282+
local.username,
283+
local.ssh_key,
284+
local.install_method,
285+
local.download,
286+
local.rke2_version,
287+
]))
288+
template_files = [
289+
join("/", [path.module, "node_template", "main.tf"]),
290+
join("/", [path.module, "node_template", "outputs.tf"]),
291+
join("/", [path.module, "node_template", "variables.tf"]),
292+
join("/", [path.module, "node_template", "versions.tf"]),
293+
]
236294
inputs = <<-EOT
237295
identifier = "${local.identifier}"
238296
owner = "${local.owner}"
@@ -311,11 +369,12 @@ strcontains(each.value.type, "database") ? local.database_config :
311369
EOT
312370
}
313371

314-
resource "local_sensitive_file" "kubeconfig" {
372+
resource "file_local" "kubeconfig" {
315373
depends_on = [
316374
module.deploy_initial_node,
317375
module.deploy_additional_nodes,
318376
]
319-
content = local.ino.output.kubeconfig
320-
filename = "${local.local_file_path}/kubeconfig"
377+
name = "kubeconfig"
378+
directory = local.local_file_path
379+
contents = local.ino.output.kubeconfig
321380
}

0 commit comments

Comments
 (0)