azure.network.NetworkManager
Explore with Pulumi AI
Manages a Network Managers.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new()
{
Location = "West Europe",
});
var current = Azure.Core.GetSubscription.Invoke();
var exampleNetworkManager = new Azure.Network.NetworkManager("exampleNetworkManager", new()
{
Location = exampleResourceGroup.Location,
ResourceGroupName = exampleResourceGroup.Name,
Scope = new Azure.Network.Inputs.NetworkManagerScopeArgs
{
SubscriptionIds = new[]
{
current.Apply(getSubscriptionResult => getSubscriptionResult.Id),
},
},
ScopeAccesses = new[]
{
"Connectivity",
"SecurityAdmin",
},
Description = "example network manager",
Tags =
{
{ "foo", "bar" },
},
});
});
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/network"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
current, err := core.LookupSubscription(ctx, nil, nil)
if err != nil {
return err
}
_, err = network.NewNetworkManager(ctx, "exampleNetworkManager", &network.NetworkManagerArgs{
Location: exampleResourceGroup.Location,
ResourceGroupName: exampleResourceGroup.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"),
Tags: pulumi.StringMap{
"foo": pulumi.String("bar"),
},
})
if err != nil {
return err
}
return nil
})
}
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 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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("West Europe")
.build());
final var current = CoreFunctions.getSubscription();
var exampleNetworkManager = new NetworkManager("exampleNetworkManager", NetworkManagerArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.scope(NetworkManagerScopeArgs.builder()
.subscriptionIds(current.applyValue(getSubscriptionResult -> getSubscriptionResult.id()))
.build())
.scopeAccesses(
"Connectivity",
"SecurityAdmin")
.description("example network manager")
.tags(Map.of("foo", "bar"))
.build());
}
}
import pulumi
import pulumi_azure as azure
example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
current = azure.core.get_subscription()
example_network_manager = azure.network.NetworkManager("exampleNetworkManager",
location=example_resource_group.location,
resource_group_name=example_resource_group.name,
scope=azure.network.NetworkManagerScopeArgs(
subscription_ids=[current.id],
),
scope_accesses=[
"Connectivity",
"SecurityAdmin",
],
description="example network manager",
tags={
"foo": "bar",
})
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
const current = azure.core.getSubscription({});
const exampleNetworkManager = new azure.network.NetworkManager("exampleNetworkManager", {
location: exampleResourceGroup.location,
resourceGroupName: exampleResourceGroup.name,
scope: {
subscriptionIds: [current.then(current => current.id)],
},
scopeAccesses: [
"Connectivity",
"SecurityAdmin",
],
description: "example network manager",
tags: {
foo: "bar",
},
});
resources:
exampleResourceGroup:
type: azure:core:ResourceGroup
properties:
location: West Europe
exampleNetworkManager:
type: azure:network:NetworkManager
properties:
location: ${exampleResourceGroup.location}
resourceGroupName: ${exampleResourceGroup.name}
scope:
subscriptionIds:
- ${current.id}
scopeAccesses:
- Connectivity
- SecurityAdmin
description: example network manager
tags:
foo: bar
variables:
current:
fn::invoke:
Function: azure:core:getSubscription
Arguments: {}
Create NetworkManager Resource
new NetworkManager(name: string, args: NetworkManagerArgs, opts?: CustomResourceOptions);
@overload
def NetworkManager(resource_name: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
location: Optional[str] = None,
name: Optional[str] = None,
resource_group_name: Optional[str] = None,
scope: Optional[NetworkManagerScopeArgs] = None,
scope_accesses: Optional[Sequence[str]] = None,
tags: Optional[Mapping[str, str]] = None)
@overload
def NetworkManager(resource_name: str,
args: NetworkManagerArgs,
opts: Optional[ResourceOptions] = None)
func NewNetworkManager(ctx *Context, name string, args NetworkManagerArgs, opts ...ResourceOption) (*NetworkManager, error)
public NetworkManager(string name, NetworkManagerArgs args, CustomResourceOptions? opts = null)
public NetworkManager(String name, NetworkManagerArgs args)
public NetworkManager(String name, NetworkManagerArgs args, CustomResourceOptions options)
type: azure:network:NetworkManager
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NetworkManagerArgs
- 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 NetworkManagerArgs
- 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 NetworkManagerArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NetworkManagerArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args NetworkManagerArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
NetworkManager Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The NetworkManager resource accepts the following input properties:
- Resource
Group stringName Specifies the name of the Resource Group where the Network Managers should exist. Changing this forces a new Network Managers to be created.
- Scope
Network
Manager Scope Args A
scope
block as defined below.- Scope
Accesses List<string> A list of configuration deployment type. Possible values are
Connectivity
andSecurityAdmin
, corresponds to if Connectivity Configuration and Security Admin Configuration is allowed for the Network Manager.- Description string
A description of the network manager.
- Location string
Specifies the Azure Region where the Network Managers should exist. Changing this forces a new resource to be created.
- Name string
Specifies the name which should be used for this Network Managers. Changing this forces a new Network Managers to be created.
- Dictionary<string, string>
A mapping of tags which should be assigned to the Network Managers.
- Resource
Group stringName Specifies the name of the Resource Group where the Network Managers should exist. Changing this forces a new Network Managers to be created.
- Scope
Network
Manager Scope Args A
scope
block as defined below.- Scope
Accesses []string A list of configuration deployment type. Possible values are
Connectivity
andSecurityAdmin
, corresponds to if Connectivity Configuration and Security Admin Configuration is allowed for the Network Manager.- Description string
A description of the network manager.
- Location string
Specifies the Azure Region where the Network Managers should exist. Changing this forces a new resource to be created.
- Name string
Specifies the name which should be used for this Network Managers. Changing this forces a new Network Managers to be created.
- map[string]string
A mapping of tags which should be assigned to the Network Managers.
- resource
Group StringName Specifies the name of the Resource Group where the Network Managers should exist. Changing this forces a new Network Managers to be created.
- scope
Network
Manager Scope Args A
scope
block as defined below.- scope
Accesses List<String> A list of configuration deployment type. Possible values are
Connectivity
andSecurityAdmin
, corresponds to if Connectivity Configuration and Security Admin Configuration is allowed for the Network Manager.- description String
A description of the network manager.
- location String
Specifies the Azure Region where the Network Managers should exist. Changing this forces a new resource to be created.
- name String
Specifies the name which should be used for this Network Managers. Changing this forces a new Network Managers to be created.
- Map<String,String>
A mapping of tags which should be assigned to the Network Managers.
- resource
Group stringName Specifies the name of the Resource Group where the Network Managers should exist. Changing this forces a new Network Managers to be created.
- scope
Network
Manager Scope Args A
scope
block as defined below.- scope
Accesses string[] A list of configuration deployment type. Possible values are
Connectivity
andSecurityAdmin
, corresponds to if Connectivity Configuration and Security Admin Configuration is allowed for the Network Manager.- description string
A description of the network manager.
- location string
Specifies the Azure Region where the Network Managers should exist. Changing this forces a new resource to be created.
- name string
Specifies the name which should be used for this Network Managers. Changing this forces a new Network Managers to be created.
- {[key: string]: string}
A mapping of tags which should be assigned to the Network Managers.
- resource_
group_ strname Specifies the name of the Resource Group where the Network Managers should exist. Changing this forces a new Network Managers to be created.
- scope
Network
Manager Scope Args A
scope
block as defined below.- scope_
accesses Sequence[str] A list of configuration deployment type. Possible values are
Connectivity
andSecurityAdmin
, corresponds to if Connectivity Configuration and Security Admin Configuration is allowed for the Network Manager.- description str
A description of the network manager.
- location str
Specifies the Azure Region where the Network Managers should exist. Changing this forces a new resource to be created.
- name str
Specifies the name which should be used for this Network Managers. Changing this forces a new Network Managers to be created.
- Mapping[str, str]
A mapping of tags which should be assigned to the Network Managers.
- resource
Group StringName Specifies the name of the Resource Group where the Network Managers should exist. Changing this forces a new Network Managers to be created.
- scope Property Map
A
scope
block as defined below.- scope
Accesses List<String> A list of configuration deployment type. Possible values are
Connectivity
andSecurityAdmin
, corresponds to if Connectivity Configuration and Security Admin Configuration is allowed for the Network Manager.- description String
A description of the network manager.
- location String
Specifies the Azure Region where the Network Managers should exist. Changing this forces a new resource to be created.
- name String
Specifies the name which should be used for this Network Managers. Changing this forces a new Network Managers to be created.
- Map<String>
A mapping of tags which should be assigned to the Network Managers.
Outputs
All input properties are implicitly available as output properties. Additionally, the NetworkManager resource produces the following output properties:
- Cross
Tenant List<NetworkScopes Manager Cross Tenant Scope> A
cross_tenant_scopes
block as defined below.- Id string
The provider-assigned unique ID for this managed resource.
- Cross
Tenant []NetworkScopes Manager Cross Tenant Scope A
cross_tenant_scopes
block as defined below.- Id string
The provider-assigned unique ID for this managed resource.
- cross
Tenant List<NetworkScopes Manager Cross Tenant Scope> A
cross_tenant_scopes
block as defined below.- id String
The provider-assigned unique ID for this managed resource.
- cross
Tenant NetworkScopes Manager Cross Tenant Scope[] A
cross_tenant_scopes
block as defined below.- id string
The provider-assigned unique ID for this managed resource.
- cross_
tenant_ Sequence[Networkscopes Manager Cross Tenant Scope] A
cross_tenant_scopes
block as defined below.- id str
The provider-assigned unique ID for this managed resource.
- cross
Tenant List<Property Map>Scopes A
cross_tenant_scopes
block as defined below.- id String
The provider-assigned unique ID for this managed resource.
Look up Existing NetworkManager Resource
Get an existing NetworkManager 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?: NetworkManagerState, opts?: CustomResourceOptions): NetworkManager
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
cross_tenant_scopes: Optional[Sequence[NetworkManagerCrossTenantScopeArgs]] = None,
description: Optional[str] = None,
location: Optional[str] = None,
name: Optional[str] = None,
resource_group_name: Optional[str] = None,
scope: Optional[NetworkManagerScopeArgs] = None,
scope_accesses: Optional[Sequence[str]] = None,
tags: Optional[Mapping[str, str]] = None) -> NetworkManager
func GetNetworkManager(ctx *Context, name string, id IDInput, state *NetworkManagerState, opts ...ResourceOption) (*NetworkManager, error)
public static NetworkManager Get(string name, Input<string> id, NetworkManagerState? state, CustomResourceOptions? opts = null)
public static NetworkManager get(String name, Output<String> id, NetworkManagerState 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.
- Cross
Tenant List<NetworkScopes Manager Cross Tenant Scope Args> A
cross_tenant_scopes
block as defined below.- Description string
A description of the network manager.
- Location string
Specifies the Azure Region where the Network Managers should exist. Changing this forces a new resource to be created.
- Name string
Specifies the name which should be used for this Network Managers. Changing this forces a new Network Managers to be created.
- Resource
Group stringName Specifies the name of the Resource Group where the Network Managers should exist. Changing this forces a new Network Managers to be created.
- Scope
Network
Manager Scope Args A
scope
block as defined below.- Scope
Accesses List<string> A list of configuration deployment type. Possible values are
Connectivity
andSecurityAdmin
, corresponds to if Connectivity Configuration and Security Admin Configuration is allowed for the Network Manager.- Dictionary<string, string>
A mapping of tags which should be assigned to the Network Managers.
- Cross
Tenant []NetworkScopes Manager Cross Tenant Scope Args A
cross_tenant_scopes
block as defined below.- Description string
A description of the network manager.
- Location string
Specifies the Azure Region where the Network Managers should exist. Changing this forces a new resource to be created.
- Name string
Specifies the name which should be used for this Network Managers. Changing this forces a new Network Managers to be created.
- Resource
Group stringName Specifies the name of the Resource Group where the Network Managers should exist. Changing this forces a new Network Managers to be created.
- Scope
Network
Manager Scope Args A
scope
block as defined below.- Scope
Accesses []string A list of configuration deployment type. Possible values are
Connectivity
andSecurityAdmin
, corresponds to if Connectivity Configuration and Security Admin Configuration is allowed for the Network Manager.- map[string]string
A mapping of tags which should be assigned to the Network Managers.
- cross
Tenant List<NetworkScopes Manager Cross Tenant Scope Args> A
cross_tenant_scopes
block as defined below.- description String
A description of the network manager.
- location String
Specifies the Azure Region where the Network Managers should exist. Changing this forces a new resource to be created.
- name String
Specifies the name which should be used for this Network Managers. Changing this forces a new Network Managers to be created.
- resource
Group StringName Specifies the name of the Resource Group where the Network Managers should exist. Changing this forces a new Network Managers to be created.
- scope
Network
Manager Scope Args A
scope
block as defined below.- scope
Accesses List<String> A list of configuration deployment type. Possible values are
Connectivity
andSecurityAdmin
, corresponds to if Connectivity Configuration and Security Admin Configuration is allowed for the Network Manager.- Map<String,String>
A mapping of tags which should be assigned to the Network Managers.
- cross
Tenant NetworkScopes Manager Cross Tenant Scope Args[] A
cross_tenant_scopes
block as defined below.- description string
A description of the network manager.
- location string
Specifies the Azure Region where the Network Managers should exist. Changing this forces a new resource to be created.
- name string
Specifies the name which should be used for this Network Managers. Changing this forces a new Network Managers to be created.
- resource
Group stringName Specifies the name of the Resource Group where the Network Managers should exist. Changing this forces a new Network Managers to be created.
- scope
Network
Manager Scope Args A
scope
block as defined below.- scope
Accesses string[] A list of configuration deployment type. Possible values are
Connectivity
andSecurityAdmin
, corresponds to if Connectivity Configuration and Security Admin Configuration is allowed for the Network Manager.- {[key: string]: string}
A mapping of tags which should be assigned to the Network Managers.
- cross_
tenant_ Sequence[Networkscopes Manager Cross Tenant Scope Args] A
cross_tenant_scopes
block as defined below.- description str
A description of the network manager.
- location str
Specifies the Azure Region where the Network Managers should exist. Changing this forces a new resource to be created.
- name str
Specifies the name which should be used for this Network Managers. Changing this forces a new Network Managers to be created.
- resource_
group_ strname Specifies the name of the Resource Group where the Network Managers should exist. Changing this forces a new Network Managers to be created.
- scope
Network
Manager Scope Args A
scope
block as defined below.- scope_
accesses Sequence[str] A list of configuration deployment type. Possible values are
Connectivity
andSecurityAdmin
, corresponds to if Connectivity Configuration and Security Admin Configuration is allowed for the Network Manager.- Mapping[str, str]
A mapping of tags which should be assigned to the Network Managers.
- cross
Tenant List<Property Map>Scopes A
cross_tenant_scopes
block as defined below.- description String
A description of the network manager.
- location String
Specifies the Azure Region where the Network Managers should exist. Changing this forces a new resource to be created.
- name String
Specifies the name which should be used for this Network Managers. Changing this forces a new Network Managers to be created.
- resource
Group StringName Specifies the name of the Resource Group where the Network Managers should exist. Changing this forces a new Network Managers to be created.
- scope Property Map
A
scope
block as defined below.- scope
Accesses List<String> A list of configuration deployment type. Possible values are
Connectivity
andSecurityAdmin
, corresponds to if Connectivity Configuration and Security Admin Configuration is allowed for the Network Manager.- Map<String>
A mapping of tags which should be assigned to the Network Managers.
Supporting Types
NetworkManagerCrossTenantScope
- Management
Groups List<string> List of management groups.
- Subscriptions List<string>
List of subscriptions.
- Tenant
Id string Tenant ID.
- Management
Groups []string List of management groups.
- Subscriptions []string
List of subscriptions.
- Tenant
Id string Tenant ID.
- management
Groups List<String> List of management groups.
- subscriptions List<String>
List of subscriptions.
- tenant
Id String Tenant ID.
- management
Groups string[] List of management groups.
- subscriptions string[]
List of subscriptions.
- tenant
Id string Tenant ID.
- management_
groups Sequence[str] List of management groups.
- subscriptions Sequence[str]
List of subscriptions.
- tenant_
id str Tenant ID.
- management
Groups List<String> List of management groups.
- subscriptions List<String>
List of subscriptions.
- tenant
Id String Tenant ID.
NetworkManagerScope
- Management
Group List<string>Ids A list of management group IDs.
- Subscription
Ids List<string> A list of subscription IDs.
- Management
Group []stringIds A list of management group IDs.
- Subscription
Ids []string A list of subscription IDs.
- management
Group List<String>Ids A list of management group IDs.
- subscription
Ids List<String> A list of subscription IDs.
- management
Group string[]Ids A list of management group IDs.
- subscription
Ids string[] A list of subscription IDs.
- management_
group_ Sequence[str]ids A list of management group IDs.
- subscription_
ids Sequence[str] A list of subscription IDs.
- management
Group List<String>Ids A list of management group IDs.
- subscription
Ids List<String> A list of subscription IDs.
Import
Network Managers can be imported using the resource id
, e.g.
$ pulumi import azure:network/networkManager:NetworkManager example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.Network/networkManagers/networkManager1
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
azurerm
Terraform Provider.