· 9 years ago · Aug 24, 2016, 09:48 AM
1This is my config
2
3
4provider "aws" {
5 access_key = "XXXXXXXXXX"
6 secret_key = "XXXXXXXXXX"
7 region = "eu-west-1"
8}
9
10resource "aws_instance" "tformexample" {
11 ami = "ami-7289ff01"
12 instance_type = "t2.micro"
13 key_name = "cdggroup1"
14 subnet_id = "subnet-4d36ce15"
15}
16
17resource "aws_security_group" "allow_all" {
18 name = "allow_all"
19 description = "Aloow all inbound traffic"
20
21 ingress {
22 from_port = 22
23 to_port = 22
24 protocl = "tcp"
25 cidr_blocks = ["0.0.0.0/0"]
26 }
27
28 egress {
29 from_port = 22
30 to_port = 22
31 protocl = "tcp"
32 cidr_blocks = ["0.0.0.0/0"]
33 security_group_id = "sg-66082501"
34 }
35}
36
37
38
39
40
41
42This is the error i'm getting---------
43
44
45./terraform plan
46There are warnings and/or errors related to your configuration. Please
47fix these before continuing.
48
49Errors:
50
51 * aws_security_group.allow_all: "ingress.0.protocol": required field is not set
52 * aws_security_group.allow_all: ingress.0: invalid or unknown key: protocl
53 * aws_security_group.allow_all: "egress.0.protocol": required field is not set
54 * aws_security_group.allow_all: egress.0: invalid or unknown key: protocl
55 * aws_security_group.allow_all: egress.0: invalid or unknown key: security_group_id