FEATURES PRICING ABOUT DOCS LOGIN

azure_security_group_rule

Creates a new network Security Group Rule to be associated with a number of given Security Groups.

~> NOTE on Security Group Rules: for usability purposes; Terraform allows the addition of a single Security Group Rule to multiple Security Groups, despite it having to define each rule individually per Security Group on Azure. As a result; in the event that one of the Rules on one of the Groups is modified by external factors, Terraform cannot reason as to whether or not that change should be propagated to the others; let alone choose one changed Rule configuration over another in case of a conflic. As such; terraform refresh only checks that the rule is still defined for each of the specified security_group_names; ignoring the actual parameters of the Rule and not updating the state with regards to them.

Example Usage

resource "azure_security_group" "web" {
    ...
}

resource "azure_security_group" "apps" {
    ...
}

resource "azure_security_group_rule" "ssh_access" {
    name = "ssh-access-rule"
    security_group_names = ["${azure_security_group.web.name}", "${azure_security_group.apps.name}"]
    type = "Inbound"
    action = "Allow"
    priority = 200
    source_address_prefix = "100.0.0.0/32"
    source_port_range = "*"
    destination_address_prefix = "10.0.0.0/32"
    destination_port_range = "22"
    protocol = "TCP"
}

Argument Reference

The following arguments are supported:

The following attributes are exported:


See the source of this document at Terraform.io

REQUEST A DEMO