Skip to content

Commit 3be752b

Browse files
committed
add resource tencentcloud_ssm_secret and tencentcloud_ssm_secret_version
1 parent 16d18df commit 3be752b

File tree

8 files changed

+1395
-0
lines changed

8 files changed

+1395
-0
lines changed

tencentcloud/connectivity/client.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import (
3333
scf "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/scf/v20180416"
3434
sqlserver "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/sqlserver/v20180328"
3535
sslCertificate "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/ssl/v20191205"
36+
ssm "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/ssm/v20190923"
3637
sts "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/sts/v20180813"
3738
tag "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tag/v20180813"
3839
tcaplusdb "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tcaplusdb/v20190823"
@@ -82,6 +83,7 @@ type TencentCloudClient struct {
8283
vodConn *vod.Client
8384
apiGatewayConn *apigateway.Client
8485
sslCertificateConn *sslCertificate.Client
86+
ssmConn *ssm.Client
8587
}
8688

8789
// NewClientProfile returns a new ClientProfile
@@ -533,3 +535,16 @@ func (me *TencentCloudClient) UseSSLCertificateClient() *sslCertificate.Client {
533535

534536
return me.sslCertificateConn
535537
}
538+
539+
// UseSsmClient returns SSM client for service
540+
func (me *TencentCloudClient) UseSsmClient() *ssm.Client {
541+
if me.ssmConn != nil {
542+
return me.ssmConn
543+
}
544+
545+
cpf := me.NewClientProfile(300)
546+
me.ssmConn, _ = ssm.NewClient(me.Credential, me.Region, cpf)
547+
me.ssmConn.WithHttpTransport(&LogRoundTripper{})
548+
549+
return me.ssmConn
550+
}

tencentcloud/extension_ssm.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package tencentcloud
2+
3+
const (
4+
SSM_PAGE_LIMIT = 200
5+
)
6+
7+
const (
8+
SSM_STATUS_ENABLED = "Enabled"
9+
SSM_STATUS_DISABLED = "Disabled"
10+
SSM_STATUS_PENDINGDELETE = "PendingDelete"
11+
)

tencentcloud/provider.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -763,6 +763,8 @@ func Provider() terraform.ResourceProvider {
763763
"tencentcloud_address_template_groups": dataSourceTencentCloudAddressTemplateGroups(),
764764
"tencentcloud_protocol_templates": dataSourceTencentCloudProtocolTemplates(),
765765
"tencentcloud_protocol_template_groups": dataSourceTencentCloudProtocolTemplateGroups(),
766+
"tencentcloud_ssm_secrets": dataSourceTencentCloudSsmSecrets(),
767+
"tencentcloud_ssm_secret_versions": dataSourceTencentCloudSsmSecretVersions(),
766768
},
767769

768770
ResourcesMap: map[string]*schema.Resource{
@@ -921,6 +923,8 @@ func Provider() terraform.ResourceProvider {
921923
"tencentcloud_address_template_group": resourceTencentCloudAddressTemplateGroup(),
922924
"tencentcloud_protocol_template": resourceTencentCloudProtocolTemplate(),
923925
"tencentcloud_protocol_template_group": resourceTencentCloudProtocolTemplateGroup(),
926+
"tencentcloud_ssm_secret": resourceTencentCloudSsmSecret(),
927+
"tencentcloud_ssm_secret_version": resourceTencentCloudSsmSecretVersion(),
924928
},
925929

926930
ConfigureFunc: providerConfigure,

0 commit comments

Comments
 (0)