permalink |
---|
/provider/ |
provider
represents the hcp
Terraform provider config.
This package contains functions and utilities for setting up the provider using Jsonnet code.
new()
hcp.provider.new
injects a new hcp
Terraform provider
block into the root module document.
Optionally, this inserts the provider into the
required_providers terraform
sub block if
the src
and/or version
parameters are set.
Args:
client_id
(string
): The OAuth2 Client ID for API operations. Whennull
, theclient_id
field will be omitted from the resulting object.client_secret
(string
): The OAuth2 Client Secret for API operations. Whennull
, theclient_secret
field will be omitted from the resulting object.project_id
(string
): The default project in which resources should be created. Whennull
, theproject_id
field will be omitted from the resulting object.alias
(string
): The provideralias
to set for this instance of the provider block. Whennull
, thealias
field will be omitted from the resulting provider block.src
(string
): The providersource
to set on the resultingrequired_providers
block. Ifsrc
orversion
is set and is notnull
, arequired_providers
block and entry for the provider will be injected into the document.version
(string
): The providerversion
to set on the resultingrequired_providers
block. Ifsrc
orversion
is set and is notnull
, arequired_providers
block and entry for the provider will be injected into the document.
Returns:
- A mixin object that injects the new provider (and optionally,
required_providers
block) into the root Terraform configuration.
newAttrs()
hcp.provider.
constructs a new object with attributes and blocks configured for the hcp
Terraform provider
.
Unlike hcp.provider.new, this function will not inject the provider
block into the root Terraform document. Instead, this must be passed in as the attrs
argument for the
tf.withProvider function to build a complete block.
This is most useful when you need to preprocess the attributes with functions, conditional, or looping logic prior to injecting into a complete block.
Args:
client_id
(string
): The OAuth2 Client ID for API operations. Whennull
, theclient_id
field will be omitted from the resulting object.client_secret
(string
): The OAuth2 Client Secret for API operations. Whennull
, theclient_secret
field will be omitted from the resulting object.project_id
(string
): The default project in which resources should be created. Whennull
, theproject_id
field will be omitted from the resulting object.
Returns:
- An attribute object that can be used with tf.withProvider to construct a new
hcp
provider configuration into the root Terraform configuration.