Hi there,
I'd like to specify the descriptions for ingress and egress rules using aws_security_group resource but this is not allows in terraform. I am pretty limited in permissions so I can not use aws_security_group_rule resource - need to fit everything into aws_security_group resource :-(
When I specify the security group like:
resource "aws_security_group" "some_sg" {
vpc_id = "${data.aws_vpc.selected.id}"
name = "some-name-sg"
description = "Allow incomming and outgoing connections"
tags {
Name = "some-name-sg"
provisioner = "terraform"
}
# Inbound HTTP from the Internet
ingress {
from_port = 80
to_port = 80
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
description = "Allow access from any host"
}
egress {
from_port = 0
to_port = 0
protocol = "-1"
cidr_blocks = ["0.0.0.0/0"]
description = "Allow access everywhere"
}
}
I get the following error on terraform apply:
egress.0: invalid or unknown key: description
Terraform v0.10.6
The security groups should have contained the inbound and outbound rules with descriptions.
I get the following error on terraform apply:
egress.0: invalid or unknown key: description
terraform plan or terraform apply
Terraform running in GitlabCI CI pipeline
This is not yet supported in AWS provider, but once this PR is merged you should be able to use it.
https://github.com/terraform-providers/terraform-provider-aws/pull/1587 has been merged in and the aws provider v1.1.0 is out. After updating using $ terraform init -upgrade the ingress/egress descriptions are supported and don't error out.
This issue can be closed.
This issue has been automatically migrated to terraform-providers/terraform-provider-aws#1975 because it looks like an issue with that provider. If you believe this is _not_ an issue with the provider, please reply to this issue and let us know.
I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Most helpful comment
This is not yet supported in AWS provider, but once this PR is merged you should be able to use it.