5. Terraform

Instructions

Step

Instructions

1

SSH into the Ubuntu Orchestrator (administrator/vpn123) using MobaXterm:

2

Change directory on the Ubuntu Orchestrator to the cd /home/administrator/Terraform directory.

3

Review the configurations files in the terraform directory.

4

Run the following command to initialize Terraform and the Check Point POC provider for Terraform.

terraform init

This will download the latest Check Point Terraform provider from Hashicorp.

5

Next, we will run a plan to see what would actually be done to build the objects that are described in the Simple Example directory.

terraform plan

Important - API server needs to be configured to accept requests from all IP addresses.

6

Now we can apply our configuration. Run the following:

terraform apply

Type 'yes' and Click Enter.

Note - if you receive timeout error (Client Timeout exceeded) during the command run ,

Please delete the api management session from SmartConsole ('Discard & Disconnect') and rerun the 'terraform apply' command.

7

Once the apply is complete run the follow to publish the changes with the python script:

python3 publish.py

8

Verify that the objects are in the .tf files were created in the R81 SmartConsole.

New Policy created : demo2021:

9

Now delete the entire configuration using the following command :

terraform destroy

Type 'yes' and Click Enter.

10

Once the destroy is complete run the follow to publish the changes with the python script :

python3 publish.py