Terraform: Feature request: add description to egress/ingress rules in aws_security_group

Created on 29 Sep 2017  ยท  4Comments  ยท  Source: hashicorp/terraform

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 Version

Terraform v0.10.6

Expected Behavior

The security groups should have contained the inbound and outbound rules with descriptions.

Actual Behavior

I get the following error on terraform apply:
egress.0: invalid or unknown key: description

Steps to Reproduce

terraform plan or terraform apply

Important Factoids

Terraform running in GitlabCI CI pipeline

enhancement provideaws

Most helpful comment

This is not yet supported in AWS provider, but once this PR is merged you should be able to use it.

All 4 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

darron picture darron  ยท  3Comments

c4milo picture c4milo  ยท  3Comments

rnowosielski picture rnowosielski  ยท  3Comments

rkulagowski picture rkulagowski  ยท  3Comments

rjinski picture rjinski  ยท  3Comments