feat(oci): change cloudinit

This commit is contained in:
Kat Inskip 2024-06-09 11:59:29 -07:00
parent 4770a8ed3f
commit 7f34a86a5c
Signed by: kat
GPG key ID: 465E64DECEA8CF0F
5 changed files with 25 additions and 6 deletions

View file

@ -0,0 +1,3 @@
#cloud-config
runcmd:
- echo "awawawaa"

View file

@ -0,0 +1,3 @@
#cloud-config
runcmd:
- echo "awawawaa"

View file

@ -1,7 +1,5 @@
locals { locals {
takeover_oracle = yamlencode({ takeover_oracle = file("cloudinit_flex_oracle.yaml")
})
} }
data "oci_core_images" "that" { data "oci_core_images" "that" {
@ -75,3 +73,6 @@ resource "oci_core_instance" "that" {
} }
} }
locals {
flex = oci_core_instance.that
}

View file

@ -1,7 +1,5 @@
locals { locals {
takeover_ubuntu = yamlencode({ takeover_ubuntu = file("cloudinit_micro_ubuntu.yaml")
})
} }
data "oci_core_images" "this" { data "oci_core_images" "this" {
@ -72,4 +70,8 @@ resource "oci_core_instance" "this" {
lifecycle { lifecycle {
ignore_changes = [source_details.0.source_id] ignore_changes = [source_details.0.source_id]
} }
}
locals {
micros = oci_core_instance.this
} }

10
tf/oci_servers/vnic.tf Normal file
View file

@ -0,0 +1,10 @@
data "oci_core_vnic_attachments" "flex" {
compartment_id = var.tenancy_ocid
instance_id = local.flex.id
}
data "oci_core_vnic_attachments" "micros" {
count = 2
compartment_id = var.tenancy_ocid
instance_id = local.micros[count.index].id
}