Skip to content
Start here

User

resource cloudflare_user

optional Expand Collapse
country?: String

The country in which the user lives.

first_name?: String

User's first name

last_name?: String

User's last name

telephone?: String

User's telephone number

zipcode?: String

The zipcode or postal code where the user lives.

computed Expand Collapse
id: String

Identifier of the user.

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

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.

organizations: List[Attributes]
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.

cloudflare_user

resource "cloudflare_user" "example_user" {
  country = "US"
  first_name = "John"
  last_name = "Appleseed"
  telephone = "+1 123-123-1234"
  zipcode = "12345"
}

data cloudflare_user

computed Expand Collapse
country: String

The country in which the user lives.

first_name: String

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

id: String

Identifier of the user.

last_name: String

User's last name

suspended: Bool

Indicates whether user has been suspended

telephone: String

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: String

The zipcode or postal code where the user lives.

betas: List[String]

Lists the betas that the user is participating in.

organizations: List[Attributes]
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.

cloudflare_user

data "cloudflare_user" "example_user" {

}

UserTokens

resource cloudflare_api_token

required Expand Collapse
name: String

Token name.

policies: List[Attributes]

List of access policies assigned to the token.

id: String

Policy identifier.

effect: String

Allow or deny operations against the resources.

permission_groups: List[Attributes]

A set of permission groups that are specified to the policy.

id: String

Identifier of the permission group.

meta?: Attributes

Attributes associated to the permission group.

key?: String
value?: String
name: String

Name of the permission group.

resources: Map[String]

A list of resource names that the policy applies to.

optional Expand Collapse
expires_on?: Time

The expiration time on or after which the JWT MUST NOT be accepted for processing.

not_before?: Time

The time before which the token MUST NOT be accepted for processing.

condition?: Attributes
request_ip?: Attributes

Client IP restrictions.

in?: List[String]

List of IPv4/IPv6 CIDR addresses.

not_in?: List[String]

List of IPv4/IPv6 CIDR addresses.

status?: String

Status of the token.

computed Expand Collapse
id: String

Token identifier tag.

issued_on: Time

The time on which the token was created.

last_used_on: Time

Last time the token was used.

modified_on: Time

Last time the token was modified.

value: String

The token value.

cloudflare_api_token

resource "cloudflare_api_token" "example_api_token" {
  name = "readonly token"
  policies = [{
    effect = "allow"
    permission_groups = [{
      id = "c8fed203ed3043cba015a93ad1616f1f"
      meta = {
        key = "key"
        value = "value"
      }
    }, {
      id = "82e64a83756745bbbb1c9c2701bf816b"
      meta = {
        key = "key"
        value = "value"
      }
    }]
    resources = {
      foo = "string"
    }
  }]
  condition = {
    request_ip = {
      in = ["123.123.123.0/24", "2606:4700::/32"]
      not_in = ["123.123.123.100/24", "2606:4700:4700::/48"]
    }
  }
  expires_on = "2020-01-01T00:00:00Z"
  not_before = "2018-07-01T05:20:00Z"
}

data cloudflare_api_token

optional Expand Collapse
token_id?: String

Token identifier tag.

filter?: Attributes
direction?: String

Direction to order results.

computed Expand Collapse
id: String

Token identifier tag.

expires_on: Time

The expiration time on or after which the JWT MUST NOT be accepted for processing.

issued_on: Time

The time on which the token was created.

last_used_on: Time

Last time the token was used.

modified_on: Time

Last time the token was modified.

name: String

Token name.

not_before: Time

The time before which the token MUST NOT be accepted for processing.

status: String

Status of the token.

condition: Attributes
request_ip: Attributes

Client IP restrictions.

in: List[String]

List of IPv4/IPv6 CIDR addresses.

not_in: List[String]

List of IPv4/IPv6 CIDR addresses.

policies: List[Attributes]

List of access policies assigned to the token.

id: String

Policy identifier.

effect: String

Allow or deny operations against the resources.

permission_groups: List[Attributes]

A set of permission groups that are specified to the policy.

id: String

Identifier of the permission group.

meta: Attributes

Attributes associated to the permission group.

key: String
value: String
name: String

Name of the permission group.

resources: Map[String]

A list of resource names that the policy applies to.

cloudflare_api_token

data "cloudflare_api_token" "example_api_token" {
  token_id = "ed17574386854bf78a67040be0a770b0"
}

data cloudflare_api_tokens

optional Expand Collapse
direction?: String

Direction to order results.

max_items?: Int64

Max items to fetch, default: 1000

computed Expand Collapse
result: List[Attributes]

The items returned by the data source

id: String

Token identifier tag.

condition: Attributes
request_ip: Attributes

Client IP restrictions.

in: List[String]

List of IPv4/IPv6 CIDR addresses.

not_in: List[String]

List of IPv4/IPv6 CIDR addresses.

expires_on: Time

The expiration time on or after which the JWT MUST NOT be accepted for processing.

issued_on: Time

The time on which the token was created.

last_used_on: Time

Last time the token was used.

modified_on: Time

Last time the token was modified.

name: String

Token name.

not_before: Time

The time before which the token MUST NOT be accepted for processing.

policies: List[Attributes]

List of access policies assigned to the token.

id: String

Policy identifier.

effect: String

Allow or deny operations against the resources.

permission_groups: List[Attributes]

A set of permission groups that are specified to the policy.

id: String

Identifier of the permission group.

meta: Attributes

Attributes associated to the permission group.

key: String
value: String
name: String

Name of the permission group.

resources: Map[String]

A list of resource names that the policy applies to.

status: String

Status of the token.

cloudflare_api_tokens

data "cloudflare_api_tokens" "example_api_tokens" {
  direction = "desc"
}

UserTokensPermission Groups

data cloudflare_api_token_permission_groups_list

optional Expand Collapse
name?: String

Filter by the name of the permission group. The value must be URL-encoded.

scope?: String

Filter by the scope of the permission group. The value must be URL-encoded.

max_items?: Int64

Max items to fetch, default: 1000

computed Expand Collapse
result: List[Attributes]

The items returned by the data source

id: String

Public ID.

name: String

Permission Group Name

scopes: List[String]

Resources to which the Permission Group is scoped

cloudflare_api_token_permission_groups_list

data "cloudflare_api_token_permission_groups_list" "example_api_token_permission_groups_list" {
  name = "Account%20Settings%20Write"
  scope = "com.cloudflare.api.account.zone"
}