This repository has been archived by the owner on Aug 15, 2022. It is now read-only.
generated from pulumi/pulumi-tf-provider-boilerplate
/
config.go
65 lines (56 loc) · 2.35 KB
/
config.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package config
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
// The `assume_role` block. If provided, terraform will attempt to assume this role using the supplied credentials.
func GetAssumeRole(ctx *pulumi.Context) string {
return config.Get(ctx, "tctest:assumeRole")
}
// The root domain of the API request, Default is `tencentcloudapi.com`.
func GetDomain(ctx *pulumi.Context) string {
return config.Get(ctx, "tctest:domain")
}
// The protocol of the API request. Valid values: `HTTP` and `HTTPS`. Default is `HTTPS`.
func GetProtocol(ctx *pulumi.Context) string {
return config.Get(ctx, "tctest:protocol")
}
// This is the TencentCloud region. It must be provided, but it can also be sourced from the `TENCENTCLOUD_REGION`
// environment variables. The default input value is ap-guangzhou.
func GetRegion(ctx *pulumi.Context) string {
v, err := config.Try(ctx, "tctest:region")
if err == nil {
return v
}
return getEnvOrDefault("", nil, "TENCENTCLOUD_REGION").(string)
}
// This is the TencentCloud access key. It must be provided, but it can also be sourced from the `TENCENTCLOUD_SECRET_ID`
// environment variable.
func GetSecretId(ctx *pulumi.Context) string {
v, err := config.Try(ctx, "tctest:secretId")
if err == nil {
return v
}
return getEnvOrDefault("", nil, "TENCENTCLOUD_SECRET_ID").(string)
}
// This is the TencentCloud secret key. It must be provided, but it can also be sourced from the `TENCENTCLOUD_SECRET_KEY`
// environment variable.
func GetSecretKey(ctx *pulumi.Context) string {
v, err := config.Try(ctx, "tctest:secretKey")
if err == nil {
return v
}
return getEnvOrDefault("", nil, "TENCENTCLOUD_SECRET_KEY").(string)
}
// TencentCloud Security Token of temporary access credentials. It can be sourced from the `TENCENTCLOUD_SECURITY_TOKEN`
// environment variable. Notice: for supported products, please refer to: [temporary key supported
// products](https://intl.cloud.tencent.com/document/product/598/10588).
func GetSecurityToken(ctx *pulumi.Context) string {
v, err := config.Try(ctx, "tctest:securityToken")
if err == nil {
return v
}
return getEnvOrDefault("", nil, "TENCENTCLOUD_SECURITY_TOKEN").(string)
}