1. Packages
  2. Cloudflare
  3. API Docs
  4. AccessCaCertificate
Cloudflare v5.24.0 published on Thursday, Mar 28, 2024 by Pulumi

cloudflare.AccessCaCertificate

Explore with Pulumi AI

cloudflare logo
Cloudflare v5.24.0 published on Thursday, Mar 28, 2024 by Pulumi

    Cloudflare Access can replace traditional SSH key models with short-lived certificates issued to your users based on the token generated by their Access login.

    It’s required that an account_id or zone_id is provided and in most cases using either is fine. However, if you’re using a scoped access token, you must provide the argument that matches the token’s scope. For example, an access token that is scoped to the “example.com” zone needs to use the zone_id argument.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudflare from "@pulumi/cloudflare";
    
    // account level
    const example = new cloudflare.AccessCaCertificate("example", {
        accountId: "f037e56e89293a057740de681ac9abbe",
        applicationId: "6cd6cea3-3ef2-4542-9aea-85a0bbcd5414",
    });
    // zone level
    const anotherExample = new cloudflare.AccessCaCertificate("anotherExample", {
        applicationId: "fe2be0ff-7f13-4350-8c8e-a9b9795fe3c2",
        zoneId: "0da42c8d2132a9ddaf714f9e7c920711",
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    # account level
    example = cloudflare.AccessCaCertificate("example",
        account_id="f037e56e89293a057740de681ac9abbe",
        application_id="6cd6cea3-3ef2-4542-9aea-85a0bbcd5414")
    # zone level
    another_example = cloudflare.AccessCaCertificate("anotherExample",
        application_id="fe2be0ff-7f13-4350-8c8e-a9b9795fe3c2",
        zone_id="0da42c8d2132a9ddaf714f9e7c920711")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// account level
    		_, err := cloudflare.NewAccessCaCertificate(ctx, "example", &cloudflare.AccessCaCertificateArgs{
    			AccountId:     pulumi.String("f037e56e89293a057740de681ac9abbe"),
    			ApplicationId: pulumi.String("6cd6cea3-3ef2-4542-9aea-85a0bbcd5414"),
    		})
    		if err != nil {
    			return err
    		}
    		// zone level
    		_, err = cloudflare.NewAccessCaCertificate(ctx, "anotherExample", &cloudflare.AccessCaCertificateArgs{
    			ApplicationId: pulumi.String("fe2be0ff-7f13-4350-8c8e-a9b9795fe3c2"),
    			ZoneId:        pulumi.String("0da42c8d2132a9ddaf714f9e7c920711"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Cloudflare = Pulumi.Cloudflare;
    
    return await Deployment.RunAsync(() => 
    {
        // account level
        var example = new Cloudflare.AccessCaCertificate("example", new()
        {
            AccountId = "f037e56e89293a057740de681ac9abbe",
            ApplicationId = "6cd6cea3-3ef2-4542-9aea-85a0bbcd5414",
        });
    
        // zone level
        var anotherExample = new Cloudflare.AccessCaCertificate("anotherExample", new()
        {
            ApplicationId = "fe2be0ff-7f13-4350-8c8e-a9b9795fe3c2",
            ZoneId = "0da42c8d2132a9ddaf714f9e7c920711",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudflare.AccessCaCertificate;
    import com.pulumi.cloudflare.AccessCaCertificateArgs;
    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 example = new AccessCaCertificate("example", AccessCaCertificateArgs.builder()        
                .accountId("f037e56e89293a057740de681ac9abbe")
                .applicationId("6cd6cea3-3ef2-4542-9aea-85a0bbcd5414")
                .build());
    
            var anotherExample = new AccessCaCertificate("anotherExample", AccessCaCertificateArgs.builder()        
                .applicationId("fe2be0ff-7f13-4350-8c8e-a9b9795fe3c2")
                .zoneId("0da42c8d2132a9ddaf714f9e7c920711")
                .build());
    
        }
    }
    
    resources:
      # account level
      example:
        type: cloudflare:AccessCaCertificate
        properties:
          accountId: f037e56e89293a057740de681ac9abbe
          applicationId: 6cd6cea3-3ef2-4542-9aea-85a0bbcd5414
      # zone level
      anotherExample:
        type: cloudflare:AccessCaCertificate
        properties:
          applicationId: fe2be0ff-7f13-4350-8c8e-a9b9795fe3c2
          zoneId: 0da42c8d2132a9ddaf714f9e7c920711
    

    Create AccessCaCertificate Resource

    new AccessCaCertificate(name: string, args: AccessCaCertificateArgs, opts?: CustomResourceOptions);
    @overload
    def AccessCaCertificate(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            account_id: Optional[str] = None,
                            application_id: Optional[str] = None,
                            zone_id: Optional[str] = None)
    @overload
    def AccessCaCertificate(resource_name: str,
                            args: AccessCaCertificateArgs,
                            opts: Optional[ResourceOptions] = None)
    func NewAccessCaCertificate(ctx *Context, name string, args AccessCaCertificateArgs, opts ...ResourceOption) (*AccessCaCertificate, error)
    public AccessCaCertificate(string name, AccessCaCertificateArgs args, CustomResourceOptions? opts = null)
    public AccessCaCertificate(String name, AccessCaCertificateArgs args)
    public AccessCaCertificate(String name, AccessCaCertificateArgs args, CustomResourceOptions options)
    
    type: cloudflare:AccessCaCertificate
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args AccessCaCertificateArgs
    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 AccessCaCertificateArgs
    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 AccessCaCertificateArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AccessCaCertificateArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AccessCaCertificateArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    ApplicationId string
    The Access Application ID to associate with the CA certificate.
    AccountId string
    The account identifier to target for the resource. Conflicts with zone_id.
    ZoneId string
    The zone identifier to target for the resource. Conflicts with account_id.
    ApplicationId string
    The Access Application ID to associate with the CA certificate.
    AccountId string
    The account identifier to target for the resource. Conflicts with zone_id.
    ZoneId string
    The zone identifier to target for the resource. Conflicts with account_id.
    applicationId String
    The Access Application ID to associate with the CA certificate.
    accountId String
    The account identifier to target for the resource. Conflicts with zone_id.
    zoneId String
    The zone identifier to target for the resource. Conflicts with account_id.
    applicationId string
    The Access Application ID to associate with the CA certificate.
    accountId string
    The account identifier to target for the resource. Conflicts with zone_id.
    zoneId string
    The zone identifier to target for the resource. Conflicts with account_id.
    application_id str
    The Access Application ID to associate with the CA certificate.
    account_id str
    The account identifier to target for the resource. Conflicts with zone_id.
    zone_id str
    The zone identifier to target for the resource. Conflicts with account_id.
    applicationId String
    The Access Application ID to associate with the CA certificate.
    accountId String
    The account identifier to target for the resource. Conflicts with zone_id.
    zoneId String
    The zone identifier to target for the resource. Conflicts with account_id.

    Outputs

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

    Aud string
    Application Audience (AUD) Tag of the CA certificate.
    Id string
    The provider-assigned unique ID for this managed resource.
    PublicKey string
    Cryptographic public key of the generated CA certificate.
    Aud string
    Application Audience (AUD) Tag of the CA certificate.
    Id string
    The provider-assigned unique ID for this managed resource.
    PublicKey string
    Cryptographic public key of the generated CA certificate.
    aud String
    Application Audience (AUD) Tag of the CA certificate.
    id String
    The provider-assigned unique ID for this managed resource.
    publicKey String
    Cryptographic public key of the generated CA certificate.
    aud string
    Application Audience (AUD) Tag of the CA certificate.
    id string
    The provider-assigned unique ID for this managed resource.
    publicKey string
    Cryptographic public key of the generated CA certificate.
    aud str
    Application Audience (AUD) Tag of the CA certificate.
    id str
    The provider-assigned unique ID for this managed resource.
    public_key str
    Cryptographic public key of the generated CA certificate.
    aud String
    Application Audience (AUD) Tag of the CA certificate.
    id String
    The provider-assigned unique ID for this managed resource.
    publicKey String
    Cryptographic public key of the generated CA certificate.

    Look up Existing AccessCaCertificate Resource

    Get an existing AccessCaCertificate 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?: AccessCaCertificateState, opts?: CustomResourceOptions): AccessCaCertificate
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            account_id: Optional[str] = None,
            application_id: Optional[str] = None,
            aud: Optional[str] = None,
            public_key: Optional[str] = None,
            zone_id: Optional[str] = None) -> AccessCaCertificate
    func GetAccessCaCertificate(ctx *Context, name string, id IDInput, state *AccessCaCertificateState, opts ...ResourceOption) (*AccessCaCertificate, error)
    public static AccessCaCertificate Get(string name, Input<string> id, AccessCaCertificateState? state, CustomResourceOptions? opts = null)
    public static AccessCaCertificate get(String name, Output<String> id, AccessCaCertificateState 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 identifier to target for the resource. Conflicts with zone_id.
    ApplicationId string
    The Access Application ID to associate with the CA certificate.
    Aud string
    Application Audience (AUD) Tag of the CA certificate.
    PublicKey string
    Cryptographic public key of the generated CA certificate.
    ZoneId string
    The zone identifier to target for the resource. Conflicts with account_id.
    AccountId string
    The account identifier to target for the resource. Conflicts with zone_id.
    ApplicationId string
    The Access Application ID to associate with the CA certificate.
    Aud string
    Application Audience (AUD) Tag of the CA certificate.
    PublicKey string
    Cryptographic public key of the generated CA certificate.
    ZoneId string
    The zone identifier to target for the resource. Conflicts with account_id.
    accountId String
    The account identifier to target for the resource. Conflicts with zone_id.
    applicationId String
    The Access Application ID to associate with the CA certificate.
    aud String
    Application Audience (AUD) Tag of the CA certificate.
    publicKey String
    Cryptographic public key of the generated CA certificate.
    zoneId String
    The zone identifier to target for the resource. Conflicts with account_id.
    accountId string
    The account identifier to target for the resource. Conflicts with zone_id.
    applicationId string
    The Access Application ID to associate with the CA certificate.
    aud string
    Application Audience (AUD) Tag of the CA certificate.
    publicKey string
    Cryptographic public key of the generated CA certificate.
    zoneId string
    The zone identifier to target for the resource. Conflicts with account_id.
    account_id str
    The account identifier to target for the resource. Conflicts with zone_id.
    application_id str
    The Access Application ID to associate with the CA certificate.
    aud str
    Application Audience (AUD) Tag of the CA certificate.
    public_key str
    Cryptographic public key of the generated CA certificate.
    zone_id str
    The zone identifier to target for the resource. Conflicts with account_id.
    accountId String
    The account identifier to target for the resource. Conflicts with zone_id.
    applicationId String
    The Access Application ID to associate with the CA certificate.
    aud String
    Application Audience (AUD) Tag of the CA certificate.
    publicKey String
    Cryptographic public key of the generated CA certificate.
    zoneId String
    The zone identifier to target for the resource. Conflicts with account_id.

    Import

    Account level CA certificate import.

    $ pulumi import cloudflare:index/accessCaCertificate:AccessCaCertificate example account/<account_id>/<application_id>
    

    Zone level CA certificate import.

    $ pulumi import cloudflare:index/accessCaCertificate:AccessCaCertificate example account/<zone_id>/<application_id>
    

    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 v5.24.0 published on Thursday, Mar 28, 2024 by Pulumi