terraform-provider-oci icon indicating copy to clipboard operation
terraform-provider-oci copied to clipboard

new security list rule syntax

Open JBAnderson5 opened this issue 2 years ago • 5 comments

affected_resources = oci_core_security_list

I noticed a change in some of the documentation for security list rules, but not in the accompanying example code. This looks like a new syntax as it is not in previous versions of the provider. Instead of declaring the destination ports directly in "tcp options" object. there is a new "destination port range" object where you declare the ports. This now mirrors the "source port range" object. This is changed for tcp and udp for ingress and egress rules.

  1. I want to confirm that this is new syntax before changing my code?
  2. How long will we be supporting backwards compatibility of old syntax?
  3. Can we update the docs and examples to match?

example code excerpt: ` tcp_options {

        #Optional
        max = var.security_list_ingress_security_rules_tcp_options_destination_port_range_max
        min = var.security_list_ingress_security_rules_tcp_options_destination_port_range_min
        source_port_range {
            #Required
            max = var.security_list_ingress_security_rules_tcp_options_source_port_range_max
            min = var.security_list_ingress_security_rules_tcp_options_source_port_range_min
        }
    }`

description in docs:

tcp_options - (Optional) (Updatable) Optional and valid only for TCP. Use to specify particular destination ports for TCP rules. If you specify TCP as the protocol but omit this object, then all destination ports are allowed. destination_port_range - (Optional) (Updatable) max - (Optional) (Updatable) The maximum port number. Must not be lower than the minimum port number. To specify a single port number, set both the min and max to the same value. min - (Optional) (Updatable) The minimum port number. Must not be greater than the maximum port number. source_port_range - (Optional) (Updatable) max - (Required) (Updatable) The maximum port number. Must not be lower than the minimum port number. To specify a single port number, set both the min and max to the same value. min - (Required) (Updatable) The minimum port number. Must not be greater than the maximum port number.

JBAnderson5 avatar Jul 07 '22 03:07 JBAnderson5

Related to https://github.com/oracle/terraform-provider-oci/issues/1324

DevOpsFu avatar Mar 13 '23 22:03 DevOpsFu

Thank you for reporting the issue. We observed the affected resources are not provided in the description or it's incorrect. We request you to add it in issue description as mentioned in below format. Example: affected_resources = oci_core_instance , oci_core_instances

If it's not related to any particular resource then mention affected resource as terraform. Example: affected_resources = terraform

As this works through automation, request you to follow exact syntax.

ravinitp avatar Mar 16 '23 14:03 ravinitp

affected resources added to description

JBAnderson5 avatar Mar 20 '23 16:03 JBAnderson5

how can we define multiple ports eg 80, 443 ?

yyyadvendra avatar Dec 21 '23 07:12 yyyadvendra

how can we define multiple ports eg 80, 443 ?

@yyyadvendra You can declare more than one ingress_security_rules block. So in this case you would have two, one with a min/max port of 80 and another with a min/max port of 443.

DevOpsFu avatar Dec 21 '23 09:12 DevOpsFu