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

aviatrix.AviatrixSite2CloudCaCertTag

Explore with Pulumi AI

The aviatrix_site2cloud_ca_cert_tag resource creates and manages Aviatrix-created Site2Cloud CA Cert Tags.

Example Usage

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

return await Deployment.RunAsync(() => 
{
    // Create an Aviatrix Site2cloud CA Cert Tag Containing One Cert
    var test = new Aviatrix.AviatrixSite2CloudCaCertTag("test", new()
    {
        TagName = "test",
        CaCertificates = new[]
        {
            new Aviatrix.Inputs.AviatrixSite2CloudCaCertTagCaCertificateArgs
            {
                CertContent = File.ReadAllText("/home/ubuntu/avx_gw_ca_cert_in_ui_root_only.crt"),
            },
        },
    });

});
Copy
package main

import (
	"io/ioutil"

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

func readFileOrPanic(path string) pulumi.StringPtrInput {
	data, err := ioutil.ReadFile(path)
	if err != nil {
		panic(err.Error())
	}
	return pulumi.String(string(data))
}

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := aviatrix.NewAviatrixSite2CloudCaCertTag(ctx, "test", &aviatrix.AviatrixSite2CloudCaCertTagArgs{
			TagName: pulumi.String("test"),
			CaCertificates: AviatrixSite2CloudCaCertTagCaCertificateArray{
				&AviatrixSite2CloudCaCertTagCaCertificateArgs{
					CertContent: readFileOrPanic("/home/ubuntu/avx_gw_ca_cert_in_ui_root_only.crt"),
				},
			},
		})
		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.AviatrixSite2CloudCaCertTag;
import com.pulumi.aviatrix.AviatrixSite2CloudCaCertTagArgs;
import com.pulumi.aviatrix.inputs.AviatrixSite2CloudCaCertTagCaCertificateArgs;
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 test = new AviatrixSite2CloudCaCertTag("test", AviatrixSite2CloudCaCertTagArgs.builder()        
            .tagName("test")
            .caCertificates(AviatrixSite2CloudCaCertTagCaCertificateArgs.builder()
                .certContent(Files.readString(Paths.get("/home/ubuntu/avx_gw_ca_cert_in_ui_root_only.crt")))
                .build())
            .build());

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

// Create an Aviatrix Site2cloud CA Cert Tag Containing One Cert
const test = new aviatrix.AviatrixSite2CloudCaCertTag("test", {
    tagName: "test",
    caCertificates: [{
        certContent: fs.readFileSync("/home/ubuntu/avx_gw_ca_cert_in_ui_root_only.crt"),
    }],
});
Copy
import pulumi
import pulumi_aviatrix as aviatrix

# Create an Aviatrix Site2cloud CA Cert Tag Containing One Cert
test = aviatrix.AviatrixSite2CloudCaCertTag("test",
    tag_name="test",
    ca_certificates=[aviatrix.AviatrixSite2CloudCaCertTagCaCertificateArgs(
        cert_content=(lambda path: open(path).read())("/home/ubuntu/avx_gw_ca_cert_in_ui_root_only.crt"),
    )])
Copy
resources:
  # Create an Aviatrix Site2cloud CA Cert Tag Containing One Cert
  test:
    type: aviatrix:AviatrixSite2CloudCaCertTag
    properties:
      tagName: test
      caCertificates:
        - certContent:
            fn::readFile: /home/ubuntu/avx_gw_ca_cert_in_ui_root_only.crt
Copy
using System.Collections.Generic;
using System.IO;
using Pulumi;
using Aviatrix = Pulumi.Aviatrix;

return await Deployment.RunAsync(() => 
{
    // Create an Aviatrix Site2cloud CA Cert Tag Containing Multiple Certs
    var test = new Aviatrix.AviatrixSite2CloudCaCertTag("test", new()
    {
        TagName = "test",
        CaCertificates = new[]
        {
            new Aviatrix.Inputs.AviatrixSite2CloudCaCertTagCaCertificateArgs
            {
                CertContent = File.ReadAllText("/home/ubuntu/avx_gw_ca_cert_root.crt"),
            },
            new Aviatrix.Inputs.AviatrixSite2CloudCaCertTagCaCertificateArgs
            {
                CertContent = File.ReadAllText("/home/ubuntu/avx_gw_ca_cert_intermediate.crt"),
            },
            new Aviatrix.Inputs.AviatrixSite2CloudCaCertTagCaCertificateArgs
            {
                CertContent = File.ReadAllText("/home/ubuntu/avx_gw_ca_cert_intermediate2.crt"),
            },
        },
    });

});
Copy
package main

import (
	"io/ioutil"

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

func readFileOrPanic(path string) pulumi.StringPtrInput {
	data, err := ioutil.ReadFile(path)
	if err != nil {
		panic(err.Error())
	}
	return pulumi.String(string(data))
}

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := aviatrix.NewAviatrixSite2CloudCaCertTag(ctx, "test", &aviatrix.AviatrixSite2CloudCaCertTagArgs{
			TagName: pulumi.String("test"),
			CaCertificates: AviatrixSite2CloudCaCertTagCaCertificateArray{
				&AviatrixSite2CloudCaCertTagCaCertificateArgs{
					CertContent: readFileOrPanic("/home/ubuntu/avx_gw_ca_cert_root.crt"),
				},
				&AviatrixSite2CloudCaCertTagCaCertificateArgs{
					CertContent: readFileOrPanic("/home/ubuntu/avx_gw_ca_cert_intermediate.crt"),
				},
				&AviatrixSite2CloudCaCertTagCaCertificateArgs{
					CertContent: readFileOrPanic("/home/ubuntu/avx_gw_ca_cert_intermediate2.crt"),
				},
			},
		})
		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.AviatrixSite2CloudCaCertTag;
import com.pulumi.aviatrix.AviatrixSite2CloudCaCertTagArgs;
import com.pulumi.aviatrix.inputs.AviatrixSite2CloudCaCertTagCaCertificateArgs;
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 test = new AviatrixSite2CloudCaCertTag("test", AviatrixSite2CloudCaCertTagArgs.builder()        
            .tagName("test")
            .caCertificates(            
                AviatrixSite2CloudCaCertTagCaCertificateArgs.builder()
                    .certContent(Files.readString(Paths.get("/home/ubuntu/avx_gw_ca_cert_root.crt")))
                    .build(),
                AviatrixSite2CloudCaCertTagCaCertificateArgs.builder()
                    .certContent(Files.readString(Paths.get("/home/ubuntu/avx_gw_ca_cert_intermediate.crt")))
                    .build(),
                AviatrixSite2CloudCaCertTagCaCertificateArgs.builder()
                    .certContent(Files.readString(Paths.get("/home/ubuntu/avx_gw_ca_cert_intermediate2.crt")))
                    .build())
            .build());

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

// Create an Aviatrix Site2cloud CA Cert Tag Containing Multiple Certs
const test = new aviatrix.AviatrixSite2CloudCaCertTag("test", {
    tagName: "test",
    caCertificates: [
        {
            certContent: fs.readFileSync("/home/ubuntu/avx_gw_ca_cert_root.crt"),
        },
        {
            certContent: fs.readFileSync("/home/ubuntu/avx_gw_ca_cert_intermediate.crt"),
        },
        {
            certContent: fs.readFileSync("/home/ubuntu/avx_gw_ca_cert_intermediate2.crt"),
        },
    ],
});
Copy
import pulumi
import pulumi_aviatrix as aviatrix

# Create an Aviatrix Site2cloud CA Cert Tag Containing Multiple Certs
test = aviatrix.AviatrixSite2CloudCaCertTag("test",
    tag_name="test",
    ca_certificates=[
        aviatrix.AviatrixSite2CloudCaCertTagCaCertificateArgs(
            cert_content=(lambda path: open(path).read())("/home/ubuntu/avx_gw_ca_cert_root.crt"),
        ),
        aviatrix.AviatrixSite2CloudCaCertTagCaCertificateArgs(
            cert_content=(lambda path: open(path).read())("/home/ubuntu/avx_gw_ca_cert_intermediate.crt"),
        ),
        aviatrix.AviatrixSite2CloudCaCertTagCaCertificateArgs(
            cert_content=(lambda path: open(path).read())("/home/ubuntu/avx_gw_ca_cert_intermediate2.crt"),
        ),
    ])
Copy
resources:
  # Create an Aviatrix Site2cloud CA Cert Tag Containing Multiple Certs
  test:
    type: aviatrix:AviatrixSite2CloudCaCertTag
    properties:
      tagName: test
      caCertificates:
        - certContent:
            fn::readFile: /home/ubuntu/avx_gw_ca_cert_root.crt
        - certContent:
            fn::readFile: /home/ubuntu/avx_gw_ca_cert_intermediate.crt
        - certContent:
            fn::readFile: /home/ubuntu/avx_gw_ca_cert_intermediate2.crt
Copy

Create AviatrixSite2CloudCaCertTag Resource

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

Constructor syntax

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

@overload
def AviatrixSite2CloudCaCertTag(resource_name: str,
                                opts: Optional[ResourceOptions] = None,
                                ca_certificates: Optional[Sequence[AviatrixSite2CloudCaCertTagCaCertificateArgs]] = None,
                                tag_name: Optional[str] = None)
func NewAviatrixSite2CloudCaCertTag(ctx *Context, name string, args AviatrixSite2CloudCaCertTagArgs, opts ...ResourceOption) (*AviatrixSite2CloudCaCertTag, error)
public AviatrixSite2CloudCaCertTag(string name, AviatrixSite2CloudCaCertTagArgs args, CustomResourceOptions? opts = null)
public AviatrixSite2CloudCaCertTag(String name, AviatrixSite2CloudCaCertTagArgs args)
public AviatrixSite2CloudCaCertTag(String name, AviatrixSite2CloudCaCertTagArgs args, CustomResourceOptions options)
type: aviatrix:AviatrixSite2CloudCaCertTag
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. AviatrixSite2CloudCaCertTagArgs
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. AviatrixSite2CloudCaCertTagArgs
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. AviatrixSite2CloudCaCertTagArgs
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. AviatrixSite2CloudCaCertTagArgs
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. AviatrixSite2CloudCaCertTagArgs
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 aviatrixSite2CloudCaCertTagResource = new Aviatrix.AviatrixSite2CloudCaCertTag("aviatrixSite2CloudCaCertTagResource", new()
{
    CaCertificates = new[]
    {
        new Aviatrix.Inputs.AviatrixSite2CloudCaCertTagCaCertificateArgs
        {
            CertContent = "string",
            CommonName = "string",
            ExpirationTime = "string",
            Id = "string",
            IssuerName = "string",
            UniqueSerial = "string",
        },
    },
    TagName = "string",
});
Copy
example, err := aviatrix.NewAviatrixSite2CloudCaCertTag(ctx, "aviatrixSite2CloudCaCertTagResource", &aviatrix.AviatrixSite2CloudCaCertTagArgs{
	CaCertificates: aviatrix.AviatrixSite2CloudCaCertTagCaCertificateArray{
		&aviatrix.AviatrixSite2CloudCaCertTagCaCertificateArgs{
			CertContent:    pulumi.String("string"),
			CommonName:     pulumi.String("string"),
			ExpirationTime: pulumi.String("string"),
			Id:             pulumi.String("string"),
			IssuerName:     pulumi.String("string"),
			UniqueSerial:   pulumi.String("string"),
		},
	},
	TagName: pulumi.String("string"),
})
Copy
var aviatrixSite2CloudCaCertTagResource = new AviatrixSite2CloudCaCertTag("aviatrixSite2CloudCaCertTagResource", AviatrixSite2CloudCaCertTagArgs.builder()
    .caCertificates(AviatrixSite2CloudCaCertTagCaCertificateArgs.builder()
        .certContent("string")
        .commonName("string")
        .expirationTime("string")
        .id("string")
        .issuerName("string")
        .uniqueSerial("string")
        .build())
    .tagName("string")
    .build());
Copy
aviatrix_site2_cloud_ca_cert_tag_resource = aviatrix.AviatrixSite2CloudCaCertTag("aviatrixSite2CloudCaCertTagResource",
    ca_certificates=[{
        "cert_content": "string",
        "common_name": "string",
        "expiration_time": "string",
        "id": "string",
        "issuer_name": "string",
        "unique_serial": "string",
    }],
    tag_name="string")
Copy
const aviatrixSite2CloudCaCertTagResource = new aviatrix.AviatrixSite2CloudCaCertTag("aviatrixSite2CloudCaCertTagResource", {
    caCertificates: [{
        certContent: "string",
        commonName: "string",
        expirationTime: "string",
        id: "string",
        issuerName: "string",
        uniqueSerial: "string",
    }],
    tagName: "string",
});
Copy
type: aviatrix:AviatrixSite2CloudCaCertTag
properties:
    caCertificates:
        - certContent: string
          commonName: string
          expirationTime: string
          id: string
          issuerName: string
          uniqueSerial: string
    tagName: string
Copy

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

CaCertificates This property is required. List<AviatrixSite2CloudCaCertTagCaCertificate>
A set of CA certificates.
TagName
This property is required.
Changes to this property will trigger replacement.
string
Site2Cloud ca cert tag name.
CaCertificates This property is required. []AviatrixSite2CloudCaCertTagCaCertificateArgs
A set of CA certificates.
TagName
This property is required.
Changes to this property will trigger replacement.
string
Site2Cloud ca cert tag name.
caCertificates This property is required. List<AviatrixSite2CloudCaCertTagCaCertificate>
A set of CA certificates.
tagName
This property is required.
Changes to this property will trigger replacement.
String
Site2Cloud ca cert tag name.
caCertificates This property is required. AviatrixSite2CloudCaCertTagCaCertificate[]
A set of CA certificates.
tagName
This property is required.
Changes to this property will trigger replacement.
string
Site2Cloud ca cert tag name.
ca_certificates This property is required. Sequence[AviatrixSite2CloudCaCertTagCaCertificateArgs]
A set of CA certificates.
tag_name
This property is required.
Changes to this property will trigger replacement.
str
Site2Cloud ca cert tag name.
caCertificates This property is required. List<Property Map>
A set of CA certificates.
tagName
This property is required.
Changes to this property will trigger replacement.
String
Site2Cloud ca cert tag name.

Outputs

All input properties are implicitly available as output properties. Additionally, the AviatrixSite2CloudCaCertTag 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 AviatrixSite2CloudCaCertTag Resource

Get an existing AviatrixSite2CloudCaCertTag 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?: AviatrixSite2CloudCaCertTagState, opts?: CustomResourceOptions): AviatrixSite2CloudCaCertTag
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        ca_certificates: Optional[Sequence[AviatrixSite2CloudCaCertTagCaCertificateArgs]] = None,
        tag_name: Optional[str] = None) -> AviatrixSite2CloudCaCertTag
func GetAviatrixSite2CloudCaCertTag(ctx *Context, name string, id IDInput, state *AviatrixSite2CloudCaCertTagState, opts ...ResourceOption) (*AviatrixSite2CloudCaCertTag, error)
public static AviatrixSite2CloudCaCertTag Get(string name, Input<string> id, AviatrixSite2CloudCaCertTagState? state, CustomResourceOptions? opts = null)
public static AviatrixSite2CloudCaCertTag get(String name, Output<String> id, AviatrixSite2CloudCaCertTagState state, CustomResourceOptions options)
resources:  _:    type: aviatrix:AviatrixSite2CloudCaCertTag    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:
CaCertificates List<AviatrixSite2CloudCaCertTagCaCertificate>
A set of CA certificates.
TagName Changes to this property will trigger replacement. string
Site2Cloud ca cert tag name.
CaCertificates []AviatrixSite2CloudCaCertTagCaCertificateArgs
A set of CA certificates.
TagName Changes to this property will trigger replacement. string
Site2Cloud ca cert tag name.
caCertificates List<AviatrixSite2CloudCaCertTagCaCertificate>
A set of CA certificates.
tagName Changes to this property will trigger replacement. String
Site2Cloud ca cert tag name.
caCertificates AviatrixSite2CloudCaCertTagCaCertificate[]
A set of CA certificates.
tagName Changes to this property will trigger replacement. string
Site2Cloud ca cert tag name.
ca_certificates Sequence[AviatrixSite2CloudCaCertTagCaCertificateArgs]
A set of CA certificates.
tag_name Changes to this property will trigger replacement. str
Site2Cloud ca cert tag name.
caCertificates List<Property Map>
A set of CA certificates.
tagName Changes to this property will trigger replacement. String
Site2Cloud ca cert tag name.

Supporting Types

AviatrixSite2CloudCaCertTagCaCertificate
, AviatrixSite2CloudCaCertTagCaCertificateArgs

CertContent This property is required. string
Content of cert certificate to create only one cert. One CA cert only per file.
CommonName string
Common name of created cert.
ExpirationTime string
Expiration time of created cert.
Id string
Unique id of created cert.
IssuerName string
Issuer name of created cert.
UniqueSerial string
Unique serial of created cert.
CertContent This property is required. string
Content of cert certificate to create only one cert. One CA cert only per file.
CommonName string
Common name of created cert.
ExpirationTime string
Expiration time of created cert.
Id string
Unique id of created cert.
IssuerName string
Issuer name of created cert.
UniqueSerial string
Unique serial of created cert.
certContent This property is required. String
Content of cert certificate to create only one cert. One CA cert only per file.
commonName String
Common name of created cert.
expirationTime String
Expiration time of created cert.
id String
Unique id of created cert.
issuerName String
Issuer name of created cert.
uniqueSerial String
Unique serial of created cert.
certContent This property is required. string
Content of cert certificate to create only one cert. One CA cert only per file.
commonName string
Common name of created cert.
expirationTime string
Expiration time of created cert.
id string
Unique id of created cert.
issuerName string
Issuer name of created cert.
uniqueSerial string
Unique serial of created cert.
cert_content This property is required. str
Content of cert certificate to create only one cert. One CA cert only per file.
common_name str
Common name of created cert.
expiration_time str
Expiration time of created cert.
id str
Unique id of created cert.
issuer_name str
Issuer name of created cert.
unique_serial str
Unique serial of created cert.
certContent This property is required. String
Content of cert certificate to create only one cert. One CA cert only per file.
commonName String
Common name of created cert.
expirationTime String
Expiration time of created cert.
id String
Unique id of created cert.
issuerName String
Issuer name of created cert.
uniqueSerial String
Unique serial of created cert.

Import

site2cloud_ca_cert_tag can be imported using the tag_name and, e.g.

 $ pulumi import aviatrix:index/aviatrixSite2CloudCaCertTag:AviatrixSite2CloudCaCertTag test tag_name
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.