Skip to content
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

feat: support pts ssm tat tem vod #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
8 changes: 7 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,8 @@ require (
github.com/mailru/easyjson v0.7.6 // indirect
github.com/manicminer/hamilton-autorest v0.2.0 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/ssm v1.0.617 // indirect
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tat v1.0.617 // indirect
k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42 // indirect
sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 // indirect
)
Expand All @@ -383,15 +385,19 @@ require (
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cdn v1.0.392
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cfs v1.0.392
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/clb v1.0.392
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.392
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.617
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm v1.0.392
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/es v1.0.392
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/gaap v1.0.392
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/mongodb v1.0.392
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/pts v1.0.604 // indirect
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/redis v1.0.392
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/scf v1.0.392
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/ssl v1.0.392
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tcaplusdb v1.0.392
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tcm v1.0.611 // indirect
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tem v1.0.604 // indirect
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vod v1.0.606 // indirect
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc v1.0.392
)

Expand Down
21 changes: 21 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1314,6 +1314,7 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO
github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
github.com/svanharmelen/jsonapi v0.0.0-20180618144545-0c0828c3f16d/go.mod h1:BSTlc8jOjh0niykqEGVXOLXdi9o0r0kR8tCYiMvjFgw=
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
github.com/tencentcloud/tencentcloud-sdk-go v1.0.392 h1:e5LzXdTogMU1aMaDjVSp1NYSZ594ZknqB3cw/0F9aZY=
github.com/tencentcloud/tencentcloud-sdk-go v1.0.392/go.mod h1:l8PU0g9KTDkwn6R4F9WbXXSUwRgKs6k7rj52H4uAcM0=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/aa v1.0.392/go.mod h1:DTrc+dJQjeL+2b7KEkfW1RiZqssiHxIMjRWhnt6PmU4=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/aai v1.0.392/go.mod h1:6jmvX/9tx9LoT7lireq2bULrcmgenqF9l4UQdzo143w=
Expand Down Expand Up @@ -1377,6 +1378,14 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cms v1.0.392/go.mod h1:
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.194/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.392 h1:UqcmPErxEm77NwqaRq6J1i2rcbhXcZHzq7WOuc9clAQ=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.392/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.604 h1:BiuYcs8fINjZT9omCf8tV+rZkrZdf+Hq4TMWUNqYNgY=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.604/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.606 h1:3Y3xlzSikB9BfKIfrTXQpwzeW97cxetqyq1kuMaMc08=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.606/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.611 h1:lAsu5kMPUpBhIo9/7VgFUH/pMgXNCwCsntTmwu1HSKY=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.611/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.617 h1:/4x3HGz3UK/ESYJj5xzPgGu7Nn9UIhAkvDe7s8/ZECY=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.617/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cpdp v1.0.392/go.mod h1:McFISRmzeVkPd8qZQjQw870DARtJHjJZoHHYMkhYcZA=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cr v1.0.392/go.mod h1:GZTyhAIbF0jhh76vReDXBXqd2+xfI4Fl8bM1mlq6Elg=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm v1.0.392 h1:nWW99NdwjHzoFiYzk+6QvVjituRpDSgGP33TX4XX+Jk=
Expand Down Expand Up @@ -1460,6 +1469,8 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/partners v1.0.392/go.mo
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/pds v1.0.392/go.mod h1:jVbtUhMGZwdYC5qPhhWlG5wLI/kqHns1aoJ/opH1gBI=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/postgres v1.0.392/go.mod h1:7/xJYJ+/2X1q40woYOEvhaDx1wcHwQ2ZTYPncFnMFeM=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/privatedns v1.0.392/go.mod h1:L6ywKmxdqNziWG5piJdyN83gRS+KMOR2nsqoS5khtNI=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/pts v1.0.604 h1:4r5qY7XYnZQc6WJhES+DYI3xIm3hy6/e24wHOqwjmKY=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/pts v1.0.604/go.mod h1:EFvGO7HiyBG9IrbeVBOixX5WUQQ1RPAirGRWrl1eiIA=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/rce v1.0.392/go.mod h1:Q+Lj6ujWGd0VijJRdmnisHn0/K5MHlDwETZ5UNoDXRU=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/redis v1.0.392 h1:TWsBoGmj5VuGyHwCksgKxKrZIwVVwn5bTuDfRbWD/yY=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/redis v1.0.392/go.mod h1:kR0eQOu2//soHJHK8aDmIoU1f4jxamcVtzhuvpPqe3Y=
Expand All @@ -1480,10 +1491,14 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/ssl v1.0.392 h1:O9BhkAY
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/ssl v1.0.392/go.mod h1:i7xMr7hiOKobK28YqZxkcPmPAThjxInKOQftIQ1J7nc=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/sslpod v1.0.392/go.mod h1:h/84RSkOo7dgbGOAwYSV2WdWkUv2OQoVRjNfrJS6jUM=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/ssm v1.0.392/go.mod h1:NN8F2vmQ4hnA/iCq+/4ekfocQdbIlWvT4rNCjx+DmcI=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/ssm v1.0.617 h1:DoBtnZDFdt08o9it3r2aUxDr/G4y6mC56eUy9LrFmSU=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/ssm v1.0.617/go.mod h1:GQkgEwro7Qt/SDgrAqKi9EecbPoZyK4sgB/WdusRg70=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/sts v1.0.392/go.mod h1:kWzzUFykmDWPoh3t6mO3Cm0pNJr3P0DHpmfITVVsA+g=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/taf v1.0.392/go.mod h1:p/huA59BWTe2ICfslUzb9CmVkKS3d0kHzaPU1upcUj4=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tag v1.0.392/go.mod h1:4lW1UzRtbnhOqKDTTkn6Ur9eBtJyzcgpg4KnLxsp/RM=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tat v1.0.392/go.mod h1:khrPL4zu0yZ6nCvxmprL/exY5dX+aYLoq0Wf5ZA6zoQ=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tat v1.0.617 h1:BrucbQpntqo3dEZhYZv7ws72nKpAqZL2mQ9NPzCNxCE=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tat v1.0.617/go.mod h1:wKeLcYaZD7mtEG4muLepDHDMtkIAxZDpibfv89E0aXg=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tav v1.0.392/go.mod h1:mVONhjO15kJGkTN092oi4C9I92RdC9wE4mlc9q6kmt0=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tbaas v1.0.392/go.mod h1:xf2aD/TKZhvw3FHqQw/p6Ye+KpknwV1ieBA75F1mt6w=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tbm v1.0.392/go.mod h1:wf8iEdOIPGM6csi0lGfqnB1j/SX8jr5liwUZwwt6oUc=
Expand All @@ -1494,12 +1509,16 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tcb v1.0.392/go.mod h1:
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tcex v1.0.392/go.mod h1:LbBLo9ZxesFf7FgpGaDaOMUr3NbNhjrIzF6jG3mwq6k=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tci v1.0.392/go.mod h1:7JzdYwICHrF8Cz2MWyPw/yo5j9/n2BtqE909Z25VVdc=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tcm v1.0.392/go.mod h1:VRJDKhxen3gaxn4EisibPAyjewSY3vFaYSsLXoh4bZ0=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tcm v1.0.611 h1:XHqQKRcbCKfA+qzp06HTrQVTNzC114OISMa8ah6E7sk=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tcm v1.0.611/go.mod h1:EJ4/uJpXb7htIzdskmwouHG9e/Famp97bQFeI7ARK0w=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tcr v1.0.392/go.mod h1:3AZguzwaPAwRyLTUQm3h1ROEnnwkgMg49a/myZhBl40=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tcss v1.0.392/go.mod h1:ibYN8So3r1ScxmJtGxV8wTs0nGxKvih+IOq6GLNtWzU=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tdcpg v1.0.392/go.mod h1:m21mWip509ME/nUwrA+n9rBLpBb8Bjuo/HkHuEojkZo=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tdid v1.0.392/go.mod h1:Do7u7dYFlitjrrXXMcnLivCGKVXI+mIENqFmqT4V/fs=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tdmq v1.0.392/go.mod h1:LfFhQr0uPl2GrjE0r7XghDu0PUWCoGBilP9NooPmpog=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tem v1.0.392/go.mod h1:afUYlMwHkDmUle3ZGxz32+Q/cwyjFgMgaF62Q+qg6DU=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tem v1.0.604 h1:NBTNRBrxgogT+B15SQUMErJfKNQ7ZE6sXdJe4GXSpXw=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tem v1.0.604/go.mod h1:rbcqXAUjppNop1I1v6R/Bc5RnVtDKoErDm2S9/Jgm6g=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/teo v1.0.392/go.mod h1:kHQx6ynDcmtj3hjL8HFn8f0VCa88y8j3CouKZAHrEiU=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/thpc v1.0.392/go.mod h1:ujCoikwjBD2UmfZspopyqjmEXfpcEma5b3vGxuWYCoU=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tia v1.0.392/go.mod h1:t3hDg8esQAI5He9+HHsaBMwPlUtXHLKL1oDZEmNL86g=
Expand All @@ -1523,6 +1542,8 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/ump v1.0.392/go.mod h1:
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vm v1.0.392/go.mod h1:OhyaYhAbA0D8t4KeW9c0apOwDw1Hqzol0eY4Ez81IOI=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vms v1.0.392/go.mod h1:PowsbqMUl5Rvy5LcO5aN8QTdI+9xAHxzDEpjMJ0tZ64=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vod v1.0.392/go.mod h1:sSLZPQ/C1k3HDBkNUpDxs5vWua7D7QRlBqYzWG+1FEA=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vod v1.0.606 h1:/J2aNBxn5DLz7z01fa0KtDjX5lAy2X+ktu9UWVNrAe8=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vod v1.0.606/go.mod h1:9AMknIcaJ57qHtxu1P6yr9DNvjYJIF9KkSMor/iFejg=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc v1.0.392 h1:nx8MQ8yJ3srpfEAlKLQKtOsBCBc30QJ3Q0RsSOGSphQ=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc v1.0.392/go.mod h1:IAl660UAxdUtp1rHUwbUwxFCVqwk61xAIRbBk6QtTy8=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/waf v1.0.392/go.mod h1:BQ6k/+94Dyt6lL3c1hCmZ5ZL4mQfA99rc5KYlIbXlRc=
Expand Down
91 changes: 91 additions & 0 deletions providers/tencentcloud/pts.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
// Copyright 2022 The Terraformer Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package tencentcloud

import (
"github.com/GoogleCloudPlatform/terraformer/terraformutils"
"github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common"
pts "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/pts/v20210728"
)

type PtsGenerator struct {
TencentCloudService
}

func (g *PtsGenerator) InitResources() error {
args := g.GetArgs()
region := args["region"].(string)
credential := args["credential"].(common.Credential)
profile := NewTencentCloudClientProfile()
client, err := pts.NewClient(&credential, region, profile)
client.WithHttpTransport(&LogRoundTripper{
Verbose: g.Verbose,
})
if err != nil {
return err
}

if err := g.DescribeProjects(client); err != nil {
return err
}

return nil
}
func (g *PtsGenerator) DescribeProjects(client *pts.Client) error {
request := pts.NewDescribeProjectsRequest()
filters := make([]string, 0)
for _, filter := range g.Filter {
if filter.FieldPath == "id" && filter.IsApplicable("tencentcloud_pts_project") {
filters = append(filters, filter.AcceptableValues...)
}
}

for i := range filters {
request.ProjectIds = append(request.ProjectIds, &filters[i])
}

var offset int64 = 0
var limit int64 = 50
allInstances := make([]*pts.Project, 0)
for {
request.Offset = &offset
request.Limit = &limit
response, err := client.DescribeProjects(request)
if err != nil {
return err
}
allInstances = append(allInstances, response.Response.ProjectSet...)
if len(response.Response.ProjectSet) < int(limit) {
break
}

offset += limit
}

for _, instance := range allInstances {
resource := terraformutils.NewResource(
*instance.ProjectId,
*instance.ProjectId+"_"+*instance.ProjectId,
"tencentcloud_pts_project",
"tencentcloud",
map[string]string{},
[]string{},
map[string]interface{}{},
)
g.Resources = append(g.Resources, resource)
}

return nil
}
127 changes: 127 additions & 0 deletions providers/tencentcloud/ssm.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
// Copyright 2022 The Terraformer Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package tencentcloud

import (
"github.com/GoogleCloudPlatform/terraformer/terraformutils"
"github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common"
ssm "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/ssm/v20190923"
)

type SsmGenerator struct {
TencentCloudService
}

func (g *SsmGenerator) InitResources() error {
args := g.GetArgs()
region := args["region"].(string)
credential := args["credential"].(common.Credential)
profile := NewTencentCloudClientProfile()
client, err := ssm.NewClient(&credential, region, profile)
if err != nil {
return err
}

if err := g.ListSecrets(client); err != nil {
return err
}

return nil
}
func (g *SsmGenerator) ListSecrets(client *ssm.Client) error {
request := ssm.NewListSecretsRequest()

var offset uint64 = 0
var limit uint64 = 50
allInstances := make([]*ssm.SecretMetadata, 0)
for {
request.Offset = &offset
request.Limit = &limit
response, err := client.ListSecrets(request)
if err != nil {
return err
}
allInstances = append(allInstances, response.Response.SecretMetadatas...)
if len(response.Response.SecretMetadatas) < int(limit) {
break
}

offset += limit
}

for _, instance := range allInstances {
resource := terraformutils.NewResource(
*instance.SecretName,
*instance.SecretName+"_"+*instance.SecretName,
"tencentcloud_ssm_secret",
"tencentcloud",
map[string]string{},
[]string{},
map[string]interface{}{},
)
g.Resources = append(g.Resources, resource)
if err := g.ListSecretVersionIds(client, *instance.SecretName, resource.ResourceName); err != nil {
return err
}
}

return nil
}

//func (g *SsmGenerator) ListSecretVersionIds(allInstances []*ssm.SecretMetadata, resourceName string) error {
// for _, instance := range allInstances {
// resource := terraformutils.NewResource(
// *instance.SecretName+"#"+"_",
// *instance.SecretName,
// "tencentcloud_ssm_secret_version",
// "tencentcloud",
// map[string]string{},
// []string{},
// map[string]interface{}{},
// )
// resource.AdditionalFields["secret_name"] = "${tencentcloud_ssm_secret." + resourceName + ".id}"
// g.Resources = append(g.Resources, resource)
// }
//
// return nil
//}

func (g *SsmGenerator) ListSecretVersionIds(client *ssm.Client, secretName, resourceName string) error {
request := ssm.NewListSecretVersionIdsRequest()

request.SecretName = &secretName
var allInstances []*ssm.VersionInfo
response, err := client.ListSecretVersionIds(request)
if err != nil {
return err
}

allInstances = response.Response.Versions
for _, instance := range allInstances {
resource := terraformutils.NewResource(
secretName+"#"+*instance.VersionId,
secretName+"_"+*instance.VersionId,
"tencentcloud_ssm_secret_version",
"tencentcloud",
map[string]string{},
[]string{},
map[string]interface{}{},
)
resource.AdditionalFields["secret_name"] = "${tencentcloud_ssm_secret." + resourceName + ".id}"
g.Resources = append(g.Resources, resource)
}

return nil
}
Loading