Solved: Publish changes done by terraform - Check Point CheckMates

Publish changes done by terraform

Hello

We would like for our futur architecture to build pour policies via terraform.

So I installed a lab but I have an issue when I try to publish the new change.

I followed this documentation :

As of right now, Terraform does not provide native support for publish and install-policy, so both of them are handled out-of-band.

In order to use post Apply/Destroy commands, the authentication method must be via environment variables.

Publish

Please use the following for publish:

$ cd $GOPATH/src/github.com/terraform-providers/terraform-provider-checkpoint/commands/publish
$ go build publish.go
$ mv publish $GOPATH/src/github.com/terraform-providers/terraform-provider-checkpoint
$ terraform apply && publish

But when i try it i have the following message :

➜ publish git:(master) go build publish.go

go: github.com/terraform-providers/terraform-provider-checkpoint/commands: github.com/terraform-providers/terraform-provider-checkpoint@v1.1.0: parsing go.mod:

module declares its path as: github.com/CheckPointSW/terraform-provider-checkpoint

but was required as: github.com/terraform-providers/terraform-provider-checkpoint

Idem to install policy

➜ install_policy git:(master) go build install_policy.go

go: github.com/terraform-providers/terraform-provider-checkpoint/commands: github.com/terraform-providers/terraform-provider-checkpoint@v1.1.0: parsing go.mod:

module declares its path as: github.com/CheckPointSW/terraform-provider-checkpoint

but was required as: github.com/terraform-providers/terraform-provider-checkpoint

Do you have a fix for me ?

How do you do in order to publish or install policy ?

Thanks for your help 🙂

Regards

0

Kudos

Click here to give kudos to this post.

1

2

3

4

5

0.5

1.0

1.5

2.0

2.5

3.0

3.5

4.0

4.5

5.0

Reply

1 Solution

Accepted Solutions

GBrembati

Employee

‎2021-02-2105:03 PM

Show option menu

Jump to solution

Hello,

When you are working with Terraform you can handle the installation as well as the publish of the changes made by Terraform.

I would simply use the resources you can find inside "checkpoint" provider in the registry, my suggestion would also be to use the latest version (as per today 1.3.0) of the provider. So you would set your provider like this:

terraform {

required_providers {

checkpoint = {

source = "CheckPointSW/checkpoint"

version = ">= 1.3.0"

}

}

}

Then in the main you would just need to add the resources to publish the changes at the end, be careful to use the right dependency for that one since you want to be executed after all the changes.

So the policy install would be something like


And the publish would be something like, with some "depends_on" statement inside,


These examples are the ones in the public documentation of our provider that you can find here: https://registry.terraform.io/providers/CheckPointSW/checkpoint/latest/docs

If you want to see a real example here is a Terraform that I have created to make few action: such as creating few objects, a policy package, connect a datacenter object, install the CME, patch to a certain Jumbo Hotfix, etc https://github.com/gbrembati/terraform/blob/master/azure/mgmt-configuration/mgmtcfg-main.tf

Hope it helps,

Giorgio

View solution in original post

1\ \ \ Kudo

Click here to give kudos to this post.

1

2

3

4

5

0.5

1.0

1.5

2.0

2.5

3.0

3.5

4.0

4.5

5.0

(1)

Reply

4 Replies

PhoneBoy

Admin

‎2021-02-2110:52 AM

Show option menu

Jump to solution

@chkp-royl @Ryan_Darst any suggestions here?

0

Kudos

Click here to give kudos to this post.

1

2

3

4

5

0.5

1.0

1.5

2.0

2.5

3.0

3.5

4.0

4.5

5.0

Reply

GBrembati

Employee

‎2021-02-2105:03 PM

Show option menu

Jump to solution

Hello,

When you are working with Terraform you can handle the installation as well as the publish of the changes made by Terraform.

terraform {

required_providers {

checkpoint = {

source = "CheckPointSW/checkpoint"

version = ">= 1.3.0"

}

}

}

So the policy install would be something like


And the publish would be something like, with some "depends_on" statement inside,


Hope it helps,

Giorgio

1

2

3

4

5

0.5

1.0

1.5

2.0

2.5

3.0

3.5

4.0

4.5

5.0

(1)

Reply

Simon_Macpherso

Advisor

‎2021-06-3002:54 AM

Show option menu

In response to GBrembati

Jump to solution

Hi Giorgio,

Do you have a working example of using Terraform to verify and deploy a JHF to an on-premise HA cluster?

Regards,

Simon

0

Kudos

Click here to give kudos to this post.

1

2

3

4

5

0.5

1.0

1.5

2.0

2.5

3.0

3.5

4.0

4.5

5.0

Reply

neilmalta

Explorer

‎2022-02-2201:19 AM

Show option menu

In response to GBrembati

Jump to solution

Hey,

I m working with the publish and policy with terraform, thanks also to you : )

But when I do any changes for example just add a host or change just a comment, its not being publish / installed.

What can I do to always publish after every terraform apply? Thanks.

0

Kudos

Click here to give kudos to this post.

1

2

3

4

5

0.5

1.0

1.5

2.0

2.5

3.0

3.5

4.0

4.5

5.0

Reply

Post Reply

Upcoming Events

Sort by:

Virtual

Tue 28 Jul 2026 @ 11:00 AM (EDT)

Under the Hood - Check Point and Illumio – Modern Network Defense Against AI-Based Threats

Virtual

Wed 29 Jul 2026 @ 12:00 PM (SGT)

The AI Security Report 2026: A Turning Point for Enterprise Defense - SGT

Virtual

Wed 29 Jul 2026 @ 02:00 PM (IDT)

The AI Security Report 2026: A Turning Point for Enterprise Defense - AMER

Virtual

Wed 29 Jul 2026 @ 03:00 PM (CEST)

The AI Security Report 2026: A Turning Point for Enterprise Defense EMEA

Virtual

Wed 29 Jul 2026 @ 11:00 AM (EDT)

TechTalk: On-Premise SD-WAN Management

Thu 30 Jul 2026 @ 11:30 AM (CDT)

CheckMates Live DFW: Agentic AI Security Deep Dive & Hands-On

Virtual

Tue 28 Jul 2026 @ 11:00 AM (EDT)

Virtual

Wed 29 Jul 2026 @ 12:00 PM (SGT)

Virtual

Wed 29 Jul 2026 @ 02:00 PM (IDT)

Virtual

Wed 29 Jul 2026 @ 03:00 PM (CEST)

Virtual

Wed 29 Jul 2026 @ 11:00 AM (EDT)

TechTalk: On-Premise SD-WAN Management

Virtual

Thu 30 Jul 2026 @ 10:00 AM (PDT)

AI Security Masters E12: READY OR NOT: Securing the AI Enterprise 4/5 - AI Gateway

In-Person

Tue 11 Aug 2026 @ 11:30 AM (EDT)

New York City: Agentic AI Security Deep Dive & Hands-On

In-Person

Thu 13 Aug 2026 @ 11:30 AM (EDT)

Waltham, MA: Agentic AI Security Deep Dive & Hands-On

In-Person

Thu 20 Aug 2026 @ 08:30 AM (COT)

Medellin: Workspace Evolution: Hybrid Mesh Management - Visibilidad, Automatización e IA

In-Person

Thu 20 Aug 2026 @ 06:00 PM (COT)

Medellin: Workspace Intelligence: IA Generativa en Acción para Equipos de Seguridad

In-Person

Thu 27 Aug 2026 @ 09:00 AM (CEST)

Check Point Hands-On SASE and Cloud Workshop - Zurich

In-Person

Wed 21 Oct 2026 @ 09:00 AM (BST)

AI Security Workshop - Glasgow

CheckMates Events

Top

About CheckMates

Learn Check Point

Advanced Learning

Resources

Non-English Discussions

YOU DESERVE THE BEST SECURITY

We’re Social. Follow Us CheckMates on LinkedIn Check Point on YouTube CheckMates on Facebook CheckMates on Instagram

©1994-2026 Check Point Software Technologies Ltd. All rights reserved. Copyright Privacy Policy About Us UserCenter

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.