Skip to content

Instantly share code, notes, and snippets.

@tprobinson
Created November 14, 2017 23:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tprobinson/1931b33f84c97e5d439a665891cb9fea to your computer and use it in GitHub Desktop.
Save tprobinson/1931b33f84c97e5d439a665891cb9fea to your computer and use it in GitHub Desktop.
Terraform error
aws_security_group.IPWhitelist: Modifying... (ID: sg-deadbeef)
ingress.2549843477.cidr_blocks.#: "1" => "0"
ingress.2549843477.cidr_blocks.0: "<IP1>/32" => ""
ingress.2549843477.description: "IP2Name" => ""
ingress.2549843477.from_port: "0" => "0"
ingress.2549843477.ipv6_cidr_blocks.#: "0" => "0"
ingress.2549843477.protocol: "-1" => ""
ingress.2549843477.security_groups.#: "0" => "0"
ingress.2549843477.self: "false" => "false"
ingress.2549843477.to_port: "0" => "0"
ingress.3238093104.cidr_blocks.#: "0" => "1"
ingress.3238093104.cidr_blocks.0: "" => "<IP1>/32"
ingress.3238093104.description: "" => "IP1Name"
ingress.3238093104.from_port: "" => "0"
ingress.3238093104.ipv6_cidr_blocks.#: "0" => "0"
ingress.3238093104.protocol: "" => "-1"
ingress.3238093104.security_groups.#: "0" => "0"
ingress.3238093104.self: "" => "false"
ingress.3238093104.to_port: "" => "0"
ingress.554573866.cidr_blocks.#: "1" => "1"
ingress.554573866.cidr_blocks.0: "<IP2>/32" => "<IP2>/32"
ingress.554573866.description: "IP2Name" => "IP2Name"
ingress.554573866.from_port: "0" => "0"
ingress.554573866.ipv6_cidr_blocks.#: "0" => "0"
ingress.554573866.protocol: "-1" => "-1"
ingress.554573866.security_groups.#: "0" => "0"
ingress.554573866.self: "false" => "false"
ingress.554573866.to_port: "0" => "0"
Error: Error applying plan:
1 error(s) occurred:
* aws_security_group.IPWhitelist: 1 error(s) occurred:
* aws_security_group.IPWhitelist: Error revoking security group ingress rules: InvalidPermission.NotFound: The specified rule does not exist in this security group.
status code: 400, request id: ba74692f-9b9c-44e5-a277-dc230e018f43
Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.
resource "aws_security_group" "IPWhitelist" {
name = "IP Whitelist"
description = "Allow traffic from certain trusted external points."
vpc_id = "${aws_vpc.management.id}"
ingress {
description = "IP1Name"
from_port = 0
to_port = 0
protocol = -1
cidr_blocks = ["<IP1>/32"]
}
ingress {
description = "IP2Name"
from_port = 0
to_port = 0
protocol = -1
cidr_blocks = ["<IP2>/32"]
}
egress {
from_port = 0
to_port = 0
protocol = "-1"
cidr_blocks = ["0.0.0.0/0"]
}
tags = "${merge(
local.global_tags,
map(
"Name", join(local.delim,list(local.naming_prefix,"Whitelist","SG"))
)
)}"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment