cloudflare.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 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 string
- The unique name of the resource.
- args ZeroTrustAccessMtlsCertificateArgs
- 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 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 string
- The unique name of the resource.
- args ZeroTrustAccessMtlsCertificateArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ZeroTrustAccessMtlsCertificateArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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",
});
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"),
})
var zeroTrustAccessMtlsCertificateResource = new ZeroTrustAccessMtlsCertificate("zeroTrustAccessMtlsCertificateResource", ZeroTrustAccessMtlsCertificateArgs.builder()
    .certificate("string")
    .name("string")
    .accountId("string")
    .associatedHostnames("string")
    .zoneId("string")
    .build());
zero_trust_access_mtls_certificate_resource = cloudflare.ZeroTrustAccessMtlsCertificate("zeroTrustAccessMtlsCertificateResource",
    certificate="string",
    name="string",
    account_id="string",
    associated_hostnames=["string"],
    zone_id="string")
const zeroTrustAccessMtlsCertificateResource = new cloudflare.ZeroTrustAccessMtlsCertificate("zeroTrustAccessMtlsCertificateResource", {
    certificate: "string",
    name: "string",
    accountId: "string",
    associatedHostnames: ["string"],
    zoneId: "string",
});
type: cloudflare:ZeroTrustAccessMtlsCertificate
properties:
    accountId: string
    associatedHostnames:
        - string
    certificate: string
    name: string
    zoneId: string
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 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 ZeroTrustAccessMtlsCertificate resource produces the following output properties:
- ExpiresOn string
- Fingerprint string
- The MD5 fingerprint of the certificate.
- Id string
- The provider-assigned unique ID for this managed resource.
- ExpiresOn string
- Fingerprint string
- The MD5 fingerprint of the certificate.
- Id string
- The provider-assigned unique ID for this managed resource.
- expiresOn String
- fingerprint String
- The MD5 fingerprint of the certificate.
- id String
- The provider-assigned unique ID for this managed resource.
- expiresOn string
- fingerprint string
- The MD5 fingerprint of the certificate.
- id string
- The provider-assigned unique ID for this managed resource.
- expires_on str
- fingerprint str
- The MD5 fingerprint of the certificate.
- id str
- The provider-assigned unique ID for this managed resource.
- expiresOn String
- fingerprint String
- The MD5 fingerprint of the certificate.
- id String
- The provider-assigned unique ID for this managed resource.
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,
        expires_on: Optional[str] = None,
        fingerprint: Optional[str] = None,
        name: Optional[str] = None,
        zone_id: Optional[str] = None) -> ZeroTrustAccessMtlsCertificatefunc 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
- 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.
- 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.
- ExpiresOn string
- Fingerprint string
- The MD5 fingerprint of the certificate.
- Name string
- The name of the certificate.
- 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.
- ExpiresOn string
- Fingerprint string
- The MD5 fingerprint of the certificate.
- Name string
- The name of the certificate.
- 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.
- expiresOn String
- fingerprint String
- The MD5 fingerprint of the certificate.
- name String
- The name of the certificate.
- 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.
- expiresOn string
- fingerprint string
- The MD5 fingerprint of the certificate.
- name string
- The name of the certificate.
- 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.
- expires_on str
- fingerprint str
- The MD5 fingerprint of the certificate.
- name str
- The name of the certificate.
- 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.
- expiresOn String
- fingerprint String
- The MD5 fingerprint of the certificate.
- name String
- The name of the certificate.
- zoneId String
- The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
Import
Note: The “certificate” field cannot be imported by this module and must be manually added to state.
$ pulumi import cloudflare:index/zeroTrustAccessMtlsCertificate:ZeroTrustAccessMtlsCertificate 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 cloudflareTerraform Provider.
