netapp.storagegrid.na_sg_grid_tenant module – NetApp StorageGRID manage tenant accounts.

Note

This module is part of the netapp.storagegrid collection (version 21.15.0).

You might already have this collection installed if you are using the ansible package. 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 netapp.storagegrid.

To use it in a playbook, specify: netapp.storagegrid.na_sg_grid_tenant.

New in netapp.storagegrid 21.15.0

Synopsis

  • Create, Update, Delete Tenant Accounts on NetApp StorageGRID.

Parameters

Parameter

Comments

account_id

string

Account Id of the tenant.

May be used for modify or delete operation.

allow_compliance_mode

boolean

Whether a tenant can use compliance mode for object lock and retention.

Requires storageGRID 11.9 or later.

Choices:

  • false

  • true

allow_platform_services

boolean

Allows tenant to use platform services features such as CloudMirror.

Choices:

  • false

  • true

allow_select_object_content

boolean

Allows tenant to use the S3 SelectObjectContent API to filter and retrieve object data.

Choices:

  • false

  • true

api_url

string / required

The url to the StorageGRID Admin Node REST API.

auth_token

string / required

The authorization token for the API request

description

string

Additional identifying information for the tenant account.

management

boolean

Whether the tenant can login to the StorageGRID tenant portal.

Choices:

  • false

  • true ← (default)

max_retention_days

integer

The maximum retention period in days allowed for new objects in compliance or governance mode.

Requires storageGRID 11.9 or later.

name

string

Name of the tenant.

Required for create or modify operation.

protocol

string

Object Storage protocol used by the tenancy.

Required for create operation.

Choices:

  • "s3"

  • "swift"

quota_size

integer

Quota to apply to the tenant specified in quota_size_unit.

If you intend to have no limits, assign 0.

Default: 0

quota_size_unit

string

The unit used to interpret the size parameter.

Choices:

  • "bytes"

  • "b"

  • "kb"

  • "mb"

  • "gb" ← (default)

  • "tb"

  • "pb"

  • "eb"

  • "zb"

  • "yb"

root_access_group

string

Existing federated group to have initial Root Access permissions for the tenant.

Must begin with federated-group/

state

string

Whether the specified account should exist or not.

Required for all operations.

Choices:

  • "present" ← (default)

  • "absent"

tenant_password

string

Root password for tenant account.

Requires root privilege.

update_password

string

Choose when to update the tenant password.

When set to always, the tenant password will always be updated.

When set to on_create the tenant password will only be set upon a new user creation.

Choices:

  • "on_create" ← (default)

  • "always"

use_own_identity_source

boolean

Whether the tenant account should configure its own identity source.

Choices:

  • false

  • true

validate_certs

boolean

Should https certificates be validated?

Choices:

  • false

  • true ← (default)

Notes

Note

  • The modules prefixed with na_sg are built to manage NetApp StorageGRID.

Examples

- name: create a tenant account
  netapp.storagegrid.na_sg_grid_tenant:
    api_url: "https://<storagegrid-endpoint-url>"
    auth_token: "storagegrid-auth-token"
    validate_certs: false
    state: present
    name: storagegrid-tenant-1
    protocol: s3
    management: true
    allow_compliance_mode: true
    max_retention_days: 365
    use_own_identity_source: false
    allow_platform_services: false
    tenant_password: "tenant-password"
    quota_size: 0

- name: update a tenant account
  netapp.storagegrid.na_sg_grid_tenant:
    api_url: "https://<storagegrid-endpoint-url>"
    auth_token: "storagegrid-auth-token"
    validate_certs: false
    state: present
    name: storagegrid-tenant-1
    protocol: s3
    management: true
    allow_compliance_mode: true
    max_retention_days: 500
    use_own_identity_source: false
    allow_platform_services: true
    tenant_password: "tenant-password"
    quota_size: 10240

- name: delete a tenant account
  netapp.storagegrid.na_sg_grid_tenant:
    api_url: "https://<storagegrid-endpoint-url>"
    auth_token: "storagegrid-auth-token"
    validate_certs: false
    state: absent
    name: storagegrid-tenant-1
    protocol: s3

Return Values

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

Key

Description

resp

dictionary

Returns information about the StorageGRID tenant account.

Returned: success

Sample: {"capabilities": ["management", "s3"], "id": "12345678901234567890", "name": "Example Account", "policy": {"allowPlatformServices": false, "quotaObjectBytes": 100000000000, "useAccountIdentitySource": true}}

Authors

  • NetApp Ansible Team (@joshedmonds)