Documentation
¶
Overview ¶
Package auth provides common functionality for Terraform and Terraform plugins to authenticate with OpenStack.
It includes a wide array of features, such as flexible authentication, debugging, client creation, endpoint customization and more.
While this package is specific to Terraform, it can be used for any kind of Terraform feature: core, backend, and plugins.
Index ¶
- func PrepareTLSConfig(caCertFile, clientCertFile, clientKeyFile string, insecure *bool) (*tls.Config, error)
- type Config
- func (c *Config) Authenticate(ctx context.Context) error
- func (c *Config) BlockStorageV1Client(ctx context.Context, region string) (*gophercloud.ServiceClient, error)
- func (c *Config) BlockStorageV2Client(ctx context.Context, region string) (*gophercloud.ServiceClient, error)
- func (c *Config) BlockStorageV3Client(ctx context.Context, region string) (*gophercloud.ServiceClient, error)
- func (c *Config) CommonServiceClientInit(ctx context.Context, newClient commonCommonServiceClientInitFunc, ...) (*gophercloud.ServiceClient, error)
- func (c *Config) ComputeV2Client(ctx context.Context, region string) (*gophercloud.ServiceClient, error)
- func (c *Config) ContainerInfraV1Client(ctx context.Context, region string) (*gophercloud.ServiceClient, error)
- func (c *Config) DNSV2Client(ctx context.Context, region string) (*gophercloud.ServiceClient, error)
- func (c *Config) DatabaseV1Client(ctx context.Context, region string) (*gophercloud.ServiceClient, error)
- func (c *Config) DetermineEndpoint(client *gophercloud.ServiceClient, eo gophercloud.EndpointOpts, service string) (*gophercloud.ServiceClient, error)
- func (c *Config) DetermineRegion(region string) string
- func (c *Config) EndpointLocator(eo gophercloud.EndpointOpts) (string, error)
- func (c *Config) IdentityV3Client(ctx context.Context, region string) (*gophercloud.ServiceClient, error)
- func (c *Config) ImageV2Client(ctx context.Context, region string) (*gophercloud.ServiceClient, error)
- func (c *Config) KeyManagerV1Client(ctx context.Context, region string) (*gophercloud.ServiceClient, error)
- func (c *Config) LoadAndValidate(ctx context.Context) error
- func (c *Config) LoadBalancerV2Client(ctx context.Context, region string) (*gophercloud.ServiceClient, error)
- func (c *Config) MessagingV2Client(ctx context.Context, clientID string, region string) (*gophercloud.ServiceClient, error)
- func (c *Config) NetworkingV2Client(ctx context.Context, region string) (*gophercloud.ServiceClient, error)
- func (c *Config) ObjectStorageV1Client(ctx context.Context, region string) (*gophercloud.ServiceClient, error)
- func (c *Config) OrchestrationV1Client(ctx context.Context, region string) (*gophercloud.ServiceClient, error)
- func (c *Config) SharedfilesystemV2Client(ctx context.Context, region string) (*gophercloud.ServiceClient, error)
- func (c *Config) WorkflowV2Client(ctx context.Context, region string) (*gophercloud.ServiceClient, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
CACertFile string
ClientCertFile string
ClientKeyFile string
Cloud string
DefaultDomain string
DomainID string
DomainName string
EndpointOverrides map[string]interface{}
EndpointType string
IdentityEndpoint string
Insecure *bool
Password string
ProjectDomainName string
ProjectDomainID string
Region string
Swauth bool
TenantID string
TenantName string
Token string
UserDomainName string
UserDomainID string
Username string
UserID string
ApplicationCredentialID string
ApplicationCredentialName string
ApplicationCredentialSecret string
UseOctavia bool
MaxRetries int
DisableNoCacheHeader bool
Context context.Context
DelayedAuth bool
AllowReauth bool
OsClient *gophercloud.ProviderClient
AuthOpts *gophercloud.AuthOptions
TerraformVersion string
SDKVersion string
EnableLogger bool
*mutexkv.MutexKV
// contains filtered or unexported fields
}
func (*Config) BlockStorageV1Client ¶
func (c *Config) BlockStorageV1Client(ctx context.Context, region string) (*gophercloud.ServiceClient, error)
func (*Config) BlockStorageV2Client ¶
func (c *Config) BlockStorageV2Client(ctx context.Context, region string) (*gophercloud.ServiceClient, error)
func (*Config) BlockStorageV3Client ¶
func (c *Config) BlockStorageV3Client(ctx context.Context, region string) (*gophercloud.ServiceClient, error)
func (*Config) CommonServiceClientInit ¶
func (c *Config) CommonServiceClientInit(ctx context.Context, newClient commonCommonServiceClientInitFunc, region, service string) (*gophercloud.ServiceClient, error)
func (*Config) ComputeV2Client ¶
func (c *Config) ComputeV2Client(ctx context.Context, region string) (*gophercloud.ServiceClient, error)
func (*Config) ContainerInfraV1Client ¶
func (c *Config) ContainerInfraV1Client(ctx context.Context, region string) (*gophercloud.ServiceClient, error)
func (*Config) DNSV2Client ¶
func (c *Config) DNSV2Client(ctx context.Context, region string) (*gophercloud.ServiceClient, error)
func (*Config) DatabaseV1Client ¶
func (c *Config) DatabaseV1Client(ctx context.Context, region string) (*gophercloud.ServiceClient, error)
func (*Config) DetermineEndpoint ¶
func (c *Config) DetermineEndpoint(client *gophercloud.ServiceClient, eo gophercloud.EndpointOpts, service string) (*gophercloud.ServiceClient, error)
DetermineEndpoint is a helper method to determine if the user wants to override an endpoint returned from the catalog.
func (*Config) DetermineRegion ¶
DetermineRegion is a helper method to determine the region based on the user's settings.
func (*Config) EndpointLocator ¶
func (c *Config) EndpointLocator(eo gophercloud.EndpointOpts) (string, error)
func (*Config) IdentityV3Client ¶
func (c *Config) IdentityV3Client(ctx context.Context, region string) (*gophercloud.ServiceClient, error)
func (*Config) ImageV2Client ¶
func (c *Config) ImageV2Client(ctx context.Context, region string) (*gophercloud.ServiceClient, error)
func (*Config) KeyManagerV1Client ¶
func (c *Config) KeyManagerV1Client(ctx context.Context, region string) (*gophercloud.ServiceClient, error)
func (*Config) LoadAndValidate ¶
LoadAndValidate performs the authentication and initial configuration of an OpenStack Provider Client. This sets up the HTTP client and authenticates to an OpenStack cloud.
Individual Service Clients are created later in this file.
func (*Config) LoadBalancerV2Client ¶
func (c *Config) LoadBalancerV2Client(ctx context.Context, region string) (*gophercloud.ServiceClient, error)
func (*Config) MessagingV2Client ¶
func (c *Config) MessagingV2Client(ctx context.Context, clientID string, region string) (*gophercloud.ServiceClient, error)
func (*Config) NetworkingV2Client ¶
func (c *Config) NetworkingV2Client(ctx context.Context, region string) (*gophercloud.ServiceClient, error)
func (*Config) ObjectStorageV1Client ¶
func (c *Config) ObjectStorageV1Client(ctx context.Context, region string) (*gophercloud.ServiceClient, error)
func (*Config) OrchestrationV1Client ¶
func (c *Config) OrchestrationV1Client(ctx context.Context, region string) (*gophercloud.ServiceClient, error)
func (*Config) SharedfilesystemV2Client ¶
func (c *Config) SharedfilesystemV2Client(ctx context.Context, region string) (*gophercloud.ServiceClient, error)
func (*Config) WorkflowV2Client ¶
func (c *Config) WorkflowV2Client(ctx context.Context, region string) (*gophercloud.ServiceClient, error)