Terraform - Passing Parameters
In order to pass parameters using Terraform, a Parameter should be created in the Tool Registry.
Parameter values can either be hardcoded or stored in the customer vault.
Value will be stored in the vault in the mentioned format OPSERA_CUSTOM_${_id}.
You can then utilize this Parameter for passing it via Terraform and in the Command Line step configuration.
Creating New Parameter
Login to https://portal.opsera.io -> Tool Registry -> Click Parameter tab-> Click on ‘+ New Parameter’ button.
Provide values and click the ‘Create’ button. Values will be stored in the vault if the ‘Secured in Vault’ toggle is enabled. This value cannot be changed upon creation.
Same procedure can be followed for creating parameters with hardcoded values just by disabling the ‘Secured in Vault’ toggle.
Terraform Pipeline Step Configuration with Parameters
2. Create a pipeline step using Terraform tool and add parameters required for passing it to the command line step.
Add these parameters in the pipeline step:
Command Line Step configuration
3. User will be able to get the parameters in the Command Line step by selecting the respective step from the ‘Terraform Step’ dropdown.
After successful run of the pipeline the values are printed in the console log.