1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. User
Cloudflare v6.6.0 published on Wednesday, Aug 20, 2025 by Pulumi

cloudflare.User

Explore with Pulumi AI

cloudflare logo
Cloudflare v6.6.0 published on Wednesday, Aug 20, 2025 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudflare from "@pulumi/cloudflare";
    
    const exampleUser = new cloudflare.User("example_user", {
        country: "US",
        firstName: "John",
        lastName: "Appleseed",
        telephone: "+1 123-123-1234",
        zipcode: "12345",
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    example_user = cloudflare.User("example_user",
        country="US",
        first_name="John",
        last_name="Appleseed",
        telephone="+1 123-123-1234",
        zipcode="12345")
    
    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.NewUser(ctx, "example_user", &cloudflare.UserArgs{
    			Country:   pulumi.String("US"),
    			FirstName: pulumi.String("John"),
    			LastName:  pulumi.String("Appleseed"),
    			Telephone: pulumi.String("+1 123-123-1234"),
    			Zipcode:   pulumi.String("12345"),
    		})
    		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 exampleUser = new Cloudflare.User("example_user", new()
        {
            Country = "US",
            FirstName = "John",
            LastName = "Appleseed",
            Telephone = "+1 123-123-1234",
            Zipcode = "12345",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudflare.User;
    import com.pulumi.cloudflare.UserArgs;
    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 exampleUser = new User("exampleUser", UserArgs.builder()
                .country("US")
                .firstName("John")
                .lastName("Appleseed")
                .telephone("+1 123-123-1234")
                .zipcode("12345")
                .build());
    
        }
    }
    
    resources:
      exampleUser:
        type: cloudflare:User
        name: example_user
        properties:
          country: US
          firstName: John
          lastName: Appleseed
          telephone: +1 123-123-1234
          zipcode: '12345'
    

    Create User Resource

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

    Constructor syntax

    new User(name: string, args?: UserArgs, opts?: CustomResourceOptions);
    @overload
    def User(resource_name: str,
             args: Optional[UserArgs] = None,
             opts: Optional[ResourceOptions] = None)
    
    @overload
    def User(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             country: Optional[str] = None,
             first_name: Optional[str] = None,
             last_name: Optional[str] = None,
             telephone: Optional[str] = None,
             zipcode: Optional[str] = None)
    func NewUser(ctx *Context, name string, args *UserArgs, opts ...ResourceOption) (*User, error)
    public User(string name, UserArgs? args = null, CustomResourceOptions? opts = null)
    public User(String name, UserArgs args)
    public User(String name, UserArgs args, CustomResourceOptions options)
    
    type: cloudflare:User
    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 UserArgs
    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 UserArgs
    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 UserArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args UserArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args UserArgs
    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 userResource = new Cloudflare.User("userResource", new()
    {
        Country = "string",
        FirstName = "string",
        LastName = "string",
        Telephone = "string",
        Zipcode = "string",
    });
    
    example, err := cloudflare.NewUser(ctx, "userResource", &cloudflare.UserArgs{
    	Country:   pulumi.String("string"),
    	FirstName: pulumi.String("string"),
    	LastName:  pulumi.String("string"),
    	Telephone: pulumi.String("string"),
    	Zipcode:   pulumi.String("string"),
    })
    
    var userResource = new User("userResource", UserArgs.builder()
        .country("string")
        .firstName("string")
        .lastName("string")
        .telephone("string")
        .zipcode("string")
        .build());
    
    user_resource = cloudflare.User("userResource",
        country="string",
        first_name="string",
        last_name="string",
        telephone="string",
        zipcode="string")
    
    const userResource = new cloudflare.User("userResource", {
        country: "string",
        firstName: "string",
        lastName: "string",
        telephone: "string",
        zipcode: "string",
    });
    
    type: cloudflare:User
    properties:
        country: string
        firstName: string
        lastName: string
        telephone: string
        zipcode: string
    

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

    Country string
    The country in which the user lives.
    FirstName string
    User's first name
    LastName string
    User's last name
    Telephone string
    User's telephone number
    Zipcode string
    The zipcode or postal code where the user lives.
    Country string
    The country in which the user lives.
    FirstName string
    User's first name
    LastName string
    User's last name
    Telephone string
    User's telephone number
    Zipcode string
    The zipcode or postal code where the user lives.
    country String
    The country in which the user lives.
    firstName String
    User's first name
    lastName String
    User's last name
    telephone String
    User's telephone number
    zipcode String
    The zipcode or postal code where the user lives.
    country string
    The country in which the user lives.
    firstName string
    User's first name
    lastName string
    User's last name
    telephone string
    User's telephone number
    zipcode string
    The zipcode or postal code where the user lives.
    country str
    The country in which the user lives.
    first_name str
    User's first name
    last_name str
    User's last name
    telephone str
    User's telephone number
    zipcode str
    The zipcode or postal code where the user lives.
    country String
    The country in which the user lives.
    firstName String
    User's first name
    lastName String
    User's last name
    telephone String
    User's telephone number
    zipcode String
    The zipcode or postal code where the user lives.

    Outputs

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

    Betas List<string>
    Lists the betas that the user is participating in.
    HasBusinessZones bool
    Indicates whether user has any business zones
    HasEnterpriseZones bool
    Indicates whether user has any enterprise zones
    HasProZones bool
    Indicates whether user has any pro zones
    Id string
    The provider-assigned unique ID for this managed resource.
    Organizations List<UserOrganization>
    Suspended bool
    Indicates whether user has been suspended
    TwoFactorAuthenticationEnabled bool
    Indicates whether two-factor authentication is enabled for the user account. Does not apply to API authentication.
    TwoFactorAuthenticationLocked bool
    Indicates whether two-factor authentication is required by one of the accounts that the user is a member of.
    Betas []string
    Lists the betas that the user is participating in.
    HasBusinessZones bool
    Indicates whether user has any business zones
    HasEnterpriseZones bool
    Indicates whether user has any enterprise zones
    HasProZones bool
    Indicates whether user has any pro zones
    Id string
    The provider-assigned unique ID for this managed resource.
    Organizations []UserOrganization
    Suspended bool
    Indicates whether user has been suspended
    TwoFactorAuthenticationEnabled bool
    Indicates whether two-factor authentication is enabled for the user account. Does not apply to API authentication.
    TwoFactorAuthenticationLocked bool
    Indicates whether two-factor authentication is required by one of the accounts that the user is a member of.
    betas List<String>
    Lists the betas that the user is participating in.
    hasBusinessZones Boolean
    Indicates whether user has any business zones
    hasEnterpriseZones Boolean
    Indicates whether user has any enterprise zones
    hasProZones Boolean
    Indicates whether user has any pro zones
    id String
    The provider-assigned unique ID for this managed resource.
    organizations List<UserOrganization>
    suspended Boolean
    Indicates whether user has been suspended
    twoFactorAuthenticationEnabled Boolean
    Indicates whether two-factor authentication is enabled for the user account. Does not apply to API authentication.
    twoFactorAuthenticationLocked Boolean
    Indicates whether two-factor authentication is required by one of the accounts that the user is a member of.
    betas string[]
    Lists the betas that the user is participating in.
    hasBusinessZones boolean
    Indicates whether user has any business zones
    hasEnterpriseZones boolean
    Indicates whether user has any enterprise zones
    hasProZones boolean
    Indicates whether user has any pro zones
    id string
    The provider-assigned unique ID for this managed resource.
    organizations UserOrganization[]
    suspended boolean
    Indicates whether user has been suspended
    twoFactorAuthenticationEnabled boolean
    Indicates whether two-factor authentication is enabled for the user account. Does not apply to API authentication.
    twoFactorAuthenticationLocked boolean
    Indicates whether two-factor authentication is required by one of the accounts that the user is a member of.
    betas Sequence[str]
    Lists the betas that the user is participating in.
    has_business_zones bool
    Indicates whether user has any business zones
    has_enterprise_zones bool
    Indicates whether user has any enterprise zones
    has_pro_zones bool
    Indicates whether user has any pro zones
    id str
    The provider-assigned unique ID for this managed resource.
    organizations Sequence[UserOrganization]
    suspended bool
    Indicates whether user has been suspended
    two_factor_authentication_enabled bool
    Indicates whether two-factor authentication is enabled for the user account. Does not apply to API authentication.
    two_factor_authentication_locked bool
    Indicates whether two-factor authentication is required by one of the accounts that the user is a member of.
    betas List<String>
    Lists the betas that the user is participating in.
    hasBusinessZones Boolean
    Indicates whether user has any business zones
    hasEnterpriseZones Boolean
    Indicates whether user has any enterprise zones
    hasProZones Boolean
    Indicates whether user has any pro zones
    id String
    The provider-assigned unique ID for this managed resource.
    organizations List<Property Map>
    suspended Boolean
    Indicates whether user has been suspended
    twoFactorAuthenticationEnabled Boolean
    Indicates whether two-factor authentication is enabled for the user account. Does not apply to API authentication.
    twoFactorAuthenticationLocked Boolean
    Indicates whether two-factor authentication is required by one of the accounts that the user is a member of.

    Look up Existing User Resource

    Get an existing User 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?: UserState, opts?: CustomResourceOptions): User
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            betas: Optional[Sequence[str]] = None,
            country: Optional[str] = None,
            first_name: Optional[str] = None,
            has_business_zones: Optional[bool] = None,
            has_enterprise_zones: Optional[bool] = None,
            has_pro_zones: Optional[bool] = None,
            last_name: Optional[str] = None,
            organizations: Optional[Sequence[UserOrganizationArgs]] = None,
            suspended: Optional[bool] = None,
            telephone: Optional[str] = None,
            two_factor_authentication_enabled: Optional[bool] = None,
            two_factor_authentication_locked: Optional[bool] = None,
            zipcode: Optional[str] = None) -> User
    func GetUser(ctx *Context, name string, id IDInput, state *UserState, opts ...ResourceOption) (*User, error)
    public static User Get(string name, Input<string> id, UserState? state, CustomResourceOptions? opts = null)
    public static User get(String name, Output<String> id, UserState state, CustomResourceOptions options)
    resources:  _:    type: cloudflare:User    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:
    Betas List<string>
    Lists the betas that the user is participating in.
    Country string
    The country in which the user lives.
    FirstName string
    User's first name
    HasBusinessZones bool
    Indicates whether user has any business zones
    HasEnterpriseZones bool
    Indicates whether user has any enterprise zones
    HasProZones bool
    Indicates whether user has any pro zones
    LastName string
    User's last name
    Organizations List<UserOrganization>
    Suspended bool
    Indicates whether user has been suspended
    Telephone string
    User's telephone number
    TwoFactorAuthenticationEnabled bool
    Indicates whether two-factor authentication is enabled for the user account. Does not apply to API authentication.
    TwoFactorAuthenticationLocked bool
    Indicates whether two-factor authentication is required by one of the accounts that the user is a member of.
    Zipcode string
    The zipcode or postal code where the user lives.
    Betas []string
    Lists the betas that the user is participating in.
    Country string
    The country in which the user lives.
    FirstName string
    User's first name
    HasBusinessZones bool
    Indicates whether user has any business zones
    HasEnterpriseZones bool
    Indicates whether user has any enterprise zones
    HasProZones bool
    Indicates whether user has any pro zones
    LastName string
    User's last name
    Organizations []UserOrganizationArgs
    Suspended bool
    Indicates whether user has been suspended
    Telephone string
    User's telephone number
    TwoFactorAuthenticationEnabled bool
    Indicates whether two-factor authentication is enabled for the user account. Does not apply to API authentication.
    TwoFactorAuthenticationLocked bool
    Indicates whether two-factor authentication is required by one of the accounts that the user is a member of.
    Zipcode string
    The zipcode or postal code where the user lives.
    betas List<String>
    Lists the betas that the user is participating in.
    country String
    The country in which the user lives.
    firstName String
    User's first name
    hasBusinessZones Boolean
    Indicates whether user has any business zones
    hasEnterpriseZones Boolean
    Indicates whether user has any enterprise zones
    hasProZones Boolean
    Indicates whether user has any pro zones
    lastName String
    User's last name
    organizations List<UserOrganization>
    suspended Boolean
    Indicates whether user has been suspended
    telephone String
    User's telephone number
    twoFactorAuthenticationEnabled Boolean
    Indicates whether two-factor authentication is enabled for the user account. Does not apply to API authentication.
    twoFactorAuthenticationLocked Boolean
    Indicates whether two-factor authentication is required by one of the accounts that the user is a member of.
    zipcode String
    The zipcode or postal code where the user lives.
    betas string[]
    Lists the betas that the user is participating in.
    country string
    The country in which the user lives.
    firstName string
    User's first name
    hasBusinessZones boolean
    Indicates whether user has any business zones
    hasEnterpriseZones boolean
    Indicates whether user has any enterprise zones
    hasProZones boolean
    Indicates whether user has any pro zones
    lastName string
    User's last name
    organizations UserOrganization[]
    suspended boolean
    Indicates whether user has been suspended
    telephone string
    User's telephone number
    twoFactorAuthenticationEnabled boolean
    Indicates whether two-factor authentication is enabled for the user account. Does not apply to API authentication.
    twoFactorAuthenticationLocked boolean
    Indicates whether two-factor authentication is required by one of the accounts that the user is a member of.
    zipcode string
    The zipcode or postal code where the user lives.
    betas Sequence[str]
    Lists the betas that the user is participating in.
    country str
    The country in which the user lives.
    first_name str
    User's first name
    has_business_zones bool
    Indicates whether user has any business zones
    has_enterprise_zones bool
    Indicates whether user has any enterprise zones
    has_pro_zones bool
    Indicates whether user has any pro zones
    last_name str
    User's last name
    organizations Sequence[UserOrganizationArgs]
    suspended bool
    Indicates whether user has been suspended
    telephone str
    User's telephone number
    two_factor_authentication_enabled bool
    Indicates whether two-factor authentication is enabled for the user account. Does not apply to API authentication.
    two_factor_authentication_locked bool
    Indicates whether two-factor authentication is required by one of the accounts that the user is a member of.
    zipcode str
    The zipcode or postal code where the user lives.
    betas List<String>
    Lists the betas that the user is participating in.
    country String
    The country in which the user lives.
    firstName String
    User's first name
    hasBusinessZones Boolean
    Indicates whether user has any business zones
    hasEnterpriseZones Boolean
    Indicates whether user has any enterprise zones
    hasProZones Boolean
    Indicates whether user has any pro zones
    lastName String
    User's last name
    organizations List<Property Map>
    suspended Boolean
    Indicates whether user has been suspended
    telephone String
    User's telephone number
    twoFactorAuthenticationEnabled Boolean
    Indicates whether two-factor authentication is enabled for the user account. Does not apply to API authentication.
    twoFactorAuthenticationLocked Boolean
    Indicates whether two-factor authentication is required by one of the accounts that the user is a member of.
    zipcode String
    The zipcode or postal code where the user lives.

    Supporting Types

    UserOrganization, UserOrganizationArgs

    Id string
    Identifier
    Name string
    Organization name.
    Permissions List<string>
    Access permissions for this User.
    Roles List<string>
    List of roles that a user has within an organization.
    Status string
    Whether the user is a member of the organization or has an invitation pending. Available values: "member", "invited".
    Id string
    Identifier
    Name string
    Organization name.
    Permissions []string
    Access permissions for this User.
    Roles []string
    List of roles that a user has within an organization.
    Status string
    Whether the user is a member of the organization or has an invitation pending. Available values: "member", "invited".
    id String
    Identifier
    name String
    Organization name.
    permissions List<String>
    Access permissions for this User.
    roles List<String>
    List of roles that a user has within an organization.
    status String
    Whether the user is a member of the organization or has an invitation pending. Available values: "member", "invited".
    id string
    Identifier
    name string
    Organization name.
    permissions string[]
    Access permissions for this User.
    roles string[]
    List of roles that a user has within an organization.
    status string
    Whether the user is a member of the organization or has an invitation pending. Available values: "member", "invited".
    id str
    Identifier
    name str
    Organization name.
    permissions Sequence[str]
    Access permissions for this User.
    roles Sequence[str]
    List of roles that a user has within an organization.
    status str
    Whether the user is a member of the organization or has an invitation pending. Available values: "member", "invited".
    id String
    Identifier
    name String
    Organization name.
    permissions List<String>
    Access permissions for this User.
    roles List<String>
    List of roles that a user has within an organization.
    status String
    Whether the user is a member of the organization or has an invitation pending. Available values: "member", "invited".

    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.6.0 published on Wednesday, Aug 20, 2025 by Pulumi