IBM Cloud Docs
Adoption considerations

Adoption considerations

Review the following considerations when adopting IBM Cloud Schematics. Additionally review the section on workspace setup for details of how to work with your Terraform configurations stored in Git repositories.

Differences to native Terraform

If you used native Terraform before and plan to migrate your Terraform templates to IBM Cloud Schematics, make sure that you understand the differences between standalone Terraform usage and use through Schematics to modify your templates.

Do I need to provide an IBM Cloud API key in the provider block?

With Schematics it is not necessary to pass an API Key.

If an API key is not defined in the provider block, Schematics passes the users IAM token for all IAM-enabled resources, including IBM Cloud Kubernetes Service clusters, and VPC infrastructure resources. However, the IAM token is not retrieved for classic infrastructure resources and the API key must be provided in the provider block.

If an IBM Cloud® API key passed, it is used to authenticate with the IBM Cloud platform, create the IAM token and IAM refresh token that Schematics requires to work with the resource's API, and to determine the permissions that you have granted to perform the provisioning operation.

For more information about how to configure the provider block, see Configuring the provider block.

Can I use my local terraform.tfvars file?

The terraform.tfvars file is a local variables file that you can use to store sensitive information, such as your IBM Cloud API key or classic infrastructure user name when you use native Terraform. This file, or environment variables must be present on your local machine for Terraform to load the values for your credentials when you initialize the Terraform CLI.

With IBM Cloud Schematics, you do not use a local terraform.tfvars file. Instead, you declare your variables in the Terraform configuration files, and enter the values for your variables when you create a workspace. You can later change the values of your variables by updating the variables from your workspace details page.

Is Terraform remote state supported?

Schematics includes implicit backend support and it is not required to define a remote backend.

You can access workspace state information from other workspaces by using the Schematics ibm_schematics_output data source. This replaces the remote_state data source used by native Terraform in conjunction with remote backend support. It works in the same way allowing access to Terraform workspaces.

With the ibm_schematics_output data source, you automatically have access to the built-in Schematics backend and can access workspace information directly. See also the ibm_schematics_state data source.

For more information about how to use these data sources, see Managing cross-workspace state access with Terraform.

Why do local-exec and remote-exec provisioner terminate after 30 minutes?

The Terraform local exec and remote exec operations have a time limit of 30 minutes. This is to ensure fair usage of the Schematics service for all users. If exceeded, the commands terminated and job execution fail.

What is the use of refresh token header?

If the destroyresource flag is set to true, refresh token header configuration is required to delete all the IBM Cloud resources, and the Schematics workspace. Following are the uses of refresh token header:

  • If the token is expired, you can use refresh token to get a new IAM access token, see IAM access token.
  • The refresh_token parameter cannot be used to retrieve a new IAM access token.
  • When the IAM access token is about to expire, use the API key to create a new access token.

Git repo restrictions

Branch names containing / (backslash) are not supported

Cost estimate

Cost estimation is available for templates. This estimated amount is subject to change as the architecture is customized within a project, and it does not include all resources, usage, licenses, fees, discounts, or taxes. In the future, aggregate costs across projects that can be grouped by various criteria are available. For more information, see Estimating infrastructure costs.