-
Notifications
You must be signed in to change notification settings - Fork 3
/
main.tf
53 lines (45 loc) · 1.24 KB
/
main.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# AWS provider configuration
provider "percona" {
region = "eu-north-1"
profile = "default"
cloud = "aws"
}
# GCP provider configuration
#provider "percona" {
# region = "europe-west1"
# zone = "europe-west1-c"
# project = "project-name"
# cloud = "gcp"
#}
resource "percona_ps" "ps" {
count = 1
instance_type = "t3.micro" # for AWS
#instance_type = "e2-micro" # for GCP
key_pair_name = "sshKey1"
password = "password"
replica_password = "replicaPassword"
cluster_size = 2
path_to_key_pair_storage = "/tmp/"
}
output "ps_resources" {
value = [for resource in percona_ps.ps : {
resource_id = resource.id,
instances = resource.instances,
orchestrator_instances = resource.orchestrator_instances,
}]
}
resource "percona_pxc" "pxc" {
count = 1
instance_type = "t3.micro" # for AWS
#instance_type = "e2-micro" # for GCP
key_pair_name = "sshKey2"
password = "password"
cluster_size = 2
path_to_key_pair_storage = "/tmp/"
}
output "pxc_resources" {
value = [for resource in percona_pxc.pxc : {
resource_id = resource.id,
instances = resource.instances,
}]
}