This section explains how to install the CSC GRE AWS for Netskope using Terraform. 


Please, follow this steps:




1 - Update file "provider.tf" file with your AWS access and secret keys. (Generate these keys for the IAM user from AWS console and ensure required permissions are granted to the keys).


"provider.tf" file



Note: If you already have the keys provisioned via "aws configure" command, comment the lines: 



2 - Update the file "terraform.auto.tfvars" with the required network and instance values, including VPC ID, Subnet IDs, Stack name, region, instance name, instance type and keyname of SSH Key. (Please ensure the stack name is unique since it will be used for creating security groups and other components. We recommend to put the same name to "stack name" and "instance name")


 "terraform.auto.tfvars" file


3 - (optional)  Update configUserData.json with the JSON used as userdata within the provisioned Instance. Terraform will automatically pick the JSON and convert it to base64.



  • Once required changes are made, trigger the following commands to provision the Virtual machine. Please ensure all the below-mentioned commands are triggered from the base module directory. (In our case csc-aws-netskope-terraform):

 

1. Trigger "terraform init" command to initialize the AWS provider. Each time we add a new module, we will need to rerun this command.

2. Trigger "terraform plan" command to check what all will get provisioned. This command will not provision the resources but will just show what will get provisioned.

3. Trigger "terraform apply" command to create the resources. This will prompt you for approval, type "yes" once prompted.


 

Use the following reference links to know more about terraform commands - https://www.terraform.io/cli/commands