...
- Validate – Validates terraform files for syntax errors
- Plan - Creates a plan of execution and displays information on changes that will occur.
- Terraform Apply – Terraform templates will be applied, and resources will be configured in the cloud Provider
...
- Terraform Blueprint requires a resource pool defined and entitled to the user.
Note: Terraform blueprint based deployed resources do not account for resource in the resource pool but require the resource pool to identify the cloud provider.
...
Configuring a Terraform Backend State (Azure)
Provisioning Terraform requires a backend state configured via HyperCloud™ Platform. Backend state in terraform preserve the current state of the deployment.
Note: If the backend state has no state saved previously, terraform plan will provide information objects which will be created. Otherwise, the terraform output will show update and delete tasks too which means existing resources will change if ignored.
Use the following steps to create a Terraform Backend State:
- Login to the HyperCloud™ Platform with your credentials Click on Services Orchestration Tab Click on Infra as Code
- Click on Backend State Click on + New Backend State
- Enter a Name : for e.g. hgprodazurebs1
- Select a Resource Pool: For e.g. RP.ARM.SouthEastAsia.RP1
- On the Entitled Users:
- Select Only Me: If this template is not meant to be shared
- Select Everyone: If this template is to be shared with everyone in the Tenant
- Select Groups & Users: if the template is to be shared with specific users or groups
- Click on Save Changes
Creating Terraform Workspace (Azure)
- Login to the HyperCloud™ Platform with your credentials Click on Services Orchestration Tab Click on Infra as Code Click on Workspace
- Click on New workspace
- Enter a Name: hgprodazurewks1
- Description: Enter a suitable description
- Environment: Select a suitable option for e.g. dev
- Cloud Type: Select Azure
- Resource pool: Select a resource pool for e.g. RP.ARM.SouthEastAsia.<RP-Name>
Note: In this release, resource pool is only required to obtain the cloud provider information. Terraform deployment does not account against the limits in the resource pool
- Backend State: Select a backend state for e.g. hgprodazurebs1
- On the Entitled Users:
- Select Only Me: If this template is not meant to be shared
- Select Everyone: If this template is to be shared with everyone in the Tenant
- Select Groups & Users: if the template is to be shared with specific users or groups
- Click Save Changes
Creating Terraform Based Blueprints (Azure)
Use the following steps to create a Terraform based HyperCloud™ Blueprint
- Download the sample terraform template from https://github.com/hypergrid-inc/HyperCloud-Blueprints/Terraform/Azure/azure-postgresql --> Create a zip archive with the files downloaded for e.g. azure-postgres-tf.zip
- Login to the HyperCloud™ Platform with your credentials Click on Services Orchestration Tab AppStore New Select Terraform
- Enter a Name for the Terraform Template for e.g. Azure PostgreSQL (PaaS)
- Enter a Description (Optional) for e.g. Terraform Template to deploy Azure PostgreSQL 9.5
- Click on Choose File and upload the
- Configure a version (Optional) for e.g. 1.0
- Click on the Cloud Type drop-down and select Azure
- On the Entitled Users:
- Select Only Me: If this template is not meant to be shared
- Select Everyone: If this template is to be shared with everyone in the Tenant
- Select Groups & Users: if the template is to be shared with specific users or groups
- Select All Tenants (Only available to Cloud Admins): if the template is to be shared with all tenants
- Click Create
- From the AppStore Click on Terraform Category Click on the Blueprint Azure Postgres (PaaS)
- On the Overview page, review details and click Next
- Select and existing workspace for e.g. hgprodazurewks1
Note: Selecting an existing workspace may destroy existing deployments if there is an overlap. This information will be provided after the Terraform Template is planned.
- On the Define Variables page, click on the Action button and update the following values
- rg_name: "hgprod-tf-rg"
- pg_name: "hgprod-psqlsrv01"
- client_startip: "your system's public ip address"
- client_endip: "your system's public ip address"
- On the Define Variables page, click on the Action button and update the following values
Note: All values must be enclosed in double quotes.
- Click on Plan
- Review the Successful Plan Output.
Note: If this is the first time a terraform template is being deployed, ensure no resources are updated or deleted. If so verify that this is intentional and then proceed to the next step
- Click on Apply
- Click on the Workspace for e.g hgprodazurewks1
- Click on Timeline Tab to monitor the status of the terraform provisioning.
- Once the terraform template has successfully provisioned, Click on the Resource Tab to view the resources created via terraform template
- More terraform templates can be created by referring to https://www.terraform.io/docs/providers/azurerm/index.html
...
Configuring a Terraform Backend State (AWS)
Provisioning Terraform requires a backend state configured via HyperCloud™ Platform. Backend state in terraform preserve the current state of the deployment.
Note: If the backend state has no state saved previously, terraform plan will provide information objects which will be created. Otherwise, the terraform output will show update and delete tasks too which means existing resources will change if ignored.
Use the following steps to create a Terraform Backend State:
- Login to the HyperCloud™ Platform with your credentials Click on Services Orchestration Tab Click on Infra as Code
- Click on Backend State Click on + New Backend State
- Enter a Name : for e.g. hgprodawsbs1
- Select a Resource Pool: for e.g. RP.AWS.ap-southeast-1a.RP1
- On the Entitled Users:
- Select Only Me: If this template is not meant to be shared
- Select Everyone: If this template is to be shared with everyone in the Tenant
- Select Groups & Users: if the template is to be shared with specific users or groups
- Click on Save Changes
Creating Terraform Workspace (AWS)
- Login to the HyperCloud™ Platform with your credentials Click on Services Orchestration Tab Click on Infra as Code Click on Workspace
- Click on New workspace
- Enter a Name: hgprodawswks1
- Description: Enter a suitable description
- Environment: Select a suitable option for e.g. dev
- Cloud Type: Select AWS
- Resource pool: Select a resource pool for e.g. RP.AWS.ap-southeast-1a.<RP-Name>
Note: In this release, resource pool is only required to obtain the cloud provider information. Terraform deployment does not account against the limits in the resource pool
- Backend State: Select a backend state for e.g. hgprodawsbs1
- On the Entitled Users:
- Select Only Me: If this template is not meant to be shared
- Select Everyone: If this template is to be shared with everyone in the Tenant
- Select Groups & Users: if the template is to be shared with specific users or groups
- Click Save Changes
Creating Terraform Based Blueprints (AWS)
Use the following steps to create a Terraform based HyperCloud™ Blueprint
- Download the sample terraform template from https://github.com/hypergrid-inc/HyperCloud-Blueprints/tree/master/Terraform/AWS/aws-s3-bucket --> Create a zip archive with the files downloaded for e.g. aws-s3-bucket-tf.zip
- Login to the HyperCloud™ Platform with your credentials Click on Services Orchestration Tab AppStore New Select Terraform
- Enter a Name for the Terraform Template for e.g. AWS S3 Bucket
- Enter a Description (Optional) for e.g. Terraform Template to AWS S3 bucket
- Click on Choose File and upload the aws-s3-bucket-tf.zip file
- Configure a version (Optional) for e.g. 1.0
- Click on the Cloud Type drop-down :select AWS
- On the Entitled Users:
- Select Only Me: If this template is not meant to be shared
- Select Everyone: If this template is to be shared with everyone in the Tenant
- Select Groups & Users: if the template is to be shared with specific users or groups
- Select All Tenants (Only available to Cloud Admins): if the template is to be shared with all tenants
- Click Create
- From the AppStore Click on Terraform Category Click on the Blueprint Azure Postgres (PaaS)
- On the Overview page, review details and click Next
- Select and existing workspace or create a new workspace Click on Validate
Note: Selecting an existing workspace may destroy existing deployments if there is an overlap. This information will be provided after the Terraform Template is planned.
- On the Define Variables page, Click on the Action button and update the following values
- Bucket_name: for e.g "hg-prod-bk1"
- On the Define Variables page, Click on the Action button and update the following values
Note: All values must be enclosed in double quotes.
- Click on Plan
- Review the Successful Plan Output.
Note: If this is the first time a terraform template is being deployed, ensure no resources are updated or deleted. If so verify that this is intentional and then proceed to the next step
- Click on Apply
- Click on the Workspace for e.g hgprodawswks1,
- Click on Timeline Tab to monitor the status of the terraform provisioning.
- Once the terraform template has successfully provisioned, Click on the Resource Tab to view the resources created via terraform template
- More terraform templates can be created by referring to https://www.terraform.io/docs/providers/aws/index.html