We recommend using Azure Native.
azure.devcenter.AttachedNetwork
Explore with Pulumi AI
Manages a Dev Center Attached Network.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.core.ResourceGroup("example", {
name: "example-dcan",
location: "West Europe",
});
const exampleVirtualNetwork = new azure.network.VirtualNetwork("example", {
name: "example-vnet",
addressSpaces: ["10.0.0.0/16"],
location: example.location,
resourceGroupName: example.name,
});
const exampleSubnet = new azure.network.Subnet("example", {
name: "internal",
resourceGroupName: example.name,
virtualNetworkName: exampleVirtualNetwork.name,
addressPrefixes: ["10.0.2.0/24"],
});
const exampleDevCenter = new azure.devcenter.DevCenter("example", {
name: "example-dc",
resourceGroupName: example.name,
location: example.location,
identity: {
type: "SystemAssigned",
},
});
const exampleNetworkConnection = new azure.devcenter.NetworkConnection("example", {
name: "example-dcnc",
resourceGroupName: example.name,
location: example.location,
domainJoinType: "AzureADJoin",
subnetId: exampleSubnet.id,
});
const exampleAttachedNetwork = new azure.devcenter.AttachedNetwork("example", {
name: "example-dcet",
devCenterId: exampleDevCenter.id,
networkConnectionId: exampleNetworkConnection.id,
});
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
name="example-dcan",
location="West Europe")
example_virtual_network = azure.network.VirtualNetwork("example",
name="example-vnet",
address_spaces=["10.0.0.0/16"],
location=example.location,
resource_group_name=example.name)
example_subnet = azure.network.Subnet("example",
name="internal",
resource_group_name=example.name,
virtual_network_name=example_virtual_network.name,
address_prefixes=["10.0.2.0/24"])
example_dev_center = azure.devcenter.DevCenter("example",
name="example-dc",
resource_group_name=example.name,
location=example.location,
identity={
"type": "SystemAssigned",
})
example_network_connection = azure.devcenter.NetworkConnection("example",
name="example-dcnc",
resource_group_name=example.name,
location=example.location,
domain_join_type="AzureADJoin",
subnet_id=example_subnet.id)
example_attached_network = azure.devcenter.AttachedNetwork("example",
name="example-dcet",
dev_center_id=example_dev_center.id,
network_connection_id=example_network_connection.id)
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/devcenter"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
Name: pulumi.String("example-dcan"),
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{
Name: pulumi.String("example-vnet"),
AddressSpaces: pulumi.StringArray{
pulumi.String("10.0.0.0/16"),
},
Location: example.Location,
ResourceGroupName: example.Name,
})
if err != nil {
return err
}
exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{
Name: pulumi.String("internal"),
ResourceGroupName: example.Name,
VirtualNetworkName: exampleVirtualNetwork.Name,
AddressPrefixes: pulumi.StringArray{
pulumi.String("10.0.2.0/24"),
},
})
if err != nil {
return err
}
exampleDevCenter, err := devcenter.NewDevCenter(ctx, "example", &devcenter.DevCenterArgs{
Name: pulumi.String("example-dc"),
ResourceGroupName: example.Name,
Location: example.Location,
Identity: &devcenter.DevCenterIdentityArgs{
Type: pulumi.String("SystemAssigned"),
},
})
if err != nil {
return err
}
exampleNetworkConnection, err := devcenter.NewNetworkConnection(ctx, "example", &devcenter.NetworkConnectionArgs{
Name: pulumi.String("example-dcnc"),
ResourceGroupName: example.Name,
Location: example.Location,
DomainJoinType: pulumi.String("AzureADJoin"),
SubnetId: exampleSubnet.ID(),
})
if err != nil {
return err
}
_, err = devcenter.NewAttachedNetwork(ctx, "example", &devcenter.AttachedNetworkArgs{
Name: pulumi.String("example-dcet"),
DevCenterId: exampleDevCenter.ID(),
NetworkConnectionId: exampleNetworkConnection.ID(),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = new Azure.Core.ResourceGroup("example", new()
{
Name = "example-dcan",
Location = "West Europe",
});
var exampleVirtualNetwork = new Azure.Network.VirtualNetwork("example", new()
{
Name = "example-vnet",
AddressSpaces = new[]
{
"10.0.0.0/16",
},
Location = example.Location,
ResourceGroupName = example.Name,
});
var exampleSubnet = new Azure.Network.Subnet("example", new()
{
Name = "internal",
ResourceGroupName = example.Name,
VirtualNetworkName = exampleVirtualNetwork.Name,
AddressPrefixes = new[]
{
"10.0.2.0/24",
},
});
var exampleDevCenter = new Azure.DevCenter.DevCenter("example", new()
{
Name = "example-dc",
ResourceGroupName = example.Name,
Location = example.Location,
Identity = new Azure.DevCenter.Inputs.DevCenterIdentityArgs
{
Type = "SystemAssigned",
},
});
var exampleNetworkConnection = new Azure.DevCenter.NetworkConnection("example", new()
{
Name = "example-dcnc",
ResourceGroupName = example.Name,
Location = example.Location,
DomainJoinType = "AzureADJoin",
SubnetId = exampleSubnet.Id,
});
var exampleAttachedNetwork = new Azure.DevCenter.AttachedNetwork("example", new()
{
Name = "example-dcet",
DevCenterId = exampleDevCenter.Id,
NetworkConnectionId = exampleNetworkConnection.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.network.VirtualNetwork;
import com.pulumi.azure.network.VirtualNetworkArgs;
import com.pulumi.azure.network.Subnet;
import com.pulumi.azure.network.SubnetArgs;
import com.pulumi.azure.devcenter.DevCenter;
import com.pulumi.azure.devcenter.DevCenterArgs;
import com.pulumi.azure.devcenter.inputs.DevCenterIdentityArgs;
import com.pulumi.azure.devcenter.NetworkConnection;
import com.pulumi.azure.devcenter.NetworkConnectionArgs;
import com.pulumi.azure.devcenter.AttachedNetwork;
import com.pulumi.azure.devcenter.AttachedNetworkArgs;
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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
.name("example-dcan")
.location("West Europe")
.build());
var exampleVirtualNetwork = new VirtualNetwork("exampleVirtualNetwork", VirtualNetworkArgs.builder()
.name("example-vnet")
.addressSpaces("10.0.0.0/16")
.location(example.location())
.resourceGroupName(example.name())
.build());
var exampleSubnet = new Subnet("exampleSubnet", SubnetArgs.builder()
.name("internal")
.resourceGroupName(example.name())
.virtualNetworkName(exampleVirtualNetwork.name())
.addressPrefixes("10.0.2.0/24")
.build());
var exampleDevCenter = new DevCenter("exampleDevCenter", DevCenterArgs.builder()
.name("example-dc")
.resourceGroupName(example.name())
.location(example.location())
.identity(DevCenterIdentityArgs.builder()
.type("SystemAssigned")
.build())
.build());
var exampleNetworkConnection = new NetworkConnection("exampleNetworkConnection", NetworkConnectionArgs.builder()
.name("example-dcnc")
.resourceGroupName(example.name())
.location(example.location())
.domainJoinType("AzureADJoin")
.subnetId(exampleSubnet.id())
.build());
var exampleAttachedNetwork = new AttachedNetwork("exampleAttachedNetwork", AttachedNetworkArgs.builder()
.name("example-dcet")
.devCenterId(exampleDevCenter.id())
.networkConnectionId(exampleNetworkConnection.id())
.build());
}
}
resources:
example:
type: azure:core:ResourceGroup
properties:
name: example-dcan
location: West Europe
exampleVirtualNetwork:
type: azure:network:VirtualNetwork
name: example
properties:
name: example-vnet
addressSpaces:
- 10.0.0.0/16
location: ${example.location}
resourceGroupName: ${example.name}
exampleSubnet:
type: azure:network:Subnet
name: example
properties:
name: internal
resourceGroupName: ${example.name}
virtualNetworkName: ${exampleVirtualNetwork.name}
addressPrefixes:
- 10.0.2.0/24
exampleDevCenter:
type: azure:devcenter:DevCenter
name: example
properties:
name: example-dc
resourceGroupName: ${example.name}
location: ${example.location}
identity:
type: SystemAssigned
exampleNetworkConnection:
type: azure:devcenter:NetworkConnection
name: example
properties:
name: example-dcnc
resourceGroupName: ${example.name}
location: ${example.location}
domainJoinType: AzureADJoin
subnetId: ${exampleSubnet.id}
exampleAttachedNetwork:
type: azure:devcenter:AttachedNetwork
name: example
properties:
name: example-dcet
devCenterId: ${exampleDevCenter.id}
networkConnectionId: ${exampleNetworkConnection.id}
Create AttachedNetwork Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AttachedNetwork(name: string, args: AttachedNetworkArgs, opts?: CustomResourceOptions);
@overload
def AttachedNetwork(resource_name: str,
args: AttachedNetworkArgs,
opts: Optional[ResourceOptions] = None)
@overload
def AttachedNetwork(resource_name: str,
opts: Optional[ResourceOptions] = None,
dev_center_id: Optional[str] = None,
network_connection_id: Optional[str] = None,
name: Optional[str] = None)
func NewAttachedNetwork(ctx *Context, name string, args AttachedNetworkArgs, opts ...ResourceOption) (*AttachedNetwork, error)
public AttachedNetwork(string name, AttachedNetworkArgs args, CustomResourceOptions? opts = null)
public AttachedNetwork(String name, AttachedNetworkArgs args)
public AttachedNetwork(String name, AttachedNetworkArgs args, CustomResourceOptions options)
type: azure:devcenter:AttachedNetwork
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args AttachedNetworkArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args AttachedNetworkArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args AttachedNetworkArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AttachedNetworkArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AttachedNetworkArgs
- 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 attachedNetworkResource = new Azure.DevCenter.AttachedNetwork("attachedNetworkResource", new()
{
DevCenterId = "string",
NetworkConnectionId = "string",
Name = "string",
});
example, err := devcenter.NewAttachedNetwork(ctx, "attachedNetworkResource", &devcenter.AttachedNetworkArgs{
DevCenterId: pulumi.String("string"),
NetworkConnectionId: pulumi.String("string"),
Name: pulumi.String("string"),
})
var attachedNetworkResource = new AttachedNetwork("attachedNetworkResource", AttachedNetworkArgs.builder()
.devCenterId("string")
.networkConnectionId("string")
.name("string")
.build());
attached_network_resource = azure.devcenter.AttachedNetwork("attachedNetworkResource",
dev_center_id="string",
network_connection_id="string",
name="string")
const attachedNetworkResource = new azure.devcenter.AttachedNetwork("attachedNetworkResource", {
devCenterId: "string",
networkConnectionId: "string",
name: "string",
});
type: azure:devcenter:AttachedNetwork
properties:
devCenterId: string
name: string
networkConnectionId: string
AttachedNetwork 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 AttachedNetwork resource accepts the following input properties:
- Dev
Center stringId - The ID of the associated Dev Center. Changing this forces a new resource to be created.
- Network
Connection stringId - The ID of the Dev Center Network Connection you want to attach. Changing this forces a new resource to be created.
- Name string
- Specifies the name of this Dev Center Attached Network. Changing this forces a new resource to be created.
- Dev
Center stringId - The ID of the associated Dev Center. Changing this forces a new resource to be created.
- Network
Connection stringId - The ID of the Dev Center Network Connection you want to attach. Changing this forces a new resource to be created.
- Name string
- Specifies the name of this Dev Center Attached Network. Changing this forces a new resource to be created.
- dev
Center StringId - The ID of the associated Dev Center. Changing this forces a new resource to be created.
- network
Connection StringId - The ID of the Dev Center Network Connection you want to attach. Changing this forces a new resource to be created.
- name String
- Specifies the name of this Dev Center Attached Network. Changing this forces a new resource to be created.
- dev
Center stringId - The ID of the associated Dev Center. Changing this forces a new resource to be created.
- network
Connection stringId - The ID of the Dev Center Network Connection you want to attach. Changing this forces a new resource to be created.
- name string
- Specifies the name of this Dev Center Attached Network. Changing this forces a new resource to be created.
- dev_
center_ strid - The ID of the associated Dev Center. Changing this forces a new resource to be created.
- network_
connection_ strid - The ID of the Dev Center Network Connection you want to attach. Changing this forces a new resource to be created.
- name str
- Specifies the name of this Dev Center Attached Network. Changing this forces a new resource to be created.
- dev
Center StringId - The ID of the associated Dev Center. Changing this forces a new resource to be created.
- network
Connection StringId - The ID of the Dev Center Network Connection you want to attach. Changing this forces a new resource to be created.
- name String
- Specifies the name of this Dev Center Attached Network. Changing this forces a new resource to be created.
Outputs
All input properties are implicitly available as output properties. Additionally, the AttachedNetwork 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 AttachedNetwork Resource
Get an existing AttachedNetwork 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?: AttachedNetworkState, opts?: CustomResourceOptions): AttachedNetwork
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
dev_center_id: Optional[str] = None,
name: Optional[str] = None,
network_connection_id: Optional[str] = None) -> AttachedNetwork
func GetAttachedNetwork(ctx *Context, name string, id IDInput, state *AttachedNetworkState, opts ...ResourceOption) (*AttachedNetwork, error)
public static AttachedNetwork Get(string name, Input<string> id, AttachedNetworkState? state, CustomResourceOptions? opts = null)
public static AttachedNetwork get(String name, Output<String> id, AttachedNetworkState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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.
- Dev
Center stringId - The ID of the associated Dev Center. Changing this forces a new resource to be created.
- Name string
- Specifies the name of this Dev Center Attached Network. Changing this forces a new resource to be created.
- Network
Connection stringId - The ID of the Dev Center Network Connection you want to attach. Changing this forces a new resource to be created.
- Dev
Center stringId - The ID of the associated Dev Center. Changing this forces a new resource to be created.
- Name string
- Specifies the name of this Dev Center Attached Network. Changing this forces a new resource to be created.
- Network
Connection stringId - The ID of the Dev Center Network Connection you want to attach. Changing this forces a new resource to be created.
- dev
Center StringId - The ID of the associated Dev Center. Changing this forces a new resource to be created.
- name String
- Specifies the name of this Dev Center Attached Network. Changing this forces a new resource to be created.
- network
Connection StringId - The ID of the Dev Center Network Connection you want to attach. Changing this forces a new resource to be created.
- dev
Center stringId - The ID of the associated Dev Center. Changing this forces a new resource to be created.
- name string
- Specifies the name of this Dev Center Attached Network. Changing this forces a new resource to be created.
- network
Connection stringId - The ID of the Dev Center Network Connection you want to attach. Changing this forces a new resource to be created.
- dev_
center_ strid - The ID of the associated Dev Center. Changing this forces a new resource to be created.
- name str
- Specifies the name of this Dev Center Attached Network. Changing this forces a new resource to be created.
- network_
connection_ strid - The ID of the Dev Center Network Connection you want to attach. Changing this forces a new resource to be created.
- dev
Center StringId - The ID of the associated Dev Center. Changing this forces a new resource to be created.
- name String
- Specifies the name of this Dev Center Attached Network. Changing this forces a new resource to be created.
- network
Connection StringId - The ID of the Dev Center Network Connection you want to attach. Changing this forces a new resource to be created.
Import
An existing Dev Center Attached Network can be imported into Pulumi using the resource id
, e.g.
$ pulumi import azure:devcenter/attachedNetwork:AttachedNetwork example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DevCenter/devCenters/dc1/attachedNetworks/et1
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.