Skip to content

Commit

Permalink
Update k3s-workers.tf
Browse files Browse the repository at this point in the history
Added some more secure stuff
  • Loading branch information
AdmiraalA committed Feb 21, 2024
1 parent 4e79471 commit 67c9e03
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions k3s-workers.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
resource "oci_core_instance_pool" "k3s_workers" {

depends_on = [
oci_load_balancer_load_balancer.k3s_load_balancer,
]
Expand Down Expand Up @@ -79,10 +78,16 @@ resource "oci_core_instance" "k3s_extra_worker_node" {
nsg_ids = [oci_core_network_security_group.lb_to_instances_http.id]
hostname_label = "k3s-extra-worker-node"
}
instance_options {
are_legacy_imds_endpoints_disabled = true
}
launch_options {
is_pv_encryption_in_transit_enabled = true
}

metadata = {
"ssh_authorized_keys" = file(var.public_key_path)
"user_data" = data.cloudinit_config.k3s_worker_tpl.rendered
metadata = {
"ssh_authorized_keys" = var.ssh_authorized_keys_content
"user_data" = data.cloudinit_config.k3s_worker_tpl.rendered
}

freeform_tags = {
Expand All @@ -92,4 +97,4 @@ resource "oci_core_instance" "k3s_extra_worker_node" {
"k3s-cluster-name" = "${var.cluster_name}"
"k3s-instance-type" = "k3s-worker"
}
}
}

0 comments on commit 67c9e03

Please sign in to comment.