Skip to content

Commit

Permalink
Merge pull request #112 from ChristianLempa:2-dev-servers
Browse files Browse the repository at this point in the history
new dns name for server
  • Loading branch information
ChristianLempa authored Aug 13, 2024
2 parents 2a56101 + 564076d commit 194648b
Show file tree
Hide file tree
Showing 4 changed files with 127 additions and 1 deletion.
15 changes: 15 additions & 0 deletions dns/dns-prod-1/terraform/server.tf
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,21 @@ resource "dns_a_record_set" "srv_prod_11" {
ttl = 3600
}

resource "dns_a_record_set" "srv_test_1" {
zone = "home.clcreative.de."
name = "srv-test-1"
addresses = ["10.20.1.1"]
ttl = 3600
}

resource "dns_a_record_set" "srv_test_2" {
zone = "home.clcreative.de."
name = "srv-test-2"
addresses = ["10.20.1.2"]
ttl = 3600
}


resource "dns_a_record_set" "srv_demo_1" {
zone = "home.clcreative.de."
name = "srv-demo-1"
Expand Down
3 changes: 2 additions & 1 deletion proxmox/terraform/20002-srv-prod-1.tf
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ resource "proxmox_vm_qemu" "srv-prod-1" {
lifecycle {
ignore_changes = [
disk,
vm_state
vm_state,
sshkeys
]
}

Expand Down
55 changes: 55 additions & 0 deletions proxmox/terraform/21001-srv-test-1.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
resource "proxmox_vm_qemu" "srv-test-1" {
name = "srv-test-1"
desc = "Testing Server 1, Testing Application Server, Ubuntu"
agent = 1
target_node = "prx-prod-1"
qemu_os = "other" # default other
bios = "seabios" # default=ovmf
tags = ""

define_connection_info = false

# -- only important for full clone
vmid = 21001
clone = "pkr-ubuntu-noble-1"
# full_clone = true
full_clone = true

# -- boot process
onboot = true
startup = ""
automatic_reboot = false # refuse auto-reboot when changing a setting

cores = 2
sockets = 1
cpu = "host"
memory = 2048
network {
bridge = "vmbr1"
model = "virtio"
tag = -1
}

scsihw = "virtio-scsi-pci" # default virtio-scsi-pci

# disk {
# storage = "pv1"
# type = "virtio"
# size = "40G"
# iothread = 1
# }

# -- lifecycle
lifecycle {
ignore_changes = [
disk,
vm_state
]
}

# Cloud Init Settings
ipconfig0 = "ip=10.20.1.1/16,gw=10.20.0.1"
nameserver = "10.20.0.1"
ciuser = "xcad"
sshkeys = var.PUBLIC_SSH_KEY
}
55 changes: 55 additions & 0 deletions proxmox/terraform/21002-srv-test-2.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
resource "proxmox_vm_qemu" "srv-test-2" {
name = "srv-test-2"
desc = "Testing Server 2, Testing Application Server, Ubuntu"
agent = 1
target_node = "prx-prod-2"
qemu_os = "other" # default other
bios = "seabios" # default=ovmf
tags = ""

define_connection_info = false

# -- only important for full clone
vmid = 21002
clone = "pkr-ubuntu-noble-2"
# full_clone = true
full_clone = true

# -- boot process
onboot = true
startup = ""
automatic_reboot = false # refuse auto-reboot when changing a setting

cores = 2
sockets = 1
cpu = "host"
memory = 2048
network {
bridge = "vmbr1"
model = "virtio"
tag = -1
}

scsihw = "virtio-scsi-pci" # default virtio-scsi-pci

# disk {
# storage = "pv1"
# type = "virtio"
# size = "40G"
# iothread = 1
# }

# -- lifecycle
lifecycle {
ignore_changes = [
disk,
vm_state
]
}

# Cloud Init Settings
ipconfig0 = "ip=10.20.1.2/16,gw=10.20.0.1"
nameserver = "10.20.0.1"
ciuser = "xcad"
sshkeys = var.PUBLIC_SSH_KEY
}

0 comments on commit 194648b

Please sign in to comment.