Cloudflare

Pulumi Official
Package maintained by Pulumi
v4.6.0 published on Tuesday, Apr 5, 2022 by Pulumi

AccessMutualTlsCertificate

Provides a Cloudflare Access Mutual TLS Certificate resource. Mutual TLS authentication ensures that the traffic is secure and trusted in both directions between a client and server and can be used with Access to only allows requests from devices with a corresponding client certificate.

Example Usage

using Pulumi;
using Cloudflare = Pulumi.Cloudflare;

class MyStack : Stack
{
    public MyStack()
    {
        var myCert = new Cloudflare.AccessMutualTlsCertificate("myCert", new Cloudflare.AccessMutualTlsCertificateArgs
        {
            ZoneId = "1d5fdc9e88c8a8c4518b068cd94331fe",
            Name = "My Root Cert",
            Certificate = @var.Ca_pem,
            AssociatedHostnames = 
            {
                "staging.example.com",
            },
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-cloudflare/sdk/v4/go/cloudflare"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := cloudflare.NewAccessMutualTlsCertificate(ctx, "myCert", &cloudflare.AccessMutualTlsCertificateArgs{
			ZoneId:      pulumi.String("1d5fdc9e88c8a8c4518b068cd94331fe"),
			Name:        pulumi.String("My Root Cert"),
			Certificate: pulumi.Any(_var.Ca_pem),
			AssociatedHostnames: pulumi.StringArray{
				pulumi.String("staging.example.com"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_cloudflare as cloudflare

my_cert = cloudflare.AccessMutualTlsCertificate("myCert",
    zone_id="1d5fdc9e88c8a8c4518b068cd94331fe",
    name="My Root Cert",
    certificate=var["ca_pem"],
    associated_hostnames=["staging.example.com"])
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";

const myCert = new cloudflare.AccessMutualTlsCertificate("myCert", {
    zoneId: "1d5fdc9e88c8a8c4518b068cd94331fe",
    name: "My Root Cert",
    certificate: _var.ca_pem,
    associatedHostnames: ["staging.example.com"],
});

Coming soon!

Create a AccessMutualTlsCertificate Resource

new AccessMutualTlsCertificate(name: string, args: AccessMutualTlsCertificateArgs, opts?: CustomResourceOptions);
@overload
def AccessMutualTlsCertificate(resource_name: str,
                               opts: Optional[ResourceOptions] = None,
                               account_id: Optional[str] = None,
                               associated_hostnames: Optional[Sequence[str]] = None,
                               certificate: Optional[str] = None,
                               name: Optional[str] = None,
                               zone_id: Optional[str] = None)
@overload
def AccessMutualTlsCertificate(resource_name: str,
                               args: AccessMutualTlsCertificateArgs,
                               opts: Optional[ResourceOptions] = None)
func NewAccessMutualTlsCertificate(ctx *Context, name string, args AccessMutualTlsCertificateArgs, opts ...ResourceOption) (*AccessMutualTlsCertificate, error)
public AccessMutualTlsCertificate(string name, AccessMutualTlsCertificateArgs args, CustomResourceOptions? opts = null)
public AccessMutualTlsCertificate(String name, AccessMutualTlsCertificateArgs args)
public AccessMutualTlsCertificate(String name, AccessMutualTlsCertificateArgs args, CustomResourceOptions options)
type: cloudflare:AccessMutualTlsCertificate
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

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

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

Name string

The name of the certificate.

AccountId string

The account to which the certificate should be added. Conflicts with zone_id.

AssociatedHostnames List<string>

The hostnames that will be prompted for this certificate.

Certificate string

The Root CA for your certificates.

ZoneId string

The DNS zone to which the certificate should be added. Conflicts with account_id.

Name string

The name of the certificate.

AccountId string

The account to which the certificate should be added. Conflicts with zone_id.

AssociatedHostnames []string

The hostnames that will be prompted for this certificate.

Certificate string

The Root CA for your certificates.

ZoneId string

The DNS zone to which the certificate should be added. Conflicts with account_id.

name String

The name of the certificate.

accountId String

The account to which the certificate should be added. Conflicts with zone_id.

associatedHostnames List

The hostnames that will be prompted for this certificate.

certificate String

The Root CA for your certificates.

zoneId String

The DNS zone to which the certificate should be added. Conflicts with account_id.

name string

The name of the certificate.

accountId string

The account to which the certificate should be added. Conflicts with zone_id.

associatedHostnames string[]

The hostnames that will be prompted for this certificate.

certificate string

The Root CA for your certificates.

zoneId string

The DNS zone to which the certificate should be added. Conflicts with account_id.

name str

The name of the certificate.

account_id str

The account to which the certificate should be added. Conflicts with zone_id.

associated_hostnames Sequence[str]

The hostnames that will be prompted for this certificate.

certificate str

The Root CA for your certificates.

zone_id str

The DNS zone to which the certificate should be added. Conflicts with account_id.

name String

The name of the certificate.

accountId String

The account to which the certificate should be added. Conflicts with zone_id.

associatedHostnames List

The hostnames that will be prompted for this certificate.

certificate String

The Root CA for your certificates.

zoneId String

The DNS zone to which the certificate should be added. Conflicts with account_id.

Outputs

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

Fingerprint string
Id string

The provider-assigned unique ID for this managed resource.

Fingerprint string
Id string

The provider-assigned unique ID for this managed resource.

fingerprint String
id String

The provider-assigned unique ID for this managed resource.

fingerprint string
id string

The provider-assigned unique ID for this managed resource.

fingerprint str
id str

The provider-assigned unique ID for this managed resource.

fingerprint String
id String

The provider-assigned unique ID for this managed resource.

Look up an Existing AccessMutualTlsCertificate Resource

Get an existing AccessMutualTlsCertificate 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?: AccessMutualTlsCertificateState, opts?: CustomResourceOptions): AccessMutualTlsCertificate
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        account_id: Optional[str] = None,
        associated_hostnames: Optional[Sequence[str]] = None,
        certificate: Optional[str] = None,
        fingerprint: Optional[str] = None,
        name: Optional[str] = None,
        zone_id: Optional[str] = None) -> AccessMutualTlsCertificate
func GetAccessMutualTlsCertificate(ctx *Context, name string, id IDInput, state *AccessMutualTlsCertificateState, opts ...ResourceOption) (*AccessMutualTlsCertificate, error)
public static AccessMutualTlsCertificate Get(string name, Input<string> id, AccessMutualTlsCertificateState? state, CustomResourceOptions? opts = null)
public static AccessMutualTlsCertificate get(String name, Output<String> id, AccessMutualTlsCertificateState 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:
AccountId string

The account to which the certificate should be added. Conflicts with zone_id.

AssociatedHostnames List<string>

The hostnames that will be prompted for this certificate.

Certificate string

The Root CA for your certificates.

Fingerprint string
Name string

The name of the certificate.

ZoneId string

The DNS zone to which the certificate should be added. Conflicts with account_id.

AccountId string

The account to which the certificate should be added. Conflicts with zone_id.

AssociatedHostnames []string

The hostnames that will be prompted for this certificate.

Certificate string

The Root CA for your certificates.

Fingerprint string
Name string

The name of the certificate.

ZoneId string

The DNS zone to which the certificate should be added. Conflicts with account_id.

accountId String

The account to which the certificate should be added. Conflicts with zone_id.

associatedHostnames List

The hostnames that will be prompted for this certificate.

certificate String

The Root CA for your certificates.

fingerprint String
name String

The name of the certificate.

zoneId String

The DNS zone to which the certificate should be added. Conflicts with account_id.

accountId string

The account to which the certificate should be added. Conflicts with zone_id.

associatedHostnames string[]

The hostnames that will be prompted for this certificate.

certificate string

The Root CA for your certificates.

fingerprint string
name string

The name of the certificate.

zoneId string

The DNS zone to which the certificate should be added. Conflicts with account_id.

account_id str

The account to which the certificate should be added. Conflicts with zone_id.

associated_hostnames Sequence[str]

The hostnames that will be prompted for this certificate.

certificate str

The Root CA for your certificates.

fingerprint str
name str

The name of the certificate.

zone_id str

The DNS zone to which the certificate should be added. Conflicts with account_id.

accountId String

The account to which the certificate should be added. Conflicts with zone_id.

associatedHostnames List

The hostnames that will be prompted for this certificate.

certificate String

The Root CA for your certificates.

fingerprint String
name String

The name of the certificate.

zoneId String

The DNS zone to which the certificate should be added. Conflicts with account_id.

Import

Access Mutual TLS Certificate can be imported using a composite ID composed of the account or zone and the mutual TLS certificate ID in the form ofaccount/ACCOUNT_ID/MUTUAL_TLS_CERTIFICATE_ID or zone/ZONE_ID/MUTUAL_TLS_CERTIFICATE_ID.

 $ pulumi import cloudflare:index/accessMutualTlsCertificate:AccessMutualTlsCertificate staging account/cb029e245cfdd66dc8d2e570d5dd3322/d41d8cd98f00b204e9800998ecf8427e

Package Details

Repository
https://github.com/pulumi/pulumi-cloudflare
License
Apache-2.0
Notes

This Pulumi package is based on the cloudflare Terraform Provider.