1. Packages
  2. Azure Classic
  3. API Docs
  4. extendedlocation
  5. CustomLocation

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi

azure.extendedlocation.CustomLocation

Explore with Pulumi AI

Manages a Custom Location within an Extended Location.

Note: Installing and configuring the Azure Arc Agent on your Kubernetes Cluster to establish connectivity is outside the scope of this document. For more details refer to Deploy agents to your cluster and Connect an existing Kubernetes Cluster. If you encounter issues connecting your Kubernetes Cluster to Azure Arc, we’d recommend opening a ticket with Microsoft Support.

Create CustomLocation Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new CustomLocation(name: string, args: CustomLocationArgs, opts?: CustomResourceOptions);
@overload
def CustomLocation(resource_name: str,
                   args: CustomLocationArgs,
                   opts: Optional[ResourceOptions] = None)

@overload
def CustomLocation(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   cluster_extension_ids: Optional[Sequence[str]] = None,
                   host_resource_id: Optional[str] = None,
                   namespace: Optional[str] = None,
                   resource_group_name: Optional[str] = None,
                   authentication: Optional[CustomLocationAuthenticationArgs] = None,
                   display_name: Optional[str] = None,
                   host_type: Optional[str] = None,
                   location: Optional[str] = None,
                   name: Optional[str] = None)
func NewCustomLocation(ctx *Context, name string, args CustomLocationArgs, opts ...ResourceOption) (*CustomLocation, error)
public CustomLocation(string name, CustomLocationArgs args, CustomResourceOptions? opts = null)
public CustomLocation(String name, CustomLocationArgs args)
public CustomLocation(String name, CustomLocationArgs args, CustomResourceOptions options)
type: azure:extendedlocation:CustomLocation
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. CustomLocationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. CustomLocationArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. CustomLocationArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. CustomLocationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. CustomLocationArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var customLocationResource = new Azure.ExtendedLocation.CustomLocation("customLocationResource", new()
{
    ClusterExtensionIds = new[]
    {
        "string",
    },
    HostResourceId = "string",
    Namespace = "string",
    ResourceGroupName = "string",
    Authentication = new Azure.ExtendedLocation.Inputs.CustomLocationAuthenticationArgs
    {
        Value = "string",
        Type = "string",
    },
    DisplayName = "string",
    HostType = "string",
    Location = "string",
    Name = "string",
});
Copy
example, err := extendedlocation.NewCustomLocation(ctx, "customLocationResource", &extendedlocation.CustomLocationArgs{
	ClusterExtensionIds: pulumi.StringArray{
		pulumi.String("string"),
	},
	HostResourceId:    pulumi.String("string"),
	Namespace:         pulumi.String("string"),
	ResourceGroupName: pulumi.String("string"),
	Authentication: &extendedlocation.CustomLocationAuthenticationArgs{
		Value: pulumi.String("string"),
		Type:  pulumi.String("string"),
	},
	DisplayName: pulumi.String("string"),
	HostType:    pulumi.String("string"),
	Location:    pulumi.String("string"),
	Name:        pulumi.String("string"),
})
Copy
var customLocationResource = new CustomLocation("customLocationResource", CustomLocationArgs.builder()
    .clusterExtensionIds("string")
    .hostResourceId("string")
    .namespace("string")
    .resourceGroupName("string")
    .authentication(CustomLocationAuthenticationArgs.builder()
        .value("string")
        .type("string")
        .build())
    .displayName("string")
    .hostType("string")
    .location("string")
    .name("string")
    .build());
Copy
custom_location_resource = azure.extendedlocation.CustomLocation("customLocationResource",
    cluster_extension_ids=["string"],
    host_resource_id="string",
    namespace="string",
    resource_group_name="string",
    authentication={
        "value": "string",
        "type": "string",
    },
    display_name="string",
    host_type="string",
    location="string",
    name="string")
Copy
const customLocationResource = new azure.extendedlocation.CustomLocation("customLocationResource", {
    clusterExtensionIds: ["string"],
    hostResourceId: "string",
    namespace: "string",
    resourceGroupName: "string",
    authentication: {
        value: "string",
        type: "string",
    },
    displayName: "string",
    hostType: "string",
    location: "string",
    name: "string",
});
Copy
type: azure:extendedlocation:CustomLocation
properties:
    authentication:
        type: string
        value: string
    clusterExtensionIds:
        - string
    displayName: string
    hostResourceId: string
    hostType: string
    location: string
    name: string
    namespace: string
    resourceGroupName: string
Copy

CustomLocation Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The CustomLocation resource accepts the following input properties:

ClusterExtensionIds This property is required. List<string>
Specifies the list of Cluster Extension IDs.
HostResourceId
This property is required.
Changes to this property will trigger replacement.
string
Specifies the host resource ID.
Namespace
This property is required.
Changes to this property will trigger replacement.
string
Specifies the namespace of the Custom Location. Changing this forces a new Custom Location to be created.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
Specifies the name of the Resource Group where the Custom Location should exist. Changing this forces a new Custom Location to be created.
Authentication CustomLocationAuthentication
An authentication block as defined below.
DisplayName string
Specifies the display name of the Custom Location.
HostType Changes to this property will trigger replacement. string
Specifies the host type of the Custom Location. The only possible values is KubernetesCluster.
Location Changes to this property will trigger replacement. string
Specifies the Azure location where the Custom Location should exist. Changing this forces a new Custom Location to be created.
Name Changes to this property will trigger replacement. string
Specifies the name which should be used for this Custom Location. Changing this forces a new Custom Location to be created.
ClusterExtensionIds This property is required. []string
Specifies the list of Cluster Extension IDs.
HostResourceId
This property is required.
Changes to this property will trigger replacement.
string
Specifies the host resource ID.
Namespace
This property is required.
Changes to this property will trigger replacement.
string
Specifies the namespace of the Custom Location. Changing this forces a new Custom Location to be created.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
Specifies the name of the Resource Group where the Custom Location should exist. Changing this forces a new Custom Location to be created.
Authentication CustomLocationAuthenticationArgs
An authentication block as defined below.
DisplayName string
Specifies the display name of the Custom Location.
HostType Changes to this property will trigger replacement. string
Specifies the host type of the Custom Location. The only possible values is KubernetesCluster.
Location Changes to this property will trigger replacement. string
Specifies the Azure location where the Custom Location should exist. Changing this forces a new Custom Location to be created.
Name Changes to this property will trigger replacement. string
Specifies the name which should be used for this Custom Location. Changing this forces a new Custom Location to be created.
clusterExtensionIds This property is required. List<String>
Specifies the list of Cluster Extension IDs.
hostResourceId
This property is required.
Changes to this property will trigger replacement.
String
Specifies the host resource ID.
namespace
This property is required.
Changes to this property will trigger replacement.
String
Specifies the namespace of the Custom Location. Changing this forces a new Custom Location to be created.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
Specifies the name of the Resource Group where the Custom Location should exist. Changing this forces a new Custom Location to be created.
authentication CustomLocationAuthentication
An authentication block as defined below.
displayName String
Specifies the display name of the Custom Location.
hostType Changes to this property will trigger replacement. String
Specifies the host type of the Custom Location. The only possible values is KubernetesCluster.
location Changes to this property will trigger replacement. String
Specifies the Azure location where the Custom Location should exist. Changing this forces a new Custom Location to be created.
name Changes to this property will trigger replacement. String
Specifies the name which should be used for this Custom Location. Changing this forces a new Custom Location to be created.
clusterExtensionIds This property is required. string[]
Specifies the list of Cluster Extension IDs.
hostResourceId
This property is required.
Changes to this property will trigger replacement.
string
Specifies the host resource ID.
namespace
This property is required.
Changes to this property will trigger replacement.
string
Specifies the namespace of the Custom Location. Changing this forces a new Custom Location to be created.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
Specifies the name of the Resource Group where the Custom Location should exist. Changing this forces a new Custom Location to be created.
authentication CustomLocationAuthentication
An authentication block as defined below.
displayName string
Specifies the display name of the Custom Location.
hostType Changes to this property will trigger replacement. string
Specifies the host type of the Custom Location. The only possible values is KubernetesCluster.
location Changes to this property will trigger replacement. string
Specifies the Azure location where the Custom Location should exist. Changing this forces a new Custom Location to be created.
name Changes to this property will trigger replacement. string
Specifies the name which should be used for this Custom Location. Changing this forces a new Custom Location to be created.
cluster_extension_ids This property is required. Sequence[str]
Specifies the list of Cluster Extension IDs.
host_resource_id
This property is required.
Changes to this property will trigger replacement.
str
Specifies the host resource ID.
namespace
This property is required.
Changes to this property will trigger replacement.
str
Specifies the namespace of the Custom Location. Changing this forces a new Custom Location to be created.
resource_group_name
This property is required.
Changes to this property will trigger replacement.
str
Specifies the name of the Resource Group where the Custom Location should exist. Changing this forces a new Custom Location to be created.
authentication CustomLocationAuthenticationArgs
An authentication block as defined below.
display_name str
Specifies the display name of the Custom Location.
host_type Changes to this property will trigger replacement. str
Specifies the host type of the Custom Location. The only possible values is KubernetesCluster.
location Changes to this property will trigger replacement. str
Specifies the Azure location where the Custom Location should exist. Changing this forces a new Custom Location to be created.
name Changes to this property will trigger replacement. str
Specifies the name which should be used for this Custom Location. Changing this forces a new Custom Location to be created.
clusterExtensionIds This property is required. List<String>
Specifies the list of Cluster Extension IDs.
hostResourceId
This property is required.
Changes to this property will trigger replacement.
String
Specifies the host resource ID.
namespace
This property is required.
Changes to this property will trigger replacement.
String
Specifies the namespace of the Custom Location. Changing this forces a new Custom Location to be created.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
Specifies the name of the Resource Group where the Custom Location should exist. Changing this forces a new Custom Location to be created.
authentication Property Map
An authentication block as defined below.
displayName String
Specifies the display name of the Custom Location.
hostType Changes to this property will trigger replacement. String
Specifies the host type of the Custom Location. The only possible values is KubernetesCluster.
location Changes to this property will trigger replacement. String
Specifies the Azure location where the Custom Location should exist. Changing this forces a new Custom Location to be created.
name Changes to this property will trigger replacement. String
Specifies the name which should be used for this Custom Location. Changing this forces a new Custom Location to be created.

Outputs

All input properties are implicitly available as output properties. Additionally, the CustomLocation resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing CustomLocation Resource

Get an existing CustomLocation resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: CustomLocationState, opts?: CustomResourceOptions): CustomLocation
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        authentication: Optional[CustomLocationAuthenticationArgs] = None,
        cluster_extension_ids: Optional[Sequence[str]] = None,
        display_name: Optional[str] = None,
        host_resource_id: Optional[str] = None,
        host_type: Optional[str] = None,
        location: Optional[str] = None,
        name: Optional[str] = None,
        namespace: Optional[str] = None,
        resource_group_name: Optional[str] = None) -> CustomLocation
func GetCustomLocation(ctx *Context, name string, id IDInput, state *CustomLocationState, opts ...ResourceOption) (*CustomLocation, error)
public static CustomLocation Get(string name, Input<string> id, CustomLocationState? state, CustomResourceOptions? opts = null)
public static CustomLocation get(String name, Output<String> id, CustomLocationState state, CustomResourceOptions options)
resources:  _:    type: azure:extendedlocation:CustomLocation    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Authentication CustomLocationAuthentication
An authentication block as defined below.
ClusterExtensionIds List<string>
Specifies the list of Cluster Extension IDs.
DisplayName string
Specifies the display name of the Custom Location.
HostResourceId Changes to this property will trigger replacement. string
Specifies the host resource ID.
HostType Changes to this property will trigger replacement. string
Specifies the host type of the Custom Location. The only possible values is KubernetesCluster.
Location Changes to this property will trigger replacement. string
Specifies the Azure location where the Custom Location should exist. Changing this forces a new Custom Location to be created.
Name Changes to this property will trigger replacement. string
Specifies the name which should be used for this Custom Location. Changing this forces a new Custom Location to be created.
Namespace Changes to this property will trigger replacement. string
Specifies the namespace of the Custom Location. Changing this forces a new Custom Location to be created.
ResourceGroupName Changes to this property will trigger replacement. string
Specifies the name of the Resource Group where the Custom Location should exist. Changing this forces a new Custom Location to be created.
Authentication CustomLocationAuthenticationArgs
An authentication block as defined below.
ClusterExtensionIds []string
Specifies the list of Cluster Extension IDs.
DisplayName string
Specifies the display name of the Custom Location.
HostResourceId Changes to this property will trigger replacement. string
Specifies the host resource ID.
HostType Changes to this property will trigger replacement. string
Specifies the host type of the Custom Location. The only possible values is KubernetesCluster.
Location Changes to this property will trigger replacement. string
Specifies the Azure location where the Custom Location should exist. Changing this forces a new Custom Location to be created.
Name Changes to this property will trigger replacement. string
Specifies the name which should be used for this Custom Location. Changing this forces a new Custom Location to be created.
Namespace Changes to this property will trigger replacement. string
Specifies the namespace of the Custom Location. Changing this forces a new Custom Location to be created.
ResourceGroupName Changes to this property will trigger replacement. string
Specifies the name of the Resource Group where the Custom Location should exist. Changing this forces a new Custom Location to be created.
authentication CustomLocationAuthentication
An authentication block as defined below.
clusterExtensionIds List<String>
Specifies the list of Cluster Extension IDs.
displayName String
Specifies the display name of the Custom Location.
hostResourceId Changes to this property will trigger replacement. String
Specifies the host resource ID.
hostType Changes to this property will trigger replacement. String
Specifies the host type of the Custom Location. The only possible values is KubernetesCluster.
location Changes to this property will trigger replacement. String
Specifies the Azure location where the Custom Location should exist. Changing this forces a new Custom Location to be created.
name Changes to this property will trigger replacement. String
Specifies the name which should be used for this Custom Location. Changing this forces a new Custom Location to be created.
namespace Changes to this property will trigger replacement. String
Specifies the namespace of the Custom Location. Changing this forces a new Custom Location to be created.
resourceGroupName Changes to this property will trigger replacement. String
Specifies the name of the Resource Group where the Custom Location should exist. Changing this forces a new Custom Location to be created.
authentication CustomLocationAuthentication
An authentication block as defined below.
clusterExtensionIds string[]
Specifies the list of Cluster Extension IDs.
displayName string
Specifies the display name of the Custom Location.
hostResourceId Changes to this property will trigger replacement. string
Specifies the host resource ID.
hostType Changes to this property will trigger replacement. string
Specifies the host type of the Custom Location. The only possible values is KubernetesCluster.
location Changes to this property will trigger replacement. string
Specifies the Azure location where the Custom Location should exist. Changing this forces a new Custom Location to be created.
name Changes to this property will trigger replacement. string
Specifies the name which should be used for this Custom Location. Changing this forces a new Custom Location to be created.
namespace Changes to this property will trigger replacement. string
Specifies the namespace of the Custom Location. Changing this forces a new Custom Location to be created.
resourceGroupName Changes to this property will trigger replacement. string
Specifies the name of the Resource Group where the Custom Location should exist. Changing this forces a new Custom Location to be created.
authentication CustomLocationAuthenticationArgs
An authentication block as defined below.
cluster_extension_ids Sequence[str]
Specifies the list of Cluster Extension IDs.
display_name str
Specifies the display name of the Custom Location.
host_resource_id Changes to this property will trigger replacement. str
Specifies the host resource ID.
host_type Changes to this property will trigger replacement. str
Specifies the host type of the Custom Location. The only possible values is KubernetesCluster.
location Changes to this property will trigger replacement. str
Specifies the Azure location where the Custom Location should exist. Changing this forces a new Custom Location to be created.
name Changes to this property will trigger replacement. str
Specifies the name which should be used for this Custom Location. Changing this forces a new Custom Location to be created.
namespace Changes to this property will trigger replacement. str
Specifies the namespace of the Custom Location. Changing this forces a new Custom Location to be created.
resource_group_name Changes to this property will trigger replacement. str
Specifies the name of the Resource Group where the Custom Location should exist. Changing this forces a new Custom Location to be created.
authentication Property Map
An authentication block as defined below.
clusterExtensionIds List<String>
Specifies the list of Cluster Extension IDs.
displayName String
Specifies the display name of the Custom Location.
hostResourceId Changes to this property will trigger replacement. String
Specifies the host resource ID.
hostType Changes to this property will trigger replacement. String
Specifies the host type of the Custom Location. The only possible values is KubernetesCluster.
location Changes to this property will trigger replacement. String
Specifies the Azure location where the Custom Location should exist. Changing this forces a new Custom Location to be created.
name Changes to this property will trigger replacement. String
Specifies the name which should be used for this Custom Location. Changing this forces a new Custom Location to be created.
namespace Changes to this property will trigger replacement. String
Specifies the namespace of the Custom Location. Changing this forces a new Custom Location to be created.
resourceGroupName Changes to this property will trigger replacement. String
Specifies the name of the Resource Group where the Custom Location should exist. Changing this forces a new Custom Location to be created.

Supporting Types

CustomLocationAuthentication
, CustomLocationAuthenticationArgs

Value This property is required. string
Specifies the value of authentication.
Type string
Specifies the type of authentication.
Value This property is required. string
Specifies the value of authentication.
Type string
Specifies the type of authentication.
value This property is required. String
Specifies the value of authentication.
type String
Specifies the type of authentication.
value This property is required. string
Specifies the value of authentication.
type string
Specifies the type of authentication.
value This property is required. str
Specifies the value of authentication.
type str
Specifies the type of authentication.
value This property is required. String
Specifies the value of authentication.
type String
Specifies the type of authentication.

Import

Custom Locations can be imported using the resource id, e.g.

$ pulumi import azure:extendedlocation/customLocation:CustomLocation example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example-resources/providers/Microsoft.ExtendedLocation/customLocations/example-custom-location
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Azure Classic pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.