invalid or unknown key: cidr_block

343 views
Skip to first unread message

fjro...@paradigmadigital.com

unread,
Sep 7, 2016, 7:34:27 AM9/7/16
to Terraform
"terraform plan" issues an error when I create a new security group:

resource "aws_security_group" "bastion-ssh-pub" {
  name          = "bastion-ssh-pub"
  vpc_id        = "${aws_vpc.main.id}"
  description   = "Bastion SSH public"
  ingress {
    from_port   = 22
    to_port     = 22
    protocol    = "tcp"
    cidr_block  = ["0.0.0.0/0"]
  }
  egress {
    from_port   = 22
    to_port     = 22
    protocol    = "tcp"
    cidr_blocks = ["${aws_vpc.main.cidr_blocks}"]
  }
  tags {
    Name        = "bastion-ssh-pub"
  }
}

ERROR:

  * aws_security_group.bastion-ssh-pub: ingress.0: invalid or unknown key: cidr_block

From documentation I have checked structure and syntax is correct.


Regards.
Francisco

Lowe Schmidt

unread,
Sep 7, 2016, 7:35:41 AM9/7/16
to terrafo...@googlegroups.com
it's cidr_blocks as in multiple

--
Lowe Schmidt | +46 723 867 157

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/hashicorp/terraform/issues
IRC: #terraform-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Terraform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to terraform-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/terraform-tool/09205069-39ac-42d6-8f20-c41572e26926%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
Message has been deleted
0 new messages