Documentation ¶
Index ¶
- Constants
- func GetAuthorizerAndSubscriptionID(ctx context.Context, c client.Client, secretRef corev1.SecretReference, ...) (azureautorest.Authorizer, string, error)
- func NewTerraformer(logger logr.Logger, restConfig *rest.Config, purpose string, ...) (terraformer.Terraformer, error)
- func NewTerraformerWithAuth(logger logr.Logger, restConfig *rest.Config, purpose string, ...) (terraformer.Terraformer, error)
- func TerraformerEnvVars(secretRef corev1.SecretReference) []corev1.EnvVar
- type ClientAuth
Constants ¶
View Source
const ( // TerraformVarSubscriptionID is the name of the terraform subscription id environment variable. TerraformVarSubscriptionID = "TF_VAR_SUBSCRIPTION_ID" // TerraformVarTenantID is the name of the terraform tenant id environment variable. TerraformVarTenantID = "TF_VAR_TENANT_ID" // TerraformVarClientID is the name of the terraform client id environment variable. TerraformVarClientID = "TF_VAR_CLIENT_ID" // TerraformVarClientSecret is the name of the client secret environment variable. TerraformVarClientSecret = "TF_VAR_CLIENT_SECRET" )
Variables ¶
This section is empty.
Functions ¶
func GetAuthorizerAndSubscriptionID ¶ added in v1.15.0
func GetAuthorizerAndSubscriptionID(ctx context.Context, c client.Client, secretRef corev1.SecretReference, allowDNSKeys bool) (azureautorest.Authorizer, string, error)
GetAuthorizerAndSubscriptionID retrieves the client auth data specified by the secret reference to create and return an Azure Authorizer and a subscription id.
func NewTerraformer ¶
func NewTerraformer(logger logr.Logger, restConfig *rest.Config, purpose string, infra *extensionsv1alpha1.Infrastructure) (terraformer.Terraformer, error)
NewTerraformer initializes a new Terraformer.
func NewTerraformerWithAuth ¶ added in v1.4.0
func NewTerraformerWithAuth(logger logr.Logger, restConfig *rest.Config, purpose string, infra *extensionsv1alpha1.Infrastructure) (terraformer.Terraformer, error)
NewTerraformerWithAuth initializes a new Terraformer that has the azure auth credentials.
func TerraformerEnvVars ¶ added in v1.15.0
func TerraformerEnvVars(secretRef corev1.SecretReference) []corev1.EnvVar
TerraformerEnvVars computes the Terraformer environment variables from the given secret reference.
Types ¶
type ClientAuth ¶
type ClientAuth struct { // SubscriptionID is the Azure subscription ID. SubscriptionID string // TenantID is the Azure tenant ID. TenantID string // ClientID is the Azure client ID. ClientID string // ClientSecret is the Azure client secret. ClientSecret string }
ClientAuth represents a Azure Client Auth credentials.
func GetClientAuthData ¶
func GetClientAuthData(ctx context.Context, c client.Client, secretRef corev1.SecretReference, allowDNSKeys bool) (*ClientAuth, error)
GetClientAuthData retrieves the client auth data specified by the secret reference.
func ReadClientAuthDataFromSecret ¶
func ReadClientAuthDataFromSecret(secret *corev1.Secret, allowDNSKeys bool) (*ClientAuth, error)
ReadClientAuthDataFromSecret reads the client auth details from the given secret.
Click to show internal directories.
Click to hide internal directories.