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 ¶
- Variables
- func FormatHeaders(headers http.Header, seperator string) string
- func RedactHeaders(headers http.Header) (processedHeaders []string)
- type Config
- func (c *Config) BlockStorageV1Client(region string) (*gophercloud.ServiceClient, error)
- func (c *Config) BlockStorageV2Client(region string) (*gophercloud.ServiceClient, error)
- func (c *Config) BlockStorageV3Client(region string) (*gophercloud.ServiceClient, error)
- func (c *Config) ComputeV2Client(region string) (*gophercloud.ServiceClient, error)
- func (c *Config) ContainerInfraV1Client(region string) (*gophercloud.ServiceClient, error)
- func (c *Config) DNSV2Client(region string) (*gophercloud.ServiceClient, error)
- func (c *Config) DatabaseV1Client(region string) (*gophercloud.ServiceClient, error)
- func (c *Config) IdentityV3Client(region string) (*gophercloud.ServiceClient, error)
- func (c *Config) ImageV2Client(region string) (*gophercloud.ServiceClient, error)
- func (c *Config) LoadAndValidate() error
- func (c *Config) LoadBalancerV2Client(region string) (*gophercloud.ServiceClient, error)
- func (c *Config) NetworkingV2Client(region string) (*gophercloud.ServiceClient, error)
- func (c *Config) ObjectStorageV1Client(region string) (*gophercloud.ServiceClient, error)
- func (c *Config) SharedfilesystemV2Client(region string) (*gophercloud.ServiceClient, error)
- type LogRoundTripper
Constants ¶
This section is empty.
Variables ¶
var REDACT_HEADERS = []string{"x-auth-token", "x-auth-key", "x-service-token",
"x-storage-token", "x-account-meta-temp-url-key", "x-account-meta-temp-url-key-2",
"x-container-meta-temp-url-key", "x-container-meta-temp-url-key-2", "set-cookie",
"x-subject-token"}
List of headers that need to be redacted
Functions ¶
func FormatHeaders ¶
FormatHeaders processes a headers object plus a deliminator, returning a string
func RedactHeaders ¶
RedactHeaders processes a headers object, returning a redacted list
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 OsClient *gophercloud.ProviderClient }
func (*Config) BlockStorageV1Client ¶
func (c *Config) BlockStorageV1Client(region string) (*gophercloud.ServiceClient, error)
func (*Config) BlockStorageV2Client ¶
func (c *Config) BlockStorageV2Client(region string) (*gophercloud.ServiceClient, error)
func (*Config) BlockStorageV3Client ¶
func (c *Config) BlockStorageV3Client(region string) (*gophercloud.ServiceClient, error)
func (*Config) ComputeV2Client ¶
func (c *Config) ComputeV2Client(region string) (*gophercloud.ServiceClient, error)
func (*Config) ContainerInfraV1Client ¶
func (c *Config) ContainerInfraV1Client(region string) (*gophercloud.ServiceClient, error)
func (*Config) DNSV2Client ¶
func (c *Config) DNSV2Client(region string) (*gophercloud.ServiceClient, error)
func (*Config) DatabaseV1Client ¶
func (c *Config) DatabaseV1Client(region string) (*gophercloud.ServiceClient, error)
func (*Config) IdentityV3Client ¶
func (c *Config) IdentityV3Client(region string) (*gophercloud.ServiceClient, error)
func (*Config) ImageV2Client ¶
func (c *Config) ImageV2Client(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(region string) (*gophercloud.ServiceClient, error)
func (*Config) NetworkingV2Client ¶
func (c *Config) NetworkingV2Client(region string) (*gophercloud.ServiceClient, error)
func (*Config) ObjectStorageV1Client ¶
func (c *Config) ObjectStorageV1Client(region string) (*gophercloud.ServiceClient, error)
func (*Config) SharedfilesystemV2Client ¶
func (c *Config) SharedfilesystemV2Client(region string) (*gophercloud.ServiceClient, error)
type LogRoundTripper ¶
type LogRoundTripper struct { Rt http.RoundTripper OsDebug bool MaxRetries int }
LogRoundTripper satisfies the http.RoundTripper interface and is used to customize the default http client RoundTripper to allow for logging.