grafana.grafana.cloud_stack module – Manage Grafana Cloud stack
Note
This module is part of the grafana.grafana collection (version 0.0.6).
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
.
To use it in a playbook, specify: grafana.grafana.cloud_stack
.
New in version 0.0.1: of grafana.grafana
Synopsis
Create and delete Grafana Cloud stacks using Ansible.
Parameters
Parameter |
Comments |
---|---|
CLoud API Key to authenticate with Grafana Cloud. |
|
Name of stack. Conventionally matches the URL of the instance. For example, “<stack_slug>.grafana.net”. |
|
Name of the organization under which Cloud stack is created. |
|
Choose a region for your stack. Choices:
|
|
Subdomain of the Grafana instance. For example, if slug is <stack_slug>, the instance URL will be https://<stack_slug>.grafana.net |
|
State for the Grafana CLoud stack. Choices:
|
|
If you use a custom domain for the instance, you can provide it here. For example, “https://grafana.yourdoman.io”. Default: “https://<stack_slug>.grafana.net” |
Examples
- name: Create a Grafana Cloud stack
cloud_stack:
name: company_name
slug: company_name
cloud_api_key: "{{ grafana_cloud_api_key }}"
region: eu
url: https://grafana.company_name.com
state: present
- name: Delete a Grafana Cloud stack
cloud_stack:
name: company_name
slug: company_name
cloud_api_key: "{{ grafana_cloud_api_key }}"
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 |
|
URL of the alertmanager instance Returned: always |
|
Slug for the cluster where the Grafana stack is deployed Returned: always |
|
ID of the Grafana Cloud stack Returned: always |
|
URl for the Loki instance Returned: always |
|
ID of the Grafana Cloud organization Returned: always |
|
URl for the Prometheus instance Returned: always |
|
URl for the Tempo instance Returned: always |
|
URL of the Grafana Cloud stack Returned: always |