1. Packages
  2. Aviatrix
  3. API Docs
  4. AviatrixTunnel
Aviatrix v0.0.11 published on Saturday, Jun 17, 2023 by Aviatrix

aviatrix.AviatrixTunnel

Explore with Pulumi AI

The aviatrix_tunnel resource allows the creation and management of Aviatrix Encrypted Peering tunnels.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Aviatrix = Pulumi.Aviatrix;

return await Deployment.RunAsync(() => 
{
    // Create an Aviatrix AWS Tunnel
    var testTunnel = new Aviatrix.AviatrixTunnel("testTunnel", new()
    {
        GwName1 = "avtx-gw1",
        GwName2 = "avtx-gw2",
    });

});
Copy
package main

import (
	"github.com/astipkovits/pulumi-aviatrix/sdk/go/aviatrix"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := aviatrix.NewAviatrixTunnel(ctx, "testTunnel", &aviatrix.AviatrixTunnelArgs{
			GwName1: pulumi.String("avtx-gw1"),
			GwName2: pulumi.String("avtx-gw2"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aviatrix.AviatrixTunnel;
import com.pulumi.aviatrix.AviatrixTunnelArgs;
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 testTunnel = new AviatrixTunnel("testTunnel", AviatrixTunnelArgs.builder()        
            .gwName1("avtx-gw1")
            .gwName2("avtx-gw2")
            .build());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as aviatrix from "@pulumi/aviatrix";

// Create an Aviatrix AWS Tunnel
const testTunnel = new aviatrix.AviatrixTunnel("test_tunnel", {
    gwName1: "avtx-gw1",
    gwName2: "avtx-gw2",
});
Copy
import pulumi
import pulumi_aviatrix as aviatrix

# Create an Aviatrix AWS Tunnel
test_tunnel = aviatrix.AviatrixTunnel("testTunnel",
    gw_name1="avtx-gw1",
    gw_name2="avtx-gw2")
Copy
resources:
  # Create an Aviatrix AWS Tunnel
  testTunnel:
    type: aviatrix:AviatrixTunnel
    properties:
      gwName1: avtx-gw1
      gwName2: avtx-gw2
Copy

Create AviatrixTunnel Resource

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

Constructor syntax

new AviatrixTunnel(name: string, args: AviatrixTunnelArgs, opts?: CustomResourceOptions);
@overload
def AviatrixTunnel(resource_name: str,
                   args: AviatrixTunnelArgs,
                   opts: Optional[ResourceOptions] = None)

@overload
def AviatrixTunnel(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   gw_name1: Optional[str] = None,
                   gw_name2: Optional[str] = None,
                   enable_ha: Optional[bool] = None)
func NewAviatrixTunnel(ctx *Context, name string, args AviatrixTunnelArgs, opts ...ResourceOption) (*AviatrixTunnel, error)
public AviatrixTunnel(string name, AviatrixTunnelArgs args, CustomResourceOptions? opts = null)
public AviatrixTunnel(String name, AviatrixTunnelArgs args)
public AviatrixTunnel(String name, AviatrixTunnelArgs args, CustomResourceOptions options)
type: aviatrix:AviatrixTunnel
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. AviatrixTunnelArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. AviatrixTunnelArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. AviatrixTunnelArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. AviatrixTunnelArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. AviatrixTunnelArgs
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 aviatrixTunnelResource = new Aviatrix.AviatrixTunnel("aviatrixTunnelResource", new()
{
    GwName1 = "string",
    GwName2 = "string",
    EnableHa = false,
});
Copy
example, err := aviatrix.NewAviatrixTunnel(ctx, "aviatrixTunnelResource", &aviatrix.AviatrixTunnelArgs{
	GwName1:  pulumi.String("string"),
	GwName2:  pulumi.String("string"),
	EnableHa: pulumi.Bool(false),
})
Copy
var aviatrixTunnelResource = new AviatrixTunnel("aviatrixTunnelResource", AviatrixTunnelArgs.builder()
    .gwName1("string")
    .gwName2("string")
    .enableHa(false)
    .build());
Copy
aviatrix_tunnel_resource = aviatrix.AviatrixTunnel("aviatrixTunnelResource",
    gw_name1="string",
    gw_name2="string",
    enable_ha=False)
Copy
const aviatrixTunnelResource = new aviatrix.AviatrixTunnel("aviatrixTunnelResource", {
    gwName1: "string",
    gwName2: "string",
    enableHa: false,
});
Copy
type: aviatrix:AviatrixTunnel
properties:
    enableHa: false
    gwName1: string
    gwName2: string
Copy

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

GwName1 This property is required. string
The first VPC Container name to make a peer pair.
GwName2 This property is required. string
The second VPC Container name to make a peer pair.
EnableHa bool
Enable this attribute if peering-HA is enabled on the gateways. Valid values: true, false. Default value: false.
GwName1 This property is required. string
The first VPC Container name to make a peer pair.
GwName2 This property is required. string
The second VPC Container name to make a peer pair.
EnableHa bool
Enable this attribute if peering-HA is enabled on the gateways. Valid values: true, false. Default value: false.
gwName1 This property is required. String
The first VPC Container name to make a peer pair.
gwName2 This property is required. String
The second VPC Container name to make a peer pair.
enableHa Boolean
Enable this attribute if peering-HA is enabled on the gateways. Valid values: true, false. Default value: false.
gwName1 This property is required. string
The first VPC Container name to make a peer pair.
gwName2 This property is required. string
The second VPC Container name to make a peer pair.
enableHa boolean
Enable this attribute if peering-HA is enabled on the gateways. Valid values: true, false. Default value: false.
gw_name1 This property is required. str
The first VPC Container name to make a peer pair.
gw_name2 This property is required. str
The second VPC Container name to make a peer pair.
enable_ha bool
Enable this attribute if peering-HA is enabled on the gateways. Valid values: true, false. Default value: false.
gwName1 This property is required. String
The first VPC Container name to make a peer pair.
gwName2 This property is required. String
The second VPC Container name to make a peer pair.
enableHa Boolean
Enable this attribute if peering-HA is enabled on the gateways. Valid values: true, false. Default value: false.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
PeeringHastatus string
(Computed) Status of the HA tunnel.
PeeringLink string
(Computed) Name of the peering link.
PeeringState string
(Computed) Status of the tunnel.
Id string
The provider-assigned unique ID for this managed resource.
PeeringHastatus string
(Computed) Status of the HA tunnel.
PeeringLink string
(Computed) Name of the peering link.
PeeringState string
(Computed) Status of the tunnel.
id String
The provider-assigned unique ID for this managed resource.
peeringHastatus String
(Computed) Status of the HA tunnel.
peeringLink String
(Computed) Name of the peering link.
peeringState String
(Computed) Status of the tunnel.
id string
The provider-assigned unique ID for this managed resource.
peeringHastatus string
(Computed) Status of the HA tunnel.
peeringLink string
(Computed) Name of the peering link.
peeringState string
(Computed) Status of the tunnel.
id str
The provider-assigned unique ID for this managed resource.
peering_hastatus str
(Computed) Status of the HA tunnel.
peering_link str
(Computed) Name of the peering link.
peering_state str
(Computed) Status of the tunnel.
id String
The provider-assigned unique ID for this managed resource.
peeringHastatus String
(Computed) Status of the HA tunnel.
peeringLink String
(Computed) Name of the peering link.
peeringState String
(Computed) Status of the tunnel.

Look up Existing AviatrixTunnel Resource

Get an existing AviatrixTunnel 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?: AviatrixTunnelState, opts?: CustomResourceOptions): AviatrixTunnel
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        enable_ha: Optional[bool] = None,
        gw_name1: Optional[str] = None,
        gw_name2: Optional[str] = None,
        peering_hastatus: Optional[str] = None,
        peering_link: Optional[str] = None,
        peering_state: Optional[str] = None) -> AviatrixTunnel
func GetAviatrixTunnel(ctx *Context, name string, id IDInput, state *AviatrixTunnelState, opts ...ResourceOption) (*AviatrixTunnel, error)
public static AviatrixTunnel Get(string name, Input<string> id, AviatrixTunnelState? state, CustomResourceOptions? opts = null)
public static AviatrixTunnel get(String name, Output<String> id, AviatrixTunnelState state, CustomResourceOptions options)
resources:  _:    type: aviatrix:AviatrixTunnel    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
EnableHa bool
Enable this attribute if peering-HA is enabled on the gateways. Valid values: true, false. Default value: false.
GwName1 string
The first VPC Container name to make a peer pair.
GwName2 string
The second VPC Container name to make a peer pair.
PeeringHastatus string
(Computed) Status of the HA tunnel.
PeeringLink string
(Computed) Name of the peering link.
PeeringState string
(Computed) Status of the tunnel.
EnableHa bool
Enable this attribute if peering-HA is enabled on the gateways. Valid values: true, false. Default value: false.
GwName1 string
The first VPC Container name to make a peer pair.
GwName2 string
The second VPC Container name to make a peer pair.
PeeringHastatus string
(Computed) Status of the HA tunnel.
PeeringLink string
(Computed) Name of the peering link.
PeeringState string
(Computed) Status of the tunnel.
enableHa Boolean
Enable this attribute if peering-HA is enabled on the gateways. Valid values: true, false. Default value: false.
gwName1 String
The first VPC Container name to make a peer pair.
gwName2 String
The second VPC Container name to make a peer pair.
peeringHastatus String
(Computed) Status of the HA tunnel.
peeringLink String
(Computed) Name of the peering link.
peeringState String
(Computed) Status of the tunnel.
enableHa boolean
Enable this attribute if peering-HA is enabled on the gateways. Valid values: true, false. Default value: false.
gwName1 string
The first VPC Container name to make a peer pair.
gwName2 string
The second VPC Container name to make a peer pair.
peeringHastatus string
(Computed) Status of the HA tunnel.
peeringLink string
(Computed) Name of the peering link.
peeringState string
(Computed) Status of the tunnel.
enable_ha bool
Enable this attribute if peering-HA is enabled on the gateways. Valid values: true, false. Default value: false.
gw_name1 str
The first VPC Container name to make a peer pair.
gw_name2 str
The second VPC Container name to make a peer pair.
peering_hastatus str
(Computed) Status of the HA tunnel.
peering_link str
(Computed) Name of the peering link.
peering_state str
(Computed) Status of the tunnel.
enableHa Boolean
Enable this attribute if peering-HA is enabled on the gateways. Valid values: true, false. Default value: false.
gwName1 String
The first VPC Container name to make a peer pair.
gwName2 String
The second VPC Container name to make a peer pair.
peeringHastatus String
(Computed) Status of the HA tunnel.
peeringLink String
(Computed) Name of the peering link.
peeringState String
(Computed) Status of the tunnel.

Import

tunnel can be imported using the gw_name1 and gw_name2, e.g.

 $ pulumi import aviatrix:index/aviatrixTunnel:AviatrixTunnel test gw_name1~gw_name2
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
aviatrix astipkovits/pulumi-aviatrix
License
Apache-2.0
Notes
This Pulumi package is based on the aviatrix Terraform Provider.