copyright | lastupdated | keywords | subcollection | ||
---|---|---|---|---|---|
|
2022-09-19 |
terraform, embed code |
account |
{{site.data.keyword.attribute-definition-list}}
{: #catalog-embed-code}
Instead of deploying the product on {{site.data.keyword.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. {: shortdesc}
{: #embed-code-prereqs}
- Install the {{site.data.keyword.cloud_notm}} CLI.
- Install the Catalog Management CLI plug-in.
- Ensure that you have a Terraform environment on your local machine.
{: #embed-code}
-
Log in to the {{site.data.keyword.cloud_notm}} CLI.
-
Copy the code from the {{site.data.keyword.cloud_notm}} 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 {{site.data.keyword.cloud_notm}} provider. For more information, see the {{site.data.keyword.cloud_notm}} Provider docs{: external}. {: note}
-
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.