ibm.NetworkGatewayVlanAssociation
Explore with Pulumi AI
Create, update, and delete a VLAN with a network gateway. The VLANs can be disassociated or updated later to be bypassed or routed. For more information, about association of VLAN in gateway, see viewing gateway appliance details.
Note
For more information, see the IBM Cloud Classic Infrastructure (SoftLayer) API docs.
For more information, about getting started, see the IBM Virtual Router Appliance docs.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ibm from "@pulumi/ibm";
const gateway = new ibm.NetworkGateway("gateway", {members: [{
hostname: "my-virtual-router",
domain: "terraformuat1.ibm.com",
datacenter: "ams01",
networkSpeed: 100,
privateNetworkOnly: false,
tcpMonitoring: true,
processKeyName: "INTEL_SINGLE_XEON_1270_3_40_2",
osKeyName: "OS_VYATTA_5600_5_X_UP_TO_1GBPS_SUBSCRIPTION_EDITION_64_BIT",
redundantNetwork: false,
diskKeyNames: ["HARD_DRIVE_2_00TB_SATA_II"],
publicBandwidth: 20000,
memory: 4,
ipv6Enabled: true,
}]});
const gatewayVlanAssociation = new ibm.NetworkGatewayVlanAssociation("gatewayVlanAssociation", {
gatewayId: gateway.networkGatewayId,
networkVlanId: 645086,
});
import pulumi
import pulumi_ibm as ibm
gateway = ibm.NetworkGateway("gateway", members=[{
"hostname": "my-virtual-router",
"domain": "terraformuat1.ibm.com",
"datacenter": "ams01",
"network_speed": 100,
"private_network_only": False,
"tcp_monitoring": True,
"process_key_name": "INTEL_SINGLE_XEON_1270_3_40_2",
"os_key_name": "OS_VYATTA_5600_5_X_UP_TO_1GBPS_SUBSCRIPTION_EDITION_64_BIT",
"redundant_network": False,
"disk_key_names": ["HARD_DRIVE_2_00TB_SATA_II"],
"public_bandwidth": 20000,
"memory": 4,
"ipv6_enabled": True,
}])
gateway_vlan_association = ibm.NetworkGatewayVlanAssociation("gatewayVlanAssociation",
gateway_id=gateway.network_gateway_id,
network_vlan_id=645086)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
gateway, err := ibm.NewNetworkGateway(ctx, "gateway", &ibm.NetworkGatewayArgs{
Members: ibm.NetworkGatewayMemberArray{
&ibm.NetworkGatewayMemberArgs{
Hostname: pulumi.String("my-virtual-router"),
Domain: pulumi.String("terraformuat1.ibm.com"),
Datacenter: pulumi.String("ams01"),
NetworkSpeed: pulumi.Float64(100),
PrivateNetworkOnly: pulumi.Bool(false),
TcpMonitoring: pulumi.Bool(true),
ProcessKeyName: pulumi.String("INTEL_SINGLE_XEON_1270_3_40_2"),
OsKeyName: pulumi.String("OS_VYATTA_5600_5_X_UP_TO_1GBPS_SUBSCRIPTION_EDITION_64_BIT"),
RedundantNetwork: pulumi.Bool(false),
DiskKeyNames: pulumi.StringArray{
pulumi.String("HARD_DRIVE_2_00TB_SATA_II"),
},
PublicBandwidth: pulumi.Float64(20000),
Memory: pulumi.Float64(4),
Ipv6Enabled: pulumi.Bool(true),
},
},
})
if err != nil {
return err
}
_, err = ibm.NewNetworkGatewayVlanAssociation(ctx, "gatewayVlanAssociation", &ibm.NetworkGatewayVlanAssociationArgs{
GatewayId: gateway.NetworkGatewayId,
NetworkVlanId: pulumi.Float64(645086),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ibm = Pulumi.Ibm;
return await Deployment.RunAsync(() =>
{
var gateway = new Ibm.NetworkGateway("gateway", new()
{
Members = new[]
{
new Ibm.Inputs.NetworkGatewayMemberArgs
{
Hostname = "my-virtual-router",
Domain = "terraformuat1.ibm.com",
Datacenter = "ams01",
NetworkSpeed = 100,
PrivateNetworkOnly = false,
TcpMonitoring = true,
ProcessKeyName = "INTEL_SINGLE_XEON_1270_3_40_2",
OsKeyName = "OS_VYATTA_5600_5_X_UP_TO_1GBPS_SUBSCRIPTION_EDITION_64_BIT",
RedundantNetwork = false,
DiskKeyNames = new[]
{
"HARD_DRIVE_2_00TB_SATA_II",
},
PublicBandwidth = 20000,
Memory = 4,
Ipv6Enabled = true,
},
},
});
var gatewayVlanAssociation = new Ibm.NetworkGatewayVlanAssociation("gatewayVlanAssociation", new()
{
GatewayId = gateway.NetworkGatewayId,
NetworkVlanId = 645086,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ibm.NetworkGateway;
import com.pulumi.ibm.NetworkGatewayArgs;
import com.pulumi.ibm.inputs.NetworkGatewayMemberArgs;
import com.pulumi.ibm.NetworkGatewayVlanAssociation;
import com.pulumi.ibm.NetworkGatewayVlanAssociationArgs;
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 gateway = new NetworkGateway("gateway", NetworkGatewayArgs.builder()
.members(NetworkGatewayMemberArgs.builder()
.hostname("my-virtual-router")
.domain("terraformuat1.ibm.com")
.datacenter("ams01")
.networkSpeed(100)
.privateNetworkOnly(false)
.tcpMonitoring(true)
.processKeyName("INTEL_SINGLE_XEON_1270_3_40_2")
.osKeyName("OS_VYATTA_5600_5_X_UP_TO_1GBPS_SUBSCRIPTION_EDITION_64_BIT")
.redundantNetwork(false)
.diskKeyNames("HARD_DRIVE_2_00TB_SATA_II")
.publicBandwidth(20000)
.memory(4)
.ipv6Enabled(true)
.build())
.build());
var gatewayVlanAssociation = new NetworkGatewayVlanAssociation("gatewayVlanAssociation", NetworkGatewayVlanAssociationArgs.builder()
.gatewayId(gateway.networkGatewayId())
.networkVlanId(645086)
.build());
}
}
resources:
gateway:
type: ibm:NetworkGateway
properties:
members:
- hostname: my-virtual-router
domain: terraformuat1.ibm.com
datacenter: ams01
networkSpeed: 100
privateNetworkOnly: false
tcpMonitoring: true
processKeyName: INTEL_SINGLE_XEON_1270_3_40_2
osKeyName: OS_VYATTA_5600_5_X_UP_TO_1GBPS_SUBSCRIPTION_EDITION_64_BIT
redundantNetwork: false
diskKeyNames:
- HARD_DRIVE_2_00TB_SATA_II
publicBandwidth: 20000
memory: 4
ipv6Enabled: true
gatewayVlanAssociation:
type: ibm:NetworkGatewayVlanAssociation
properties:
gatewayId: ${gateway.networkGatewayId}
networkVlanId: 645086
Argument reference
Review the argument references that you can specify for your resource.
bypass
- (Optional, Bool) Indicates if the VLAN should be in bypass or routed mode. Default value is true.gateway_id
- (Required, Forces new resource, Integer) The ID of the network gateway.network_vlan_id
- (Required, Forces new resource, Integer) The ID of the network VLAN to associate with the network gateway.
Create NetworkGatewayVlanAssociation Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new NetworkGatewayVlanAssociation(name: string, args: NetworkGatewayVlanAssociationArgs, opts?: CustomResourceOptions);
@overload
def NetworkGatewayVlanAssociation(resource_name: str,
args: NetworkGatewayVlanAssociationArgs,
opts: Optional[ResourceOptions] = None)
@overload
def NetworkGatewayVlanAssociation(resource_name: str,
opts: Optional[ResourceOptions] = None,
gateway_id: Optional[float] = None,
network_vlan_id: Optional[float] = None,
bypass: Optional[bool] = None,
network_gateway_vlan_association_id: Optional[str] = None)
func NewNetworkGatewayVlanAssociation(ctx *Context, name string, args NetworkGatewayVlanAssociationArgs, opts ...ResourceOption) (*NetworkGatewayVlanAssociation, error)
public NetworkGatewayVlanAssociation(string name, NetworkGatewayVlanAssociationArgs args, CustomResourceOptions? opts = null)
public NetworkGatewayVlanAssociation(String name, NetworkGatewayVlanAssociationArgs args)
public NetworkGatewayVlanAssociation(String name, NetworkGatewayVlanAssociationArgs args, CustomResourceOptions options)
type: ibm:NetworkGatewayVlanAssociation
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 NetworkGatewayVlanAssociationArgs
- 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 NetworkGatewayVlanAssociationArgs
- 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 NetworkGatewayVlanAssociationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NetworkGatewayVlanAssociationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args NetworkGatewayVlanAssociationArgs
- 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 networkGatewayVlanAssociationResource = new Ibm.NetworkGatewayVlanAssociation("networkGatewayVlanAssociationResource", new()
{
GatewayId = 0,
NetworkVlanId = 0,
Bypass = false,
NetworkGatewayVlanAssociationId = "string",
});
example, err := ibm.NewNetworkGatewayVlanAssociation(ctx, "networkGatewayVlanAssociationResource", &ibm.NetworkGatewayVlanAssociationArgs{
GatewayId: pulumi.Float64(0),
NetworkVlanId: pulumi.Float64(0),
Bypass: pulumi.Bool(false),
NetworkGatewayVlanAssociationId: pulumi.String("string"),
})
var networkGatewayVlanAssociationResource = new NetworkGatewayVlanAssociation("networkGatewayVlanAssociationResource", NetworkGatewayVlanAssociationArgs.builder()
.gatewayId(0)
.networkVlanId(0)
.bypass(false)
.networkGatewayVlanAssociationId("string")
.build());
network_gateway_vlan_association_resource = ibm.NetworkGatewayVlanAssociation("networkGatewayVlanAssociationResource",
gateway_id=0,
network_vlan_id=0,
bypass=False,
network_gateway_vlan_association_id="string")
const networkGatewayVlanAssociationResource = new ibm.NetworkGatewayVlanAssociation("networkGatewayVlanAssociationResource", {
gatewayId: 0,
networkVlanId: 0,
bypass: false,
networkGatewayVlanAssociationId: "string",
});
type: ibm:NetworkGatewayVlanAssociation
properties:
bypass: false
gatewayId: 0
networkGatewayVlanAssociationId: string
networkVlanId: 0
NetworkGatewayVlanAssociation 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 NetworkGatewayVlanAssociation resource accepts the following input properties:
- Gateway
Id double - Gateway instance ID
- Network
Vlan doubleId - The Identifier of the VLAN to be associated
- Bypass bool
- Indicates if the VLAN should be in bypass or routed modes
- Network
Gateway stringVlan Association Id - (String) The unique identifier of the gateway/VLAN association.
- Gateway
Id float64 - Gateway instance ID
- Network
Vlan float64Id - The Identifier of the VLAN to be associated
- Bypass bool
- Indicates if the VLAN should be in bypass or routed modes
- Network
Gateway stringVlan Association Id - (String) The unique identifier of the gateway/VLAN association.
- gateway
Id Double - Gateway instance ID
- network
Vlan DoubleId - The Identifier of the VLAN to be associated
- bypass Boolean
- Indicates if the VLAN should be in bypass or routed modes
- network
Gateway StringVlan Association Id - (String) The unique identifier of the gateway/VLAN association.
- gateway
Id number - Gateway instance ID
- network
Vlan numberId - The Identifier of the VLAN to be associated
- bypass boolean
- Indicates if the VLAN should be in bypass or routed modes
- network
Gateway stringVlan Association Id - (String) The unique identifier of the gateway/VLAN association.
- gateway_
id float - Gateway instance ID
- network_
vlan_ floatid - The Identifier of the VLAN to be associated
- bypass bool
- Indicates if the VLAN should be in bypass or routed modes
- network_
gateway_ strvlan_ association_ id - (String) The unique identifier of the gateway/VLAN association.
- gateway
Id Number - Gateway instance ID
- network
Vlan NumberId - The Identifier of the VLAN to be associated
- bypass Boolean
- Indicates if the VLAN should be in bypass or routed modes
- network
Gateway StringVlan Association Id - (String) The unique identifier of the gateway/VLAN association.
Outputs
All input properties are implicitly available as output properties. Additionally, the NetworkGatewayVlanAssociation 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 NetworkGatewayVlanAssociation Resource
Get an existing NetworkGatewayVlanAssociation 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?: NetworkGatewayVlanAssociationState, opts?: CustomResourceOptions): NetworkGatewayVlanAssociation
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
bypass: Optional[bool] = None,
gateway_id: Optional[float] = None,
network_gateway_vlan_association_id: Optional[str] = None,
network_vlan_id: Optional[float] = None) -> NetworkGatewayVlanAssociation
func GetNetworkGatewayVlanAssociation(ctx *Context, name string, id IDInput, state *NetworkGatewayVlanAssociationState, opts ...ResourceOption) (*NetworkGatewayVlanAssociation, error)
public static NetworkGatewayVlanAssociation Get(string name, Input<string> id, NetworkGatewayVlanAssociationState? state, CustomResourceOptions? opts = null)
public static NetworkGatewayVlanAssociation get(String name, Output<String> id, NetworkGatewayVlanAssociationState state, CustomResourceOptions options)
resources: _: type: ibm:NetworkGatewayVlanAssociation get: id: ${id}
- 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.
- Bypass bool
- Indicates if the VLAN should be in bypass or routed modes
- Gateway
Id double - Gateway instance ID
- Network
Gateway stringVlan Association Id - (String) The unique identifier of the gateway/VLAN association.
- Network
Vlan doubleId - The Identifier of the VLAN to be associated
- Bypass bool
- Indicates if the VLAN should be in bypass or routed modes
- Gateway
Id float64 - Gateway instance ID
- Network
Gateway stringVlan Association Id - (String) The unique identifier of the gateway/VLAN association.
- Network
Vlan float64Id - The Identifier of the VLAN to be associated
- bypass Boolean
- Indicates if the VLAN should be in bypass or routed modes
- gateway
Id Double - Gateway instance ID
- network
Gateway StringVlan Association Id - (String) The unique identifier of the gateway/VLAN association.
- network
Vlan DoubleId - The Identifier of the VLAN to be associated
- bypass boolean
- Indicates if the VLAN should be in bypass or routed modes
- gateway
Id number - Gateway instance ID
- network
Gateway stringVlan Association Id - (String) The unique identifier of the gateway/VLAN association.
- network
Vlan numberId - The Identifier of the VLAN to be associated
- bypass bool
- Indicates if the VLAN should be in bypass or routed modes
- gateway_
id float - Gateway instance ID
- network_
gateway_ strvlan_ association_ id - (String) The unique identifier of the gateway/VLAN association.
- network_
vlan_ floatid - The Identifier of the VLAN to be associated
- bypass Boolean
- Indicates if the VLAN should be in bypass or routed modes
- gateway
Id Number - Gateway instance ID
- network
Gateway StringVlan Association Id - (String) The unique identifier of the gateway/VLAN association.
- network
Vlan NumberId - The Identifier of the VLAN to be associated
Package Details
- Repository
- ibm ibm-cloud/terraform-provider-ibm
- License
- Notes
- This Pulumi package is based on the
ibm
Terraform Provider.