Add Test_20282_IONOS_V2_20251104_114815.TF
This commit is contained in:
parent
76a53b7d45
commit
2cbe75300d
74
Test_20282_IONOS_V2_20251104_114815.TF
Normal file
74
Test_20282_IONOS_V2_20251104_114815.TF
Normal file
@ -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"
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "ionoscloud_datacenter" "simpl_vm" {
|
||||||
|
name = "test_env_ionos"
|
||||||
|
location = "de"
|
||||||
|
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 = "test_env_ionos"
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "ionoscloud_server" "simpl_vm" {
|
||||||
|
name = "simpl_vm_server"
|
||||||
|
datacenter_id = ionoscloud_datacenter.simpl_vm.id
|
||||||
|
cores = 4
|
||||||
|
ram = 8192
|
||||||
|
availability_zone = "AUTO"
|
||||||
|
cpu_family = "INTEL_XEON"
|
||||||
|
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
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user