netapp.cloudmanager.na_cloudmanager_connector_gcp – NetApp Cloud Manager connector for GCP.

Note

This plugin is part of the netapp.cloudmanager collection (version 21.11.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.cloudmanager.

To use it in a playbook, specify: netapp.cloudmanager.na_cloudmanager_connector_gcp.

New in version 21.4.0: of netapp.cloudmanager

Synopsis

  • Create or delete Cloud Manager connector for GCP.

Parameters

Parameter Choices/Defaults Comments
account_id
string
The NetApp account ID that the Connector will be associated with.
If not provided, Cloud Manager uses the first account. If no account exists, Cloud Manager creates a new account.
You can find the account ID in the account tab of Cloud Manager at [https://cloudmanager.netapp.com](https://cloudmanager.netapp.com).
associate_public_ip
boolean
    Choices:
  • no
  • yes
Indicates whether to associate a public IP address to the virtual machine.
client_id
string
The client ID of the Cloud Manager Connector.
If state is absent, the client id is used to identify the agent and delete it.
If state is absent and this parameter is not set, all agents associated with name are deleted.
Ignored when state is present.
company
string / required
The name of the company of the user.
environment
string
added in 21.8.0 of netapp.cloudmanager
    Choices:
  • prod
  • stage
The environment for NetApp Cloud Manager API operations.
feature_flags
dictionary
added in 21.11.0 of netapp.cloudmanager
Enable or disable a new feature.
This can be used to enable an experimental feature or disable a new feature that breaks backward compatibility.
Supported keys and values are subject to change without notice. Unknown keys are ignored.
firewall_tags
boolean
    Choices:
  • no
  • yes
Indicates whether to add firewall_tags to the connector VM (HTTP and HTTP).
gcp_service_account_email
string / required
added in 21.7.0 of netapp.cloudmanager
The email of the service_account for the connector instance. This service account is used to allow the Connector to create Cloud Volume ONTAP.

aliases: service_account_email
gcp_service_account_path
string / required
added in 21.7.0 of netapp.cloudmanager
The local path of the service_account JSON file for GCP authorization purposes. This service account is used to create the Connector in GCP.

aliases: service_account_path
machine_type
string
Default:
"n1-standard-4"
The machine_type for the Connector VM.
name
string / required
The name of the Cloud Manager connector for GCP to manage.
network_project_id
string
The project id in GCP associated with the Subnet. If not provided, it is assumed that the Subnet is within the previously specified project id.
project_id
string / required
The GCP project_id where the connector will be created.
proxy_certificates
list / elements=string
The proxy certificates. A list of certificate file names.
proxy_password
string
The proxy password, if using a proxy to connect to the internet.
proxy_url
string
The proxy URL, if using a proxy to connect to the internet.
proxy_user_name
string
The proxy user name, if using a proxy to connect to the internet.
refresh_token
string
The refresh token for NetApp Cloud Manager API operations.
sa_client_id
string
The service account secret client ID for NetApp Cloud Manager API operations.
sa_secret_key
string
The service account secret key for NetApp Cloud Manager API operations.
state
string
    Choices:
  • present
  • absent
Whether the specified Cloud Manager connector for GCP should exist or not.
subnet_id
string
Default:
"default"
The name of the subnet for the virtual machine.
zone
string / required
The GCP zone where the Connector will be created.

Notes

Note

  • The modules prefixed with na_cloudmanager are built to manage CloudManager and CVO deployments in AWS/GCP/Azure clouds.
  • If sa_client_id and sa_secret_key are provided, service account will be used in operations. refresh_token will be ignored.

Examples

- name: Create NetApp Cloud Manager connector for GCP
  netapp.cloudmanager.na_cloudmanager_connector_gcp:
    state: present
    name: ansible-occm-gcp
    project_id: xxxxxxx-support
    zone: us-east4-b
    company: NetApp
    gcp_service_account_email: [email protected]
    gcp_service_account_path: gcp_creds.json
    proxy_user_name: test
    proxy_password: test
    proxy_url: http://abcdefg.com
    proxy_certificates: ["D-TRUST_Root_Class_3_CA_2_2009.crt", "DigiCertGlobalRootCA.crt", "DigiCertGlobalRootG2.crt"]
    account_id: account-xxxxXXXX
    refresh_token: "{{ xxxxxxxxxxxxxxx }}"

- name: Delete NetApp Cloud Manager connector for GCP
  netapp.cloudmanager.na_cloudmanager_connector_gcp:
    state: absent
    name: ansible-occm-gcp
    refresh_token: "{{ xxxxxxxxxxxxxxx }}"
    client_id: "{{ wwwwwwwwww }}"
    project_id: xxxxxxx-support
    zone: us-east4-b
    company: NetApp
    gcp_service_account_email: [email protected]
    gcp_service_account_path: gcp_creds.json
    account_id: account-xxxxXXXX

Return Values

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

Key Returned Description
client_id
string
success
Newly created GCP connector id on cloud manager.

Sample:
FDQE8SwrbjVS6mqUgZoOHQmu2DvBNRRW
client_ids
list / elements=string
success
a list of client ids matching the name and provider if the connector already exists.
ideally the list should be empty, or contain a single element matching client_id.

Sample:
['FDQE8SwrbjVS6mqUgZoOHQmu2DvBNRRW']


Authors

© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/netapp/cloudmanager/na_cloudmanager_connector_gcp_module.html