Browse Source

fix syntax

main
Felix Kronlage-Dammers 3 months ago
parent
commit
ccf2f3ae24
  1. 31
      server.tf

31
server.tf

@ -29,12 +29,12 @@ variable "dnsimple_account" {
variable "dnsimple_domain" {
type = string
default = "example.net"
default = "example.com"
}
variable "hostname_fqdn" {
type = string
default = "my-hostname.example.net"
default = "my-hostname.example.com"
}
variable "hostname" {
@ -49,17 +49,17 @@ variable "hostname_alias" {
variable "storage_name" {
type = string
default = var.hostname
default = "my-storage"
}
variable "ip4_name" {
type = string
default = var.hostname +"_ip4"
default = "my-ip4"
}
variable "ip6_name" {
type = string
default = var.hostname +"_ip6"
default = "my-ip6"
}
variable "cores" {
@ -91,6 +91,7 @@ resource "gridscale_server" "server" {
memory = var.memory
power = true
ipv4 = gridscale_ipv4.ip.id
ipv6 = gridscale_ipv6.ip.id
hardware_profile = "q35"
storage {
@ -152,6 +153,10 @@ resource "gridscale_ipv4" "ip" {
name = var.ip4_name
}
resource "gridscale_ipv6" "ip" {
name = var.ip6_name
}
output "server_ip" {
value = gridscale_ipv4.ip.ip
}
@ -164,3 +169,19 @@ resource "dnsimple_zone_record" "foobar" {
ttl = 3600
}
resource "dnsimple_zone_record" "foobar2" {
zone_name = "${var.dnsimple_domain}"
name = var.hostname_alias
value = gridscale_ipv4.ip.ip
type = "A"
ttl = 3600
}
resource "dnsimple_zone_record" "foobar3" {
zone_name = "${var.dnsimple_domain}"
name = var.hostname_alias
value = gridscale_ipv6.ip.ip
type = "AAAA"
ttl = 3600
}

Loading…
Cancel
Save