Show / Hide Table of Contents

Class Network

Manages a V2 Neutron network resource within OpenStack.

Example Usage

using Pulumi;
using OpenStack = Pulumi.OpenStack;

class MyStack : Stack
{
public MyStack()
{
    var network1 = new OpenStack.Networking.Network("network1", new OpenStack.Networking.NetworkArgs
    {
        AdminStateUp = "true",
    });
    var subnet1 = new OpenStack.Networking.Subnet("subnet1", new OpenStack.Networking.SubnetArgs
    {
        Cidr = "192.168.199.0/24",
        IpVersion = 4,
        NetworkId = network1.Id,
    });
    var secgroup1 = new OpenStack.Compute.SecGroup("secgroup1", new OpenStack.Compute.SecGroupArgs
    {
        Description = "a security group",
        Rules = 
        {
            new OpenStack.Compute.Inputs.SecGroupRuleArgs
            {
                Cidr = "0.0.0.0/0",
                FromPort = 22,
                IpProtocol = "tcp",
                ToPort = 22,
            },
        },
    });
    var port1 = new OpenStack.Networking.Port("port1", new OpenStack.Networking.PortArgs
    {
        AdminStateUp = "true",
        FixedIps = 
        {
            new OpenStack.Networking.Inputs.PortFixedIpArgs
            {
                IpAddress = "192.168.199.10",
                SubnetId = subnet1.Id,
            },
        },
        NetworkId = network1.Id,
        SecurityGroupIds = 
        {
            secgroup1.Id,
        },
    });
    var instance1 = new OpenStack.Compute.Instance("instance1", new OpenStack.Compute.InstanceArgs
    {
        Networks = 
        {
            new OpenStack.Compute.Inputs.InstanceNetworkArgs
            {
                Port = port1.Id,
            },
        },
        SecurityGroups = 
        {
            secgroup1.Name,
        },
    });
}

}
Inheritance
System.Object
Resource
CustomResource
Network
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.OpenStack.Networking
Assembly: Pulumi.OpenStack.dll
Syntax
public class Network : CustomResource

Constructors

View Source

Network(String, NetworkArgs, CustomResourceOptions)

Create a Network resource with the given unique name, arguments, and options.

Declaration
public Network(string name, NetworkArgs args = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

NetworkArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

AdminStateUp

The administrative state of the network. Acceptable values are "true" and "false". Changing this value updates the state of the existing network.

Declaration
public Output<bool> AdminStateUp { get; }
Property Value
Type Description
Output<System.Boolean>
View Source

AllTags

The collection of tags assigned on the network, which have been explicitly and implicitly added.

Declaration
public Output<ImmutableArray<string>> AllTags { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>
View Source

AvailabilityZoneHints

An availability zone is used to make network resources highly available. Used for resources with high availability so that they are scheduled on different availability zones. Changing this creates a new network.

Declaration
public Output<ImmutableArray<string>> AvailabilityZoneHints { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>
View Source

Description

Human-readable description of the network. Changing this updates the name of the existing network.

Declaration
public Output<string> Description { get; }
Property Value
Type Description
Output<System.String>
View Source

DnsDomain

The network DNS domain. Available, when Neutron DNS extension is enabled. The dns_domain of a network in conjunction with the dns_name attribute of its ports will be published in an external DNS service when Neutron is configured to integrate with such a service.

Declaration
public Output<string> DnsDomain { get; }
Property Value
Type Description
Output<System.String>
View Source

External

Specifies whether the network resource has the external routing facility. Valid values are true and false. Defaults to false. Changing this updates the external attribute of the existing network.

Declaration
public Output<bool> External { get; }
Property Value
Type Description
Output<System.Boolean>
View Source

Mtu

The network MTU. Available for read-only, when Neutron net-mtu extension is enabled. Available for the modification, when Neutron net-mtu-writable extension is enabled.

Declaration
public Output<int> Mtu { get; }
Property Value
Type Description
Output<System.Int32>
View Source

Name

The name of the network. Changing this updates the name of the existing network.

Declaration
public Output<string> Name { get; }
Property Value
Type Description
Output<System.String>
View Source

PortSecurityEnabled

Whether to explicitly enable or disable port security on the network. Port Security is usually enabled by default, so omitting this argument will usually result in a value of "true". Setting this explicitly to false will disable port security. Valid values are true and false.

Declaration
public Output<bool> PortSecurityEnabled { get; }
Property Value
Type Description
Output<System.Boolean>
View Source

QosPolicyId

Reference to the associated QoS policy.

Declaration
public Output<string> QosPolicyId { get; }
Property Value
Type Description
Output<System.String>
View Source

Region

The region in which to obtain the V2 Networking client. A Networking client is needed to create a Neutron network. If omitted, the region argument of the provider is used. Changing this creates a new network.

Declaration
public Output<string> Region { get; }
Property Value
Type Description
Output<System.String>
View Source

Segments

An array of one or more provider segment objects.

Declaration
public Output<ImmutableArray<NetworkSegment>> Segments { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<NetworkSegment>>
View Source

Shared

Specifies whether the network resource can be accessed by any tenant or not. Changing this updates the sharing capabilities of the existing network.

Declaration
public Output<bool> Shared { get; }
Property Value
Type Description
Output<System.Boolean>
View Source

Tags

A set of string tags for the network.

Declaration
public Output<ImmutableArray<string>> Tags { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>
View Source

TenantId

The owner of the network. Required if admin wants to create a network for another tenant. Changing this creates a new network.

Declaration
public Output<string> TenantId { get; }
Property Value
Type Description
Output<System.String>
View Source

TransparentVlan

Specifies whether the network resource has the VLAN transparent attribute set. Valid values are true and false. Defaults to false. Changing this updates the transparent_vlan attribute of the existing network.

Declaration
public Output<bool> TransparentVlan { get; }
Property Value
Type Description
Output<System.Boolean>
View Source

ValueSpecs

Map of additional options.

Declaration
public Output<ImmutableDictionary<string, object>> ValueSpecs { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>>

Methods

View Source

Get(String, Input<String>, NetworkState, CustomResourceOptions)

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

Declaration
public static Network Get(string name, Input<string> id, NetworkState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

NetworkState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
Network
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.