Skip to content

Commit 74d9450

Browse files
Rich-yixiaozhu36
authored andcommitted
Add multiple zones
1 parent 08ca9d1 commit 74d9450

File tree

19 files changed

+308
-331
lines changed

19 files changed

+308
-331
lines changed

CHANGELOG.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
## 1.0.0 (Unreleased)
22

33
- **NEW:** `rds-postgres` [GH-1]( https://github.com/terraform-alicloud-modules/terraform-alicloud-rds-postgres/pull/1)
4-
5-
- Add multiple zones [GH-2]( https://github.com/terraform-alicloud-modules/terraform-alicloud-rds-postgres/pull/2)

README-CN.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ module "postgres" {
5454
###########
5555
#databases
5656
###########
57-
privilege = "ReadOnly"
57+
privilege = "DBOwner"
5858
databases = [
5959
{
6060
name = "dbuser1"
@@ -164,6 +164,13 @@ module "postgres" {
164164

165165
* 本 Module 使用的 AccessKey 和 SecretKey 可以直接从 `profile``shared_credentials_file` 中获取。如果未设置,可通过下载安装 [aliyun-cli](https://github.com/aliyun/aliyun-cli#installation) 后进行配置。
166166

167+
168+
提交问题
169+
------
170+
如果在使用该 Terraform Module 的过程中有任何问题,可以直接创建一个 [Provider Issue](https://github.com/terraform-providers/terraform-provider-alicloud/issues/new),我们将根据问题描述提供解决方案。
171+
172+
**注意:** 不建议在该 Module 仓库中直接提交 Issue。
173+
167174
作者
168175
-------
169176
Created and maintained by He Guimin(@xiaozhu36, heguimin36@163.com) and Yi Jincheng(yi785301535@163.com)

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ module "postgres" {
5757
###########
5858
#databases
5959
###########
60-
privilege = "ReadOnly"
60+
privilege = "DBOwner"
6161
databases = [
6262
{
6363
name = "dbuser1"
@@ -168,6 +168,13 @@ module "postgres" {
168168
* This module using AccessKey and SecretKey are from 'profile' and 'shared_credentials_file'.
169169
If you have not set them yet, please install [aliyun-cli](https://github.com/aliyun/aliyun-cli#installation) and configure it.
170170

171+
172+
Submit Issues
173+
-------------
174+
If you have any problems when using this module, please opening a [provider issue](https://github.com/terraform-providers/terraform-provider-alicloud/issues/new) and let us know.
175+
176+
**Note:** There does not recommend to open an issue on this repo.
177+
171178
Authors
172179
-------
173180
Created and maintained by He Guimin(@xiaozhu36, heguimin36@163.com) and Yi Jincheng(yi785301535@163.com)

example/complete/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ module "postgres" {
4242
#################
4343
# Rds Instance
4444
#################
45-
create_instance=true
45+
create_instance = true
4646
engine_version = local.engine_version
4747
instance_type = data.alicloud_db_instance_classes.default.instance_classes.0.instance_class
4848
vswitch_id = alicloud_vswitch.this.id

example/complete/outputs.tf

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,47 +2,47 @@
22
# Alarm Rule
33
#############
44
output "this_alarm_rule_effective_interval" {
5-
description = "The interval of effecting alarm rule. "
5+
description = "The interval of effecting alarm rule."
66
value = module.postgres.this_alarm_rule_effective_interval
77
}
88

99
output "this_alarm_rule_id" {
10-
description = "The ID of the alarm rule. "
10+
description = "The ID of the alarm rule."
1111
value = module.postgres.this_alarm_rule_id
1212
}
1313

1414
output "this_alarm_rule_name" {
15-
description = "The alarm name. "
15+
description = "The alarm name."
1616
value = module.postgres.this_alarm_rule_name
1717
}
1818

1919
output "this_alarm_rule_project" {
20-
description = "Monitor project name. "
20+
description = "Monitor project name."
2121
value = module.postgres.this_alarm_rule_project
2222
}
2323

2424
output "this_alarm_rule_metric" {
25-
description = "Name of the monitoring metrics. "
25+
description = "Name of the monitoring metrics."
2626
value = module.postgres.this_alarm_rule_metric
2727
}
2828

2929
output "this_alarm_rule_dimensions" {
30-
description = "Map of the resources associated with the alarm rule. "
30+
description = "Map of the resources associated with the alarm rule."
3131
value = module.postgres.this_alarm_rule_dimensions
3232
}
3333

3434
output "this_alarm_rule_period" {
35-
description = "Index query cycle. "
35+
description = "Index query cycle."
3636
value = module.postgres.this_alarm_rule_period
3737
}
3838

3939
output "this_alarm_rule_statistics" {
40-
description = "Statistical method. "
40+
description = "Statistical method."
4141
value = module.postgres.this_alarm_rule_statistics
4242
}
4343

4444
output "this_alarm_rule_operator" {
45-
description = "Alarm comparison operator. "
45+
description = "Alarm comparison operator."
4646
value = module.postgres.this_alarm_rule_operator
4747
}
4848

@@ -52,47 +52,47 @@ output "this_alarm_rule_threshold" {
5252
}
5353

5454
output "this_alarm_rule_triggered_count" {
55-
description = "Number of trigger alarm. "
55+
description = "Number of trigger alarm."
5656
value = module.postgres.this_alarm_rule_triggered_count
5757
}
5858

5959
output "this_alarm_rule_contact_groups" {
60-
description = "List contact groups of the alarm rule. "
60+
description = "List contact groups of the alarm rule."
6161
value = module.postgres.this_alarm_rule_contact_groups
6262
}
6363

6464
output "this_alarm_rule_silence_time" {
65-
description = " Notification silence period in the alarm state. "
65+
description = " Notification silence period in the alarm state."
6666
value = module.postgres.this_alarm_rule_silence_time
6767
}
6868

6969
output "this_alarm_rule_notify_type" {
70-
description = "Notification type. "
70+
description = "Notification type."
7171
value = module.postgres.this_alarm_rule_notify_type
7272
}
7373

7474
output "this_alarm_rule_enabled" {
75-
description = "Whether to enable alarm rule. "
75+
description = "Whether to enable alarm rule."
7676
value = module.postgres.this_alarm_rule_enabled
7777
}
7878

7979
output "this_alarm_rule_webhook" {
80-
description = "The webhook that is called when the alarm is triggered. "
80+
description = "The webhook that is called when the alarm is triggered."
8181
value = module.postgres.this_alarm_rule_webhook
8282
}
8383

8484
output "this_alarm_rule_cpu_usage_status" {
85-
description = "The current alarm cpu usage rule status. "
85+
description = "The current alarm cpu usage rule status."
8686
value = module.postgres.this_alarm_rule_cpu_usage_status
8787
}
8888

8989
output "this_alarm_rule_disk_usage_status" {
90-
description = "The current alarm disk usage rule status. "
90+
description = "The current alarm disk usage rule status."
9191
value = module.postgres.this_alarm_rule_disk_usage_status
9292
}
9393

9494
output "this_alarm_rule_connection_usage_status" {
95-
description = "The current alarm memory usage rule status. "
95+
description = "The current alarm memory usage rule status."
9696
value = module.postgres.this_alarm_rule_connection_usage_status
9797
}
9898

@@ -146,17 +146,17 @@ output "this_db_instance_security_ips" {
146146
}
147147

148148
output "this_db_instance_zone_id" {
149-
description = "The zone id in which the Rds instance."
149+
description = "The zone id in which the postgres instance."
150150
value = module.postgres.this_db_instance_zone_id
151151
}
152152

153153
output "this_db_instance_vswitch_id" {
154-
description = "The vswitch id in which the Rds instance."
154+
description = "The vswitch id in which the postgres instance."
155155
value = module.postgres.this_db_instance_vswitch_id
156156
}
157157

158158
output "this_db_instance_security_group_ids" {
159-
description = "The security group ids in which the Rds instance."
159+
description = "The security group ids in which the postgres instance."
160160
value = module.postgres.this_db_instance_security_group_ids
161161
}
162162

@@ -170,17 +170,17 @@ output "this_db_instance_tags" {
170170
##################################
171171

172172
output "this_db_instance_connection_string" {
173-
description = "Postgre SQL instance public connection string"
173+
description = "Postgre SQL instance public connection string."
174174
value = module.postgres.this_db_instance_connection_string
175175
}
176176

177177
output "this_db_instance_port" {
178-
description = "Postgre SQL instance public connection string"
178+
description = "Postgre SQL instance connection port."
179179
value = module.postgres.this_db_instance_port
180180
}
181181

182182
output "this_db_instance_connection_ip_address" {
183-
description = "Postgre SQL instance public connection string's ip address"
183+
description = "Postgre SQL instance public connection string's ip address."
184184
value = module.postgres.this_db_instance_connection_ip_address
185185
}
186186

example/using-existing-rds-instance/outputs.tf

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,47 +2,47 @@
22
# Alarm Rule
33
#############
44
output "this_alarm_rule_effective_interval" {
5-
description = "The interval of effecting alarm rule. "
5+
description = "The interval of effecting alarm rule."
66
value = module.postgres.this_alarm_rule_effective_interval
77
}
88

99
output "this_alarm_rule_id" {
10-
description = "The ID of the alarm rule. "
10+
description = "The ID of the alarm rule."
1111
value = module.postgres.this_alarm_rule_id
1212
}
1313

1414
output "this_alarm_rule_name" {
15-
description = "The alarm name. "
15+
description = "The alarm name."
1616
value = module.postgres.this_alarm_rule_name
1717
}
1818

1919
output "this_alarm_rule_project" {
20-
description = "Monitor project name. "
20+
description = "Monitor project name."
2121
value = module.postgres.this_alarm_rule_project
2222
}
2323

2424
output "this_alarm_rule_metric" {
25-
description = "Name of the monitoring metrics. "
25+
description = "Name of the monitoring metrics."
2626
value = module.postgres.this_alarm_rule_metric
2727
}
2828

2929
output "this_alarm_rule_dimensions" {
30-
description = "Map of the resources associated with the alarm rule. "
30+
description = "Map of the resources associated with the alarm rule."
3131
value = module.postgres.this_alarm_rule_dimensions
3232
}
3333

3434
output "this_alarm_rule_period" {
35-
description = "Index query cycle. "
35+
description = "Index query cycle."
3636
value = module.postgres.this_alarm_rule_period
3737
}
3838

3939
output "this_alarm_rule_statistics" {
40-
description = "Statistical method. "
40+
description = "Statistical method."
4141
value = module.postgres.this_alarm_rule_statistics
4242
}
4343

4444
output "this_alarm_rule_operator" {
45-
description = "Alarm comparison operator. "
45+
description = "Alarm comparison operator."
4646
value = module.postgres.this_alarm_rule_operator
4747
}
4848

@@ -52,47 +52,47 @@ output "this_alarm_rule_threshold" {
5252
}
5353

5454
output "this_alarm_rule_triggered_count" {
55-
description = "Number of trigger alarm. "
55+
description = "Number of trigger alarm."
5656
value = module.postgres.this_alarm_rule_triggered_count
5757
}
5858

5959
output "this_alarm_rule_contact_groups" {
60-
description = "List contact groups of the alarm rule. "
60+
description = "List contact groups of the alarm rule."
6161
value = module.postgres.this_alarm_rule_contact_groups
6262
}
6363

6464
output "this_alarm_rule_silence_time" {
65-
description = " Notification silence period in the alarm state. "
65+
description = " Notification silence period in the alarm state."
6666
value = module.postgres.this_alarm_rule_silence_time
6767
}
6868

6969
output "this_alarm_rule_notify_type" {
70-
description = "Notification type. "
70+
description = "Notification type."
7171
value = module.postgres.this_alarm_rule_notify_type
7272
}
7373

7474
output "this_alarm_rule_enabled" {
75-
description = "Whether to enable alarm rule. "
75+
description = "Whether to enable alarm rule."
7676
value = module.postgres.this_alarm_rule_enabled
7777
}
7878

7979
output "this_alarm_rule_webhook" {
80-
description = "The webhook that is called when the alarm is triggered. "
80+
description = "The webhook that is called when the alarm is triggered."
8181
value = module.postgres.this_alarm_rule_webhook
8282
}
8383

8484
output "this_alarm_rule_cpu_usage_status" {
85-
description = "The current alarm cpu usage rule status. "
85+
description = "The current alarm cpu usage rule status."
8686
value = module.postgres.this_alarm_rule_cpu_usage_status
8787
}
8888

8989
output "this_alarm_rule_disk_usage_status" {
90-
description = "The current alarm disk usage rule status. "
90+
description = "The current alarm disk usage rule status."
9191
value = module.postgres.this_alarm_rule_disk_usage_status
9292
}
9393

9494
output "this_alarm_rule_connection_usage_status" {
95-
description = "The current alarm memory usage rule status. "
95+
description = "The current alarm memory usage rule status."
9696
value = module.postgres.this_alarm_rule_connection_usage_status
9797
}
9898

@@ -146,17 +146,17 @@ output "this_db_instance_security_ips" {
146146
}
147147

148148
output "this_db_instance_zone_id" {
149-
description = "The zone id in which the Rds instance."
149+
description = "The zone id in which the postgres instance."
150150
value = module.postgres.this_db_instance_zone_id
151151
}
152152

153153
output "this_db_instance_vswitch_id" {
154-
description = "The vswitch id in which the Rds instance."
154+
description = "The vswitch id in which the postgres instance."
155155
value = module.postgres.this_db_instance_vswitch_id
156156
}
157157

158158
output "this_db_instance_security_group_ids" {
159-
description = "The security group ids in which the Rds instance."
159+
description = "The security group ids in which the postgres instance."
160160
value = module.postgres.this_db_instance_security_group_ids
161161
}
162162

@@ -170,17 +170,17 @@ output "this_db_instance_tags" {
170170
##################################
171171

172172
output "this_db_instance_connection_string" {
173-
description = "Postgre SQL instance public connection string"
173+
description = "Postgre SQL instance public connection string."
174174
value = module.postgres.this_db_instance_connection_string
175175
}
176176

177177
output "this_db_instance_port" {
178-
description = "Postgre SQL instance public connection string"
178+
description = "Postgre SQL instance connection port."
179179
value = module.postgres.this_db_instance_port
180180
}
181181

182182
output "this_db_instance_connection_ip_address" {
183-
description = "Postgre SQL instance public connection string's ip address"
183+
description = "Postgre SQL instance public connection string's ip address."
184184
value = module.postgres.this_db_instance_connection_ip_address
185185
}
186186

modules/database/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ variable "account_type" {
6868
variable "account_privilege" {
6969
description = "The privilege of one account access database."
7070
type = string
71-
default = "ReadOnly"
71+
default = "DBOwner"
7272
}
7373

7474
variable "db_instance_id" {

0 commit comments

Comments
 (0)