Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a data source for VPC Security Groups and ACLs #1223

Closed
dprosper opened this issue Mar 25, 2020 · 3 comments
Closed

Add a data source for VPC Security Groups and ACLs #1223

dprosper opened this issue Mar 25, 2020 · 3 comments

Comments

@dprosper
Copy link
Contributor

We need a data source for VPC Gen 1 and VPC Gen 2 security groups and ACLs. It is needed in order to retrieve and modify the default security group and default ACL that are created. It might be useful as well to get a full list of all security groups and ACLs

@condescendent
Copy link

Is it resolved? how could I add new rules to the default security group created with my vpc ?

@ileneruth
Copy link

You can reference the default_security_group of a newly created VPC using 'default_security_group' as in the example below, where I have added a rule to the default security group. (Ref: https://cloud.ibm.com/docs/terraform?topic=terraform-vpc-gen2-resources#vpc-output)

resource "ibm_is_security_group_rule" "allow_ssh_traffic" {

group = ibm_is_vpc.main_vpc.default_security_group
direction = "inbound"

tcp {
port_min = 22
port_max = 22
}
}

That said, I need to be able to delete a security group rule from the default security group and I cannot find any way to do that!

@hkantare
Copy link
Collaborator

hkantare commented Dec 7, 2020

We developed support for datasource for security groups..
https://cloud.ibm.com/docs/terraform?topic=terraform-vpc-gen2-data-sources#sec-group-datasource

@hkantare hkantare closed this as completed Dec 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants