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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

No more than 1 "tcp_options" blocks are allowed #2111

Open
bassg0navy opened this issue May 12, 2024 · 0 comments
Open

No more than 1 "tcp_options" blocks are allowed #2111

bassg0navy opened this issue May 12, 2024 · 0 comments
Labels

Comments

@bassg0navy
Copy link

bassg0navy commented May 12, 2024

Community Note

  • Please vote on this issue by adding a 馃憤 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version and Provider Version

Terraform v1.8.3 on darwin_arm64 on provider registry.terraform.io/hashicorp/oci v5.41.0

Affected Resource(s)

oci_core_security_list

Terraform Configuration Files

locals {ingress_ports = [22, 80, 443, 5000, 8081]}

resource "oci_core_security_list" "pub_security_list" {
  vcn_id         = oci_core_vcn.main.id
  compartment_id = var.compartment_id
  display_name   = "${local.vcn_prefix}-${var.public_subnet_security_list_display_name}"

  ingress_security_rules {
    protocol    = 6 # TCP protocol for SSH
    source      = "0.0.0.0/0"
    description = "Allow tcp traffic (SSH, HTTP(s), Flask, Expo) from all sources"

    dynamic "tcp_options" {
      for_each = local.ingress_ports
      iterator = port
      content {
        max = port.value
        min = port.value
      }
    }
  }
}

Debug Output

Gist

Expected Behavior

Terraform should have created an ingress_security_rules for each port listed in local.ingress_ports

Actual Behavior

Error states that no more than 1 tcp_option block are allowed inside an ingress_security_rules attribute. Why are dynamic blocks allowed inside this attribute for tcp_options if more than one can't be specified for ingress_security_rules?

Steps to Reproduce

  1. terraform plan

References

@bassg0navy bassg0navy added the bug label May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant