Documentation ¶
Index ¶
- Constants
- Variables
- func InfrastructureConfigFromInfrastructure(infra *extensionsv1alpha1.Infrastructure) (*azurev1alpha1.InfrastructureConfig, error)
- func NewTerraformer(restConfig *rest.Config, clientAuth *ClientAuth, ...) (*terraformer.Terraformer, error)
- func TerraformVariablesEnvironmentFromClientAuth(auth *ClientAuth) (map[string]string, error)
- type ClientAuth
Constants ¶
View Source
const ( // 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 ¶
View Source
var ( // ChartsPath is the path to the charts ChartsPath = filepath.Join("controllers", "provider-azure", "charts") // InternalChartsPath is the path to the internal charts InternalChartsPath = filepath.Join(ChartsPath, "internal") )
View Source
var ( // Scheme is a scheme with the types relevant for Azure actuators. Scheme *runtime.Scheme )
Functions ¶
func InfrastructureConfigFromInfrastructure ¶
func InfrastructureConfigFromInfrastructure(infra *extensionsv1alpha1.Infrastructure) (*azurev1alpha1.InfrastructureConfig, error)
InfrastructureConfigFromInfrastructure extracts the InfrastructureConfig from the ProviderConfig section of the given Infrastructure.
func NewTerraformer ¶
func NewTerraformer( restConfig *rest.Config, clientAuth *ClientAuth, purpose, namespace, name string, ) (*terraformer.Terraformer, error)
NewTerraformer initializes a new Terraformer that has the azure auth credentials.
func TerraformVariablesEnvironmentFromClientAuth ¶
func TerraformVariablesEnvironmentFromClientAuth(auth *ClientAuth) (map[string]string, error)
TerraformVariablesEnvironmentFromClientAuth computes the Terraformer variables environment from the given ServiceAccount.
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 client secret ClientSecret string }
ClientAuth represents a Azure Client Auth credentials.
func GetClientAuthData ¶
func GetClientAuthData(ctx context.Context, c client.Client, secretRef corev1.SecretReference) (*ClientAuth, error)
GetClientAuthData retrieves the client auth data specified by the secret reference.
func ReadClientAuthDataFromSecret ¶
func ReadClientAuthDataFromSecret(secret *corev1.Secret) (*ClientAuth, error)
ReadClientAuthDataFromSecret reads the client auth details from the given secret.
Click to show internal directories.
Click to hide internal directories.