Skip to content

Multiple remote_port issue #220

@codeuday95

Description

@codeuday95

Is there an existing issue for this?

  • I have searched the existing issues

Greenfield/Brownfield provisioning

greenfield

Terraform Version

1.3.7

Module Version

5.0.0

AzureRM Provider Version

3.39.1

Affected Resource(s)/Data Source(s)

remote_port

Terraform Configuration Files

remote_port = "80,8080" 
not able to take multiple ports

tfvars variables values

not needed

Debug Output/Panic Output

# module.windowsservers.azurerm_network_security_rule.vm[0] will be created
  + resource "azurerm_network_security_rule" "vm" {
      + access                      = "Allow"
      + description                 = "Allow remote protocol in from all locations"
      + destination_address_prefix  = "*"
      + destination_port_range      = "3389,8080"
      + direction                   = "Inbound"
      + id                          = (known after apply)
      + name                        = "allow_remote_3389,8080_in_all"
      + network_security_group_name = "azureclivm-nsg"
      + priority                    = 101
      + protocol                    = "Tcp"
      + resource_group_name         = "Azurecli-Dev-Rg"
      + source_address_prefixes     = [
          + "0.0.0.0/0",
        ]
      + source_port_range           = "*"
    }

Expected Behaviour

No response

Actual Behaviour

Error: creating/updating Security Rule: (Name "allow_remote_3389,8080_in_all" / Network Security Group Name "azureclivm-nsg" / Resource Group "Azurecli-Dev-Rg"): network.SecurityRulesClient#CreateOrUpdate: Failure sending request: StatusCode=400 -- Original Error: Code="SecurityRuleInvalidPortRange" Message="Security rule has invalid Port range. Value provided: 3389,8080. Value should be an integer OR integer range with '-' delimiter. Valid range 0-65535." Details=[]

│ with module.windowsservers.azurerm_network_security_rule.vm[0],
│ on .terraform/modules/windowsservers/main.tf line 347, in resource "azurerm_network_security_rule" "vm":
│ 347: resource "azurerm_network_security_rule" "vm"

Steps to Reproduce

terraform apply

Important Factoids

No response

References

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions