grafana.grafana.cloud_stack module – Manage Grafana Cloud stack
Note
This module is part of the grafana.grafana collection (version 5.7.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 grafana.grafana
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: grafana.grafana.cloud_stack
.
New in grafana.grafana 0.0.1
Synopsis
Create and delete Grafana Cloud stacks using Ansible.
Requirements
The below requirements are needed on the host that executes this module.
requests >= 1.0.0
Parameters
Parameter |
Comments |
---|---|
Cloud API Key to authenticate with Grafana Cloud. |
|
Sets the name of stack. Conventionally matches the URL of the instance. For example, |
|
Name of the organization under which Cloud stack is created. |
|
Sets the region for the Grafana Cloud stack. Choices:
|
|
Sets the subdomain of the Grafana instance. For example, if slug is stackslug, the instance URL will be |
|
State for the Grafana Cloud stack. Choices:
|
|
If you use a custom domain for the instance, you can provide it here. If not provided, Will be set to |
Notes
Note
Does not support
check_mode
.
Examples
- name: Create a Grafana Cloud stack
grafana.grafana.cloud_stack:
name: stack_name
stack_slug: stack_name
cloud_api_key: "{{ grafana_cloud_api_key }}"
region: eu
url: https://grafana.company_name.com
org_slug: org_name
state: present
- name: Delete a Grafana Cloud stack
grafana.grafana.cloud_stack:
name: stack_name
slug: stack_name
cloud_api_key: "{{ grafana_cloud_api_key }}"
org_slug: org_name
state: absent
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Name of the alertmanager instance. Returned: always Sample: |
|
URL of the alertmanager instance. Returned: always Sample: |
|
Slug for the cluster where the Grafana stack is deployed. Returned: always Sample: |
|
ID of the Grafana Cloud stack. Returned: always Sample: |
|
URl for the Loki instance. Returned: always Sample: |
|
ID of the Grafana Cloud organization. Returned: always Sample: |
|
URl for the Prometheus instance. Returned: always Sample: |
|
URl for the Tempo instance. Returned: always Sample: |
|
URL of the Grafana Cloud stack. Returned: always Sample: |