About IBM Cloud Schematics
IBM Cloud Schematics delivers Terraform-as-a-Service so that you can use a high-level scripting language to model the resources that you want in your IBM Cloud environment, and enable Infrastructure as Code (IaC). Terraform is an Open Source software that is developed by HashiCorp that enables predictable and consistent resource provisioning to build complex, multi-tier cloud environments.
What is Infrastructure as Code?
Infrastructure as Code (IaC) helps you codify your cloud environment so that you can automate the provisioning and management of your resources in the cloud. Rather than manually provisioning and configuring infrastructure resources or using scripts to adjust your cloud environment, you use a high-level scripting language to specify your resource and its configuration. Then, you use tools like Terraform to provision the resource in the cloud by leveraging its API. Your infrastructure code is treated the same way as your app code so that you can apply DevOps core practices such as version control, testing, and continuous monitoring.How is IBM Cloud Schematics different from Terraform?
With IBM Cloud Schematics, you can organize your IBM Cloud resources across environments by using workspaces. Every workspace points to a set of Terraform configuration files, which build a Terraform template. We can choose to create your own Terraform template, or use one of the pre-defined templates that are provided by IBM. Workspaces allow for the separation of concerns for cloud resources and can be individually managed with IBM Cloud Identity and Access Management. To use IBM Cloud Schematics, you don't need to install the Terraform CLI or the IBM Cloud Provider plug-in for Terraform.I am not familiar with Terraform. Can I still use IBM Cloud Schematics?
Yes. IBM Cloud Schematics provides a set of pre-defined Terraform templates that you can choose from to get started with Schematics. Simply select the template that you want and create a workspace in IBM Cloud Schematics from this template. Then, create a Terraform execution plan, apply this plan, and watch IBM Cloud Schematics provision the resources for you.
How it works?
Review how IBM Cloud Schematics provisions and manages your IBM Cloud resources with Terraform.
Benefits
Review the capabilities that IBM Cloud Schematics provides to templatize and organize your IBM Cloud resources.
Benefit Description Enable Infrastructure as Code (IaC) Use Terraform templates to model, codify, and configure the IBM Cloud resources that you want, and build your own resource library that you can replicate or re-create across environments. To change your environment, you state the outcome that you want and let IBM Cloud Schematics determine the actions that must be performed to get to the described state. Use native Terraform capabilities Build your Terraform configuration files in HashiCorp Configuration Language (HCL) or JSON format and provision your specified resources with IBM Cloud Schematics. IBM Cloud Schematics supports all IBM Cloud resources that are provided by the IBM Cloud Provider plug-in for Terraform with the advantage that you don't have to install the Terraform CLI and the IBM Cloud Provider plug-in. Simply use the built-in Terraform capabilities in the IBM Cloud console or CLI to connect IBM Cloud Schematics to the GitHub repository that hosts your template or provide your template by uploading a .tar file. Then, create an execution plan, and watch IBM Cloud Schematics spin up your resources. One language to describe resources Every IBM Cloud resource comes with a CLI or API that you can use to provision and work with the resource. By using IBM Cloud Schematics, you don't need to learn each CLI or API to automate the provisioning of your resources. Instead, you use the Terraform language to model all your resources. Organize IBM Cloud resources in workspaces With IBM Cloud Schematics, you can organize your IBM Cloud resources across environments by using workspaces. Every workspace is connected to a GitHub repository that stores a Terraform template. We can also provide the template by uploading a .tar file from your local machine. Use workspaces to distinguish between your test, staging, and prod environment, and to change resource configurations without affecting resources in other environments. Control access to your IBM Cloud resources Assign platform and services access permissions to your users in IBM Cloud Identity and Access Management to control who can provision and manage resources in your IBM Cloud account. Leverage GitHub for version control If you connect your workspace to a repository in GitHub, you can keep your Terraform template in source control and enable collaboration, review, and auditing of changes. We can also roll back to a previous version of your template and let IBM Cloud Schematics deploy the change to your IBM Cloud environment. Get IBM Cloud help and support IBM Cloud Schematics is fully integrated into the IBM Cloud support system. If you run into an issue with using IBM Cloud Schematics, open an IBM Cloud support case.
Key terms
IBM Cloud Schematics uses Terraform as the underlying tool to enable Infrastructure as Code (IaC) so that you can define and deploy your resources with simple text files.
Learn the basics about Terraform and IBM Cloud Schematics by reviewing the following terms.
- Resources
- Resources are IBM Cloud Platform-as-a-Service, Infrastructure-as-a-Service, and Functions-as-a-Service components that you can provision and manage in IBM Cloud with IBM Cloud Schematics. Resources are specified and configured by using Terraform configuration files. The resources that are supported in IBM Cloud Schematics are determined by the IBM Cloud Provider plug-in for Terraform. The plug-in provides the syntax to describe a supported resource, and understands the APIs of each supported IBM Cloud resource and available configuration parameters.
To find a list of supported IBM Cloud resources, see the IBM Cloud Provider plug-in reference.
- Terraform configuration file
- A Terraform configuration file defines the IBM Cloud resources that you want to create. We can configure one resource per file, or combine multiple resources in one file. Terraform configuration files can be written in HashiCorp Configuration Language (HCL) or JSON syntax, and are stored in a GitHub or GitLab repository or uploaded by using a .tar file.
For more information about how to write configuration files, see creating Terraform configurations.
- Template
- A Terraform template includes one or a set of Terraform configuration files that combined can be used to build a specific IBM Cloud solution. For example, you might have a template that creates a multizone cluster in IBM Cloud Kubernetes Service. This cluster consists of multiple IBM Cloud resources in different zones, such as classic infrastructure virtual servers and VLANs. We can build your own template and import it into IBM Cloud Schematics by storing all Terraform configuration files that build your configuration in one GitHub or GitLab repository. We can also provide your template by uploading a tape archive file (.tar) from your local machine. Templates are designed and constructed for reuse by using variables so that you can share these templates with other teams in your organization.
- Workspace
- A workspace is used to organize your IBM Cloud resources across environments. For example, use workspaces to separate your test, staging, and production environment. We can provide your Terraform template by connecting your workspace to a GitHub or GitLab repository or by uploading a tape archive file (.tar) from your local machine. To customize the IBM Cloud resources to your needs, you specify user-defined variables in your workspace. With IBM Cloud Identity and Access Management, you can control who has access to your resources and can provision or manage these resources in your IBM Cloud account.
- Execution plan
- An execution plan is a summary of actions that IBM Cloud Schematics must perform to provision, modify, or remove the IBM Cloud resources of your template. The plan is created by running the terraform plan command.
- IBM Cloud Provider plug-in
- To support a multi-cloud approach, Terraform works with different cloud providers. A cloud provider is responsible for understanding the resources that you can provision, their API, and the methods to expose these resources in the cloud. To make this knowledge available to users, each cloud provider must provide a CLI plug-in for Terraform. The IBM Cloud Provider plug-in is IBM's CLI plug-in for Terraform. IBM Cloud Schematics uses the plug-in to provision your IBM Cloud resources. To find a list of supported IBM Cloud resources and how to describe them, see the IBM Cloud Provider plug-in reference.