how to append new rules in aws security group using terraform

1,263 views
Skip to first unread message

Balaji Ramachandran

unread,
Jul 30, 2018, 7:40:52 AM7/30/18
to Terraform
As stated by terraform that we can modify the existing settings without destroying the running config.
I am trying to add he new security rules into the existing security group and also want to modify the existing ingress or egree rule.
How to do that? 
Best Regards
Bala

Clint Shryock

unread,
Jul 31, 2018, 11:27:42 AM7/31/18
to Terraform
I believe it's very common to use a combination of aws_security_group and aws_security_group_rule resources:


After creating the group, you can add/remove individual rules with configuration. Note that the aws_security_group_rule resource is incompatible with listing rules in-line in the configuration of aws_security_group.

Cheers,
Clint
Reply all
Reply to author
Forward
0 new messages