· 7 years ago · Dec 28, 2018, 02:00 PM
1provider "aws" {
2 region = "us-east-2"
3 access_key = ""
4 secret_key = ""
5
6}
7
8resource "aws_route53_zone" "test_zone" {
9 name = "test.zone_name"
10 vpc {
11 vpc_id = "${vpc_id}"
12 }
13}
14resource "aws_route53_record" "test_record" {
15 zone_id = "${aws_route53_zone.test_zone.zone_id}"
16 name = "sub.test.zone_name"
17 type = "CNAME"
18 ttl = "30"
19 records = [
20 "${zone_record}"
21 ]
22}
23
24resource "aws_instance" "test_instance" {
25 ami = "${ami_id}"
26 instance_type = "${aws_instance_type}"
27
28 vpc_security_group_ids = ["${aws_route53_zone.test_zone.zone_id}"]
29 key_name = "${istance_private_key}"
30 tags = {
31 Name = "terraform-task"
32 Terraform = "Task"
33 }
34}
35
36resoucre "aws_eip" "lb" {
37 instance = "${aws_instance.test_instance.id}"
38 private_ips = ["", ""]
39}