1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. Account
Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi

cloudflare.Account

Explore with Pulumi AI

cloudflare logo
Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudflare from "@pulumi/cloudflare";
    
    const exampleAccount = new cloudflare.Account("example_account", {
        name: "name",
        type: "standard",
        unit: {
            id: "f267e341f3dd4697bd3b9f71dd96247f",
        },
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    example_account = cloudflare.Account("example_account",
        name="name",
        type="standard",
        unit={
            "id": "f267e341f3dd4697bd3b9f71dd96247f",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-cloudflare/sdk/v6/go/cloudflare"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := cloudflare.NewAccount(ctx, "example_account", &cloudflare.AccountArgs{
    			Name: pulumi.String("name"),
    			Type: pulumi.String("standard"),
    			Unit: &cloudflare.AccountUnitArgs{
    				Id: pulumi.String("f267e341f3dd4697bd3b9f71dd96247f"),
    			},
    		})
    		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 exampleAccount = new Cloudflare.Account("example_account", new()
        {
            Name = "name",
            Type = "standard",
            Unit = new Cloudflare.Inputs.AccountUnitArgs
            {
                Id = "f267e341f3dd4697bd3b9f71dd96247f",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudflare.Account;
    import com.pulumi.cloudflare.AccountArgs;
    import com.pulumi.cloudflare.inputs.AccountUnitArgs;
    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 exampleAccount = new Account("exampleAccount", AccountArgs.builder()
                .name("name")
                .type("standard")
                .unit(AccountUnitArgs.builder()
                    .id("f267e341f3dd4697bd3b9f71dd96247f")
                    .build())
                .build());
    
        }
    }
    
    resources:
      exampleAccount:
        type: cloudflare:Account
        name: example_account
        properties:
          name: name
          type: standard
          unit:
            id: f267e341f3dd4697bd3b9f71dd96247f
    

    Create Account Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Account(name: string, args: AccountArgs, opts?: CustomResourceOptions);
    @overload
    def Account(resource_name: str,
                args: AccountArgs,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def Account(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                name: Optional[str] = None,
                type: Optional[str] = None,
                settings: Optional[AccountSettingsArgs] = None,
                unit: Optional[AccountUnitArgs] = None)
    func NewAccount(ctx *Context, name string, args AccountArgs, opts ...ResourceOption) (*Account, error)
    public Account(string name, AccountArgs args, CustomResourceOptions? opts = null)
    public Account(String name, AccountArgs args)
    public Account(String name, AccountArgs args, CustomResourceOptions options)
    
    type: cloudflare:Account
    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 AccountArgs
    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 AccountArgs
    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 AccountArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AccountArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AccountArgs
    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 accountResource = new Cloudflare.Account("accountResource", new()
    {
        Name = "string",
        Type = "string",
        Settings = new Cloudflare.Inputs.AccountSettingsArgs
        {
            AbuseContactEmail = "string",
            EnforceTwofactor = false,
        },
        Unit = new Cloudflare.Inputs.AccountUnitArgs
        {
            Id = "string",
        },
    });
    
    example, err := cloudflare.NewAccount(ctx, "accountResource", &cloudflare.AccountArgs{
    	Name: pulumi.String("string"),
    	Type: pulumi.String("string"),
    	Settings: &cloudflare.AccountSettingsArgs{
    		AbuseContactEmail: pulumi.String("string"),
    		EnforceTwofactor:  pulumi.Bool(false),
    	},
    	Unit: &cloudflare.AccountUnitArgs{
    		Id: pulumi.String("string"),
    	},
    })
    
    var accountResource = new Account("accountResource", AccountArgs.builder()
        .name("string")
        .type("string")
        .settings(AccountSettingsArgs.builder()
            .abuseContactEmail("string")
            .enforceTwofactor(false)
            .build())
        .unit(AccountUnitArgs.builder()
            .id("string")
            .build())
        .build());
    
    account_resource = cloudflare.Account("accountResource",
        name="string",
        type="string",
        settings={
            "abuse_contact_email": "string",
            "enforce_twofactor": False,
        },
        unit={
            "id": "string",
        })
    
    const accountResource = new cloudflare.Account("accountResource", {
        name: "string",
        type: "string",
        settings: {
            abuseContactEmail: "string",
            enforceTwofactor: false,
        },
        unit: {
            id: "string",
        },
    });
    
    type: cloudflare:Account
    properties:
        name: string
        settings:
            abuseContactEmail: string
            enforceTwofactor: false
        type: string
        unit:
            id: string
    

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

    Name string
    Account name
    Type string
    the type of account being created. For self-serve customers, use standard. for enterprise customers, use enterprise. Available values: "standard", "enterprise".
    Settings AccountSettings
    Account settings
    Unit AccountUnit
    information related to the tenant unit, and optionally, an id of the unit to create the account on. see https://developers.cloudflare.com/tenant/how-to/manage-accounts/
    Name string
    Account name
    Type string
    the type of account being created. For self-serve customers, use standard. for enterprise customers, use enterprise. Available values: "standard", "enterprise".
    Settings AccountSettingsArgs
    Account settings
    Unit AccountUnitArgs
    information related to the tenant unit, and optionally, an id of the unit to create the account on. see https://developers.cloudflare.com/tenant/how-to/manage-accounts/
    name String
    Account name
    type String
    the type of account being created. For self-serve customers, use standard. for enterprise customers, use enterprise. Available values: "standard", "enterprise".
    settings AccountSettings
    Account settings
    unit AccountUnit
    information related to the tenant unit, and optionally, an id of the unit to create the account on. see https://developers.cloudflare.com/tenant/how-to/manage-accounts/
    name string
    Account name
    type string
    the type of account being created. For self-serve customers, use standard. for enterprise customers, use enterprise. Available values: "standard", "enterprise".
    settings AccountSettings
    Account settings
    unit AccountUnit
    information related to the tenant unit, and optionally, an id of the unit to create the account on. see https://developers.cloudflare.com/tenant/how-to/manage-accounts/
    name str
    Account name
    type str
    the type of account being created. For self-serve customers, use standard. for enterprise customers, use enterprise. Available values: "standard", "enterprise".
    settings AccountSettingsArgs
    Account settings
    unit AccountUnitArgs
    information related to the tenant unit, and optionally, an id of the unit to create the account on. see https://developers.cloudflare.com/tenant/how-to/manage-accounts/
    name String
    Account name
    type String
    the type of account being created. For self-serve customers, use standard. for enterprise customers, use enterprise. Available values: "standard", "enterprise".
    settings Property Map
    Account settings
    unit Property Map
    information related to the tenant unit, and optionally, an id of the unit to create the account on. see https://developers.cloudflare.com/tenant/how-to/manage-accounts/

    Outputs

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

    CreatedOn string
    Timestamp for the creation of the account
    Id string
    The provider-assigned unique ID for this managed resource.
    CreatedOn string
    Timestamp for the creation of the account
    Id string
    The provider-assigned unique ID for this managed resource.
    createdOn String
    Timestamp for the creation of the account
    id String
    The provider-assigned unique ID for this managed resource.
    createdOn string
    Timestamp for the creation of the account
    id string
    The provider-assigned unique ID for this managed resource.
    created_on str
    Timestamp for the creation of the account
    id str
    The provider-assigned unique ID for this managed resource.
    createdOn String
    Timestamp for the creation of the account
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Account Resource

    Get an existing Account 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?: AccountState, opts?: CustomResourceOptions): Account
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            created_on: Optional[str] = None,
            name: Optional[str] = None,
            settings: Optional[AccountSettingsArgs] = None,
            type: Optional[str] = None,
            unit: Optional[AccountUnitArgs] = None) -> Account
    func GetAccount(ctx *Context, name string, id IDInput, state *AccountState, opts ...ResourceOption) (*Account, error)
    public static Account Get(string name, Input<string> id, AccountState? state, CustomResourceOptions? opts = null)
    public static Account get(String name, Output<String> id, AccountState state, CustomResourceOptions options)
    resources:  _:    type: cloudflare:Account    get:      id: ${id}
    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:
    CreatedOn string
    Timestamp for the creation of the account
    Name string
    Account name
    Settings AccountSettings
    Account settings
    Type string
    the type of account being created. For self-serve customers, use standard. for enterprise customers, use enterprise. Available values: "standard", "enterprise".
    Unit AccountUnit
    information related to the tenant unit, and optionally, an id of the unit to create the account on. see https://developers.cloudflare.com/tenant/how-to/manage-accounts/
    CreatedOn string
    Timestamp for the creation of the account
    Name string
    Account name
    Settings AccountSettingsArgs
    Account settings
    Type string
    the type of account being created. For self-serve customers, use standard. for enterprise customers, use enterprise. Available values: "standard", "enterprise".
    Unit AccountUnitArgs
    information related to the tenant unit, and optionally, an id of the unit to create the account on. see https://developers.cloudflare.com/tenant/how-to/manage-accounts/
    createdOn String
    Timestamp for the creation of the account
    name String
    Account name
    settings AccountSettings
    Account settings
    type String
    the type of account being created. For self-serve customers, use standard. for enterprise customers, use enterprise. Available values: "standard", "enterprise".
    unit AccountUnit
    information related to the tenant unit, and optionally, an id of the unit to create the account on. see https://developers.cloudflare.com/tenant/how-to/manage-accounts/
    createdOn string
    Timestamp for the creation of the account
    name string
    Account name
    settings AccountSettings
    Account settings
    type string
    the type of account being created. For self-serve customers, use standard. for enterprise customers, use enterprise. Available values: "standard", "enterprise".
    unit AccountUnit
    information related to the tenant unit, and optionally, an id of the unit to create the account on. see https://developers.cloudflare.com/tenant/how-to/manage-accounts/
    created_on str
    Timestamp for the creation of the account
    name str
    Account name
    settings AccountSettingsArgs
    Account settings
    type str
    the type of account being created. For self-serve customers, use standard. for enterprise customers, use enterprise. Available values: "standard", "enterprise".
    unit AccountUnitArgs
    information related to the tenant unit, and optionally, an id of the unit to create the account on. see https://developers.cloudflare.com/tenant/how-to/manage-accounts/
    createdOn String
    Timestamp for the creation of the account
    name String
    Account name
    settings Property Map
    Account settings
    type String
    the type of account being created. For self-serve customers, use standard. for enterprise customers, use enterprise. Available values: "standard", "enterprise".
    unit Property Map
    information related to the tenant unit, and optionally, an id of the unit to create the account on. see https://developers.cloudflare.com/tenant/how-to/manage-accounts/

    Supporting Types

    AccountSettings, AccountSettingsArgs

    AbuseContactEmail string
    Sets an abuse contact email to notify for abuse reports.
    DefaultNameservers string
    Specifies the default nameservers to be used for new zones added to this account.

    Deprecated: This attribute is deprecated.

    EnforceTwofactor bool
    Indicates whether membership in this account requires that Two-Factor Authentication is enabled
    UseAccountCustomNsByDefault bool

    Indicates whether new zones should use the account-level custom nameservers by default.

    Deprecated in favor of DNS Settings.

    Deprecated: This attribute is deprecated.

    AbuseContactEmail string
    Sets an abuse contact email to notify for abuse reports.
    DefaultNameservers string
    Specifies the default nameservers to be used for new zones added to this account.

    Deprecated: This attribute is deprecated.

    EnforceTwofactor bool
    Indicates whether membership in this account requires that Two-Factor Authentication is enabled
    UseAccountCustomNsByDefault bool

    Indicates whether new zones should use the account-level custom nameservers by default.

    Deprecated in favor of DNS Settings.

    Deprecated: This attribute is deprecated.

    abuseContactEmail String
    Sets an abuse contact email to notify for abuse reports.
    defaultNameservers String
    Specifies the default nameservers to be used for new zones added to this account.

    Deprecated: This attribute is deprecated.

    enforceTwofactor Boolean
    Indicates whether membership in this account requires that Two-Factor Authentication is enabled
    useAccountCustomNsByDefault Boolean

    Indicates whether new zones should use the account-level custom nameservers by default.

    Deprecated in favor of DNS Settings.

    Deprecated: This attribute is deprecated.

    abuseContactEmail string
    Sets an abuse contact email to notify for abuse reports.
    defaultNameservers string
    Specifies the default nameservers to be used for new zones added to this account.

    Deprecated: This attribute is deprecated.

    enforceTwofactor boolean
    Indicates whether membership in this account requires that Two-Factor Authentication is enabled
    useAccountCustomNsByDefault boolean

    Indicates whether new zones should use the account-level custom nameservers by default.

    Deprecated in favor of DNS Settings.

    Deprecated: This attribute is deprecated.

    abuse_contact_email str
    Sets an abuse contact email to notify for abuse reports.
    default_nameservers str
    Specifies the default nameservers to be used for new zones added to this account.

    Deprecated: This attribute is deprecated.

    enforce_twofactor bool
    Indicates whether membership in this account requires that Two-Factor Authentication is enabled
    use_account_custom_ns_by_default bool

    Indicates whether new zones should use the account-level custom nameservers by default.

    Deprecated in favor of DNS Settings.

    Deprecated: This attribute is deprecated.

    abuseContactEmail String
    Sets an abuse contact email to notify for abuse reports.
    defaultNameservers String
    Specifies the default nameservers to be used for new zones added to this account.

    Deprecated: This attribute is deprecated.

    enforceTwofactor Boolean
    Indicates whether membership in this account requires that Two-Factor Authentication is enabled
    useAccountCustomNsByDefault Boolean

    Indicates whether new zones should use the account-level custom nameservers by default.

    Deprecated in favor of DNS Settings.

    Deprecated: This attribute is deprecated.

    AccountUnit, AccountUnitArgs

    Id string
    Tenant unit ID
    Id string
    Tenant unit ID
    id String
    Tenant unit ID
    id string
    Tenant unit ID
    id str
    Tenant unit ID
    id String
    Tenant unit ID

    Import

    $ pulumi import cloudflare:index/account:Account example '<account_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.
    cloudflare logo
    Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi