Skip to content
Securely manage Docker, Swarm, Kubernetes and Podman clusters in the cloud, on-premise, and in the data center.
Secure app deployment and device management for your Industrial IoT, IoT and Edge devices.
Let Portainer's Managed Platform Services accelerate your containerization journey.
A fully integrated, multi-cluster Kubernetes platform that’s scalable, secure and supported.
Deployment scenarios
Partner Solutions (Hybrid Cloud)
Onboard, manage and deploy workloads across hundreds of devices securely with Portainer.
Deployment scenarios
Partner Solutions (Edge/IIoT)
Portainer and Terraform
Portainer teamApril 16, 20252 min read

Portainer’s Official Terraform Provider is Now Generally Available

Sometimes the best things come from solving your own problem.

A developer in our community needed a way to manage Portainer using Terraform. So they built a provider. It started out as a simple tool to meet their own needs, but it worked. And more importantly, it sparked an idea.

After they shared it with us, we saw the potential. It wasn’t just about automation, it was about enabling teams to treat Portainer like the rest of their infrastructure: defined in code, version-controlled, and repeatable.

Rather than build something similar ourselves, we reached out. We offered support, guidance, and sponsorship to take the project from “clever solution” to “production-ready tool.” That collaboration has now culminated in the official release.

Portainer can now be managed through both Terraform and OpenTofu, allowing users to fully automate the provisioning, configuration, and lifecycle management of Portainer resources. If you’ve been waiting to bring your container management tooling under the same Infrastructure as Code (IaC) model used for everything else, this is the release you’ve been waiting for.

With this provider, you can declare and manage Portainer users, environments, stacks, edge devices, Kubernetes objects, access controls, registries, and more. All of it can now be integrated into your existing GitOps workflows or infrastructure pipelines.

This marks another step in our mission to make container management simpler and more accessible; now, for those who prefer to click and for those who prefer to code.

What It Can Do

At launch, the provider supports over 50 resources. You can define users, teams, endpoints, stacks, tags, registries, edge agents, Kubernetes objects, and more, all within your Terraform plans.

That includes:

  • Full lifecycle management of Docker and Kubernetes resources

  • Edge stack and job orchestration

  • User and team provisioning

  • Registry and image management

  • Portainer settings and license activation

  • Declarative RBAC, access policies, and webhook triggers

You can also import existing Portainer resources into Terraform, letting you adopt infrastructure as code without needing to start from scratch.

Production Ready, Tested Daily

This provider has been built to be reliable. Every day, end-to-end tests run automatically against a live Portainer instance using real Terraform plans. This catches regressions early and ensures that the provider continues to work as expected with every new Portainer release.

The provider is open source, released under the MIT license, and contributions are welcome. If something is missing, open an issue or submit a pull request. The community is active, and we’re listening. For those of you on our community slack channel, there is a dedicated space just for you.

Join the GitOps Generation

This release makes it easier to bring Portainer into your existing GitOps workflows. Whether you're pushing updates through CI/CD or managing hundreds of remote devices at the edge, you now have the ability to declare and control everything from a single place: your version control system.

It’s another step forward in our mission to simplify container management for everyone. If you prefer to click, you still can. But if you’d rather code it, version it, and automate it, Portainer now fits right in.

avatar

Portainer team

Portainer Team

COMMENTS

Related articles