Documentation ¶
Index ¶
Constants ¶
const (
DefaultHostname = "app.terraform.io"
)
Variables ¶
var (
ErrMissingAuthToken = errors.New("required token could not be found. Please set the token using an input variable in the provider configuration block or by using the TFE_TOKEN environment variable")
)
var ( // TFEUserAgent is the user agent string sent with all requests made by the provider TFEUserAgent = fmt.Sprintf("terraform-provider-tfe/%s", providerVersion.ProviderVersion) )
Functions ¶
func CheckConstraints ¶
func CheckConstraints(c *disco.Constraints) error
CheckConstraints checks service version constrains against our own version and returns rich and informational diagnostics in case any incompatibilities are detected.
func GetClient ¶
GetClient encapsulates the logic for configuring a go-tfe client instance for the provider, including fallback to values from environment variables. This is useful because we're muxing multiple provider servers together and each one needs an identically configured client.
Internally, this function caches configured clients using the specified parameters
Types ¶
type CLIHostConfig ¶
type CLIHostConfig struct { Hosts map[string]*ConfigHost `hcl:"host"` Credentials CredentialsMap `hcl:"credentials"` }
CLIHostConfig is the structure of the configuration for the Terraform CLI.
type ClientConfigMap ¶
type ClientConfigMap struct {
// contains filtered or unexported fields
}
func (*ClientConfigMap) GetByConfig ¶
func (c *ClientConfigMap) GetByConfig(config *ClientConfiguration) *tfe.Client
func (*ClientConfigMap) Lock ¶
func (c *ClientConfigMap) Lock()
func (*ClientConfigMap) Set ¶
func (c *ClientConfigMap) Set(client *tfe.Client, config *ClientConfiguration)
func (*ClientConfigMap) Unlock ¶
func (c *ClientConfigMap) Unlock()
type ClientConfiguration ¶
type ClientConfiguration struct { Services *disco.Disco HTTPClient *http.Client TFEHost svchost.Hostname Token string Insecure bool }
ClientConfiguration is the refined information needed to configure a tfe.Client
func (ClientConfiguration) Key ¶
func (c ClientConfiguration) Key() string
Key returns a string that is comparable to other ClientConfiguration values
type ConfigHost ¶
type ConfigHost struct {
Services map[string]interface{} `hcl:"services"`
}
ConfigHost is the structure of the "host" nested block within the CLI configuration, which can be used to override the default service host discovery behavior for a particular hostname.