You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description: "Disk size (in GB). Allowed value is range from 10 to 1000, and the value must be a multiple of 10.",
88
+
Description: "Disk size (in GB). Allowed value must be a multiple of 10. The storage must be set with the limit of `storage_min` and `storage_max` which data source `tencentcloud_postgresql_specinfos` provides.",
89
89
},
90
90
"memory": {
91
91
Type: schema.TypeInt,
92
-
Optional: true,
93
-
Computed: true,
94
-
Description: "Memory size (in MB).",
92
+
Required: true,
93
+
Description: "Memory size (in GB). Allowed value must be larger than `memory` that data source `tencentcloud_postgresql_specinfos` provides.",
Description: "The id of specification of the postgresql instance, like `cdb.pg.z1.2g`, which can be queried with data source `tencentcloud_postgresql_specinfos`.",
114
-
},
115
108
"root_password": {
116
109
Type: schema.TypeString,
117
110
Required: true,
@@ -175,28 +168,41 @@ func resourceTencentCloudPostgresqlInstanceCreate(d *schema.ResourceData, meta i
175
168
name=d.Get("name").(string)
176
169
dbVersion=d.Get("engine_version").(string)
177
170
payType=d.Get("charge_type").(string)
178
-
specCode=d.Get("spec_code").(string)
179
171
projectId=d.Get("project_id").(int)
180
172
subnetId=d.Get("subnet_id").(string)
181
173
vpcId=d.Get("vpc_id").(string)
182
174
zone=d.Get("availability_zone").(string)
183
175
storage=d.Get("storage").(int)
176
+
memory=d.Get("memory").(int)
184
177
)
185
178
186
179
varperiod=1
187
180
//the sdk asks to set value with 1 when paytype is postpaid
Copy file name to clipboardExpand all lines: website/docs/r/postgresql_instance.html.markdown
+2-3Lines changed: 2 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,15 +18,14 @@ Use this resource to create postgresql instance
18
18
19
19
The following arguments are supported:
20
20
21
+
*`memory` - (Required) Memory size (in GB). Allowed value must be larger than `memory` that data source `tencentcloud_postgresql_specinfos` provides.
21
22
*`name` - (Required) Name of the postgresql instance.
22
23
*`root_password` - (Required) Password of root account. This parameter can be specified when you purchase master instances, but it should be ignored when you purchase read-only instances or disaster recovery instances.
23
-
*`spec_code` - (Required, ForceNew) The id of specification of the postgresql instance, like `cdb.pg.z1.2g`, which can be queried with data source `tencentcloud_postgresql_specinfos`.
24
-
*`storage` - (Required) Disk size (in GB). Allowed value is range from 10 to 1000, and the value must be a multiple of 10.
24
+
*`storage` - (Required) Disk size (in GB). Allowed value must be a multiple of 10. The storage must be set with the limit of `storage_min` and `storage_max` which data source `tencentcloud_postgresql_specinfos` provides.
0 commit comments