Terraform: self doesn't work in aws_security_group

Created on 16 Apr 2015  ยท  3Comments  ยท  Source: hashicorp/terraform

It's necessary in AWS to all members of a group to talk to each other, thus the following would be helpful; it's currently an error.

    ingress {
        from_port = 9300
        to_port = 9300
        protocol = "tcp"
        security_groups = ["${self.id}"]
    }
* resource 'aws_security_group.elasticsearch_master' config: cannot contain self-reference self.id

Most helpful comment

This is difficult to search when jogging your memory and this issue comes up still, the answer is to use the self argument today: https://www.terraform.io/docs/providers/aws/r/security_group_rule.html#self

All 3 comments

You can only use self in provisioners currently. Sorry!

This is difficult to search when jogging your memory and this issue comes up still, the answer is to use the self argument today: https://www.terraform.io/docs/providers/aws/r/security_group_rule.html#self

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

jeroenjacobs79 picture jeroenjacobs79  ยท  3Comments

rjinski picture rjinski  ยท  3Comments

darron picture darron  ยท  3Comments

carl-youngblood picture carl-youngblood  ยท  3Comments

pawelsawicz picture pawelsawicz  ยท  3Comments