Resource: azuread_named_location

Manages a Named Location within Azure Active Directory.

API Permissions

The following API permissions are required in order to use this resource.

When authenticated with a service principal, this resource requires the following application roles: Policy.ReadWrite.ConditionalAccess and Policy.Read.All

When authenticated with a user principal, this resource requires one of the following directory roles: Conditional Access Administrator or Global Administrator

Example Usage

resource "azuread_named_location" "example-ip" {
  display_name = "IP Named Location"
  ip {
    ip_ranges = [
      "1.1.1.1/32",
      "2.2.2.2/32",
    ]
    trusted = true
  }
}

resource "azuread_named_location" "example-country" {
  display_name = "Country Named Location"
  country {
    countries_and_regions = [
      "GB",
      "US",
    ]
    include_unknown_countries_and_regions = false
  }
}

Argument Reference

The following arguments are supported:


country block supports the following:


ip block supports the following:


Attributes Reference

In addition to all arguments above, the following attributes are exported:

Import

Named Locations can be imported using the id, e.g.

terraform import azuread_named_location.my_location 00000000-0000-0000-0000-000000000000