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

Terraform provider or docs on recommended restapi usage #1512

Open
nwmcsween opened this issue Nov 14, 2023 · 3 comments
Open

Terraform provider or docs on recommended restapi usage #1512

nwmcsween opened this issue Nov 14, 2023 · 3 comments

Comments

@nwmcsween
Copy link

Looking to use IaC to manage openziti and so far have seen guides using the terraform restapi provider to craft api requests, wondering if openziti is looking at creating a terraform provider or if there is a "right" way of using the restapi using terraform (docs).

@dovholuknf
Copy link
Member

as far as I know, it's not something we are (or will be) focusing on at the moment. As for "the right way" to use the rest api, I'm not sure what you mean? A repo was started that consumes/wraps the API in python https://github.com/openziti-test-kitchen/openziti-edge-client-python but it isn't something that we are actively working on. it's in our incubator type org - openziti-test-kitchen. Is that maybe what you mean?

Did you find the overall docs themselves?

Or from your running controller (linked from that first link):

  • https://:/edge/client/v1/docs
  • https://:/edge/management/v1/docs

@qrkourier
Copy link
Member

qrkourier commented Nov 14, 2023

Hey there, I did adapt the restapi provider to work with OpenZiti. It's uploaded in the Terraform registry.

Here are some modules that use that TF provider. Among those is this one, which is more of an end-to-end demo deploying OpenZiti on Linode Kubernetes Engine, implemented as a consecutive series of Terraform modules.

@qrkourier
Copy link
Member

Clint linked you to the references for the two edge APIs: client, management. It sounds like you're looking for the management API, i.e. managing an OpenZiti network's resources with IaC.

The restapi provider that I adapted to work with OpenZiti is a thin wrapper around the OpenZiti management API, so it does the bare minimum you'd expect from a TF provider, essentially translating a resource declaration into the necessary CRUD operations. It was an experiment, so not a lot of polish has gone into it.

Are you partial to Terraform, CDK, Ansible, Pulumi for IaC? The Terraform path is the best-blazed trail so far, but the Python library for the management API is a great start toward an Ansible Collection of modules for managing OpenZiti network resources.

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

No branches or pull requests

3 participants