aviatrix.AviatrixGatewayCertificateConfig

Explore with Pulumi AI

The aviatrix_gateway_certificate_config resource allows the management of Aviatrix gateway certificate configuration. Available as of provider version R2.18.1+.

Example Usage

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

return await Deployment.RunAsync(() => 
{
    // Aviatrix Gateway Certificate Management
    var testGatewayCert = new Aviatrix.AviatrixGatewayCertificateConfig("testGatewayCert", new()
    {
        CaCertificate = File.ReadAllText("path/to/CA_cert.pem"),
        CaPrivateKey = File.ReadAllText("path/to/CA_private.key"),
    });

});
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.NewAviatrixGatewayCertificateConfig(ctx, "testGatewayCert", &aviatrix.AviatrixGatewayCertificateConfigArgs{
			CaCertificate: readFileOrPanic("path/to/CA_cert.pem"),
			CaPrivateKey:  readFileOrPanic("path/to/CA_private.key"),
		})
		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.AviatrixGatewayCertificateConfig;
import com.pulumi.aviatrix.AviatrixGatewayCertificateConfigArgs;
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 testGatewayCert = new AviatrixGatewayCertificateConfig("testGatewayCert", AviatrixGatewayCertificateConfigArgs.builder()        
            .caCertificate(Files.readString(Paths.get("path/to/CA_cert.pem")))
            .caPrivateKey(Files.readString(Paths.get("path/to/CA_private.key")))
            .build());

    }
}
import pulumi
import pulumi_aviatrix as aviatrix

# Aviatrix Gateway Certificate Management
test_gateway_cert = aviatrix.AviatrixGatewayCertificateConfig("testGatewayCert",
    ca_certificate=(lambda path: open(path).read())("path/to/CA_cert.pem"),
    ca_private_key=(lambda path: open(path).read())("path/to/CA_private.key"))
import * as pulumi from "@pulumi/pulumi";
import * as aviatrix from "@astipkovits/aviatrix";
import * as fs from "fs";

// Aviatrix Gateway Certificate Management
const testGatewayCert = new aviatrix.AviatrixGatewayCertificateConfig("testGatewayCert", {
    caCertificate: fs.readFileSync("path/to/CA_cert.pem"),
    caPrivateKey: fs.readFileSync("path/to/CA_private.key"),
});
resources:
  # Aviatrix Gateway Certificate Management
  testGatewayCert:
    type: aviatrix:AviatrixGatewayCertificateConfig
    properties:
      caCertificate:
        fn::readFile: path/to/CA_cert.pem
      caPrivateKey:
        fn::readFile: path/to/CA_private.key

Create AviatrixGatewayCertificateConfig Resource

new AviatrixGatewayCertificateConfig(name: string, args: AviatrixGatewayCertificateConfigArgs, opts?: CustomResourceOptions);
@overload
def AviatrixGatewayCertificateConfig(resource_name: str,
                                     opts: Optional[ResourceOptions] = None,
                                     ca_certificate: Optional[str] = None,
                                     ca_private_key: Optional[str] = None)
@overload
def AviatrixGatewayCertificateConfig(resource_name: str,
                                     args: AviatrixGatewayCertificateConfigArgs,
                                     opts: Optional[ResourceOptions] = None)
func NewAviatrixGatewayCertificateConfig(ctx *Context, name string, args AviatrixGatewayCertificateConfigArgs, opts ...ResourceOption) (*AviatrixGatewayCertificateConfig, error)
public AviatrixGatewayCertificateConfig(string name, AviatrixGatewayCertificateConfigArgs args, CustomResourceOptions? opts = null)
public AviatrixGatewayCertificateConfig(String name, AviatrixGatewayCertificateConfigArgs args)
public AviatrixGatewayCertificateConfig(String name, AviatrixGatewayCertificateConfigArgs args, CustomResourceOptions options)
type: aviatrix:AviatrixGatewayCertificateConfig
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args AviatrixGatewayCertificateConfigArgs
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 AviatrixGatewayCertificateConfigArgs
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 AviatrixGatewayCertificateConfigArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args AviatrixGatewayCertificateConfigArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args AviatrixGatewayCertificateConfigArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

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

CaCertificate string

CA Certificate in PEM format. To read certificate from a file please use the built-in file function.

CaPrivateKey string

CA Private Key. To read the private key from a file please use the built-in file function.

CaCertificate string

CA Certificate in PEM format. To read certificate from a file please use the built-in file function.

CaPrivateKey string

CA Private Key. To read the private key from a file please use the built-in file function.

caCertificate String

CA Certificate in PEM format. To read certificate from a file please use the built-in file function.

caPrivateKey String

CA Private Key. To read the private key from a file please use the built-in file function.

caCertificate string

CA Certificate in PEM format. To read certificate from a file please use the built-in file function.

caPrivateKey string

CA Private Key. To read the private key from a file please use the built-in file function.

ca_certificate str

CA Certificate in PEM format. To read certificate from a file please use the built-in file function.

ca_private_key str

CA Private Key. To read the private key from a file please use the built-in file function.

caCertificate String

CA Certificate in PEM format. To read certificate from a file please use the built-in file function.

caPrivateKey String

CA Private Key. To read the private key from a file please use the built-in file function.

Outputs

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

Get an existing AviatrixGatewayCertificateConfig 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?: AviatrixGatewayCertificateConfigState, opts?: CustomResourceOptions): AviatrixGatewayCertificateConfig
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        ca_certificate: Optional[str] = None,
        ca_private_key: Optional[str] = None) -> AviatrixGatewayCertificateConfig
func GetAviatrixGatewayCertificateConfig(ctx *Context, name string, id IDInput, state *AviatrixGatewayCertificateConfigState, opts ...ResourceOption) (*AviatrixGatewayCertificateConfig, error)
public static AviatrixGatewayCertificateConfig Get(string name, Input<string> id, AviatrixGatewayCertificateConfigState? state, CustomResourceOptions? opts = null)
public static AviatrixGatewayCertificateConfig get(String name, Output<String> id, AviatrixGatewayCertificateConfigState 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:
CaCertificate string

CA Certificate in PEM format. To read certificate from a file please use the built-in file function.

CaPrivateKey string

CA Private Key. To read the private key from a file please use the built-in file function.

CaCertificate string

CA Certificate in PEM format. To read certificate from a file please use the built-in file function.

CaPrivateKey string

CA Private Key. To read the private key from a file please use the built-in file function.

caCertificate String

CA Certificate in PEM format. To read certificate from a file please use the built-in file function.

caPrivateKey String

CA Private Key. To read the private key from a file please use the built-in file function.

caCertificate string

CA Certificate in PEM format. To read certificate from a file please use the built-in file function.

caPrivateKey string

CA Private Key. To read the private key from a file please use the built-in file function.

ca_certificate str

CA Certificate in PEM format. To read certificate from a file please use the built-in file function.

ca_private_key str

CA Private Key. To read the private key from a file please use the built-in file function.

caCertificate String

CA Certificate in PEM format. To read certificate from a file please use the built-in file function.

caPrivateKey String

CA Private Key. To read the private key from a file please use the built-in file function.

Import

!> WARNING: When importing, the provider cannot read your private key or certificate into the state file. After importing, if you do not want to change the values of the CA private key or certificate you must set the attributes ca_certificate and ca_private_key to the empty string (""). Otherwise, Terraform will see a diff and force replacement. aviatrix_gateway_certificate_config can be imported using controller IP with the dots(.) replaces with dashes(-), e.g. controller IP is 10.11.12.13

 $ pulumi import aviatrix:index/aviatrixGatewayCertificateConfig:AviatrixGatewayCertificateConfig test 10-11-12-13

Package Details

Repository
aviatrix astipkovits/pulumi-aviatrix
License
Apache-2.0
Notes

This Pulumi package is based on the aviatrix Terraform Provider.