Cloudflare

v4.12.1 published on Thursday, Sep 22, 2022 by Pulumi

AuthenticatedOriginPullsCertificate

Provides a Cloudflare Authenticated Origin Pulls certificate resource. An uploaded client certificate is required to use Per-Zone or Per-Hostname Authenticated Origin Pulls.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Cloudflare = Pulumi.Cloudflare;

return await Deployment.RunAsync(() => 
{
    // Per-Zone Authenticated Origin Pulls certificate
    var myPerZoneAopCert = new Cloudflare.AuthenticatedOriginPullsCertificate("myPerZoneAopCert", new()
    {
        Certificate = "-----INSERT CERTIFICATE-----",
        PrivateKey = "-----INSERT PRIVATE KEY-----",
        Type = "per-zone",
        ZoneId = @var.Cloudflare_zone_id,
    });

    // Per-Hostname Authenticated Origin Pulls certificate
    var myPerHostnameAopCert = new Cloudflare.AuthenticatedOriginPullsCertificate("myPerHostnameAopCert", new()
    {
        Certificate = "-----INSERT CERTIFICATE-----",
        PrivateKey = "-----INSERT PRIVATE KEY-----",
        Type = "per-hostname",
        ZoneId = @var.Cloudflare_zone_id,
    });

});
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := cloudflare.NewAuthenticatedOriginPullsCertificate(ctx, "myPerZoneAopCert", &cloudflare.AuthenticatedOriginPullsCertificateArgs{
			Certificate: pulumi.String("-----INSERT CERTIFICATE-----"),
			PrivateKey:  pulumi.String("-----INSERT PRIVATE KEY-----"),
			Type:        pulumi.String("per-zone"),
			ZoneId:      pulumi.Any(_var.Cloudflare_zone_id),
		})
		if err != nil {
			return err
		}
		_, err = cloudflare.NewAuthenticatedOriginPullsCertificate(ctx, "myPerHostnameAopCert", &cloudflare.AuthenticatedOriginPullsCertificateArgs{
			Certificate: pulumi.String("-----INSERT CERTIFICATE-----"),
			PrivateKey:  pulumi.String("-----INSERT PRIVATE KEY-----"),
			Type:        pulumi.String("per-hostname"),
			ZoneId:      pulumi.Any(_var.Cloudflare_zone_id),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.AuthenticatedOriginPullsCertificate;
import com.pulumi.cloudflare.AuthenticatedOriginPullsCertificateArgs;
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 myPerZoneAopCert = new AuthenticatedOriginPullsCertificate("myPerZoneAopCert", AuthenticatedOriginPullsCertificateArgs.builder()        
            .certificate("-----INSERT CERTIFICATE-----")
            .privateKey("-----INSERT PRIVATE KEY-----")
            .type("per-zone")
            .zoneId(var_.cloudflare_zone_id())
            .build());

        var myPerHostnameAopCert = new AuthenticatedOriginPullsCertificate("myPerHostnameAopCert", AuthenticatedOriginPullsCertificateArgs.builder()        
            .certificate("-----INSERT CERTIFICATE-----")
            .privateKey("-----INSERT PRIVATE KEY-----")
            .type("per-hostname")
            .zoneId(var_.cloudflare_zone_id())
            .build());

    }
}
import pulumi
import pulumi_cloudflare as cloudflare

# Per-Zone Authenticated Origin Pulls certificate
my_per_zone_aop_cert = cloudflare.AuthenticatedOriginPullsCertificate("myPerZoneAopCert",
    certificate="-----INSERT CERTIFICATE-----",
    private_key="-----INSERT PRIVATE KEY-----",
    type="per-zone",
    zone_id=var["cloudflare_zone_id"])
# Per-Hostname Authenticated Origin Pulls certificate
my_per_hostname_aop_cert = cloudflare.AuthenticatedOriginPullsCertificate("myPerHostnameAopCert",
    certificate="-----INSERT CERTIFICATE-----",
    private_key="-----INSERT PRIVATE KEY-----",
    type="per-hostname",
    zone_id=var["cloudflare_zone_id"])
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";

// Per-Zone Authenticated Origin Pulls certificate
const myPerZoneAopCert = new cloudflare.AuthenticatedOriginPullsCertificate("my_per_zone_aop_cert", {
    certificate: "-----INSERT CERTIFICATE-----",
    privateKey: "-----INSERT PRIVATE KEY-----",
    type: "per-zone",
    zoneId: var_cloudflare_zone_id,
});
// Per-Hostname Authenticated Origin Pulls certificate
const myPerHostnameAopCert = new cloudflare.AuthenticatedOriginPullsCertificate("my_per_hostname_aop_cert", {
    certificate: "-----INSERT CERTIFICATE-----",
    privateKey: "-----INSERT PRIVATE KEY-----",
    type: "per-hostname",
    zoneId: var_cloudflare_zone_id,
});
resources:
  # Per-Zone Authenticated Origin Pulls certificate
  myPerZoneAopCert:
    type: cloudflare:AuthenticatedOriginPullsCertificate
    properties:
      certificate: '-----INSERT CERTIFICATE-----'
      privateKey: '-----INSERT PRIVATE KEY-----'
      type: per-zone
      zoneId: ${var.cloudflare_zone_id}
  # Per-Hostname Authenticated Origin Pulls certificate
  myPerHostnameAopCert:
    type: cloudflare:AuthenticatedOriginPullsCertificate
    properties:
      certificate: '-----INSERT CERTIFICATE-----'
      privateKey: '-----INSERT PRIVATE KEY-----'
      type: per-hostname
      zoneId: ${var.cloudflare_zone_id}

Create a AuthenticatedOriginPullsCertificate Resource

new AuthenticatedOriginPullsCertificate(name: string, args: AuthenticatedOriginPullsCertificateArgs, opts?: CustomResourceOptions);
@overload
def AuthenticatedOriginPullsCertificate(resource_name: str,
                                        opts: Optional[ResourceOptions] = None,
                                        certificate: Optional[str] = None,
                                        private_key: Optional[str] = None,
                                        type: Optional[str] = None,
                                        zone_id: Optional[str] = None)
@overload
def AuthenticatedOriginPullsCertificate(resource_name: str,
                                        args: AuthenticatedOriginPullsCertificateArgs,
                                        opts: Optional[ResourceOptions] = None)
func NewAuthenticatedOriginPullsCertificate(ctx *Context, name string, args AuthenticatedOriginPullsCertificateArgs, opts ...ResourceOption) (*AuthenticatedOriginPullsCertificate, error)
public AuthenticatedOriginPullsCertificate(string name, AuthenticatedOriginPullsCertificateArgs args, CustomResourceOptions? opts = null)
public AuthenticatedOriginPullsCertificate(String name, AuthenticatedOriginPullsCertificateArgs args)
public AuthenticatedOriginPullsCertificate(String name, AuthenticatedOriginPullsCertificateArgs args, CustomResourceOptions options)
type: cloudflare:AuthenticatedOriginPullsCertificate
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args AuthenticatedOriginPullsCertificateArgs
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 AuthenticatedOriginPullsCertificateArgs
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 AuthenticatedOriginPullsCertificateArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args AuthenticatedOriginPullsCertificateArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args AuthenticatedOriginPullsCertificateArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

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

Certificate string

The public client certificate.

PrivateKey string

The private key of the client certificate.

Type string

The form of Authenticated Origin Pulls to upload the certificate to.

ZoneId string

The zone ID to upload the certificate to.

Certificate string

The public client certificate.

PrivateKey string

The private key of the client certificate.

Type string

The form of Authenticated Origin Pulls to upload the certificate to.

ZoneId string

The zone ID to upload the certificate to.

certificate String

The public client certificate.

privateKey String

The private key of the client certificate.

type String

The form of Authenticated Origin Pulls to upload the certificate to.

zoneId String

The zone ID to upload the certificate to.

certificate string

The public client certificate.

privateKey string

The private key of the client certificate.

type string

The form of Authenticated Origin Pulls to upload the certificate to.

zoneId string

The zone ID to upload the certificate to.

certificate str

The public client certificate.

private_key str

The private key of the client certificate.

type str

The form of Authenticated Origin Pulls to upload the certificate to.

zone_id str

The zone ID to upload the certificate to.

certificate String

The public client certificate.

privateKey String

The private key of the client certificate.

type String

The form of Authenticated Origin Pulls to upload the certificate to.

zoneId String

The zone ID to upload the certificate to.

Outputs

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

ExpiresOn string
Id string

The provider-assigned unique ID for this managed resource.

Issuer string
SerialNumber string
Signature string
Status string
UploadedOn string
ExpiresOn string
Id string

The provider-assigned unique ID for this managed resource.

Issuer string
SerialNumber string
Signature string
Status string
UploadedOn string
expiresOn String
id String

The provider-assigned unique ID for this managed resource.

issuer String
serialNumber String
signature String
status String
uploadedOn String
expiresOn string
id string

The provider-assigned unique ID for this managed resource.

issuer string
serialNumber string
signature string
status string
uploadedOn string
expires_on str
id str

The provider-assigned unique ID for this managed resource.

issuer str
serial_number str
signature str
status str
uploaded_on str
expiresOn String
id String

The provider-assigned unique ID for this managed resource.

issuer String
serialNumber String
signature String
status String
uploadedOn String

Look up an Existing AuthenticatedOriginPullsCertificate Resource

Get an existing AuthenticatedOriginPullsCertificate 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?: AuthenticatedOriginPullsCertificateState, opts?: CustomResourceOptions): AuthenticatedOriginPullsCertificate
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        certificate: Optional[str] = None,
        expires_on: Optional[str] = None,
        issuer: Optional[str] = None,
        private_key: Optional[str] = None,
        serial_number: Optional[str] = None,
        signature: Optional[str] = None,
        status: Optional[str] = None,
        type: Optional[str] = None,
        uploaded_on: Optional[str] = None,
        zone_id: Optional[str] = None) -> AuthenticatedOriginPullsCertificate
func GetAuthenticatedOriginPullsCertificate(ctx *Context, name string, id IDInput, state *AuthenticatedOriginPullsCertificateState, opts ...ResourceOption) (*AuthenticatedOriginPullsCertificate, error)
public static AuthenticatedOriginPullsCertificate Get(string name, Input<string> id, AuthenticatedOriginPullsCertificateState? state, CustomResourceOptions? opts = null)
public static AuthenticatedOriginPullsCertificate get(String name, Output<String> id, AuthenticatedOriginPullsCertificateState 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:
Certificate string

The public client certificate.

ExpiresOn string
Issuer string
PrivateKey string

The private key of the client certificate.

SerialNumber string
Signature string
Status string
Type string

The form of Authenticated Origin Pulls to upload the certificate to.

UploadedOn string
ZoneId string

The zone ID to upload the certificate to.

Certificate string

The public client certificate.

ExpiresOn string
Issuer string
PrivateKey string

The private key of the client certificate.

SerialNumber string
Signature string
Status string
Type string

The form of Authenticated Origin Pulls to upload the certificate to.

UploadedOn string
ZoneId string

The zone ID to upload the certificate to.

certificate String

The public client certificate.

expiresOn String
issuer String
privateKey String

The private key of the client certificate.

serialNumber String
signature String
status String
type String

The form of Authenticated Origin Pulls to upload the certificate to.

uploadedOn String
zoneId String

The zone ID to upload the certificate to.

certificate string

The public client certificate.

expiresOn string
issuer string
privateKey string

The private key of the client certificate.

serialNumber string
signature string
status string
type string

The form of Authenticated Origin Pulls to upload the certificate to.

uploadedOn string
zoneId string

The zone ID to upload the certificate to.

certificate str

The public client certificate.

expires_on str
issuer str
private_key str

The private key of the client certificate.

serial_number str
signature str
status str
type str

The form of Authenticated Origin Pulls to upload the certificate to.

uploaded_on str
zone_id str

The zone ID to upload the certificate to.

certificate String

The public client certificate.

expiresOn String
issuer String
privateKey String

The private key of the client certificate.

serialNumber String
signature String
status String
type String

The form of Authenticated Origin Pulls to upload the certificate to.

uploadedOn String
zoneId String

The zone ID to upload the certificate to.

Import

Authenticated Origin Pull certificates can be imported using a composite ID formed of the zone ID, the form of Authenticated Origin Pulls, and the certificate ID, e.g. # Import Per-Zone Authenticated Origin Pull certificate

 $ pulumi import cloudflare:index/authenticatedOriginPullsCertificate:AuthenticatedOriginPullsCertificate 2458ce5a-0c35-4c7f-82c7-8e9487d3ff60 023e105f4ecef8ad9ca31a8372d0c353/per-zone/2458ce5a-0c35-4c7f-82c7-8e9487d3ff60

Import Per-Hostname Authenticated Origin Pull certificate

 $ pulumi import cloudflare:index/authenticatedOriginPullsCertificate:AuthenticatedOriginPullsCertificate 2458ce5a-0c35-4c7f-82c7-8e9487d3ff60 023e105f4ecef8ad9ca31a8372d0c353/per-hostname/2458ce5a-0c35-4c7f-82c7-8e9487d3ff60

Package Details

Repository
https://github.com/pulumi/pulumi-cloudflare
License
Apache-2.0
Notes

This Pulumi package is based on the cloudflare Terraform Provider.