providers

package
v0.33.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package providers is a generated GoMock package.

Index

Constants

View Source
const (
	AWSProviderName = "aws"
)

Provider's config parameters need to match the values expected by Terraform https://registry.terraform.io/providers/hashicorp/aws/latest/docs

View Source
const (
	AzureProviderName = "azurerm"
)

Provider's config parameters need to match the values expected by Terraform https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs

View Source
const (
	KubernetesProviderName = "kubernetes"
)

Variables

This section is empty.

Functions

func GetRecipeProviderConfigs added in v0.31.0

func GetRecipeProviderConfigs(ctx context.Context, envConfig *recipes.Configuration) map[string]any

GetRecipeProviderConfigs returns the Terraform provider configurations for Terraform providers specified under the RecipeConfig/Terraform/Providers section under environment configuration.

func GetUCPConfiguredTerraformProviders added in v0.31.0

func GetUCPConfiguredTerraformProviders(ucpConn sdk.Connection, secretProvider *ucp_provider.SecretProvider) map[string]Provider

GetUCPConfiguredTerraformProviders returns a map of Terraform provider names to provider config builder. These providers represent Terraform providers for which Radius generates custom provider configurations based on credentials stored with UCP and providers configured on the Radius environment. For example, the Azure subscription id is added to Azure provider config using Radius Environment's Azure provider scope.

Types

type MockProvider

type MockProvider struct {
	// contains filtered or unexported fields
}

MockProvider is a mock of Provider interface.

func NewMockProvider

func NewMockProvider(ctrl *gomock.Controller) *MockProvider

NewMockProvider creates a new mock instance.

func (*MockProvider) BuildConfig

func (m *MockProvider) BuildConfig(arg0 context.Context, arg1 *recipes.Configuration) (map[string]interface{}, error)

BuildConfig mocks base method.

func (*MockProvider) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

type MockProviderMockRecorder

type MockProviderMockRecorder struct {
	// contains filtered or unexported fields
}

MockProviderMockRecorder is the mock recorder for MockProvider.

func (*MockProviderMockRecorder) BuildConfig

func (mr *MockProviderMockRecorder) BuildConfig(arg0, arg1 interface{}) *gomock.Call

BuildConfig indicates an expected call of BuildConfig.

type Provider

type Provider interface {
	// BuildConfig generates the Terraform provider configuration for the provider.
	// Returns a map of Terraform provider name to values representing the provider configuration.
	// Returns an error if the provider configuration cannot be generated.
	BuildConfig(ctx context.Context, envConfig *recipes.Configuration) (map[string]any, error)
}

Provider is an interface for generating Terraform provider configurations.

func NewAWSProvider

func NewAWSProvider(ucpConn sdk.Connection, secretProvider *ucp_provider.SecretProvider) Provider

NewAWSProvider creates a new AWSProvider instance.

func NewAzureProvider

func NewAzureProvider(ucpConn sdk.Connection, secretProvider *ucp_provider.SecretProvider) Provider

NewAzureProvider creates a new AzureProvider instance.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL