1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. ZeroTrustAccessMtlsCertificate
Cloudflare v6.0.1 published on Wednesday, Apr 16, 2025 by Pulumi

cloudflare.ZeroTrustAccessMtlsCertificate

Explore with Pulumi AI

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";

const exampleZeroTrustAccessMtlsCertificate = new cloudflare.ZeroTrustAccessMtlsCertificate("example_zero_trust_access_mtls_certificate", {
    certificate: `  -----BEGIN CERTIFICATE-----
  MIIGAjCCA+qgAwIBAgIJAI7kymlF7CWT...N4RI7KKB7nikiuUf8vhULKy5IX10
  DrUtmu/B
  -----END CERTIFICATE-----
`,
    name: "Allow devs",
    zoneId: "zone_id",
    associatedHostnames: ["admin.example.com"],
});
Copy
import pulumi
import pulumi_cloudflare as cloudflare

example_zero_trust_access_mtls_certificate = cloudflare.ZeroTrustAccessMtlsCertificate("example_zero_trust_access_mtls_certificate",
    certificate="""  -----BEGIN CERTIFICATE-----
  MIIGAjCCA+qgAwIBAgIJAI7kymlF7CWT...N4RI7KKB7nikiuUf8vhULKy5IX10
  DrUtmu/B
  -----END CERTIFICATE-----
""",
    name="Allow devs",
    zone_id="zone_id",
    associated_hostnames=["admin.example.com"])
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := cloudflare.NewZeroTrustAccessMtlsCertificate(ctx, "example_zero_trust_access_mtls_certificate", &cloudflare.ZeroTrustAccessMtlsCertificateArgs{
			Certificate: pulumi.String("  -----BEGIN CERTIFICATE-----\n  MIIGAjCCA+qgAwIBAgIJAI7kymlF7CWT...N4RI7KKB7nikiuUf8vhULKy5IX10\n  DrUtmu/B\n  -----END CERTIFICATE-----\n"),
			Name:        pulumi.String("Allow devs"),
			ZoneId:      pulumi.String("zone_id"),
			AssociatedHostnames: pulumi.StringArray{
				pulumi.String("admin.example.com"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Cloudflare = Pulumi.Cloudflare;

return await Deployment.RunAsync(() => 
{
    var exampleZeroTrustAccessMtlsCertificate = new Cloudflare.ZeroTrustAccessMtlsCertificate("example_zero_trust_access_mtls_certificate", new()
    {
        Certificate = @"  -----BEGIN CERTIFICATE-----
  MIIGAjCCA+qgAwIBAgIJAI7kymlF7CWT...N4RI7KKB7nikiuUf8vhULKy5IX10
  DrUtmu/B
  -----END CERTIFICATE-----
",
        Name = "Allow devs",
        ZoneId = "zone_id",
        AssociatedHostnames = new[]
        {
            "admin.example.com",
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.ZeroTrustAccessMtlsCertificate;
import com.pulumi.cloudflare.ZeroTrustAccessMtlsCertificateArgs;
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 exampleZeroTrustAccessMtlsCertificate = new ZeroTrustAccessMtlsCertificate("exampleZeroTrustAccessMtlsCertificate", ZeroTrustAccessMtlsCertificateArgs.builder()
            .certificate("""
  -----BEGIN CERTIFICATE-----
  MIIGAjCCA+qgAwIBAgIJAI7kymlF7CWT...N4RI7KKB7nikiuUf8vhULKy5IX10
  DrUtmu/B
  -----END CERTIFICATE-----
            """)
            .name("Allow devs")
            .zoneId("zone_id")
            .associatedHostnames("admin.example.com")
            .build());

    }
}
Copy
resources:
  exampleZeroTrustAccessMtlsCertificate:
    type: cloudflare:ZeroTrustAccessMtlsCertificate
    name: example_zero_trust_access_mtls_certificate
    properties:
      certificate: |2
          -----BEGIN CERTIFICATE-----
          MIIGAjCCA+qgAwIBAgIJAI7kymlF7CWT...N4RI7KKB7nikiuUf8vhULKy5IX10
          DrUtmu/B
          -----END CERTIFICATE-----
      name: Allow devs
      zoneId: zone_id
      associatedHostnames:
        - admin.example.com
Copy

Create ZeroTrustAccessMtlsCertificate Resource

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

Constructor syntax

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

@overload
def ZeroTrustAccessMtlsCertificate(resource_name: str,
                                   opts: Optional[ResourceOptions] = None,
                                   certificate: Optional[str] = None,
                                   name: Optional[str] = None,
                                   account_id: Optional[str] = None,
                                   associated_hostnames: Optional[Sequence[str]] = None,
                                   zone_id: Optional[str] = None)
func NewZeroTrustAccessMtlsCertificate(ctx *Context, name string, args ZeroTrustAccessMtlsCertificateArgs, opts ...ResourceOption) (*ZeroTrustAccessMtlsCertificate, error)
public ZeroTrustAccessMtlsCertificate(string name, ZeroTrustAccessMtlsCertificateArgs args, CustomResourceOptions? opts = null)
public ZeroTrustAccessMtlsCertificate(String name, ZeroTrustAccessMtlsCertificateArgs args)
public ZeroTrustAccessMtlsCertificate(String name, ZeroTrustAccessMtlsCertificateArgs args, CustomResourceOptions options)
type: cloudflare:ZeroTrustAccessMtlsCertificate
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. ZeroTrustAccessMtlsCertificateArgs
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. ZeroTrustAccessMtlsCertificateArgs
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. ZeroTrustAccessMtlsCertificateArgs
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. ZeroTrustAccessMtlsCertificateArgs
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. ZeroTrustAccessMtlsCertificateArgs
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 zeroTrustAccessMtlsCertificateResource = new Cloudflare.ZeroTrustAccessMtlsCertificate("zeroTrustAccessMtlsCertificateResource", new()
{
    Certificate = "string",
    Name = "string",
    AccountId = "string",
    AssociatedHostnames = new[]
    {
        "string",
    },
    ZoneId = "string",
});
Copy
example, err := cloudflare.NewZeroTrustAccessMtlsCertificate(ctx, "zeroTrustAccessMtlsCertificateResource", &cloudflare.ZeroTrustAccessMtlsCertificateArgs{
	Certificate: pulumi.String("string"),
	Name:        pulumi.String("string"),
	AccountId:   pulumi.String("string"),
	AssociatedHostnames: pulumi.StringArray{
		pulumi.String("string"),
	},
	ZoneId: pulumi.String("string"),
})
Copy
var zeroTrustAccessMtlsCertificateResource = new ZeroTrustAccessMtlsCertificate("zeroTrustAccessMtlsCertificateResource", ZeroTrustAccessMtlsCertificateArgs.builder()
    .certificate("string")
    .name("string")
    .accountId("string")
    .associatedHostnames("string")
    .zoneId("string")
    .build());
Copy
zero_trust_access_mtls_certificate_resource = cloudflare.ZeroTrustAccessMtlsCertificate("zeroTrustAccessMtlsCertificateResource",
    certificate="string",
    name="string",
    account_id="string",
    associated_hostnames=["string"],
    zone_id="string")
Copy
const zeroTrustAccessMtlsCertificateResource = new cloudflare.ZeroTrustAccessMtlsCertificate("zeroTrustAccessMtlsCertificateResource", {
    certificate: "string",
    name: "string",
    accountId: "string",
    associatedHostnames: ["string"],
    zoneId: "string",
});
Copy
type: cloudflare:ZeroTrustAccessMtlsCertificate
properties:
    accountId: string
    associatedHostnames:
        - string
    certificate: string
    name: string
    zoneId: string
Copy

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

Certificate This property is required. string
The certificate content.
Name This property is required. string
The name of the certificate.
AccountId string
The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
AssociatedHostnames List<string>
The hostnames of the applications that will use this certificate.
ZoneId string
The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
Certificate This property is required. string
The certificate content.
Name This property is required. string
The name of the certificate.
AccountId string
The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
AssociatedHostnames []string
The hostnames of the applications that will use this certificate.
ZoneId string
The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
certificate This property is required. String
The certificate content.
name This property is required. String
The name of the certificate.
accountId String
The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
associatedHostnames List<String>
The hostnames of the applications that will use this certificate.
zoneId String
The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
certificate This property is required. string
The certificate content.
name This property is required. string
The name of the certificate.
accountId string
The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
associatedHostnames string[]
The hostnames of the applications that will use this certificate.
zoneId string
The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
certificate This property is required. str
The certificate content.
name This property is required. str
The name of the certificate.
account_id str
The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
associated_hostnames Sequence[str]
The hostnames of the applications that will use this certificate.
zone_id str
The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
certificate This property is required. String
The certificate content.
name This property is required. String
The name of the certificate.
accountId String
The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
associatedHostnames List<String>
The hostnames of the applications that will use this certificate.
zoneId String
The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.

Outputs

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

CreatedAt string
ExpiresOn string
Fingerprint string
The MD5 fingerprint of the certificate.
Id string
The provider-assigned unique ID for this managed resource.
UpdatedAt string
CreatedAt string
ExpiresOn string
Fingerprint string
The MD5 fingerprint of the certificate.
Id string
The provider-assigned unique ID for this managed resource.
UpdatedAt string
createdAt String
expiresOn String
fingerprint String
The MD5 fingerprint of the certificate.
id String
The provider-assigned unique ID for this managed resource.
updatedAt String
createdAt string
expiresOn string
fingerprint string
The MD5 fingerprint of the certificate.
id string
The provider-assigned unique ID for this managed resource.
updatedAt string
created_at str
expires_on str
fingerprint str
The MD5 fingerprint of the certificate.
id str
The provider-assigned unique ID for this managed resource.
updated_at str
createdAt String
expiresOn String
fingerprint String
The MD5 fingerprint of the certificate.
id String
The provider-assigned unique ID for this managed resource.
updatedAt String

Look up Existing ZeroTrustAccessMtlsCertificate Resource

Get an existing ZeroTrustAccessMtlsCertificate 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?: ZeroTrustAccessMtlsCertificateState, opts?: CustomResourceOptions): ZeroTrustAccessMtlsCertificate
@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,
        created_at: Optional[str] = None,
        expires_on: Optional[str] = None,
        fingerprint: Optional[str] = None,
        name: Optional[str] = None,
        updated_at: Optional[str] = None,
        zone_id: Optional[str] = None) -> ZeroTrustAccessMtlsCertificate
func GetZeroTrustAccessMtlsCertificate(ctx *Context, name string, id IDInput, state *ZeroTrustAccessMtlsCertificateState, opts ...ResourceOption) (*ZeroTrustAccessMtlsCertificate, error)
public static ZeroTrustAccessMtlsCertificate Get(string name, Input<string> id, ZeroTrustAccessMtlsCertificateState? state, CustomResourceOptions? opts = null)
public static ZeroTrustAccessMtlsCertificate get(String name, Output<String> id, ZeroTrustAccessMtlsCertificateState state, CustomResourceOptions options)
resources:  _:    type: cloudflare:ZeroTrustAccessMtlsCertificate    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:
AccountId string
The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
AssociatedHostnames List<string>
The hostnames of the applications that will use this certificate.
Certificate string
The certificate content.
CreatedAt string
ExpiresOn string
Fingerprint string
The MD5 fingerprint of the certificate.
Name string
The name of the certificate.
UpdatedAt string
ZoneId string
The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
AccountId string
The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
AssociatedHostnames []string
The hostnames of the applications that will use this certificate.
Certificate string
The certificate content.
CreatedAt string
ExpiresOn string
Fingerprint string
The MD5 fingerprint of the certificate.
Name string
The name of the certificate.
UpdatedAt string
ZoneId string
The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
accountId String
The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
associatedHostnames List<String>
The hostnames of the applications that will use this certificate.
certificate String
The certificate content.
createdAt String
expiresOn String
fingerprint String
The MD5 fingerprint of the certificate.
name String
The name of the certificate.
updatedAt String
zoneId String
The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
accountId string
The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
associatedHostnames string[]
The hostnames of the applications that will use this certificate.
certificate string
The certificate content.
createdAt string
expiresOn string
fingerprint string
The MD5 fingerprint of the certificate.
name string
The name of the certificate.
updatedAt string
zoneId string
The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
account_id str
The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
associated_hostnames Sequence[str]
The hostnames of the applications that will use this certificate.
certificate str
The certificate content.
created_at str
expires_on str
fingerprint str
The MD5 fingerprint of the certificate.
name str
The name of the certificate.
updated_at str
zone_id str
The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
accountId String
The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
associatedHostnames List<String>
The hostnames of the applications that will use this certificate.
certificate String
The certificate content.
createdAt String
expiresOn String
fingerprint String
The MD5 fingerprint of the certificate.
name String
The name of the certificate.
updatedAt String
zoneId String
The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.

Import

$ pulumi import cloudflare:index/zeroTrustAccessMtlsCertificate:ZeroTrustAccessMtlsCertificate example '<{accounts|zones}/{account_id|zone_id}>/<certificate_id>'
Copy

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

Package Details

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