Cisco Intersight Service for HashiCorp Terraform (IST) addresses the challenge of securely connecting and configuring on-premises and hybrid environments to work with Terraform Cloud Business Tier. Leveraging Intersight Assist, users can integrate Terraform Cloud Business with Cisco Intersight, enabling secure communication between on-premises data centers and edge locations with the IaC platform. This means users can spend less time managing the end-to-end lifecycle of Terraform Cloud Agents, benefiting from native integration directly within Intersight, including upgrades and the ability to scale as demand grows.
This example covers a simple use case to create a new project/tenant in Openstack alongside users, quota, and policies for a new customer. This use case will walk the user through the following steps:
The code will get all the required inputs from the Terraform Cloud workspace. As an example, to create the project/tenant, we refer to the variable "tenant-name", as shown in the code below:
// Create a project
resource "openstack_identity_project_v3" "myProject" {
name = var.customer_name
description = "A project dedicated to ${var.customer_name}"
}
As of today, the terraform plan use fixed information to create the quota and other stuff, but it will be very simple to transform this fixed value in variable.
To add your Terraform Cloud credentials in Intersight you will need the following:
Login to Intersight and claim your Terraform Cloud target.
Go to Admin/Targets/ClaimTarget and select Terraform Cloud.
Fill the form by providing the necessary information:
Once the target is created, the agent can be added.
Key | Value | Type | Description |
---|---|---|---|
auth_url | http://192.168.130.110:5000 | String | The Openstack administration endpoint |
user_name | admin | String | The Openstack administration user |
password | ******** | String, Sensitive | The password of the Openstack administrator user |
tenant_name | RMLAB | String | Openstack main tenant |
customer_name | RMLAB | String | The Customer's name used to create tenant, users and role |
To execute the Terraform code in your datacenter click on the Queue Plan Manually button
You will see the tenant's name alongside the customer name, user's group, and all the quotas associated with the tenant.
The following output will be generated:
Get hands on experience with Intersight Service for Terraform in DevNet's Sandbox environment.
Cisco Intersight Service for HashiCorp Terraform
Learn how to provision virtual machines in vSphere using Intersight Service for Terraform.
Introduction to Intersight Service for Hashicorp Terraform
Provisioning VMs using Intersight Terraform Service for Hashicorp
Owner
Contributors
Categories
Programming Languages
HCLLicense
Code Exchange Community
Get help, share code, and collaborate with other developers in the Code Exchange community.View Community