Embedding software in Terraform
Instead of deploying the product on IBM Cloud®, you can copy and embed the product's code into your own Terraform configuration. This task is for users who are experienced with Terraform.
Before you begin
- Install the IBM Cloud CLI.
- Install the Catalog Management CLI plug-in.
- Ensure that you have a Terraform environment on your local machine.
Running locally in a Terraform template
-
Log in to the IBM Cloud CLI.
-
Copy the code from the IBM Cloud catalog.
-
Embed the code in your Terraform template, and set the values for your configuration.
-
Run the
ibmcloud catalog netrc
command to configure a.netrc
file with an authentication token.You might need to configure the IBM Cloud provider. For more information, see the IBM Cloud Provider docs.
-
Run the
terraform init
command to download all of the required Terraform modules. -
Run the
terraform plan
command to see what resources will be created. -
Run the
terraform apply
command to create the resources. It might take some time to create the resources.