1. Packages
  2. Cloudflare
  3. API Docs
  4. Account
Cloudflare v5.24.0 published on Thursday, Mar 28, 2024 by Pulumi

cloudflare.Account

Explore with Pulumi AI

cloudflare logo
Cloudflare v5.24.0 published on Thursday, Mar 28, 2024 by Pulumi

    Provides a Cloudflare Account resource. Account is the basic resource for working with Cloudflare zones, teams and users.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudflare from "@pulumi/cloudflare";
    
    const example = new cloudflare.Account("example", {
        enforceTwofactor: true,
        name: "some-enterprise-account",
        type: "enterprise",
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    example = cloudflare.Account("example",
        enforce_twofactor=True,
        name="some-enterprise-account",
        type="enterprise")
    
    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.NewAccount(ctx, "example", &cloudflare.AccountArgs{
    			EnforceTwofactor: pulumi.Bool(true),
    			Name:             pulumi.String("some-enterprise-account"),
    			Type:             pulumi.String("enterprise"),
    		})
    		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 example = new Cloudflare.Account("example", new()
        {
            EnforceTwofactor = true,
            Name = "some-enterprise-account",
            Type = "enterprise",
        });
    
    });
    
    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 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 example = new Account("example", AccountArgs.builder()        
                .enforceTwofactor(true)
                .name("some-enterprise-account")
                .type("enterprise")
                .build());
    
        }
    }
    
    resources:
      example:
        type: cloudflare:Account
        properties:
          enforceTwofactor: true
          name: some-enterprise-account
          type: enterprise
    

    Create Account Resource

    new Account(name: string, args: AccountArgs, opts?: CustomResourceOptions);
    @overload
    def Account(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                enforce_twofactor: Optional[bool] = None,
                name: Optional[str] = None,
                type: Optional[str] = None)
    @overload
    def Account(resource_name: str,
                args: AccountArgs,
                opts: Optional[ResourceOptions] = 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.
    
    
    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.

    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

    The Account resource accepts the following input properties:

    Name string
    The name of the account that is displayed in the Cloudflare dashboard.
    EnforceTwofactor bool
    Whether 2FA is enforced on the account. Defaults to false.
    Type string
    Account type. Available values: enterprise, standard. Defaults to standard. Modifying this attribute will force creation of a new resource.
    Name string
    The name of the account that is displayed in the Cloudflare dashboard.
    EnforceTwofactor bool
    Whether 2FA is enforced on the account. Defaults to false.
    Type string
    Account type. Available values: enterprise, standard. Defaults to standard. Modifying this attribute will force creation of a new resource.
    name String
    The name of the account that is displayed in the Cloudflare dashboard.
    enforceTwofactor Boolean
    Whether 2FA is enforced on the account. Defaults to false.
    type String
    Account type. Available values: enterprise, standard. Defaults to standard. Modifying this attribute will force creation of a new resource.
    name string
    The name of the account that is displayed in the Cloudflare dashboard.
    enforceTwofactor boolean
    Whether 2FA is enforced on the account. Defaults to false.
    type string
    Account type. Available values: enterprise, standard. Defaults to standard. Modifying this attribute will force creation of a new resource.
    name str
    The name of the account that is displayed in the Cloudflare dashboard.
    enforce_twofactor bool
    Whether 2FA is enforced on the account. Defaults to false.
    type str
    Account type. Available values: enterprise, standard. Defaults to standard. Modifying this attribute will force creation of a new resource.
    name String
    The name of the account that is displayed in the Cloudflare dashboard.
    enforceTwofactor Boolean
    Whether 2FA is enforced on the account. Defaults to false.
    type String
    Account type. Available values: enterprise, standard. Defaults to standard. Modifying this attribute will force creation of a new resource.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Account 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 string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    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,
            enforce_twofactor: Optional[bool] = None,
            name: Optional[str] = None,
            type: Optional[str] = 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)
    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:
    EnforceTwofactor bool
    Whether 2FA is enforced on the account. Defaults to false.
    Name string
    The name of the account that is displayed in the Cloudflare dashboard.
    Type string
    Account type. Available values: enterprise, standard. Defaults to standard. Modifying this attribute will force creation of a new resource.
    EnforceTwofactor bool
    Whether 2FA is enforced on the account. Defaults to false.
    Name string
    The name of the account that is displayed in the Cloudflare dashboard.
    Type string
    Account type. Available values: enterprise, standard. Defaults to standard. Modifying this attribute will force creation of a new resource.
    enforceTwofactor Boolean
    Whether 2FA is enforced on the account. Defaults to false.
    name String
    The name of the account that is displayed in the Cloudflare dashboard.
    type String
    Account type. Available values: enterprise, standard. Defaults to standard. Modifying this attribute will force creation of a new resource.
    enforceTwofactor boolean
    Whether 2FA is enforced on the account. Defaults to false.
    name string
    The name of the account that is displayed in the Cloudflare dashboard.
    type string
    Account type. Available values: enterprise, standard. Defaults to standard. Modifying this attribute will force creation of a new resource.
    enforce_twofactor bool
    Whether 2FA is enforced on the account. Defaults to false.
    name str
    The name of the account that is displayed in the Cloudflare dashboard.
    type str
    Account type. Available values: enterprise, standard. Defaults to standard. Modifying this attribute will force creation of a new resource.
    enforceTwofactor Boolean
    Whether 2FA is enforced on the account. Defaults to false.
    name String
    The name of the account that is displayed in the Cloudflare dashboard.
    type String
    Account type. Available values: enterprise, standard. Defaults to standard. Modifying this attribute will force creation of a new resource.

    Import

    $ pulumi import cloudflare:index/account:Account example <account_id>
    

    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 v5.24.0 published on Thursday, Mar 28, 2024 by Pulumi