Latest

IBM Terraform provider

ManageIQ includes an IBM Terraform provider that provides functionality to integrate with the Managed Services component. Managed services uses open source Terraform to manage and deliver cloud infrastructure as code. Terraform is an Open Source software that is developed by HashiCorp that enables predictable and consistent provisioning of many cloud platforms, classic infrastructure, and virtual private cloud (VPC) infrastructure resources by using a high-level scripting language. You can use Terraform to automate your cloud resource provisioning, rapidly build complex, multi-tier cloud environments, and enable Infrastructure as Code (IaC). ManageIQ provides functionality to integrate with Terraform and take advantage of features. This includes:

  • Discovering the inventory from Managed Services, including templates, stacks, and virtual machines provisioned using Terraform.

  • Providing traceability between VM resources provisioned by Terraform and discovered by ManageIQ.

  • Applying ManageIQ policy tags to hosts.

Adding an IBM Terraform Provider

To start discovering the Terraform templates and virtual machines, you need at least one IBM Terraform provider added to ManageIQ.

  1. Browse to menu: Configuration > Providers.

  2. Select menu: Configuration > Add a new Provider.

  3. Select Type as IBM Terraform Configuration

  4. Enter a Name for the provider.

  5. Select a Zone, choose default.

    In the Endpoint section:

  6. Enter the Managed Services URL for the provider.

    This is the URL for Managed Services and can be either an IP address or a hostname.

    For example, https://cam.apps.test.example.com.

  7. In the Endpoint section, enter the CloudPak for MCM URL. This is the console URL for the IBM CloudPak for Multicloud Management system. This is used for authentication and access token.

    For example, https://cp-console.apps.test.example.com.

  8. Select SSL verification as Verify or Do not verify.

  9. Enter a Username for a user on the provider. This must be a user in IBM CloudPak for Multicloud Management.

  10. Enter a Password.

  11. Click Validate to test your connection.

  12. Click Add to confirm your settings and save the provider.

ManageIQ saves the IBM Terraform provider in its database and triggers a refresh of resources detected in the provider.

Triggering a Refresh of an IBM Terraform Provider

Your IBM Terraform provider can still create new hosts independently of ManageIQ. Your ManageIQ detects these changes after an automatic refresh period. However, you can trigger a manual refresh to avoid waiting for the automatic refresh.

  1. Navigate to menu: Configuration > Providers.

  2. Select your Terraform provider using the checkbox, and click menu: Configuration > Refresh Relationships and Power States. This triggers the refresh.

  3. When the refresh is complete, select the Terraform provider to check the updated list of Configuration profiles and Configured systems in the provider.