Skip to content
This repository has been archived by the owner on Oct 23, 2020. It is now read-only.

Commit

Permalink
push dhcp-options example
Browse files Browse the repository at this point in the history
  • Loading branch information
outscale-rjt committed Feb 9, 2018
1 parent cac3d22 commit 7d441e4
Showing 1 changed file with 72 additions and 0 deletions.
72 changes: 72 additions & 0 deletions examples/dhcp-options/vpc.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
resource "osc_vpc" "vpc-1" {

cidr_block = "192.168.0.0/16"

tags {
Name = "${var.project}"
}

}

resource "osc_subnet" "vpc-subnet-1" {

vpc_id = "${osc_vpc.vpc-1.id}"
cidr_block = "192.168.0.0/16"
availability_zone = "eu-west-2a"

tags {
Name = "${var.project}"
}

}

resource "osc_internet_gateway" "gw-1" {

vpc_id = "${osc_vpc.vpc-1.id}"
tags {
Name = "internet-gateway"
}

}

resource "osc_route_table" "rt-1" {

vpc_id = "${osc_vpc.vpc-1.id}"
route {
cidr_block = "0.0.0.0/0"
gateway_id = "${osc_internet_gateway.gw-1.id}"
}

tags {
Name = "Default-1"
}

}

resource "osc_route_table_association" "attach-rt" {

subnet_id = "${osc_subnet.vpc-subnet-1.id}"
route_table_id = "${osc_route_table.rt-1.id}"

}

resource "osc_eip" "eip-1" {

vpc = true

}

resource "osc_vpc_dhcp_options" "doptions-1" {

domain_name = "contoso.lan"
domain_name_servers = [ "192.168.0.10", "8.8.8.8", "8.8.4.4" ]
ntp_servers = [ "129.250.35.251", "198.60.22.240", "138.68.46.177", "107.155.72.167" ]

}

resource "osc_vpc_dhcp_options_association" "attach-doptions-1" {

vpc_id = "${osc_vpc.vpc-1.id}"
dhcp_options_id = "${osc_vpc_dhcp_options.doptions-1.id}"

}

0 comments on commit 7d441e4

Please sign in to comment.