Overview
...
Amazon Web Services (AWS) is a subsidiary of Amazon that provides onthese metered pay-as-you-go services:
On-demand cloud computing platforms
...
APIs to individuals, companies, and governments
...
Configure A Terraform Backend State (AWS)
...
Deploying an AWS Terraform Blueprint is a three-step process where you’ll need to:
Note |
---|
Before you begin |
Create a Terraform Blueprint
...
Create a Terraform-based Blueprint is a three-step process. You’ll need to:
Configure a Backend State
...
A Terraform backend allows for abstraction and determines how a state is loaded, and operations executed. Terraform uses the local backend by default. In the HCP portal, a Terraform Backend state stores the current state of the deployment. (Refer Note [1) You can use the following steps to configure your ]
To create a Terraform Backend State:
Login Log in to HyperCloudTM with your credentialsyour HCP portal account.
Click Service Orchestration > Select AppStore > Click Terraform
Click on Terraform Blueprint to open your Blueprint Azure Postgres (PaaS)
On the Overview page, review details and click Next
Enter the name for your new workspace.
Enter the brief description for your new workspace.
Select the environment type Enter the following details in the New backend State dialog:
Enter a Name for your Backend State.
Select the Cloud Type from the drop-down list
e.
g: Dev.Select
the Cloud typeyour Resource Pool from the drop-down list.
Select the Resource pool e.g: RP.ARM.Australia Central.atest
Select the backend state for your new workspace
Enter a brief Description of your Backend State.
To
entitled usersentitle users to your Backend State, select:
SelectOnly Me:
Select Everyone If this template is to be shared with everyone in the.
Select if you do not want anyone to access your backend state.
Everyone: if you want to share your backend state with everyone.
Groups & Users: if
you want to share the backend state with specific users or groups.
Click Create Workspace and Validate
Select the workspace type as Existing and Select the existing workspace e.g. hgprodazurewks1 and click Validate
On the Workspace page:
Select the Workspace type as New:
Click Service Orchestration and navigate to Services > Infra as Code > Backend State > Click + New Backend State.
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"
Click on Plan
Review the Successful Plan Output.
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
To create additional templates refer to the Terraform documentation.
Note
All values must be enclosed in double-quotes.
Terraform Template provides the information regarding, Overlapping the Existing Workspace that may destroy the existing deployment.
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.
Create Your Terraform Workspace
...
Enter the first three alphabets of the username in the Users drop-down and select the username.
Type the first three alphabets of the Group Name in the Groups drop-down and select the group name.
Click Save Changes.
Note
[1] If the backend state has no state saved previously, the Terraform plan will provide you an information object which will be created.
Otherwise, the Terraform output will show updates and delete tasks too, which means existing resources will change if ignored.
Create your Terraform Workspace
...
Workspaces are collections of infrastructure that run locally. In other words, a workspace is an isolated instance of state data for a Terraform CLI. A Terraform workspace manages each collection of infrastructure with a persistent working directory, which contains a configuration, state data, and variables. The You can create multiple workspaces to manage various sets of discrete infrastructure from a single configuration in a single directory. The Terraform cloud manages infrastructure collections with workspaces instead through workspaces instead of directories. The terraform workspace organizes your infrastructure in a good manner into groups. You can create your new a workspace to manage your collection of infrastructure resources.
You can use the following steps to Create your To create a Terraform Workspace: [1]
Login to the HyperCloud™ Platform(HCP) with your credentials.Click Services Orchestration > Select Services > Click on Infra your HCP account.
Click Service Orchestration and navigate to Infra as Code > Click on Workspace > Click on + New workspaceWorkspace.
Enter the following details in your new the New Workspace dialog:
Enter the name Example: hgprodawswks1your workspace Name.
Enter a brief description of your new workspaceWorkspace.
Select a suitable environment for your new workspace , Example: devEnvironment.
Select the Cloud Type from the drop-down list, Example: AWS.
Select the Resource pool, Example: RP.AWS.ap-southeast-1a.<RP-Name>(Refer Note (1))
Backend State: select a backend state for Example: hgprodawsbs1.
To your 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
your Resource Pool from the drop-down list.
Select your Backend State from the drop-down list.
To entitle users to your new Workspace, select:
Only Me: if you do not want anyone to access your Workspace.
Everyone: if you want to share your Workspace with everyone.
Groups & Users: if you want to share the Workspace with specific users or groups
.
Enter the first three alphabets of the username in the Users drop-down and select the username.
Type the first three alphabets of the Group Name in the Groups drop-down and select the group name.
Click New Workspace.
NoteNotes
(1)In this release, the resource pool is only required to obtain the [1] Resource pool contains cloud provider information. Therefore, a Terraform deployment does not
account against the limits inaffect the quota limit of the resource pool.
Create a Terraform
...
Blueprint
...
Your Terraform-based blueprints help let you to create an Infrastructure of infrastructure on your cloud environment using a template.
Download the Sample Terraform Template
...
Tip |
---|
Before you begin
|
...
|
...
|
...
|
...
|
Follow these steps to create a Terraform based HyperCloud™ Platform(HCP) Blueprint-based blueprint:
Login Log in to the your HCP portal account with your credentials.
Click Services Orchestration > Select Service Orchestration and navigate to AppStore > Click on New > Select Terraform from the drop-down list.
Enter the Following these details in your the New Terraform blueprintdialog:
Enter a Name for the your Terraform Template,
Example: AWS S3 Bucket.Enter a brief description of your Terraform Template. This is an optional step, enter a brief Description, for Example: Terraform Template to AWS S3 bucket.
Click on Choose File and upload the aws-s3-bucket-tf.zip file
field.
You can create a Terraform template using a template file in .zip format. Click Choose File to upload a Terraform template file.
Configure your Terraform template version. This is an optional step, configure a version, Example: 1.0
Select AWS from the Cloud Type from the drop-down : select AWSlist.
To your entitled usersentitle users to your Terraform template, select:
SelectOnly Me:
Select Everyone: If this template is to be shared with everyone in the Tenant.
Selectif you do not want anyone to access your Terraform template.
Everyone: if you want to share your Terraform template with everyone.
Groups & Users: if
you want to share your Terraform template with specific users or groups
.
Enter the first three alphabets of the username in the Users drop-down and select the username.
Type the first three alphabets of the Group Name in the Groups drop-down and select the group name.
If you are a Cloud Administrator, you can choose All Tenants to make the template available to all the tenants.
Click Create.
Provision
...
your Terraform
...
Blueprint
...
You Once you’ve created a Terraform workspace, you can provision your Terreform Blueprints in the Blueprint on your Amazon Web Service (AWS) resource once you have created Terraform workspace.You can use the following . Follow these steps to provision your Terraform Blueprint:
Login to your HyperCloudTM Platform(HCP) with your credentialsHCP portal account.
Click on Service Orchestration > Select and navigate to AppStore > Click on Terraform > Click on the Blueprint Azure Postgres (PaaS).
Click on Terraform Blueprint to open your Blueprint Azure Postgres (PaaS)
On the Overviewpage, review detailsopen your Terraform Blueprint.
From the Blueprint Details page:
Review your blueprint Overview, and click Next.
On Select New Workspace Type from the Workspace page:
Select the Workspace type as New.
Enter these details to create a new workspace:
Enter the name a Name for your new workspace.
Enter the brief description for your a brief Description of the new workspace.
Select the environment type following configurations for your workspace from the drop-down list Example: Dev.:
Select your workspace Environment
Select
Cloud Type
Select
your Resource Pool
Select the backend state
To entitled users:
Selectentitle users to your new Workspace, 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.
Select if you do not want anyone to access your Workspace.
Everyone: if you want to share your Workspace with everyone.
Groups & Users: if the template is to be shared you want to share the Workspace with specific users or groups.
Enter the first three alphabets of the username in the Users drop-down and select the username.
Type the first three alphabets of the Group Name in the Groups drop-down and select the group name.
Click Create Workspace and Validate.
Select the workspace type as Existing and Select the existing workspace e.g. hgprodazurewks1 and click Validate.
Alternately, you can select an Existing Workspace Type from the drop-down list, if you’ve configured one already.
From the Define Variables page, click
Action
and
- Bucket_name: for e.g
provide the value for Bucket_Name.
Example: "hg-prod-bk1"
[1]
Click
Plan and
Review the Successful Plan Output.
...
[2]
Click
Apply.
Click
...
open your Workspace.
Click
Timeline
...
to monitor
...
the Terraform provisioning status.
Once
you’ve successfully provisioned your Terraform template
, click
the
Resource
...
to view the resources created via the Terraform template.
More Terraform templates can be created by referring to Terraform Templates.
Note
([1) ]All values variables must be enclosed in double-quotes.
(2)The Terraform template ensures that there are no resources are being updated or deleted in its first deployment.
If so, then verifies that this is intentional and then proceed to the next step[2] If you are deploying your Terraform template for the first time, it ensures that it does not delete or update your existing resources.
If any of your resources are slated for deletion or updates, the template verifies that this is intentional before performing these tasks.
You can create your own templates. Refer to your Terraform Amazon Web Services Documentation.
Deploy your Terraform Blueprint
...
Once you’ve provisioned a Terraform Blueprint, you’ll need to deploy it. Follow these steps to deploy your Terraform Blueprint:
Login to your HCP portal account.
Click Service Orchestration and navigate to AppStore > Terraform > Click open your Terraform Blueprint > Click Edit.
Select your Workspace and click Validate.
Check your Terraform variables for syntax errors by clicking Validate.
Click Plan to create a plan of execution and review the changes to your deployed resource.
Click Apply to deploy your Blueprint and configure your resources in the cloud provider.