cloudflare.PagesDomain
Explore with Pulumi AI
Provides a resource for managing Cloudflare Pages domains.
A DNS record for the domain is not automatically created. You need to create a
cloudflare.Record
resource for the domain you want to use.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const my_domain = new cloudflare.PagesDomain("my-domain", {
accountId: "f037e56e89293a057740de681ac9abbe",
projectName: "my-example-project",
domain: "example.com",
});
import pulumi
import pulumi_cloudflare as cloudflare
my_domain = cloudflare.PagesDomain("my-domain",
account_id="f037e56e89293a057740de681ac9abbe",
project_name="my-example-project",
domain="example.com")
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 {
_, err := cloudflare.NewPagesDomain(ctx, "my-domain", &cloudflare.PagesDomainArgs{
AccountId: pulumi.String("f037e56e89293a057740de681ac9abbe"),
ProjectName: pulumi.String("my-example-project"),
Domain: pulumi.String("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 my_domain = new Cloudflare.PagesDomain("my-domain", new()
{
AccountId = "f037e56e89293a057740de681ac9abbe",
ProjectName = "my-example-project",
Domain = "example.com",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.PagesDomain;
import com.pulumi.cloudflare.PagesDomainArgs;
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 my_domain = new PagesDomain("my-domain", PagesDomainArgs.builder()
.accountId("f037e56e89293a057740de681ac9abbe")
.projectName("my-example-project")
.domain("example.com")
.build());
}
}
resources:
my-domain:
type: cloudflare:PagesDomain
properties:
accountId: f037e56e89293a057740de681ac9abbe
projectName: my-example-project
domain: example.com
Create PagesDomain Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new PagesDomain(name: string, args: PagesDomainArgs, opts?: CustomResourceOptions);
@overload
def PagesDomain(resource_name: str,
args: PagesDomainArgs,
opts: Optional[ResourceOptions] = None)
@overload
def PagesDomain(resource_name: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
domain: Optional[str] = None,
project_name: Optional[str] = None)
func NewPagesDomain(ctx *Context, name string, args PagesDomainArgs, opts ...ResourceOption) (*PagesDomain, error)
public PagesDomain(string name, PagesDomainArgs args, CustomResourceOptions? opts = null)
public PagesDomain(String name, PagesDomainArgs args)
public PagesDomain(String name, PagesDomainArgs args, CustomResourceOptions options)
type: cloudflare:PagesDomain
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 PagesDomainArgs
- 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 PagesDomainArgs
- 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 PagesDomainArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PagesDomainArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PagesDomainArgs
- 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 pagesDomainResource = new Cloudflare.PagesDomain("pagesDomainResource", new()
{
AccountId = "string",
Domain = "string",
ProjectName = "string",
});
example, err := cloudflare.NewPagesDomain(ctx, "pagesDomainResource", &cloudflare.PagesDomainArgs{
AccountId: pulumi.String("string"),
Domain: pulumi.String("string"),
ProjectName: pulumi.String("string"),
})
var pagesDomainResource = new PagesDomain("pagesDomainResource", PagesDomainArgs.builder()
.accountId("string")
.domain("string")
.projectName("string")
.build());
pages_domain_resource = cloudflare.PagesDomain("pagesDomainResource",
account_id="string",
domain="string",
project_name="string")
const pagesDomainResource = new cloudflare.PagesDomain("pagesDomainResource", {
accountId: "string",
domain: "string",
projectName: "string",
});
type: cloudflare:PagesDomain
properties:
accountId: string
domain: string
projectName: string
PagesDomain 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 PagesDomain resource accepts the following input properties:
- Account
Id string - The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
- Domain string
- Custom domain. Modifying this attribute will force creation of a new resource.
- Project
Name string - Name of the Pages Project. Modifying this attribute will force creation of a new resource.
- Account
Id string - The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
- Domain string
- Custom domain. Modifying this attribute will force creation of a new resource.
- Project
Name string - Name of the Pages Project. Modifying this attribute will force creation of a new resource.
- account
Id String - The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
- domain String
- Custom domain. Modifying this attribute will force creation of a new resource.
- project
Name String - Name of the Pages Project. Modifying this attribute will force creation of a new resource.
- account
Id string - The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
- domain string
- Custom domain. Modifying this attribute will force creation of a new resource.
- project
Name string - Name of the Pages Project. Modifying this attribute will force creation of a new resource.
- account_
id str - The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
- domain str
- Custom domain. Modifying this attribute will force creation of a new resource.
- project_
name str - Name of the Pages Project. Modifying this attribute will force creation of a new resource.
- account
Id String - The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
- domain String
- Custom domain. Modifying this attribute will force creation of a new resource.
- project
Name String - Name of the Pages Project. Modifying this attribute will force creation of a new resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the PagesDomain resource produces the following output properties:
Look up Existing PagesDomain Resource
Get an existing PagesDomain 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?: PagesDomainState, opts?: CustomResourceOptions): PagesDomain
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
domain: Optional[str] = None,
project_name: Optional[str] = None,
status: Optional[str] = None) -> PagesDomain
func GetPagesDomain(ctx *Context, name string, id IDInput, state *PagesDomainState, opts ...ResourceOption) (*PagesDomain, error)
public static PagesDomain Get(string name, Input<string> id, PagesDomainState? state, CustomResourceOptions? opts = null)
public static PagesDomain get(String name, Output<String> id, PagesDomainState 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. Modifying this attribute will force creation of a new resource.
- Domain string
- Custom domain. Modifying this attribute will force creation of a new resource.
- Project
Name string - Name of the Pages Project. Modifying this attribute will force creation of a new resource.
- Status string
- Status of the custom domain.
- Account
Id string - The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
- Domain string
- Custom domain. Modifying this attribute will force creation of a new resource.
- Project
Name string - Name of the Pages Project. Modifying this attribute will force creation of a new resource.
- Status string
- Status of the custom domain.
- account
Id String - The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
- domain String
- Custom domain. Modifying this attribute will force creation of a new resource.
- project
Name String - Name of the Pages Project. Modifying this attribute will force creation of a new resource.
- status String
- Status of the custom domain.
- account
Id string - The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
- domain string
- Custom domain. Modifying this attribute will force creation of a new resource.
- project
Name string - Name of the Pages Project. Modifying this attribute will force creation of a new resource.
- status string
- Status of the custom domain.
- account_
id str - The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
- domain str
- Custom domain. Modifying this attribute will force creation of a new resource.
- project_
name str - Name of the Pages Project. Modifying this attribute will force creation of a new resource.
- status str
- Status of the custom domain.
- account
Id String - The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
- domain String
- Custom domain. Modifying this attribute will force creation of a new resource.
- project
Name String - Name of the Pages Project. Modifying this attribute will force creation of a new resource.
- status String
- Status of the custom domain.
Import
$ pulumi import cloudflare:index/pagesDomain:PagesDomain example <account_id>/<project_name>/<domain-name>
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.