generated from pulumi/pulumi-tf-provider-boilerplate
/
config.go
51 lines (43 loc) · 2.2 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
// 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-artifactory/sdk/v6/go/artifactory/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
var _ = internal.GetEnvOrDefault
// This is a access token that can be given to you by your admin under `User Management > Access Tokens`. If not set, the
// 'api_key' attribute value will be used.
func GetAccessToken(ctx *pulumi.Context) string {
return config.Get(ctx, "artifactory:accessToken")
}
// API key. If `accessToken` attribute, `JFROG_ACCESS_TOKEN` or `ARTIFACTORY_ACCESS_TOKEN` environment variable is set, the
// provider will ignore this attribute.
//
// Deprecated: An upcoming version will support the option to block the usage/creation of API Keys (for admins to set on their platform).
// In a future version (scheduled for end of Q3, 2023), the option to disable the usage/creation of API Keys will be available and set to disabled by default. Admins will be able to enable the usage/creation of API Keys.
// By end of Q4 2024, API Keys will be deprecated all together and the option to use them will no longer be available. See [JFrog API deprecation process](https://jfrog.com/help/r/jfrog-platform-administration-documentation/jfrog-api-key-deprecation-process) for more details.
func GetApiKey(ctx *pulumi.Context) string {
return config.Get(ctx, "artifactory:apiKey")
}
// Toggle for pre-flight checking of Artifactory Pro and Enterprise license. Default to `true`.
func GetCheckLicense(ctx *pulumi.Context) bool {
v, err := config.TryBool(ctx, "artifactory:checkLicense")
if err == nil {
return v
}
var value bool
value = false
return value
}
// OIDC provider name. See [Configure an OIDC
// Integration](https://jfrog.com/help/r/jfrog-platform-administration-documentation/configure-an-oidc-integration) for
// more details.
func GetOidcProviderName(ctx *pulumi.Context) string {
return config.Get(ctx, "artifactory:oidcProviderName")
}
// Artifactory URL.
func GetUrl(ctx *pulumi.Context) string {
return config.Get(ctx, "artifactory:url")
}