@groovy.transform.CompileStatic @groovy.util.logging.Slf4j class TerraformRemoteStateExtension
Extension that is added to the project TerraformExtension and to instances of TerraformSourceDirectorySet
Modifiers | Name | Description |
---|---|---|
static java.lang.String |
NAME |
Type | Name and description |
---|---|
java.lang.Object |
prefix |
Constructor and description |
---|
TerraformRemoteStateExtension
(Project project) |
Type Params | Return Type | Name and description |
---|---|---|
|
void |
backend(java.lang.String backendType, Action<? extends BackendSpec> configurator) Replaces the existing backend with another registered one and configures it. |
|
void |
backend(java.lang.Class<? extends BackendSpec> backendType, Action<? extends BackendSpec> configurator) Replaces the existing backend with another registered one and configures it. |
<T extends BackendSpec> |
static T |
findBackend(Project project, java.lang.Class<T> backend) A utility to find the global configuration for a specific backend |
|
static TerraformRemoteStateExtension |
findExtension(Project project) A utility to locate the extension. |
|
static TerraformRemoteStateExtension |
findExtension(Project project, java.lang.String sourceSetName) Utility to find this extension on a terraform source set. |
|
void |
follow(TerraformRemoteStateExtension other) Follows the settings of another remote state extension. |
|
java.lang.String |
getBackendName() The name of the currently configured backend. |
|
Provider<BackendSpec> |
getBackendProvider() A provider to the configured backend. |
|
Provider<java.lang.String> |
getBeginTokenProvider() Starting delimiter for tokens. |
|
java.lang.String |
getDefaultTextTemplate() The default template used for the partial configuration of the backend. |
|
Provider<java.lang.String> |
getEndTokenProvider() Terminating delimiter for tokens |
|
Provider<java.lang.String> |
getPrefix() A prefix that is added to remote state names. |
|
Provider<java.lang.Boolean> |
getRemoteStateVarProvider() A provider to indicate whether remote state tokens should be added as a terraform map variable. |
|
Provider<java.io.File> |
getTemplateFile() Returns location of template file. |
|
Provider<BackendTextTemplate> |
getTextTemplate() Returns text template. |
|
Provider<java.util.Map<java.lang.String, ?>> |
getTokenProvider() A provider of all of the tokens that were configured in the active backend. |
|
java.util.Map<java.lang.String, java.lang.Object> |
getTokens() Returns the current set of tokens |
|
void |
noFollow() Do not follow any other remote state. |
|
void |
setBackend(java.lang.String backendType) Replaces the existing backend with another registered one. |
|
void |
setBackend(java.lang.Class<? extends BackendSpec> backendType) Replaces the existing backend with another registered one. |
|
void |
setPrefix(java.lang.Object p) Assign the prefix. |
|
void |
setRemoteStateVar(boolean asVar) Whether tokens should be bundled in a map variable called remote_state . |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Replaces the existing backend with another registered one and configures it.
backendType
- Name of backendconfigurator
- ConfiguratorReplaces the existing backend with another registered one and configures it.
backendType
- Type of backendconfigurator
- ConfiguratorA utility to find the global configuration for a specific backend
project
- Project to interrogatebackend
- Backend to findA utility to locate the extension.
project
- Project contextUtility to find this extension on a terraform source set.
project
- Project contextsourceSetName
- Name of source set. Follows the settings of another remote state extension.
If the other remote has a backend provider configured, set this remote state to be the same.
This overrides any previous configured backend.
If you want a different backend or fix the usage of a remote state variable map, you'll need to set it
after the follow
call.
Tokens will be read from the followed extension first and then overwritten by and local setting.
other
- Instance of TerraformRemoteStateExtension to follow.The name of the currently configured backend.
null
is no backend is configured.A provider to the configured backend.
Starting delimiter for tokens.
Only useful when a custom template is used.
The default template used for the partial configuration of the backend.
Terminating delimiter for tokens
Only useful when a custom template is used.
A prefix that is added to remote state names.
A provider to indicate whether remote state tokens should be added as a terraform map variable.
Returns location of template file.
Returns text template.
A provider of all of the tokens that were configured in the active backend.
Returns the current set of tokens
Do not follow any other remote state. This will set the following
false
.Replaces the existing backend with another registered one.
backendType
- Name of backend.Replaces the existing backend with another registered one.
backendType
- Type of backend.Assign the prefix.
p
- Object that can be converted to a string. Can be a Provider
as well. Whether tokens should be bundled in a map variable called remote_state
.
Groovy Documentation