Skip to content

azurermIpGroup

Manages an IP group that contains a list of CIDRs and/or IP addresses.

Example Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as azurerm from "./.gen/providers/azurerm";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: azurerm.
For a more precise conversion please use the --provider flag in convert.*/
const azurermResourceGroupExample = new azurerm.resourceGroup.ResourceGroup(
  this,
  "example",
  {
    location: "West Europe",
    name: "example-rg",
  }
);
const azurermIpGroupExample = new azurerm.ipGroup.IpGroup(this, "example_1", {
  cidrs: ["192.168.0.1", "172.16.240.0/20", "10.48.0.0/12"],
  location: azurermResourceGroupExample.location,
  name: "example1-ipgroup",
  resource_group_name: azurermResourceGroupExample.name,
  tags: {
    environment: "Production",
  },
});
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermIpGroupExample.overrideLogicalId("example");

Arguments Reference

The following arguments are supported:

  • name - (Required) Specifies the name of the IP group. Changing this forces a new resource to be created.

  • resourceGroupName - (Required) The name of the resource group in which to create the IP group. Changing this forces a new resource to be created.

  • location - (Required) Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

  • cidrs - (Optional) A list of CIDRs or IP addresses.

\~> NOTE: The AzureRM Terraform provider provides cidr support via the standalone resource azurerm_ip_group_cidr and in-line within this resource using the cidrs property. You cannot use both methods simultaneously. If cidrs are set via the resource azurermIpGroupCidr then ignoreChanges should be used in the ip group configuration.

  • tags - (Optional) A mapping of tags to assign to the resource.

Attributes Reference

In addition to the Arguments listed above - the following Attributes are exported:

  • id - The ID of the IP group.

  • firewallIds - A firewallIds block as defined below.

  • firewallPolicyIds - A firewallPolicyIds block as defined below.

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

  • create - (Defaults to 30 minutes) Used when creating the IP Group.
  • update - (Defaults to 30 minutes) Used when updating the IP Group.
  • read - (Defaults to 5 minutes) Used when retrieving the IP Group.
  • delete - (Defaults to 30 minutes) Used when deleting the IP Group.

Import

IP Groups can be imported using the resourceId, e.g.

terraform import azurerm_ip_group.ipgroup1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/ipGroups/myIpGroup