mirror of https://github.com/pulumi/pulumi.git
53 lines
1.4 KiB
Go
53 lines
1.4 KiB
Go
// Code generated by test DO NOT EDIT.
|
|
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
|
|
|
|
package config
|
|
|
|
import (
|
|
"example.com/pulumi-configstation/sdk/go/configstation/internal"
|
|
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
|
|
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
|
|
)
|
|
|
|
var _ = internal.GetEnvOrDefault
|
|
|
|
func GetFavoritePlants(ctx *pulumi.Context) string {
|
|
return config.Get(ctx, "configstation:favoritePlants")
|
|
}
|
|
|
|
// omg my favorite sandwich
|
|
func GetFavoriteSandwich(ctx *pulumi.Context) string {
|
|
return config.Get(ctx, "configstation:favoriteSandwich")
|
|
}
|
|
func GetIsMember(ctx *pulumi.Context) bool {
|
|
v, err := config.TryBool(ctx, "configstation:isMember")
|
|
if err == nil {
|
|
return v
|
|
}
|
|
var value bool
|
|
value = true
|
|
return value
|
|
}
|
|
func GetKids(ctx *pulumi.Context) string {
|
|
return config.Get(ctx, "configstation:kids")
|
|
}
|
|
func GetName(ctx *pulumi.Context) string {
|
|
return config.Get(ctx, "configstation:name")
|
|
}
|
|
func GetNumberOfSheep(ctx *pulumi.Context) int {
|
|
return config.GetInt(ctx, "configstation:numberOfSheep")
|
|
}
|
|
|
|
// This is a huge secret
|
|
func GetSecretCode(ctx *pulumi.Context) string {
|
|
v, err := config.Try(ctx, "configstation:secretCode")
|
|
if err == nil {
|
|
return v
|
|
}
|
|
var value string
|
|
if d := internal.GetEnvOrDefault(nil, nil, "SECRET_CODE", "MY_SUPER_SECRET_CODE"); d != nil {
|
|
value = d.(string)
|
|
}
|
|
return value
|
|
}
|