cloudflare.ZeroTrustAccessShortLivedCertificate
Explore with Pulumi AI
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
orzone_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 thezone_id
argument.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
// account level
const example = new cloudflare.ZeroTrustAccessShortLivedCertificate("example", {
accountId: "f037e56e89293a057740de681ac9abbe",
applicationId: "6cd6cea3-3ef2-4542-9aea-85a0bbcd5414",
});
// zone level
const anotherExample = new cloudflare.ZeroTrustAccessShortLivedCertificate("another_example", {
zoneId: "0da42c8d2132a9ddaf714f9e7c920711",
applicationId: "fe2be0ff-7f13-4350-8c8e-a9b9795fe3c2",
});
import pulumi
import pulumi_cloudflare as cloudflare
# account level
example = cloudflare.ZeroTrustAccessShortLivedCertificate("example",
account_id="f037e56e89293a057740de681ac9abbe",
application_id="6cd6cea3-3ef2-4542-9aea-85a0bbcd5414")
# zone level
another_example = cloudflare.ZeroTrustAccessShortLivedCertificate("another_example",
zone_id="0da42c8d2132a9ddaf714f9e7c920711",
application_id="fe2be0ff-7f13-4350-8c8e-a9b9795fe3c2")
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.NewZeroTrustAccessShortLivedCertificate(ctx, "example", &cloudflare.ZeroTrustAccessShortLivedCertificateArgs{
AccountId: pulumi.String("f037e56e89293a057740de681ac9abbe"),
ApplicationId: pulumi.String("6cd6cea3-3ef2-4542-9aea-85a0bbcd5414"),
})
if err != nil {
return err
}
// zone level
_, err = cloudflare.NewZeroTrustAccessShortLivedCertificate(ctx, "another_example", &cloudflare.ZeroTrustAccessShortLivedCertificateArgs{
ZoneId: pulumi.String("0da42c8d2132a9ddaf714f9e7c920711"),
ApplicationId: pulumi.String("fe2be0ff-7f13-4350-8c8e-a9b9795fe3c2"),
})
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.ZeroTrustAccessShortLivedCertificate("example", new()
{
AccountId = "f037e56e89293a057740de681ac9abbe",
ApplicationId = "6cd6cea3-3ef2-4542-9aea-85a0bbcd5414",
});
// zone level
var anotherExample = new Cloudflare.ZeroTrustAccessShortLivedCertificate("another_example", new()
{
ZoneId = "0da42c8d2132a9ddaf714f9e7c920711",
ApplicationId = "fe2be0ff-7f13-4350-8c8e-a9b9795fe3c2",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.ZeroTrustAccessShortLivedCertificate;
import com.pulumi.cloudflare.ZeroTrustAccessShortLivedCertificateArgs;
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) {
// account level
var example = new ZeroTrustAccessShortLivedCertificate("example", ZeroTrustAccessShortLivedCertificateArgs.builder()
.accountId("f037e56e89293a057740de681ac9abbe")
.applicationId("6cd6cea3-3ef2-4542-9aea-85a0bbcd5414")
.build());
// zone level
var anotherExample = new ZeroTrustAccessShortLivedCertificate("anotherExample", ZeroTrustAccessShortLivedCertificateArgs.builder()
.zoneId("0da42c8d2132a9ddaf714f9e7c920711")
.applicationId("fe2be0ff-7f13-4350-8c8e-a9b9795fe3c2")
.build());
}
}
resources:
# account level
example:
type: cloudflare:ZeroTrustAccessShortLivedCertificate
properties:
accountId: f037e56e89293a057740de681ac9abbe
applicationId: 6cd6cea3-3ef2-4542-9aea-85a0bbcd5414
# zone level
anotherExample:
type: cloudflare:ZeroTrustAccessShortLivedCertificate
name: another_example
properties:
zoneId: 0da42c8d2132a9ddaf714f9e7c920711
applicationId: fe2be0ff-7f13-4350-8c8e-a9b9795fe3c2
Create ZeroTrustAccessShortLivedCertificate Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ZeroTrustAccessShortLivedCertificate(name: string, args: ZeroTrustAccessShortLivedCertificateArgs, opts?: CustomResourceOptions);
@overload
def ZeroTrustAccessShortLivedCertificate(resource_name: str,
args: ZeroTrustAccessShortLivedCertificateArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ZeroTrustAccessShortLivedCertificate(resource_name: str,
opts: Optional[ResourceOptions] = None,
application_id: Optional[str] = None,
account_id: Optional[str] = None,
zone_id: Optional[str] = None)
func NewZeroTrustAccessShortLivedCertificate(ctx *Context, name string, args ZeroTrustAccessShortLivedCertificateArgs, opts ...ResourceOption) (*ZeroTrustAccessShortLivedCertificate, error)
public ZeroTrustAccessShortLivedCertificate(string name, ZeroTrustAccessShortLivedCertificateArgs args, CustomResourceOptions? opts = null)
public ZeroTrustAccessShortLivedCertificate(String name, ZeroTrustAccessShortLivedCertificateArgs args)
public ZeroTrustAccessShortLivedCertificate(String name, ZeroTrustAccessShortLivedCertificateArgs args, CustomResourceOptions options)
type: cloudflare:ZeroTrustAccessShortLivedCertificate
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 ZeroTrustAccessShortLivedCertificateArgs
- 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 ZeroTrustAccessShortLivedCertificateArgs
- 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 ZeroTrustAccessShortLivedCertificateArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ZeroTrustAccessShortLivedCertificateArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ZeroTrustAccessShortLivedCertificateArgs
- 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 zeroTrustAccessShortLivedCertificateResource = new Cloudflare.ZeroTrustAccessShortLivedCertificate("zeroTrustAccessShortLivedCertificateResource", new()
{
ApplicationId = "string",
AccountId = "string",
ZoneId = "string",
});
example, err := cloudflare.NewZeroTrustAccessShortLivedCertificate(ctx, "zeroTrustAccessShortLivedCertificateResource", &cloudflare.ZeroTrustAccessShortLivedCertificateArgs{
ApplicationId: pulumi.String("string"),
AccountId: pulumi.String("string"),
ZoneId: pulumi.String("string"),
})
var zeroTrustAccessShortLivedCertificateResource = new ZeroTrustAccessShortLivedCertificate("zeroTrustAccessShortLivedCertificateResource", ZeroTrustAccessShortLivedCertificateArgs.builder()
.applicationId("string")
.accountId("string")
.zoneId("string")
.build());
zero_trust_access_short_lived_certificate_resource = cloudflare.ZeroTrustAccessShortLivedCertificate("zeroTrustAccessShortLivedCertificateResource",
application_id="string",
account_id="string",
zone_id="string")
const zeroTrustAccessShortLivedCertificateResource = new cloudflare.ZeroTrustAccessShortLivedCertificate("zeroTrustAccessShortLivedCertificateResource", {
applicationId: "string",
accountId: "string",
zoneId: "string",
});
type: cloudflare:ZeroTrustAccessShortLivedCertificate
properties:
accountId: string
applicationId: string
zoneId: string
ZeroTrustAccessShortLivedCertificate 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 ZeroTrustAccessShortLivedCertificate resource accepts the following input properties:
- Application
Id string - The Access Application ID to associate with the CA certificate.
- Account
Id string - The account identifier to target for the resource. Conflicts with
zone_id
. - Zone
Id string - The zone identifier to target for the resource. Conflicts with
account_id
.
- Application
Id string - The Access Application ID to associate with the CA certificate.
- Account
Id string - The account identifier to target for the resource. Conflicts with
zone_id
. - Zone
Id string - The zone identifier to target for the resource. Conflicts with
account_id
.
- application
Id String - The Access Application ID to associate with the CA certificate.
- account
Id String - The account identifier to target for the resource. Conflicts with
zone_id
. - zone
Id String - The zone identifier to target for the resource. Conflicts with
account_id
.
- application
Id string - The Access Application ID to associate with the CA certificate.
- account
Id string - The account identifier to target for the resource. Conflicts with
zone_id
. - zone
Id 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
.
- application
Id String - The Access Application ID to associate with the CA certificate.
- account
Id String - The account identifier to target for the resource. Conflicts with
zone_id
. - zone
Id 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 ZeroTrustAccessShortLivedCertificate resource produces the following output properties:
- 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.
Look up Existing ZeroTrustAccessShortLivedCertificate Resource
Get an existing ZeroTrustAccessShortLivedCertificate 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?: ZeroTrustAccessShortLivedCertificateState, opts?: CustomResourceOptions): ZeroTrustAccessShortLivedCertificate
@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) -> ZeroTrustAccessShortLivedCertificate
func GetZeroTrustAccessShortLivedCertificate(ctx *Context, name string, id IDInput, state *ZeroTrustAccessShortLivedCertificateState, opts ...ResourceOption) (*ZeroTrustAccessShortLivedCertificate, error)
public static ZeroTrustAccessShortLivedCertificate Get(string name, Input<string> id, ZeroTrustAccessShortLivedCertificateState? state, CustomResourceOptions? opts = null)
public static ZeroTrustAccessShortLivedCertificate get(String name, Output<String> id, ZeroTrustAccessShortLivedCertificateState 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.
- Account
Id string - The account identifier to target for the resource. Conflicts with
zone_id
. - Application
Id string - The Access Application ID to associate with the CA certificate.
- Aud string
- Application Audience (AUD) Tag of the CA certificate.
- Public
Key string - Cryptographic public key of the generated CA certificate.
- Zone
Id string - The zone identifier to target for the resource. Conflicts with
account_id
.
- Account
Id string - The account identifier to target for the resource. Conflicts with
zone_id
. - Application
Id string - The Access Application ID to associate with the CA certificate.
- Aud string
- Application Audience (AUD) Tag of the CA certificate.
- Public
Key string - Cryptographic public key of the generated CA certificate.
- Zone
Id string - The zone identifier to target for the resource. Conflicts with
account_id
.
- account
Id String - The account identifier to target for the resource. Conflicts with
zone_id
. - application
Id String - The Access Application ID to associate with the CA certificate.
- aud String
- Application Audience (AUD) Tag of the CA certificate.
- public
Key String - Cryptographic public key of the generated CA certificate.
- zone
Id String - The zone identifier to target for the resource. Conflicts with
account_id
.
- account
Id string - The account identifier to target for the resource. Conflicts with
zone_id
. - application
Id string - The Access Application ID to associate with the CA certificate.
- aud string
- Application Audience (AUD) Tag of the CA certificate.
- public
Key string - Cryptographic public key of the generated CA certificate.
- zone
Id 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
.
- account
Id String - The account identifier to target for the resource. Conflicts with
zone_id
. - application
Id String - The Access Application ID to associate with the CA certificate.
- aud String
- Application Audience (AUD) Tag of the CA certificate.
- public
Key String - Cryptographic public key of the generated CA certificate.
- zone
Id String - The zone identifier to target for the resource. Conflicts with
account_id
.
Import
Account level CA certificate import.
$ pulumi import cloudflare:index/zeroTrustAccessShortLivedCertificate:ZeroTrustAccessShortLivedCertificate example account/<account_id>/<application_id>
Zone level CA certificate import.
$ pulumi import cloudflare:index/zeroTrustAccessShortLivedCertificate:ZeroTrustAccessShortLivedCertificate example account/<zone_id>/<application_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.