Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish the required binaries needed for out-of-band commands #144

Open
stv-io opened this issue Apr 14, 2023 · 2 comments
Open

Publish the required binaries needed for out-of-band commands #144

stv-io opened this issue Apr 14, 2023 · 2 comments

Comments

@stv-io
Copy link

stv-io commented Apr 14, 2023

Currently, and according to the docs, for the Post Apply/Destroy commands (publish / logout / discard etc) as documented in the provider, a few commands / binaries are required.

Given some of the commands are built with older versions of golang (1.13), it is not easy to obtain a version of these.

Although there are probably better long term ways of managing this, a quick short term improvement would be to publish and release these binaries, for the more common developer architectures and platforms.

As an example, I myself, on mac os intel, have golang 1.20 installed and will need to go through the process of running the build using docker and moving a lot of things around

@stv-io
Copy link
Author

stv-io commented Apr 14, 2023

For anyone in a similar situation as me, this is a copy-paste version of what I did to build and expose the commands.

docker run -it -v $(pwd):/builds --entrypoint bash golang:1.13.15

# within the container
git clone https://github.com/CheckPointSW/terraform-provider-checkpoint.git $GOPATH/src/github.com/terraform-providers/terraform-provider-checkpoint
cd $GOPATH/src/github.com/terraform-providers/terraform-provider-checkpoint
make fmt
make build
export GOOS=darwin
export GOARCH=amd64
cd commands/publish/
go build publish.go
mv publish /builds/
cd ../logout/
go build logout.go
mv logout /builds/
cd ../discard/
go build discard.go
mv discard /builds/
cd ../approve_session/
go build approve_session.go
mv approve_session /builds/
cd ../reject_session/
go build reject_session.go
mv reject_session /builds/
cd ../submit_session/
go build submit_session.go
mv submit_session /builds/
cd ../install_policy/
go build install_policy.go
mv install_policy /builds/

@chkp-royl
Copy link
Contributor

Hi @stv-io,
Thanks for suggesting this feature.
Currently it's not supported but we might be able to add this logic as part of the repository CI/CD workflows.
We encourage our community to contribute and take part in developing the provider since it's open source project so if you want, you can share possible changes in PR and we will review it.

Regards,
Roy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants