1. Packages
  2. Azure Classic
  3. API Docs
  4. network
  5. NetworkManagerStaticMember

We recommend using Azure Native.

Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi

azure.network.NetworkManagerStaticMember

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi

    Manages a Network Manager Static Member.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = new azure.core.ResourceGroup("example", {
        name: "example-resources",
        location: "West Europe",
    });
    const current = azure.core.getSubscription({});
    const exampleNetworkManager = new azure.network.NetworkManager("example", {
        name: "example-network-manager",
        location: example.location,
        resourceGroupName: example.name,
        scope: {
            subscriptionIds: [current.then(current => current.id)],
        },
        scopeAccesses: [
            "Connectivity",
            "SecurityAdmin",
        ],
        description: "example network manager",
    });
    const exampleNetworkManagerNetworkGroup = new azure.network.NetworkManagerNetworkGroup("example", {
        name: "example-group",
        networkManagerId: exampleNetworkManager.id,
        description: "example network group",
    });
    const exampleVirtualNetwork = new azure.network.VirtualNetwork("example", {
        name: "example-vnet",
        resourceGroupName: example.name,
        addressSpaces: ["192.168.1.0/24"],
        location: example.location,
    });
    const exampleNetworkManagerStaticMember = new azure.network.NetworkManagerStaticMember("example", {
        name: "example-nmsm",
        networkGroupId: exampleNetworkManagerNetworkGroup.id,
        targetVirtualNetworkId: exampleVirtualNetwork.id,
    });
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.core.ResourceGroup("example",
        name="example-resources",
        location="West Europe")
    current = azure.core.get_subscription()
    example_network_manager = azure.network.NetworkManager("example",
        name="example-network-manager",
        location=example.location,
        resource_group_name=example.name,
        scope={
            "subscription_ids": [current.id],
        },
        scope_accesses=[
            "Connectivity",
            "SecurityAdmin",
        ],
        description="example network manager")
    example_network_manager_network_group = azure.network.NetworkManagerNetworkGroup("example",
        name="example-group",
        network_manager_id=example_network_manager.id,
        description="example network group")
    example_virtual_network = azure.network.VirtualNetwork("example",
        name="example-vnet",
        resource_group_name=example.name,
        address_spaces=["192.168.1.0/24"],
        location=example.location)
    example_network_manager_static_member = azure.network.NetworkManagerStaticMember("example",
        name="example-nmsm",
        network_group_id=example_network_manager_network_group.id,
        target_virtual_network_id=example_virtual_network.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
    	"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-resources"),
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		current, err := core.LookupSubscription(ctx, &core.LookupSubscriptionArgs{}, nil)
    		if err != nil {
    			return err
    		}
    		exampleNetworkManager, err := network.NewNetworkManager(ctx, "example", &network.NetworkManagerArgs{
    			Name:              pulumi.String("example-network-manager"),
    			Location:          example.Location,
    			ResourceGroupName: example.Name,
    			Scope: &network.NetworkManagerScopeArgs{
    				SubscriptionIds: pulumi.StringArray{
    					pulumi.String(current.Id),
    				},
    			},
    			ScopeAccesses: pulumi.StringArray{
    				pulumi.String("Connectivity"),
    				pulumi.String("SecurityAdmin"),
    			},
    			Description: pulumi.String("example network manager"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleNetworkManagerNetworkGroup, err := network.NewNetworkManagerNetworkGroup(ctx, "example", &network.NetworkManagerNetworkGroupArgs{
    			Name:             pulumi.String("example-group"),
    			NetworkManagerId: exampleNetworkManager.ID(),
    			Description:      pulumi.String("example network group"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{
    			Name:              pulumi.String("example-vnet"),
    			ResourceGroupName: example.Name,
    			AddressSpaces: pulumi.StringArray{
    				pulumi.String("192.168.1.0/24"),
    			},
    			Location: example.Location,
    		})
    		if err != nil {
    			return err
    		}
    		_, err = network.NewNetworkManagerStaticMember(ctx, "example", &network.NetworkManagerStaticMemberArgs{
    			Name:                   pulumi.String("example-nmsm"),
    			NetworkGroupId:         exampleNetworkManagerNetworkGroup.ID(),
    			TargetVirtualNetworkId: exampleVirtualNetwork.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-resources",
            Location = "West Europe",
        });
    
        var current = Azure.Core.GetSubscription.Invoke();
    
        var exampleNetworkManager = new Azure.Network.NetworkManager("example", new()
        {
            Name = "example-network-manager",
            Location = example.Location,
            ResourceGroupName = example.Name,
            Scope = new Azure.Network.Inputs.NetworkManagerScopeArgs
            {
                SubscriptionIds = new[]
                {
                    current.Apply(getSubscriptionResult => getSubscriptionResult.Id),
                },
            },
            ScopeAccesses = new[]
            {
                "Connectivity",
                "SecurityAdmin",
            },
            Description = "example network manager",
        });
    
        var exampleNetworkManagerNetworkGroup = new Azure.Network.NetworkManagerNetworkGroup("example", new()
        {
            Name = "example-group",
            NetworkManagerId = exampleNetworkManager.Id,
            Description = "example network group",
        });
    
        var exampleVirtualNetwork = new Azure.Network.VirtualNetwork("example", new()
        {
            Name = "example-vnet",
            ResourceGroupName = example.Name,
            AddressSpaces = new[]
            {
                "192.168.1.0/24",
            },
            Location = example.Location,
        });
    
        var exampleNetworkManagerStaticMember = new Azure.Network.NetworkManagerStaticMember("example", new()
        {
            Name = "example-nmsm",
            NetworkGroupId = exampleNetworkManagerNetworkGroup.Id,
            TargetVirtualNetworkId = exampleVirtualNetwork.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.core.CoreFunctions;
    import com.pulumi.azure.core.inputs.GetSubscriptionArgs;
    import com.pulumi.azure.network.NetworkManager;
    import com.pulumi.azure.network.NetworkManagerArgs;
    import com.pulumi.azure.network.inputs.NetworkManagerScopeArgs;
    import com.pulumi.azure.network.NetworkManagerNetworkGroup;
    import com.pulumi.azure.network.NetworkManagerNetworkGroupArgs;
    import com.pulumi.azure.network.VirtualNetwork;
    import com.pulumi.azure.network.VirtualNetworkArgs;
    import com.pulumi.azure.network.NetworkManagerStaticMember;
    import com.pulumi.azure.network.NetworkManagerStaticMemberArgs;
    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-resources")
                .location("West Europe")
                .build());
    
            final var current = CoreFunctions.getSubscription();
    
            var exampleNetworkManager = new NetworkManager("exampleNetworkManager", NetworkManagerArgs.builder()
                .name("example-network-manager")
                .location(example.location())
                .resourceGroupName(example.name())
                .scope(NetworkManagerScopeArgs.builder()
                    .subscriptionIds(current.applyValue(getSubscriptionResult -> getSubscriptionResult.id()))
                    .build())
                .scopeAccesses(            
                    "Connectivity",
                    "SecurityAdmin")
                .description("example network manager")
                .build());
    
            var exampleNetworkManagerNetworkGroup = new NetworkManagerNetworkGroup("exampleNetworkManagerNetworkGroup", NetworkManagerNetworkGroupArgs.builder()
                .name("example-group")
                .networkManagerId(exampleNetworkManager.id())
                .description("example network group")
                .build());
    
            var exampleVirtualNetwork = new VirtualNetwork("exampleVirtualNetwork", VirtualNetworkArgs.builder()
                .name("example-vnet")
                .resourceGroupName(example.name())
                .addressSpaces("192.168.1.0/24")
                .location(example.location())
                .build());
    
            var exampleNetworkManagerStaticMember = new NetworkManagerStaticMember("exampleNetworkManagerStaticMember", NetworkManagerStaticMemberArgs.builder()
                .name("example-nmsm")
                .networkGroupId(exampleNetworkManagerNetworkGroup.id())
                .targetVirtualNetworkId(exampleVirtualNetwork.id())
                .build());
    
        }
    }
    
    resources:
      example:
        type: azure:core:ResourceGroup
        properties:
          name: example-resources
          location: West Europe
      exampleNetworkManager:
        type: azure:network:NetworkManager
        name: example
        properties:
          name: example-network-manager
          location: ${example.location}
          resourceGroupName: ${example.name}
          scope:
            subscriptionIds:
              - ${current.id}
          scopeAccesses:
            - Connectivity
            - SecurityAdmin
          description: example network manager
      exampleNetworkManagerNetworkGroup:
        type: azure:network:NetworkManagerNetworkGroup
        name: example
        properties:
          name: example-group
          networkManagerId: ${exampleNetworkManager.id}
          description: example network group
      exampleVirtualNetwork:
        type: azure:network:VirtualNetwork
        name: example
        properties:
          name: example-vnet
          resourceGroupName: ${example.name}
          addressSpaces:
            - 192.168.1.0/24
          location: ${example.location}
      exampleNetworkManagerStaticMember:
        type: azure:network:NetworkManagerStaticMember
        name: example
        properties:
          name: example-nmsm
          networkGroupId: ${exampleNetworkManagerNetworkGroup.id}
          targetVirtualNetworkId: ${exampleVirtualNetwork.id}
    variables:
      current:
        fn::invoke:
          Function: azure:core:getSubscription
          Arguments: {}
    

    Create NetworkManagerStaticMember Resource

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

    Constructor syntax

    new NetworkManagerStaticMember(name: string, args: NetworkManagerStaticMemberArgs, opts?: CustomResourceOptions);
    @overload
    def NetworkManagerStaticMember(resource_name: str,
                                   args: NetworkManagerStaticMemberArgs,
                                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def NetworkManagerStaticMember(resource_name: str,
                                   opts: Optional[ResourceOptions] = None,
                                   network_group_id: Optional[str] = None,
                                   target_virtual_network_id: Optional[str] = None,
                                   name: Optional[str] = None)
    func NewNetworkManagerStaticMember(ctx *Context, name string, args NetworkManagerStaticMemberArgs, opts ...ResourceOption) (*NetworkManagerStaticMember, error)
    public NetworkManagerStaticMember(string name, NetworkManagerStaticMemberArgs args, CustomResourceOptions? opts = null)
    public NetworkManagerStaticMember(String name, NetworkManagerStaticMemberArgs args)
    public NetworkManagerStaticMember(String name, NetworkManagerStaticMemberArgs args, CustomResourceOptions options)
    
    type: azure:network:NetworkManagerStaticMember
    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 NetworkManagerStaticMemberArgs
    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 NetworkManagerStaticMemberArgs
    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 NetworkManagerStaticMemberArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args NetworkManagerStaticMemberArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args NetworkManagerStaticMemberArgs
    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 networkManagerStaticMemberResource = new Azure.Network.NetworkManagerStaticMember("networkManagerStaticMemberResource", new()
    {
        NetworkGroupId = "string",
        TargetVirtualNetworkId = "string",
        Name = "string",
    });
    
    example, err := network.NewNetworkManagerStaticMember(ctx, "networkManagerStaticMemberResource", &network.NetworkManagerStaticMemberArgs{
    	NetworkGroupId:         pulumi.String("string"),
    	TargetVirtualNetworkId: pulumi.String("string"),
    	Name:                   pulumi.String("string"),
    })
    
    var networkManagerStaticMemberResource = new NetworkManagerStaticMember("networkManagerStaticMemberResource", NetworkManagerStaticMemberArgs.builder()
        .networkGroupId("string")
        .targetVirtualNetworkId("string")
        .name("string")
        .build());
    
    network_manager_static_member_resource = azure.network.NetworkManagerStaticMember("networkManagerStaticMemberResource",
        network_group_id="string",
        target_virtual_network_id="string",
        name="string")
    
    const networkManagerStaticMemberResource = new azure.network.NetworkManagerStaticMember("networkManagerStaticMemberResource", {
        networkGroupId: "string",
        targetVirtualNetworkId: "string",
        name: "string",
    });
    
    type: azure:network:NetworkManagerStaticMember
    properties:
        name: string
        networkGroupId: string
        targetVirtualNetworkId: string
    

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

    NetworkGroupId string
    Specifies the ID of the Network Manager Group. Changing this forces a new Network Manager Static Member to be created.
    TargetVirtualNetworkId string
    Specifies the Resource ID of the Virtual Network using as the Static Member. Changing this forces a new Network Manager Static Member to be created.
    Name string
    Specifies the name which should be used for this Network Manager Static Member. Changing this forces a new Network Manager Static Member to be created.
    NetworkGroupId string
    Specifies the ID of the Network Manager Group. Changing this forces a new Network Manager Static Member to be created.
    TargetVirtualNetworkId string
    Specifies the Resource ID of the Virtual Network using as the Static Member. Changing this forces a new Network Manager Static Member to be created.
    Name string
    Specifies the name which should be used for this Network Manager Static Member. Changing this forces a new Network Manager Static Member to be created.
    networkGroupId String
    Specifies the ID of the Network Manager Group. Changing this forces a new Network Manager Static Member to be created.
    targetVirtualNetworkId String
    Specifies the Resource ID of the Virtual Network using as the Static Member. Changing this forces a new Network Manager Static Member to be created.
    name String
    Specifies the name which should be used for this Network Manager Static Member. Changing this forces a new Network Manager Static Member to be created.
    networkGroupId string
    Specifies the ID of the Network Manager Group. Changing this forces a new Network Manager Static Member to be created.
    targetVirtualNetworkId string
    Specifies the Resource ID of the Virtual Network using as the Static Member. Changing this forces a new Network Manager Static Member to be created.
    name string
    Specifies the name which should be used for this Network Manager Static Member. Changing this forces a new Network Manager Static Member to be created.
    network_group_id str
    Specifies the ID of the Network Manager Group. Changing this forces a new Network Manager Static Member to be created.
    target_virtual_network_id str
    Specifies the Resource ID of the Virtual Network using as the Static Member. Changing this forces a new Network Manager Static Member to be created.
    name str
    Specifies the name which should be used for this Network Manager Static Member. Changing this forces a new Network Manager Static Member to be created.
    networkGroupId String
    Specifies the ID of the Network Manager Group. Changing this forces a new Network Manager Static Member to be created.
    targetVirtualNetworkId String
    Specifies the Resource ID of the Virtual Network using as the Static Member. Changing this forces a new Network Manager Static Member to be created.
    name String
    Specifies the name which should be used for this Network Manager Static Member. Changing this forces a new Network Manager Static Member to be created.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Region string
    The region of the Network Manager Static Member.
    Id string
    The provider-assigned unique ID for this managed resource.
    Region string
    The region of the Network Manager Static Member.
    id String
    The provider-assigned unique ID for this managed resource.
    region String
    The region of the Network Manager Static Member.
    id string
    The provider-assigned unique ID for this managed resource.
    region string
    The region of the Network Manager Static Member.
    id str
    The provider-assigned unique ID for this managed resource.
    region str
    The region of the Network Manager Static Member.
    id String
    The provider-assigned unique ID for this managed resource.
    region String
    The region of the Network Manager Static Member.

    Look up Existing NetworkManagerStaticMember Resource

    Get an existing NetworkManagerStaticMember 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?: NetworkManagerStaticMemberState, opts?: CustomResourceOptions): NetworkManagerStaticMember
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            name: Optional[str] = None,
            network_group_id: Optional[str] = None,
            region: Optional[str] = None,
            target_virtual_network_id: Optional[str] = None) -> NetworkManagerStaticMember
    func GetNetworkManagerStaticMember(ctx *Context, name string, id IDInput, state *NetworkManagerStaticMemberState, opts ...ResourceOption) (*NetworkManagerStaticMember, error)
    public static NetworkManagerStaticMember Get(string name, Input<string> id, NetworkManagerStaticMemberState? state, CustomResourceOptions? opts = null)
    public static NetworkManagerStaticMember get(String name, Output<String> id, NetworkManagerStaticMemberState 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.
    The following state arguments are supported:
    Name string
    Specifies the name which should be used for this Network Manager Static Member. Changing this forces a new Network Manager Static Member to be created.
    NetworkGroupId string
    Specifies the ID of the Network Manager Group. Changing this forces a new Network Manager Static Member to be created.
    Region string
    The region of the Network Manager Static Member.
    TargetVirtualNetworkId string
    Specifies the Resource ID of the Virtual Network using as the Static Member. Changing this forces a new Network Manager Static Member to be created.
    Name string
    Specifies the name which should be used for this Network Manager Static Member. Changing this forces a new Network Manager Static Member to be created.
    NetworkGroupId string
    Specifies the ID of the Network Manager Group. Changing this forces a new Network Manager Static Member to be created.
    Region string
    The region of the Network Manager Static Member.
    TargetVirtualNetworkId string
    Specifies the Resource ID of the Virtual Network using as the Static Member. Changing this forces a new Network Manager Static Member to be created.
    name String
    Specifies the name which should be used for this Network Manager Static Member. Changing this forces a new Network Manager Static Member to be created.
    networkGroupId String
    Specifies the ID of the Network Manager Group. Changing this forces a new Network Manager Static Member to be created.
    region String
    The region of the Network Manager Static Member.
    targetVirtualNetworkId String
    Specifies the Resource ID of the Virtual Network using as the Static Member. Changing this forces a new Network Manager Static Member to be created.
    name string
    Specifies the name which should be used for this Network Manager Static Member. Changing this forces a new Network Manager Static Member to be created.
    networkGroupId string
    Specifies the ID of the Network Manager Group. Changing this forces a new Network Manager Static Member to be created.
    region string
    The region of the Network Manager Static Member.
    targetVirtualNetworkId string
    Specifies the Resource ID of the Virtual Network using as the Static Member. Changing this forces a new Network Manager Static Member to be created.
    name str
    Specifies the name which should be used for this Network Manager Static Member. Changing this forces a new Network Manager Static Member to be created.
    network_group_id str
    Specifies the ID of the Network Manager Group. Changing this forces a new Network Manager Static Member to be created.
    region str
    The region of the Network Manager Static Member.
    target_virtual_network_id str
    Specifies the Resource ID of the Virtual Network using as the Static Member. Changing this forces a new Network Manager Static Member to be created.
    name String
    Specifies the name which should be used for this Network Manager Static Member. Changing this forces a new Network Manager Static Member to be created.
    networkGroupId String
    Specifies the ID of the Network Manager Group. Changing this forces a new Network Manager Static Member to be created.
    region String
    The region of the Network Manager Static Member.
    targetVirtualNetworkId String
    Specifies the Resource ID of the Virtual Network using as the Static Member. Changing this forces a new Network Manager Static Member to be created.

    Import

    Network Manager Static Member can be imported using the resource id, e.g.

    $ pulumi import azure:network/networkManagerStaticMember:NetworkManagerStaticMember example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.Network/networkManagers/networkManager1/networkGroups/networkGroup1/staticMembers/staticMember1
    

    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.
    azure logo

    We recommend using Azure Native.

    Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi