Ready to level-up your engineering skills? Join a Pulumi Workshop. Register Now

AuthenticatedOriginPulls

Provides a Cloudflare Authenticated Origin Pulls resource. An cloudflare.AuthenticatedOriginPulls resource is required to use Per-Zone or Per-Hostname Authenticated Origin Pulls.

Example Usage

using Pulumi;
using Cloudflare = Pulumi.Cloudflare;

class MyStack : Stack
{
    public MyStack()
    {
        // Authenticated Origin Pulls
        var myAop = new Cloudflare.AuthenticatedOriginPulls("myAop", new Cloudflare.AuthenticatedOriginPullsArgs
        {
            ZoneId = @var.Cloudflare_zone_id,
            Enabled = true,
        });
        // Per-Zone Authenticated Origin Pulls
        var myPerZoneAopCert = new Cloudflare.AuthenticatedOriginPullsCertificate("myPerZoneAopCert", new Cloudflare.AuthenticatedOriginPullsCertificateArgs
        {
            ZoneId = @var.Cloudflare_zone_id,
            Certificate = "-----INSERT CERTIFICATE-----",
            PrivateKey = "-----INSERT PRIVATE KEY-----",
            Type = "per-zone",
        });
        var myPerZoneAop = new Cloudflare.AuthenticatedOriginPulls("myPerZoneAop", new Cloudflare.AuthenticatedOriginPullsArgs
        {
            ZoneId = @var.Cloudflare_zone_id,
            AuthenticatedOriginPullsCertificate = myPerZoneAopCert.Id,
            Enabled = true,
        });
        // Per-Hostname Authenticated Origin Pulls
        var myPerHostnameAopCert = new Cloudflare.AuthenticatedOriginPullsCertificate("myPerHostnameAopCert", new Cloudflare.AuthenticatedOriginPullsCertificateArgs
        {
            ZoneId = @var.Cloudflare_zone_id,
            Certificate = "-----INSERT CERTIFICATE-----",
            PrivateKey = "-----INSERT PRIVATE KEY-----",
            Type = "per-hostname",
        });
        var myPerHostnameAop = new Cloudflare.AuthenticatedOriginPulls("myPerHostnameAop", new Cloudflare.AuthenticatedOriginPullsArgs
        {
            ZoneId = @var.Cloudflare_zone_id,
            AuthenticatedOriginPullsCertificate = myPerHostnameAopCert.Id,
            Hostname = "aop.example.com",
            Enabled = true,
        });
    }

}
package main

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

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := cloudflare.NewAuthenticatedOriginPulls(ctx, "myAop", &cloudflare.AuthenticatedOriginPullsArgs{
            ZoneId:  pulumi.Any(_var.Cloudflare_zone_id),
            Enabled: pulumi.Bool(true),
        })
        if err != nil {
            return err
        }
        myPerZoneAopCert, err := cloudflare.NewAuthenticatedOriginPullsCertificate(ctx, "myPerZoneAopCert", &cloudflare.AuthenticatedOriginPullsCertificateArgs{
            ZoneId:      pulumi.Any(_var.Cloudflare_zone_id),
            Certificate: pulumi.String("-----INSERT CERTIFICATE-----"),
            PrivateKey:  pulumi.String("-----INSERT PRIVATE KEY-----"),
            Type:        pulumi.String("per-zone"),
        })
        if err != nil {
            return err
        }
        _, err = cloudflare.NewAuthenticatedOriginPulls(ctx, "myPerZoneAop", &cloudflare.AuthenticatedOriginPullsArgs{
            ZoneId:                              pulumi.Any(_var.Cloudflare_zone_id),
            AuthenticatedOriginPullsCertificate: myPerZoneAopCert.ID(),
            Enabled:                             pulumi.Bool(true),
        })
        if err != nil {
            return err
        }
        myPerHostnameAopCert, err := cloudflare.NewAuthenticatedOriginPullsCertificate(ctx, "myPerHostnameAopCert", &cloudflare.AuthenticatedOriginPullsCertificateArgs{
            ZoneId:      pulumi.Any(_var.Cloudflare_zone_id),
            Certificate: pulumi.String("-----INSERT CERTIFICATE-----"),
            PrivateKey:  pulumi.String("-----INSERT PRIVATE KEY-----"),
            Type:        pulumi.String("per-hostname"),
        })
        if err != nil {
            return err
        }
        _, err = cloudflare.NewAuthenticatedOriginPulls(ctx, "myPerHostnameAop", &cloudflare.AuthenticatedOriginPullsArgs{
            ZoneId:                              pulumi.Any(_var.Cloudflare_zone_id),
            AuthenticatedOriginPullsCertificate: myPerHostnameAopCert.ID(),
            Hostname:                            pulumi.String("aop.example.com"),
            Enabled:                             pulumi.Bool(true),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_cloudflare as cloudflare

# Authenticated Origin Pulls
my_aop = cloudflare.AuthenticatedOriginPulls("myAop",
    zone_id=var["cloudflare_zone_id"],
    enabled=True)
# Per-Zone Authenticated Origin Pulls
my_per_zone_aop_cert = cloudflare.AuthenticatedOriginPullsCertificate("myPerZoneAopCert",
    zone_id=var["cloudflare_zone_id"],
    certificate="-----INSERT CERTIFICATE-----",
    private_key="-----INSERT PRIVATE KEY-----",
    type="per-zone")
my_per_zone_aop = cloudflare.AuthenticatedOriginPulls("myPerZoneAop",
    zone_id=var["cloudflare_zone_id"],
    authenticated_origin_pulls_certificate=my_per_zone_aop_cert.id,
    enabled=True)
# Per-Hostname Authenticated Origin Pulls
my_per_hostname_aop_cert = cloudflare.AuthenticatedOriginPullsCertificate("myPerHostnameAopCert",
    zone_id=var["cloudflare_zone_id"],
    certificate="-----INSERT CERTIFICATE-----",
    private_key="-----INSERT PRIVATE KEY-----",
    type="per-hostname")
my_per_hostname_aop = cloudflare.AuthenticatedOriginPulls("myPerHostnameAop",
    zone_id=var["cloudflare_zone_id"],
    authenticated_origin_pulls_certificate=my_per_hostname_aop_cert.id,
    hostname="aop.example.com",
    enabled=True)
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";

// Authenticated Origin Pulls
const myAop = new cloudflare.AuthenticatedOriginPulls("myAop", {
    zoneId: _var.cloudflare_zone_id,
    enabled: true,
});
// Per-Zone Authenticated Origin Pulls
const myPerZoneAopCert = new cloudflare.AuthenticatedOriginPullsCertificate("myPerZoneAopCert", {
    zoneId: _var.cloudflare_zone_id,
    certificate: "-----INSERT CERTIFICATE-----",
    privateKey: "-----INSERT PRIVATE KEY-----",
    type: "per-zone",
});
const myPerZoneAop = new cloudflare.AuthenticatedOriginPulls("myPerZoneAop", {
    zoneId: _var.cloudflare_zone_id,
    authenticatedOriginPullsCertificate: myPerZoneAopCert.id,
    enabled: true,
});
// Per-Hostname Authenticated Origin Pulls
const myPerHostnameAopCert = new cloudflare.AuthenticatedOriginPullsCertificate("myPerHostnameAopCert", {
    zoneId: _var.cloudflare_zone_id,
    certificate: "-----INSERT CERTIFICATE-----",
    privateKey: "-----INSERT PRIVATE KEY-----",
    type: "per-hostname",
});
const myPerHostnameAop = new cloudflare.AuthenticatedOriginPulls("myPerHostnameAop", {
    zoneId: _var.cloudflare_zone_id,
    authenticatedOriginPullsCertificate: myPerHostnameAopCert.id,
    hostname: "aop.example.com",
    enabled: true,
});

Create a AuthenticatedOriginPulls Resource

new AuthenticatedOriginPulls(name: string, args: AuthenticatedOriginPullsArgs, opts?: CustomResourceOptions);
def AuthenticatedOriginPulls(resource_name: str, opts: Optional[ResourceOptions] = None, authenticated_origin_pulls_certificate: Optional[str] = None, enabled: Optional[bool] = None, hostname: Optional[str] = None, zone_id: Optional[str] = None)
func NewAuthenticatedOriginPulls(ctx *Context, name string, args AuthenticatedOriginPullsArgs, opts ...ResourceOption) (*AuthenticatedOriginPulls, error)
public AuthenticatedOriginPulls(string name, AuthenticatedOriginPullsArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args AuthenticatedOriginPullsArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args AuthenticatedOriginPullsArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args AuthenticatedOriginPullsArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

AuthenticatedOriginPulls Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The AuthenticatedOriginPulls resource accepts the following input properties:

Enabled bool

Whether or not to enable Authenticated Origin Pulls on the given zone or hostname.

ZoneId string

The zone ID to upload the certificate to.

AuthenticatedOriginPullsCertificate string

The id of an uploaded Authenticated Origin Pulls certificate. If no hostname is provided, this certificate will be used zone wide as Per-Zone Authenticated Origin Pulls.

Hostname string

Specify a hostname to enable Per-Hostname Authenticated Origin Pulls on, using the provided certificate.

Enabled bool

Whether or not to enable Authenticated Origin Pulls on the given zone or hostname.

ZoneId string

The zone ID to upload the certificate to.

AuthenticatedOriginPullsCertificate string

The id of an uploaded Authenticated Origin Pulls certificate. If no hostname is provided, this certificate will be used zone wide as Per-Zone Authenticated Origin Pulls.

Hostname string

Specify a hostname to enable Per-Hostname Authenticated Origin Pulls on, using the provided certificate.

enabled boolean

Whether or not to enable Authenticated Origin Pulls on the given zone or hostname.

zoneId string

The zone ID to upload the certificate to.

authenticatedOriginPullsCertificate string

The id of an uploaded Authenticated Origin Pulls certificate. If no hostname is provided, this certificate will be used zone wide as Per-Zone Authenticated Origin Pulls.

hostname string

Specify a hostname to enable Per-Hostname Authenticated Origin Pulls on, using the provided certificate.

enabled bool

Whether or not to enable Authenticated Origin Pulls on the given zone or hostname.

zone_id str

The zone ID to upload the certificate to.

authenticated_origin_pulls_certificate str

The id of an uploaded Authenticated Origin Pulls certificate. If no hostname is provided, this certificate will be used zone wide as Per-Zone Authenticated Origin Pulls.

hostname str

Specify a hostname to enable Per-Hostname Authenticated Origin Pulls on, using the provided certificate.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing AuthenticatedOriginPulls Resource

Get an existing AuthenticatedOriginPulls 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?: AuthenticatedOriginPullsState, opts?: CustomResourceOptions): AuthenticatedOriginPulls
@staticmethod
def get(resource_name: str, id: str, opts: Optional[ResourceOptions] = None, authenticated_origin_pulls_certificate: Optional[str] = None, enabled: Optional[bool] = None, hostname: Optional[str] = None, zone_id: Optional[str] = None) -> AuthenticatedOriginPulls
func GetAuthenticatedOriginPulls(ctx *Context, name string, id IDInput, state *AuthenticatedOriginPullsState, opts ...ResourceOption) (*AuthenticatedOriginPulls, error)
public static AuthenticatedOriginPulls Get(string name, Input<string> id, AuthenticatedOriginPullsState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

AuthenticatedOriginPullsCertificate string

The id of an uploaded Authenticated Origin Pulls certificate. If no hostname is provided, this certificate will be used zone wide as Per-Zone Authenticated Origin Pulls.

Enabled bool

Whether or not to enable Authenticated Origin Pulls on the given zone or hostname.

Hostname string

Specify a hostname to enable Per-Hostname Authenticated Origin Pulls on, using the provided certificate.

ZoneId string

The zone ID to upload the certificate to.

AuthenticatedOriginPullsCertificate string

The id of an uploaded Authenticated Origin Pulls certificate. If no hostname is provided, this certificate will be used zone wide as Per-Zone Authenticated Origin Pulls.

Enabled bool

Whether or not to enable Authenticated Origin Pulls on the given zone or hostname.

Hostname string

Specify a hostname to enable Per-Hostname Authenticated Origin Pulls on, using the provided certificate.

ZoneId string

The zone ID to upload the certificate to.

authenticatedOriginPullsCertificate string

The id of an uploaded Authenticated Origin Pulls certificate. If no hostname is provided, this certificate will be used zone wide as Per-Zone Authenticated Origin Pulls.

enabled boolean

Whether or not to enable Authenticated Origin Pulls on the given zone or hostname.

hostname string

Specify a hostname to enable Per-Hostname Authenticated Origin Pulls on, using the provided certificate.

zoneId string

The zone ID to upload the certificate to.

authenticated_origin_pulls_certificate str

The id of an uploaded Authenticated Origin Pulls certificate. If no hostname is provided, this certificate will be used zone wide as Per-Zone Authenticated Origin Pulls.

enabled bool

Whether or not to enable Authenticated Origin Pulls on the given zone or hostname.

hostname str

Specify a hostname to enable Per-Hostname Authenticated Origin Pulls on, using the provided certificate.

zone_id str

The zone ID to upload the certificate to.

Import

Authenticated Origin Pull configuration can be imported using a composite ID formed of the zone ID, the form of Authenticated Origin Pulls, and the certificate ID, with each section filled or left blank e.g. # Import Authenticated Origin Pull configuration

 $ pulumi import cloudflare:index/authenticatedOriginPulls:AuthenticatedOriginPulls my_aop 023e105f4ecef8ad9ca31a8372d0c353//

Import Per-Zone Authenticated Origin Pull configuration

 $ pulumi import cloudflare:index/authenticatedOriginPulls:AuthenticatedOriginPulls my_per_zone_aop 023e105f4ecef8ad9ca31a8372d0c353/2458ce5a-0c35-4c7f-82c7-8e9487d3ff60/

Import Per-Hostname Authenticated Origin Pull configuration

 $ pulumi import cloudflare:index/authenticatedOriginPulls:AuthenticatedOriginPulls my_per_hostname_aop 023e105f4ecef8ad9ca31a8372d0c353/2458ce5a-0c35-4c7f-82c7-8e9487d3ff60/aop.example.com

Package Details

Repository
https://github.com/pulumi/pulumi-cloudflare
License
Apache-2.0
Notes
This Pulumi package is based on the cloudflare Terraform Provider.