mirror of
https://github.com/kittywitch/nixfiles.git
synced 2026-02-09 04:19:19 -08:00
feat(oci): change cloudinit
This commit is contained in:
parent
4770a8ed3f
commit
7f34a86a5c
5 changed files with 25 additions and 6 deletions
3
tf/oci_servers/cloudinit_flex_oracle.yaml
Normal file
3
tf/oci_servers/cloudinit_flex_oracle.yaml
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
#cloud-config
|
||||||
|
runcmd:
|
||||||
|
- echo "awawawaa"
|
||||||
3
tf/oci_servers/cloudinit_micro_ubuntu.yaml
Normal file
3
tf/oci_servers/cloudinit_micro_ubuntu.yaml
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
#cloud-config
|
||||||
|
runcmd:
|
||||||
|
- echo "awawawaa"
|
||||||
|
|
@ -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
|
||||||
|
}
|
||||||
|
|
@ -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" {
|
||||||
|
|
@ -73,3 +71,7 @@ resource "oci_core_instance" "this" {
|
||||||
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
10
tf/oci_servers/vnic.tf
Normal 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
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue