This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# General | |
digitalocean_token = "<your-do-token>" | |
dc_domain = "my.dc" | |
dc_name_suffix = "my-dc" | |
digitalocean_region = "fra1" | |
# DNS | |
dns_memory_size = "4gb" | |
dns_image = "<your-dns-image-id>" | |
powerdns_api_key = "pass1234" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- https://raw.githubusercontent.com/PowerDNS/pdns/rel/auth-4.1.x/modules/gmysqlbackend/schema.mysql.sql | |
USE powerdns; | |
CREATE TABLE domains ( | |
id INT AUTO_INCREMENT, | |
name VARCHAR(255) NOT NULL, | |
master VARCHAR(128) DEFAULT NULL, | |
last_check INT DEFAULT NULL, | |
type VARCHAR(6) NOT NULL, | |
notified_serial INT DEFAULT NULL, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# MySQL Configuration file | |
launch=gmysql | |
gmysql-host=localhost | |
gmysql-dbname=powerdns | |
gmysql-user=<power_admin> | |
gmysql-password=<power_admin_password> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data "template_file" "node_user_data" { | |
template = file("templates/user_data") | |
vars = { | |
dns_ip = var.dns_ip | |
dns_name = var.dns_name | |
} | |
} | |
resource "digitalocean_droplet" "node" { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#cloud-config | |
manage_resolv_conf: true | |
resolv_conf: | |
nameservers: ['${dns_ip}'] | |
searchdomains: | |
- ${dns_name} | |
package_upgrade: false | |
package_update: true | |
packages: | |
- net-tools |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
volume_ids = [ | |
digitalocean_volume.node_volume.id] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "digitalocean_volume" "node_volume" { | |
name = "node.volume" | |
region = var.digitalocean_region | |
size = "160" | |
} | |
resource "digitalocean_droplet" "bastion" { | |
name = "node" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "digitalocean_droplet" "web" { | |
name = "web-${count.index + 1}" | |
count = var.web_servers_size | |
image = var.web_server_image | |
region = var.digitalocean_region | |
size = var.web_server_memory_size | |
monitoring = true | |
private_networking = true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
provider "digitalocean" { | |
token = var.digitalocean_token | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
web_server_image = "centos-7-x64" | |
web_server_ssh_keys = [ | |
"123", | |
"456" | |
] |
NewerOlder