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

aviatrix logo
Aviatrix v0.0.11 published on Saturday, Jun 17, 2023 by Aviatrix

    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"),
                },
            },
        });
    
    });
    
    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
    	})
    }
    
    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());
    
        }
    }
    
    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"),
        )])
    
    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"),
        }],
    });
    
    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
    
    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"),
                },
            },
        });
    
    });
    
    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
    	})
    }
    
    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());
    
        }
    }
    
    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"),
            ),
        ])
    
    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"),
            },
        ],
    });
    
    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
    

    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 string
    The unique name of the resource.
    args AviatrixSite2CloudCaCertTagArgs
    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 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 string
    The unique name of the resource.
    args AviatrixSite2CloudCaCertTagArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AviatrixSite2CloudCaCertTagArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args 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",
    });
    
    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"),
    })
    
    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());
    
    aviatrix_site2_cloud_ca_cert_tag_resource = aviatrix.AviatrixSite2CloudCaCertTag("aviatrixSite2CloudCaCertTagResource",
        ca_certificates=[aviatrix.AviatrixSite2CloudCaCertTagCaCertificateArgs(
            cert_content="string",
            common_name="string",
            expiration_time="string",
            id="string",
            issuer_name="string",
            unique_serial="string",
        )],
        tag_name="string")
    
    const aviatrixSite2CloudCaCertTagResource = new aviatrix.AviatrixSite2CloudCaCertTag("aviatrixSite2CloudCaCertTagResource", {
        caCertificates: [{
            certContent: "string",
            commonName: "string",
            expirationTime: "string",
            id: "string",
            issuerName: "string",
            uniqueSerial: "string",
        }],
        tagName: "string",
    });
    
    type: aviatrix:AviatrixSite2CloudCaCertTag
    properties:
        caCertificates:
            - certContent: string
              commonName: string
              expirationTime: string
              id: string
              issuerName: string
              uniqueSerial: string
        tagName: string
    

    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

    The AviatrixSite2CloudCaCertTag resource accepts the following input properties:

    CaCertificates List<AviatrixSite2CloudCaCertTagCaCertificate>
    A set of CA certificates.
    TagName string
    Site2Cloud ca cert tag name.
    CaCertificates []AviatrixSite2CloudCaCertTagCaCertificateArgs
    A set of CA certificates.
    TagName string
    Site2Cloud ca cert tag name.
    caCertificates List<AviatrixSite2CloudCaCertTagCaCertificate>
    A set of CA certificates.
    tagName String
    Site2Cloud ca cert tag name.
    caCertificates AviatrixSite2CloudCaCertTagCaCertificate[]
    A set of CA certificates.
    tagName string
    Site2Cloud ca cert tag name.
    ca_certificates Sequence[AviatrixSite2CloudCaCertTagCaCertificateArgs]
    A set of CA certificates.
    tag_name str
    Site2Cloud ca cert tag name.
    caCertificates List<Property Map>
    A set of CA certificates.
    tagName 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)
    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.
    The following state arguments are supported:
    CaCertificates List<AviatrixSite2CloudCaCertTagCaCertificate>
    A set of CA certificates.
    TagName string
    Site2Cloud ca cert tag name.
    CaCertificates []AviatrixSite2CloudCaCertTagCaCertificateArgs
    A set of CA certificates.
    TagName string
    Site2Cloud ca cert tag name.
    caCertificates List<AviatrixSite2CloudCaCertTagCaCertificate>
    A set of CA certificates.
    tagName String
    Site2Cloud ca cert tag name.
    caCertificates AviatrixSite2CloudCaCertTagCaCertificate[]
    A set of CA certificates.
    tagName string
    Site2Cloud ca cert tag name.
    ca_certificates Sequence[AviatrixSite2CloudCaCertTagCaCertificateArgs]
    A set of CA certificates.
    tag_name str
    Site2Cloud ca cert tag name.
    caCertificates List<Property Map>
    A set of CA certificates.
    tagName String
    Site2Cloud ca cert tag name.

    Supporting Types

    AviatrixSite2CloudCaCertTagCaCertificate, AviatrixSite2CloudCaCertTagCaCertificateArgs

    CertContent 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 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 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 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 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 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
    

    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.
    aviatrix logo
    Aviatrix v0.0.11 published on Saturday, Jun 17, 2023 by Aviatrix