Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aiven-open/terraform-mgmt-sample
Code sample for managing multiple Aiven services with Terraform
https://github.com/aiven-open/terraform-mgmt-sample
aiven automation grafana influxdb postgresql terraform
Last synced: 6 days ago
JSON representation
Code sample for managing multiple Aiven services with Terraform
- Host: GitHub
- URL: https://github.com/aiven-open/terraform-mgmt-sample
- Owner: Aiven-Open
- License: apache-2.0
- Created: 2021-05-10T12:15:56.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-02-02T14:06:39.000Z (almost 3 years ago)
- Last Synced: 2023-12-13T02:20:40.423Z (11 months ago)
- Topics: aiven, automation, grafana, influxdb, postgresql, terraform
- Language: HCL
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 14
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Managing your Aiven infrastructure with Terraform
This code sample sets up an open source data infrastructure on the Aiven platform using Terraform, consisting of a PostgreSQL® instance sending metrics to InfluxDB®, which can be visualized with Grafana®.Read more about this setup on the [Managing your Aiven infrastructure with Terraform]() article.
For more information, check the [Aiven Terraform Provider](https://aiven.github.io/terraform-provider-aiven/README) official documentation.
## Prerequisites
- [Terraform](https://learn.hashicorp.com/tutorials/terraform/install-cli), at least v0.13
- [Aiven account](https://console.aiven.io/signup)## Running it
Populate the `terraform.tfvars` file with your Aiven access token and project name.To create the infrastructure, run the following commands:
```bash
$ terraform plan
$ terraform apply
```## Connecting to PostgreSQL
To connect to the deployed PostgreSQL instance, run the following command:
```bash
$ psql "$(terraform output -raw postgresql_service_uri)"
```## Visualizing metrics with Grafana
Run the following command to find the Grafana URL, username and password:
```bash
$ terraform output -raw grafana_service_uri
$ terraform output -raw grafana_service_username
$ terraform output -raw grafana_service_password
```Open the Grafana URL in your web browser with the outputted username and password.
## Clean up
To destroy the infrastructure, set the `termination_protection` flag under the PostgreSQL resource to `false` and run the command below:
```
$ terraform destroy
```## Trademarks
Postgres, PostgreSQL and the Slonik Logo are trademarks or registered trademarks of the PostgreSQL Community Association of Canada, and used with their permission.
InfluxDB® is a trademark [registered / owned] by InfluxData, which is not affiliated with, and does not endorse, this product.
Terraform and Grafana are trademarks and property of their respective owners. All product and service names used in this website are for identification purposes only and do not imply endorsement.
## License
This project is licensed under the [Apache License, Version 2.0](https://github.com/aiven/aiven-kafka-connect-s3/blob/master/LICENSE).