From 13badb75d8bd75a4258a23c4a55323e6c94c7e12 Mon Sep 17 00:00:00 2001 From: gitops_test Date: Mon, 10 Nov 2025 14:37:21 +0000 Subject: [PATCH] Add Awesome_Compute_VM_20251110_143721.TF --- Awesome_Compute_VM_20251110_143721.TF | 74 +++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 Awesome_Compute_VM_20251110_143721.TF diff --git a/Awesome_Compute_VM_20251110_143721.TF b/Awesome_Compute_VM_20251110_143721.TF new file mode 100644 index 0000000..0ae76fc --- /dev/null +++ b/Awesome_Compute_VM_20251110_143721.TF @@ -0,0 +1,74 @@ + +terraform { + required_providers { + ionoscloud = { + source = "registry.terraform.io/ionos-cloud/ionoscloud" + version = "6.7.0" + } + } +} + +data "ionoscloud_image" "simpl_vm" { + type = "HDD" + cloud_init = "V1" + image_alias = "ubuntu:22.04" + location = "de/fra" +} + +resource "ionoscloud_datacenter" "simpl_vm" { + name = "analysis-env-ionos" + location = "de/fra" + description = "var.simpl_datacenter_description" + sec_auth_protection = false +} + +resource "ionoscloud_lan" "simpl_vm" { + datacenter_id = ionoscloud_datacenter.simpl_vm.id + public = true + name = "simpl_vm_lan" +} + +resource "ionoscloud_ipblock" "simpl_vm" { + location = ionoscloud_datacenter.simpl_vm.location + size = 1 + name = "analysis-env-ionos" +} + +resource "ionoscloud_server" "simpl_vm" { + name = "simpl_vm_server" + datacenter_id = ionoscloud_datacenter.simpl_vm.id + cores = 2 + ram = 8192 + availability_zone = "AUTO" + image_name = data.ionoscloud_image.simpl_vm.name + image_password = "test1234" + type = "ENTERPRISE" + + volume { + name = "volume" + size = 100 + disk_type = "SSD Standard" + bus = "VIRTIO" + availability_zone = "AUTO" + user_data = "var.simpl_cloud_init" + } + + nic { + lan = ionoscloud_lan.simpl_vm.id + name = "nic" + dhcp = true + ips = [ionoscloud_ipblock.simpl_vm.ips[0]] + } +} + +output "vmIps" { + value = ionoscloud_server.simpl_vm.nic[0].ips +} + +output "datacenterId" { + value = ionoscloud_datacenter.simpl_vm.id +} + +output "volumeId" { + value = ionoscloud_server.simpl_vm.boot_volume +}