Finished implementing opentofu provisioning
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,5 +1,4 @@
|
||||
.envrc
|
||||
.terraform
|
||||
.terraform.*
|
||||
terraform*
|
||||
id_*
|
||||
41
clone-rocky.tf
Normal file
41
clone-rocky.tf
Normal file
@@ -0,0 +1,41 @@
|
||||
resource "proxmox_virtual_environment_vm" "rocky_clone" {
|
||||
name = "rocky-clone"
|
||||
node_name = var.virtual_environment_node_name
|
||||
started = true
|
||||
|
||||
clone {
|
||||
vm_id = "7000"
|
||||
}
|
||||
|
||||
agent {
|
||||
# NOTE: The agent is installed and enabled as part of the cloud-init configuration in the template VM, see cloud-config.tf
|
||||
# The working agent is *required* to retrieve the VM IP addresses.
|
||||
# If you are using a different cloud-init configuration, or a different clone source
|
||||
# that does not have the qemu-guest-agent installed, you may need to disable the `agent` below and remove the `vm_ipv4_address` output.
|
||||
# See https://bpg.sh/docs/resources/virtual_environment_vm#qemu-guest-agent for more details.
|
||||
enabled = true
|
||||
}
|
||||
|
||||
memory {
|
||||
dedicated = 768
|
||||
}
|
||||
|
||||
initialization {
|
||||
dns {
|
||||
servers = ["1.1.1.1"]
|
||||
}
|
||||
ip_config {
|
||||
ipv4 {
|
||||
address = "dhcp"
|
||||
}
|
||||
}
|
||||
user_account {
|
||||
username = "rocky"
|
||||
keys = [trimspace(file("./id_ed25519_rocky.pub"))]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
output "rocky_ipv4_address" {
|
||||
value = proxmox_virtual_environment_vm.rocky_clone.ipv4_addresses[1][0]
|
||||
}
|
||||
10
terraform.tfstate
Normal file
10
terraform.tfstate
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"version": 4,
|
||||
"terraform_version": "1.12.1",
|
||||
"serial": 21,
|
||||
"lineage": "af0feed9-13f3-3cfd-a2e5-f720e7014b48",
|
||||
"outputs": {},
|
||||
"resources": [],
|
||||
"check_results": null
|
||||
}
|
||||
|
||||
1
terraform.tfstate.backup
Normal file
1
terraform.tfstate.backup
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user