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

[FEAT] Support setting source and destination for alicloud_security_group_rule #7732

Open
TheOignon opened this issue Oct 15, 2024 · 0 comments

Comments

@TheOignon
Copy link

TheOignon commented Oct 15, 2024

Description

The current version of the alicloud_security_group_rule only allow to set one type of CIDR : source for Ingress, dest for Egress. Everything is mapped through the cidr_ip field. Though officially Alibabacloud supports to set both source and dest in the UI and in the Alibabacloud GO SDK.
It would be nice to populate those changes directly to this resource in the Terraform provider.

Terraform Version

v1.9.7

Affected Resource(s)

Please list the resources as a list, for example:

  • alicloud_security_group_rule

If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.

Terraform Actual Configuration

resource "alicloud_security_group_rule" "allow_all_tcp" {
  type              = "ingress"
  ip_protocol       = "tcp"
  nic_type          = "internet"
  policy            = "accept"
  port_range        = "1/65535"
  priority          = 1
  security_group_id = alicloud_security_group.default.id
  cidr_ip           = "0.0.0.0/0"
}

Terraform Desired Configuration

resource "alicloud_security_group_rule" "allow_all_tcp_only_to_this_ip" {
  type              = "ingress"
  ip_protocol       = "tcp"
  nic_type          = "internet"
  policy            = "accept"
  port_range        = "1/65535"
  priority          = 1
  security_group_id = alicloud_security_group.default.id
  source_cidr_ip    = "0.0.0.0/0"
  dest_cidr_ip      = "192.168.0.1/32"
}
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

1 participant