Skip to content

feat(postgre): [120040436] Add resource tencentcloud_postgresql_clone_db_instance #2888

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/2888.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:new-resource
tencentcloud_postgresql_clone_db_instance
```
22 changes: 18 additions & 4 deletions tencentcloud/connectivity/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,10 +211,11 @@ type TencentCloudClient struct {
controlcenterConn *controlcenter.Client
thpcConn *thpc.Client
//omit nil client
omitNilConn *common.Client
emrv20190103Conn *emr.Client
teov20220901Conn *teo.Client
sslv20191205Conn *sslCertificate.Client
omitNilConn *common.Client
emrv20190103Conn *emr.Client
teov20220901Conn *teo.Client
sslv20191205Conn *sslCertificate.Client
postgresv20170312Conn *postgre.Client
}

// NewClientProfile returns a new ClientProfile
Expand Down Expand Up @@ -1858,3 +1859,16 @@ func (me *TencentCloudClient) UseSslV20191205Client() *sslCertificate.Client {

return me.sslv20191205Conn
}

// UsePostgresV20170312Client return POSTGRES client for service
func (me *TencentCloudClient) UsePostgresV20170312Client() *postgre.Client {
if me.postgresv20170312Conn != nil {
return me.postgresv20170312Conn
}
cpf := me.NewClientProfile(300)
cpf.Language = "zh-CN"
me.postgresv20170312Conn, _ = postgre.NewClient(me.Credential, me.Region, cpf)
me.postgresv20170312Conn.WithHttpTransport(&LogRoundTripper{})

return me.postgresv20170312Conn
}
1 change: 1 addition & 0 deletions tencentcloud/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -1506,6 +1506,7 @@ func Provider() *schema.Provider {
"tencentcloud_postgresql_account": postgresql.ResourceTencentCloudPostgresqlAccount(),
"tencentcloud_postgresql_account_privileges_operation": postgresql.ResourceTencentCloudPostgresqlAccountPrivilegesOperation(),
"tencentcloud_postgresql_apply_parameter_template_operation": postgresql.ResourceTencentCloudPostgresqlApplyParameterTemplateOperation(),
"tencentcloud_postgresql_clone_db_instance": postgresql.ResourceTencentCloudPostgresqlCloneDbInstance(),
"tencentcloud_sqlserver_instance": sqlserver.ResourceTencentCloudSqlserverInstance(),
"tencentcloud_sqlserver_db": sqlserver.ResourceTencentCloudSqlserverDB(),
"tencentcloud_sqlserver_account": sqlserver.ResourceTencentCloudSqlserverAccount(),
Expand Down
1 change: 1 addition & 0 deletions tencentcloud/provider.md
Original file line number Diff line number Diff line change
Expand Up @@ -901,6 +901,7 @@ TencentDB for PostgreSQL(PostgreSQL)
tencentcloud_postgresql_instance_ha_config
tencentcloud_postgresql_account
tencentcloud_postgresql_apply_parameter_template_operation
tencentcloud_postgresql_clone_db_instance

TencentDB for Redis(crs)
Data Source
Expand Down
Loading
Loading