/
Terraform - Passing Parameters

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

  1. 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.

Related content

Terraform Script - Workflow
Terraform Script - Workflow
More like this
Terraform State Related Functionalities
Terraform State Related Functionalities
More like this
Continuous Deployment via Argo (GitOps)
Continuous Deployment via Argo (GitOps)
Read with this
Custom Parameters Help Documentation
Custom Parameters Help Documentation
More like this
Global Parameter usage in Command Line
Global Parameter usage in Command Line
More like this
Release update 06/21/2021
Release update 06/21/2021
More like this