· 9 years ago · Sep 15, 2016, 09:56 AM
1provider "aws" {
2 access_key = "${var.access_key}"
3 secret_key = "${var.secret_key}"
4 region = "${var.default_region}"
5}
6
7#What AMI do we want to use for provisioning this resource
8variable "ami_id" {}
9variable "centos_ami_id" {}
10variable "awsaccount" {}
11variable "vpcid" {}
12variable "vpccidr" {}
13variable "vpcname" {}
14variable "subnet" {}
15
16resource "aws_vpc" "demo" {
17 cidr_block = "172.20.0.0/20"
18 enable_dns_support = true
19 enable_dns_hostnames = true
20 tags {
21 Name = "Just a Demo"
22 project = "BOHICA"
23 }
24}
25
26resource "aws_default_route_table" "demo" {
27 default_route_table_id = "${aws_vpc.demo.default_route_table_id}"
28 tags {
29 Name = "Demo_main-route"
30 project = "BOHICA"
31 }
32}
33
34
35→ terraform plan [6233ca6]
36There are warnings and/or errors related to your configuration. Please
37fix these before continuing.
38
39Errors:
40
41 * aws_default_route_table.demo: Provider doesn't support resource: aws_default_route_table