Skip to content

Commit e84a42d

Browse files
committed
scf add public-net-config to data_source
1 parent 549ad71 commit e84a42d

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

tencentcloud/data_source_tc_scf_functions.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,10 @@ func dataSourceTencentCloudScfFunctionsRead(d *schema.ResourceData, m interface{
349349
m["host"] = resp.AccessInfo.Host
350350
m["vip"] = resp.AccessInfo.Vip
351351
m["l5_enable"] = *resp.L5Enable == "TRUE"
352+
if resp.PublicNetConfig != nil {
353+
m["enable_public_net"] = *resp.PublicNetConfig.PublicNetStatus == "ENABLE"
354+
m["enable_eip_config"] = *resp.PublicNetConfig.EipConfig.EipStatus == "ENABLE"
355+
}
352356

353357
triggers := make([]map[string]interface{}, 0, len(resp.Triggers))
354358
for _, trigger := range resp.Triggers {

tencentcloud/resource_tc_scf_function.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,6 @@ func resourceTencentCloudScfFunction() *schema.Resource {
201201
Type: schema.TypeBool,
202202
Optional: true,
203203
Default: false,
204-
AtLeastOneOf: []string{"enable_public_net"},
205204
Description: "Indicates whether EIP config set to `ENABLE` when `enable_public_net` was true.",
206205
},
207206
// cos code

0 commit comments

Comments
 (0)