File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ locals {
5151
5252resource "file_local_directory" "deploy_path" {
5353 path = local. deploy_path
54- permissions = " 0775 "
54+ permissions = " 0755 "
5555}
5656
5757resource "file_local_directory" "tf_data_dir" {
@@ -60,7 +60,7 @@ resource "file_local_directory" "tf_data_dir" {
6060 ]
6161 count = (local. tf_data_dir != local. deploy_path ? 1 : 0 )
6262 path = local. tf_data_dir
63- permissions = " 0775 "
63+ permissions = " 0755 "
6464}
6565
6666# ## Template Files ###
@@ -200,7 +200,7 @@ resource "file_local" "generate_files" {
200200 directory = dirname (" ${ local . deploy_path } /${ each . key } " )
201201 name = basename (each. key )
202202 contents = each. value
203- permissions = " 0644 "
203+ permissions = " 0600 "
204204}
205205
206206# # Deploy ##
Original file line number Diff line number Diff line change @@ -219,8 +219,7 @@ resource "terraform_data" "wait_for_certificate_secret" {
219219}
220220
221221
222- # The Helm resource completes in less than 10 seconds
223- # at which time the tls-rancher-ingress secret is generated
222+ # Wait for the tls-rancher-ingress secret to be generated by the Helm release
224223data "kubernetes_secret_v1" "certificate" {
225224 depends_on = [
226225 time_sleep . settle_before_rancher ,
Original file line number Diff line number Diff line change @@ -23,6 +23,10 @@ variable "rke2_version" {
2323 The version of rke2 powering the cluster.
2424 This is used for determining ingress configuration.
2525 EOT
26+ validation {
27+ condition = can (regex (" ^v\\ d+\\ .\\ d+\\ .\\ d+\\ +rke2r\\ d+$" , var. rke2_version ))
28+ error_message = " The rke2_version must match the format vX.Y.Z+rke2rN (eg. v1.34.7+rke2r1)."
29+ }
2630}
2731variable "rancher_helm_repo" {
2832 type = string
Original file line number Diff line number Diff line change @@ -23,6 +23,10 @@ variable "rke2_version" {
2323 The version of rke2 powering the cluster.
2424 This is used for determining ingress configuration.
2525 EOT
26+ validation {
27+ condition = can (regex (" ^v?[0-9]+\\ .[0-9]+\\ .[0-9]+.*$" , var. rke2_version ))
28+ error_message = " The rke2_version must be a valid version string, e.g., 'v1.28.4+rke2r1'."
29+ }
2630}
2731variable "rancher_helm_repo" {
2832 type = string
@@ -67,7 +71,7 @@ variable "rancher_helm_chart_values" {
6771 "agentTLSMode" : "system-store"
6872 }
6973 EOT
70- default = " {} "
74+ default = " e30= "
7175 sensitive = true
7276}
7377variable "ca_certs" {
Original file line number Diff line number Diff line change @@ -50,6 +50,10 @@ variable "rke2_version" {
5050 The version of rke2 powering the cluster.
5151 This is used for determining ingress configuration.
5252 EOT
53+ validation {
54+ condition = can (regex (" ^v?[0-9]+\\ .[0-9]+\\ .[0-9]+.*$" , var. rke2_version ))
55+ error_message = " The rke2_version must be a valid version string, e.g., 'v1.28.4+rke2r1'."
56+ }
5357}
5458variable "rancher_helm_repo" {
5559 type = string
You can’t perform that action at this time.
0 commit comments