1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. AccessMutualTlsCertificate
Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi

cloudflare.AccessMutualTlsCertificate

Explore with Pulumi AI

cloudflare logo
Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi
    Deprecated: cloudflare.index/accessmutualtlscertificate.AccessMutualTlsCertificate has been deprecated in favor of cloudflare.index/zerotrustaccessmtlscertificate.ZeroTrustAccessMtlsCertificate

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

    Create AccessMutualTlsCertificate Resource

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

    Constructor syntax

    new AccessMutualTlsCertificate(name: string, args: AccessMutualTlsCertificateArgs, opts?: CustomResourceOptions);
    @overload
    def AccessMutualTlsCertificate(resource_name: str,
                                   args: AccessMutualTlsCertificateArgs,
                                   opts: Optional[ResourceOptions] = None)
    
    @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)
    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.
    
    

    Parameters

    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

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The AccessMutualTlsCertificate resource accepts the following input properties:

    Certificate string
    The certificate content.
    Name 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 string
    The certificate content.
    Name 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 String
    The certificate content.
    name 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 string
    The certificate content.
    name 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 str
    The certificate content.
    name 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 String
    The certificate content.
    name 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 AccessMutualTlsCertificate 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 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,
            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) -> 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)
    resources:  _:    type: cloudflare:AccessMutualTlsCertificate    get:      id: ${id}
    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 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/accessMutualTlsCertificate:AccessMutualTlsCertificate example '<{accounts|zones}/{account_id|zone_id}>/<certificate_id>'
    

    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.
    cloudflare logo
    Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi