forked from aiven/terraform-provider-aiven
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sample.tf
35 lines (30 loc) · 880 Bytes
/
sample.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
variable "aiven_email" {}
variable "aiven_password" {}
variable "aiven_card_id" {}
provider "aiven" {
email = "${var.aiven_email}"
password = "${var.aiven_password}"
}
resource "aiven_project" "sample" {
project = "sample"
card_id = "${var.aiven_card_id}"
cloud = "google-europe-west1"
}
resource "aiven_service" "postgresql" {
project = "${aiven_project.sample.project}"
group_name = "test"
cloud = "google-europe-west1"
plan = "hobbyist"
service_name = "test-postgresql"
service_type = "pg"
}
resource "aiven_database" "postgresql" {
project = "${aiven_service.postgresql.project}"
service_name = "${aiven_service.postgresql.service_name}"
database = "coda"
}
resource "aiven_service_user" "postgresql" {
project = "${aiven_service.postgresql.project}"
service_name = "${aiven_database.postgresql.service_name}"
username = "codabox"
}