Make Private Networking optional
This commit is contained in:
@@ -4,10 +4,10 @@ resource "digitalocean_droplet" "this" {
|
||||
ipv6 = "true"
|
||||
monitoring = "true"
|
||||
name = "${var.host_name}.${var.domain_name}"
|
||||
private_networking = "true"
|
||||
private_networking = var.use_vpc > 0 ? "true" : "false"
|
||||
region = var.region
|
||||
ssh_keys = var.ssh_keys
|
||||
size = var.size
|
||||
tags = var.tags
|
||||
vpc_uuid = data.digitalocean_vpc.this.id
|
||||
vpc_uuid = var.use_vpc > 0 ? data.digitalocean_vpc.this[0].id : ""
|
||||
}
|
||||
|
Reference in New Issue
Block a user