File tree 2 files changed +11
-10
lines changed
infra/terraform/EKS/modules/postgresql
tests/registry/ha+tls+external-db_redis
2 files changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -56,23 +56,24 @@ resource "aws_rds_cluster" "aurora" {
56
56
}
57
57
58
58
resource "aws_rds_cluster_instance" "postgresql" {
59
- cluster_identifier = aws_rds_cluster. aurora . id
60
- engine = aws_rds_cluster. aurora . engine
61
- engine_version = aws_rds_cluster. aurora . engine_version
62
- instance_class = " db.t3.medium"
63
- # vpc_security_group_ids = [aws_security_group.allow_psql.id]
59
+ cluster_identifier = aws_rds_cluster. aurora . id
60
+ engine = aws_rds_cluster. aurora . engine
61
+ engine_version = aws_rds_cluster. aurora . engine_version
62
+ instance_class = " db.t3.medium"
64
63
65
- publicly_accessible = true
64
+ publicly_accessible = true
65
+ depends_on = [aws_rds_cluster . aurora ]
66
66
}
67
67
68
68
resource "null_resource" "create_databases" {
69
69
for_each = toset (var. databases )
70
70
71
71
provisioner "local-exec" {
72
- command = " createdb -h ${ aws_rds_cluster . aurora . endpoint } -U ${ var . administrator_login } ${ each . value } "
72
+ command = " until getent hosts ${ aws_rds_cluster . aurora . endpoint } ; do sleep 5; done; createdb -h ${ aws_rds_cluster . aurora . endpoint } -U ${ var . administrator_login } ${ each . value } "
73
73
74
74
environment = {
75
75
PGPASSWORD = random_password.db_password.result
76
76
}
77
77
}
78
+ depends_on = [aws_rds_cluster_instance . postgresql ]
78
79
}
Original file line number Diff line number Diff line change 1
- k8s_enabled = true
2
- db_enabled = true
1
+ k8s_enabled = true
2
+ db_enabled = true
3
3
object_storage_enabled = true
4
- redis_enabled = true
4
+ redis_enabled = true
You can’t perform that action at this time.
0 commit comments