1. Packages
  2. Azure Native v2
  3. API Docs
  4. hybridcloud
  5. CloudConnection
These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi

azure-native-v2.hybridcloud.CloudConnection

Explore with Pulumi AI

These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi

Resource which represents the managed network connection between Azure Gateways and remote cloud gateways. Azure REST API version: 2023-01-01-preview. Prior API version in Azure Native 1.x: 2023-01-01-preview.

Example Usage

Create a Cloud Connection

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;

return await Deployment.RunAsync(() => 
{
    var cloudConnection = new AzureNative.HybridCloud.CloudConnection("cloudConnection", new()
    {
        CloudConnectionName = "cloudconnection1",
        CloudConnector = new AzureNative.HybridCloud.Inputs.ResourceReferenceArgs
        {
            Id = "/subscriptions/subid/resourceGroups/demo-rg/providers/Microsoft.HybridCloud/cloudConnectors/123456789012",
        },
        Location = "West US",
        RemoteResourceId = "arn:aws:ec2:us-east-1:123456789012:VPNGateway/vgw-043da592550819c8a",
        ResourceGroupName = "demo-rg",
        SharedKey = "password123",
        VirtualHub = new AzureNative.HybridCloud.Inputs.ResourceReferenceArgs
        {
            Id = "/subscriptions/subid/resourceGroups/demo-rg/providers/Microsoft.Network/VirtualHubs/testHub",
        },
    });

});
Copy
package main

import (
	hybridcloud "github.com/pulumi/pulumi-azure-native-sdk/hybridcloud/v2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := hybridcloud.NewCloudConnection(ctx, "cloudConnection", &hybridcloud.CloudConnectionArgs{
			CloudConnectionName: pulumi.String("cloudconnection1"),
			CloudConnector: &hybridcloud.ResourceReferenceArgs{
				Id: pulumi.String("/subscriptions/subid/resourceGroups/demo-rg/providers/Microsoft.HybridCloud/cloudConnectors/123456789012"),
			},
			Location:          pulumi.String("West US"),
			RemoteResourceId:  pulumi.String("arn:aws:ec2:us-east-1:123456789012:VPNGateway/vgw-043da592550819c8a"),
			ResourceGroupName: pulumi.String("demo-rg"),
			SharedKey:         pulumi.String("password123"),
			VirtualHub: &hybridcloud.ResourceReferenceArgs{
				Id: pulumi.String("/subscriptions/subid/resourceGroups/demo-rg/providers/Microsoft.Network/VirtualHubs/testHub"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.hybridcloud.CloudConnection;
import com.pulumi.azurenative.hybridcloud.CloudConnectionArgs;
import com.pulumi.azurenative.hybridcloud.inputs.ResourceReferenceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var cloudConnection = new CloudConnection("cloudConnection", CloudConnectionArgs.builder()
            .cloudConnectionName("cloudconnection1")
            .cloudConnector(ResourceReferenceArgs.builder()
                .id("/subscriptions/subid/resourceGroups/demo-rg/providers/Microsoft.HybridCloud/cloudConnectors/123456789012")
                .build())
            .location("West US")
            .remoteResourceId("arn:aws:ec2:us-east-1:123456789012:VPNGateway/vgw-043da592550819c8a")
            .resourceGroupName("demo-rg")
            .sharedKey("password123")
            .virtualHub(ResourceReferenceArgs.builder()
                .id("/subscriptions/subid/resourceGroups/demo-rg/providers/Microsoft.Network/VirtualHubs/testHub")
                .build())
            .build());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const cloudConnection = new azure_native.hybridcloud.CloudConnection("cloudConnection", {
    cloudConnectionName: "cloudconnection1",
    cloudConnector: {
        id: "/subscriptions/subid/resourceGroups/demo-rg/providers/Microsoft.HybridCloud/cloudConnectors/123456789012",
    },
    location: "West US",
    remoteResourceId: "arn:aws:ec2:us-east-1:123456789012:VPNGateway/vgw-043da592550819c8a",
    resourceGroupName: "demo-rg",
    sharedKey: "password123",
    virtualHub: {
        id: "/subscriptions/subid/resourceGroups/demo-rg/providers/Microsoft.Network/VirtualHubs/testHub",
    },
});
Copy
import pulumi
import pulumi_azure_native as azure_native

cloud_connection = azure_native.hybridcloud.CloudConnection("cloudConnection",
    cloud_connection_name="cloudconnection1",
    cloud_connector={
        "id": "/subscriptions/subid/resourceGroups/demo-rg/providers/Microsoft.HybridCloud/cloudConnectors/123456789012",
    },
    location="West US",
    remote_resource_id="arn:aws:ec2:us-east-1:123456789012:VPNGateway/vgw-043da592550819c8a",
    resource_group_name="demo-rg",
    shared_key="password123",
    virtual_hub={
        "id": "/subscriptions/subid/resourceGroups/demo-rg/providers/Microsoft.Network/VirtualHubs/testHub",
    })
Copy
resources:
  cloudConnection:
    type: azure-native:hybridcloud:CloudConnection
    properties:
      cloudConnectionName: cloudconnection1
      cloudConnector:
        id: /subscriptions/subid/resourceGroups/demo-rg/providers/Microsoft.HybridCloud/cloudConnectors/123456789012
      location: West US
      remoteResourceId: arn:aws:ec2:us-east-1:123456789012:VPNGateway/vgw-043da592550819c8a
      resourceGroupName: demo-rg
      sharedKey: password123
      virtualHub:
        id: /subscriptions/subid/resourceGroups/demo-rg/providers/Microsoft.Network/VirtualHubs/testHub
Copy

Create CloudConnection Resource

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

Constructor syntax

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

@overload
def CloudConnection(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    resource_group_name: Optional[str] = None,
                    cloud_connection_name: Optional[str] = None,
                    cloud_connector: Optional[ResourceReferenceArgs] = None,
                    location: Optional[str] = None,
                    remote_resource_id: Optional[str] = None,
                    shared_key: Optional[str] = None,
                    tags: Optional[Mapping[str, str]] = None,
                    virtual_hub: Optional[ResourceReferenceArgs] = None)
func NewCloudConnection(ctx *Context, name string, args CloudConnectionArgs, opts ...ResourceOption) (*CloudConnection, error)
public CloudConnection(string name, CloudConnectionArgs args, CustomResourceOptions? opts = null)
public CloudConnection(String name, CloudConnectionArgs args)
public CloudConnection(String name, CloudConnectionArgs args, CustomResourceOptions options)
type: azure-native:hybridcloud:CloudConnection
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. CloudConnectionArgs
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. CloudConnectionArgs
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. CloudConnectionArgs
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. CloudConnectionArgs
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. CloudConnectionArgs
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 cloudConnectionResource = new AzureNative.Hybridcloud.CloudConnection("cloudConnectionResource", new()
{
    ResourceGroupName = "string",
    CloudConnectionName = "string",
    CloudConnector = 
    {
        { "id", "string" },
    },
    Location = "string",
    RemoteResourceId = "string",
    SharedKey = "string",
    Tags = 
    {
        { "string", "string" },
    },
    VirtualHub = 
    {
        { "id", "string" },
    },
});
Copy
example, err := hybridcloud.NewCloudConnection(ctx, "cloudConnectionResource", &hybridcloud.CloudConnectionArgs{
	ResourceGroupName:   "string",
	CloudConnectionName: "string",
	CloudConnector: map[string]interface{}{
		"id": "string",
	},
	Location:         "string",
	RemoteResourceId: "string",
	SharedKey:        "string",
	Tags: map[string]interface{}{
		"string": "string",
	},
	VirtualHub: map[string]interface{}{
		"id": "string",
	},
})
Copy
var cloudConnectionResource = new CloudConnection("cloudConnectionResource", CloudConnectionArgs.builder()
    .resourceGroupName("string")
    .cloudConnectionName("string")
    .cloudConnector(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
    .location("string")
    .remoteResourceId("string")
    .sharedKey("string")
    .tags(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
    .virtualHub(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
    .build());
Copy
cloud_connection_resource = azure_native.hybridcloud.CloudConnection("cloudConnectionResource",
    resource_group_name=string,
    cloud_connection_name=string,
    cloud_connector={
        id: string,
    },
    location=string,
    remote_resource_id=string,
    shared_key=string,
    tags={
        string: string,
    },
    virtual_hub={
        id: string,
    })
Copy
const cloudConnectionResource = new azure_native.hybridcloud.CloudConnection("cloudConnectionResource", {
    resourceGroupName: "string",
    cloudConnectionName: "string",
    cloudConnector: {
        id: "string",
    },
    location: "string",
    remoteResourceId: "string",
    sharedKey: "string",
    tags: {
        string: "string",
    },
    virtualHub: {
        id: "string",
    },
});
Copy
type: azure-native:hybridcloud:CloudConnection
properties:
    cloudConnectionName: string
    cloudConnector:
        id: string
    location: string
    remoteResourceId: string
    resourceGroupName: string
    sharedKey: string
    tags:
        string: string
    virtualHub:
        id: string
Copy

CloudConnection 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 CloudConnection resource accepts the following input properties:

ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group. The name is case insensitive.
CloudConnectionName Changes to this property will trigger replacement. string
The name of the cloud connection resource
CloudConnector Changes to this property will trigger replacement. Pulumi.AzureNative.HybridCloud.Inputs.ResourceReference
The cloud connector which discovered the remote resource.
Location Changes to this property will trigger replacement. string
The geo-location where the resource lives
RemoteResourceId Changes to this property will trigger replacement. string
Identifier for the remote cloud resource
SharedKey string
Shared key of the cloud connection.
Tags Dictionary<string, string>
Resource tags.
VirtualHub Changes to this property will trigger replacement. Pulumi.AzureNative.HybridCloud.Inputs.ResourceReference
The virtualHub to which the cloud connection belongs.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group. The name is case insensitive.
CloudConnectionName Changes to this property will trigger replacement. string
The name of the cloud connection resource
CloudConnector Changes to this property will trigger replacement. ResourceReferenceArgs
The cloud connector which discovered the remote resource.
Location Changes to this property will trigger replacement. string
The geo-location where the resource lives
RemoteResourceId Changes to this property will trigger replacement. string
Identifier for the remote cloud resource
SharedKey string
Shared key of the cloud connection.
Tags map[string]string
Resource tags.
VirtualHub Changes to this property will trigger replacement. ResourceReferenceArgs
The virtualHub to which the cloud connection belongs.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group. The name is case insensitive.
cloudConnectionName Changes to this property will trigger replacement. String
The name of the cloud connection resource
cloudConnector Changes to this property will trigger replacement. ResourceReference
The cloud connector which discovered the remote resource.
location Changes to this property will trigger replacement. String
The geo-location where the resource lives
remoteResourceId Changes to this property will trigger replacement. String
Identifier for the remote cloud resource
sharedKey String
Shared key of the cloud connection.
tags Map<String,String>
Resource tags.
virtualHub Changes to this property will trigger replacement. ResourceReference
The virtualHub to which the cloud connection belongs.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group. The name is case insensitive.
cloudConnectionName Changes to this property will trigger replacement. string
The name of the cloud connection resource
cloudConnector Changes to this property will trigger replacement. ResourceReference
The cloud connector which discovered the remote resource.
location Changes to this property will trigger replacement. string
The geo-location where the resource lives
remoteResourceId Changes to this property will trigger replacement. string
Identifier for the remote cloud resource
sharedKey string
Shared key of the cloud connection.
tags {[key: string]: string}
Resource tags.
virtualHub Changes to this property will trigger replacement. ResourceReference
The virtualHub to which the cloud connection belongs.
resource_group_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the resource group. The name is case insensitive.
cloud_connection_name Changes to this property will trigger replacement. str
The name of the cloud connection resource
cloud_connector Changes to this property will trigger replacement. ResourceReferenceArgs
The cloud connector which discovered the remote resource.
location Changes to this property will trigger replacement. str
The geo-location where the resource lives
remote_resource_id Changes to this property will trigger replacement. str
Identifier for the remote cloud resource
shared_key str
Shared key of the cloud connection.
tags Mapping[str, str]
Resource tags.
virtual_hub Changes to this property will trigger replacement. ResourceReferenceArgs
The virtualHub to which the cloud connection belongs.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group. The name is case insensitive.
cloudConnectionName Changes to this property will trigger replacement. String
The name of the cloud connection resource
cloudConnector Changes to this property will trigger replacement. Property Map
The cloud connector which discovered the remote resource.
location Changes to this property will trigger replacement. String
The geo-location where the resource lives
remoteResourceId Changes to this property will trigger replacement. String
Identifier for the remote cloud resource
sharedKey String
Shared key of the cloud connection.
tags Map<String>
Resource tags.
virtualHub Changes to this property will trigger replacement. Property Map
The virtualHub to which the cloud connection belongs.

Outputs

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

Etag string
A unique read-only string that changes whenever the resource is updated.
Id string
The provider-assigned unique ID for this managed resource.
Name string
The name of the resource
ProvisioningState string
The provisioning state of the cloud collection resource.
SystemData Pulumi.AzureNative.HybridCloud.Outputs.SystemDataResponse
Azure Resource Manager metadata containing createdBy and modifiedBy information.
Type string
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Etag string
A unique read-only string that changes whenever the resource is updated.
Id string
The provider-assigned unique ID for this managed resource.
Name string
The name of the resource
ProvisioningState string
The provisioning state of the cloud collection resource.
SystemData SystemDataResponse
Azure Resource Manager metadata containing createdBy and modifiedBy information.
Type string
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
etag String
A unique read-only string that changes whenever the resource is updated.
id String
The provider-assigned unique ID for this managed resource.
name String
The name of the resource
provisioningState String
The provisioning state of the cloud collection resource.
systemData SystemDataResponse
Azure Resource Manager metadata containing createdBy and modifiedBy information.
type String
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
etag string
A unique read-only string that changes whenever the resource is updated.
id string
The provider-assigned unique ID for this managed resource.
name string
The name of the resource
provisioningState string
The provisioning state of the cloud collection resource.
systemData SystemDataResponse
Azure Resource Manager metadata containing createdBy and modifiedBy information.
type string
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
etag str
A unique read-only string that changes whenever the resource is updated.
id str
The provider-assigned unique ID for this managed resource.
name str
The name of the resource
provisioning_state str
The provisioning state of the cloud collection resource.
system_data SystemDataResponse
Azure Resource Manager metadata containing createdBy and modifiedBy information.
type str
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
etag String
A unique read-only string that changes whenever the resource is updated.
id String
The provider-assigned unique ID for this managed resource.
name String
The name of the resource
provisioningState String
The provisioning state of the cloud collection resource.
systemData Property Map
Azure Resource Manager metadata containing createdBy and modifiedBy information.
type String
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

Supporting Types

ResourceReference
, ResourceReferenceArgs

Id string
Resource ID.
Id string
Resource ID.
id String
Resource ID.
id string
Resource ID.
id str
Resource ID.
id String
Resource ID.

ResourceReferenceResponse
, ResourceReferenceResponseArgs

Id string
Resource ID.
Id string
Resource ID.
id String
Resource ID.
id string
Resource ID.
id str
Resource ID.
id String
Resource ID.

SystemDataResponse
, SystemDataResponseArgs

CreatedAt string
The timestamp of resource creation (UTC).
CreatedBy string
The identity that created the resource.
CreatedByType string
The type of identity that created the resource.
LastModifiedAt string
The timestamp of resource last modification (UTC)
LastModifiedBy string
The identity that last modified the resource.
LastModifiedByType string
The type of identity that last modified the resource.
CreatedAt string
The timestamp of resource creation (UTC).
CreatedBy string
The identity that created the resource.
CreatedByType string
The type of identity that created the resource.
LastModifiedAt string
The timestamp of resource last modification (UTC)
LastModifiedBy string
The identity that last modified the resource.
LastModifiedByType string
The type of identity that last modified the resource.
createdAt String
The timestamp of resource creation (UTC).
createdBy String
The identity that created the resource.
createdByType String
The type of identity that created the resource.
lastModifiedAt String
The timestamp of resource last modification (UTC)
lastModifiedBy String
The identity that last modified the resource.
lastModifiedByType String
The type of identity that last modified the resource.
createdAt string
The timestamp of resource creation (UTC).
createdBy string
The identity that created the resource.
createdByType string
The type of identity that created the resource.
lastModifiedAt string
The timestamp of resource last modification (UTC)
lastModifiedBy string
The identity that last modified the resource.
lastModifiedByType string
The type of identity that last modified the resource.
created_at str
The timestamp of resource creation (UTC).
created_by str
The identity that created the resource.
created_by_type str
The type of identity that created the resource.
last_modified_at str
The timestamp of resource last modification (UTC)
last_modified_by str
The identity that last modified the resource.
last_modified_by_type str
The type of identity that last modified the resource.
createdAt String
The timestamp of resource creation (UTC).
createdBy String
The identity that created the resource.
createdByType String
The type of identity that created the resource.
lastModifiedAt String
The timestamp of resource last modification (UTC)
lastModifiedBy String
The identity that last modified the resource.
lastModifiedByType String
The type of identity that last modified the resource.

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:hybridcloud:CloudConnection cloudconnection1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCloud/cloudConnections/{cloudConnectionName} 
Copy

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

Package Details

Repository
azure-native-v2 pulumi/pulumi-azure-native
License
Apache-2.0
These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi