Generates a remote state file containing partial configuration for backend.
AbstractRemoteStateConfigGenerator
).Type | Name and description |
---|---|
java.lang.Object |
destinationDir |
java.lang.Object |
templateFile |
java.lang.Object |
textTemplate |
Constructor and description |
---|
RemoteStateConfigGenerator
() |
Type Params | Return Type | Name and description |
---|---|---|
|
void |
addTokenProvider(Provider<java.util.Map<java.lang.String, java.lang.Object>> tokenProvider) Adds a provider of tokens. |
|
void |
exec() |
|
Provider<java.io.File> |
getBackendConfigFile() The location of the backend configuration file. |
|
boolean |
getBackendFileRequired() Returns whether a backend partial configuration file should be generated. |
|
Provider<java.lang.String> |
getBeginTokenProvider() Starting delimiter for tokens. |
|
java.lang.String |
getDefaultTextTemplate() The default text template that will be used if nothing else is configured. |
|
Provider<java.io.File> |
getDestinationDir() The output directory for the configuration file |
|
Provider<java.lang.String> |
getEndTokenProvider() Terminating delimiter for tokens |
|
Provider<java.io.File> |
getTemplateFile() Returns location of template file. |
|
Provider<BackendTextTemplate> |
getTextTemplate() Returns text template. |
|
java.util.Map<java.lang.String, java.lang.Object> |
getTokens() Returns the current set of tokens |
|
void |
setDestinationDir(java.lang.Object dir) Override the output directory. |
|
void |
setRemoteState(TerraformRemoteStateExtension source) Set remote state. |
|
void |
setTemplateFile(java.lang.Object file) Applies a custom template file for backend configuration. |
|
void |
setTextTemplate(java.lang.Object text) Use a string as a template. |
Adds a provider of tokens. These providers are processed before any of the customisations on the backend provider.
tokenProvider
- Addition provider of tokensThe location of the backend configuration file.
Returns whether a backend partial configuration file should be generated.
true
is one is required.Starting delimiter for tokens. Only useful when a custom template is used.
The default text template that will be used if nothing else is configured.
The output directory for the configuration file
Terminating delimiter for tokens Only useful when a custom template is used.
Returns location of template file.
Returns text template.
Returns the current set of tokens
Override the output directory.
dir
- Anything convertible to a file path.Set remote state. This removes any previous settings of setTextTemplate and setTemplateFile.
source
- Remote state extension associated with this configuration generator.Applies a custom template file for backend configuration. The default is to use the template file from the remote extension on the source set.
file
- Location of template fileUse a string as a template. The default is to use the template text from the remote extension on the source set.
text
- Template that can be processed by Ant's ReplaceTokens
.Groovy Documentation