Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tofu/oci/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -190,13 +190,13 @@ resource "oci_core_instance" "ampere_instance" {
# user_data: Talos MachineConfig for omni_ready mode (null = omit for Ubuntu)
var.omni_ready ? { user_data = base64encode(local._ampere_user_data) } : {},
# ssh_authorized_keys: Ubuntu cloud-init only (Talos ignores this)
!var.omni_ready && var.ssh_public_key != null ? { ssh_authorized_keys = var.ssh_public_key } : {},
! var.omni_ready && var.ssh_public_key != null ? { ssh_authorized_keys = var.ssh_public_key } : {},
)

lifecycle {
ignore_changes = [
source_details[0].source_id, # Ignore image updates after initial deploy
metadata, # Ignore SSH key / user_data drift on imported instances
metadata,
]
}
}
Expand Down Expand Up @@ -229,7 +229,7 @@ resource "oci_core_instance" "micro_instance" {
lifecycle {
ignore_changes = [
source_details[0].source_id,
metadata, # Ignore SSH key drift on imported instances
metadata,
]
}
}
Expand Down
8 changes: 4 additions & 4 deletions tofu/oci/validation.tf
Original file line number Diff line number Diff line change
Expand Up @@ -79,28 +79,28 @@ check "micro_min_boot_vol" {

check "omni_ready_requires_talos_image" {
assert {
condition = !var.omni_ready || var.talos_image_ocid != null
condition = ! var.omni_ready || var.talos_image_ocid != null
error_message = "omni_ready = true requires talos_image_ocid. Import the Talos+Tailscale Image Factory image and set talos_image_ocid."
}
}

check "omni_ready_requires_endpoint" {
assert {
condition = !var.omni_ready || var.omni_endpoint != null
condition = ! var.omni_ready || var.omni_endpoint != null
error_message = "omni_ready = true requires omni_endpoint (e.g. omni.wind-bearded.ts.net:8090)."
}
}

check "omni_ready_requires_join_token" {
assert {
condition = !var.omni_ready || var.omni_join_token != null
condition = ! var.omni_ready || var.omni_join_token != null
error_message = "omni_ready = true requires omni_join_token. Get from: omnictl get connections -o yaml | grep joinToken."
}
}

check "omni_ready_requires_tailscale_key" {
assert {
condition = !var.omni_ready || var.tailscale_auth_key != null
condition = ! var.omni_ready || var.tailscale_auth_key != null
error_message = "omni_ready = true requires tailscale_auth_key with tag:oci applied."
}
}