damex.cloudflare.cloudflare_r2_bucket_info module – Ensure Cloudflare R2 bucket information is gathered

Note

This module is part of the damex.cloudflare collection (version 1.2.3).

It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install damex.cloudflare.

To use it in a playbook, specify: damex.cloudflare.cloudflare_r2_bucket_info.

Synopsis

  • Gathers information about Cloudflare R2 buckets.

  • Returns information about all buckets or a specific bucket.

Parameters

Parameter

Comments

account_api_key

string

Cloudflare account API key.

Required together with account_email if api_token is not provided.

account_email

string

Cloudflare account email.

Required together with account_api_key if api_token is not provided.

account_id

string

Cloudflare account identifier.

Required if account_name is not provided.

account_name

string

Cloudflare account name.

Required if account_id is not provided.

Resolved to account identifier via the Cloudflare API.

api_token

string

Cloudflare API token.

Required if account_email and account_api_key are not provided.

Can be specified in CLOUDFLARE_TOKEN environment variable.

name

string

Bucket name to query.

If not specified, all buckets are returned.

Attributes

Attribute

Support

Description

check_mode

Support: full

Supports check mode.

diff_mode

Support: none

Does not support diff mode.

Examples

- name: Ensure R2 bucket information is gathered
  damex.cloudflare.cloudflare_r2_bucket_info:
    account_name: damex
    api_token: "{{ cloudflare_api_token }}"
  register: cloudflare_r2_bucket_information

- name: Ensure specific R2 bucket information is gathered
  damex.cloudflare.cloudflare_r2_bucket_info:
    name: my-bucket
    account_name: damex
    api_token: "{{ cloudflare_api_token }}"
  register: cloudflare_r2_bucket_information

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

buckets

list / elements=dictionary

R2 bucket information.

Returned: always

creation_date

string

Bucket creation timestamp.

Returned: always

location

string

Bucket location.

Returned: always

name

string

Bucket name.

Returned: always

storage_class

string

Default storage class.

Returned: always

Authors

  • Roman Kuzmitskii (@damex)