
Security News
Another Round of TEA Protocol Spam Floods npm, But It’s Not a Worm
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.
pulumi-portainer
Advanced tools
A Pulumi provider for managing Portainer container management platform resources, dynamically bridged from the Terraform Portainer provider with support for environments, stacks, users, teams, registries, and container orchestration.
A Pulumi provider for managing Portainer container management platform resources, dynamically bridged from the Terraform Portainer Provider.
This package provides a Pulumi provider that enables you to manage your Portainer container management platform using TypeScript, JavaScript, Python, Go, or C#. The provider is automatically generated from the Terraform Portainer provider, giving you access to all its functionality within the Pulumi ecosystem.
npm install pulumi-portainer
yarn add pulumi-portainer
pnpm add pulumi-portainer
bun add pulumi-portainer
Before using the provider, you need to configure authentication with your Portainer instance.
You can configure the provider in several ways:
pulumi config set portainer:url https://your-portainer-instance.com
pulumi config set portainer:username your-username
pulumi config set portainer:password your-password --secret
export PORTAINER_URL="https://your-portainer-instance.com"
export PORTAINER_USERNAME="your-username"
export PORTAINER_PASSWORD="your-password"
import * as portainer from 'pulumi-portainer'
const provider = new portainer.Provider('portainer-provider', {
url: 'https://your-portainer-instance.com',
username: 'your-username',
password: 'your-password',
})
import * as portainer from 'pulumi-portainer'
// Create a Docker environment
const dockerEnv = new portainer.Environment('docker-prod', {
name: 'Docker Production',
environmentUrl: 'unix:///var/run/docker.sock',
environmentType: 1, // Docker environment
publicUrl: 'docker-prod.example.com:2376',
})
// Create a Kubernetes environment
const k8sEnv = new portainer.Environment('k8s-cluster', {
name: 'Kubernetes Production',
environmentUrl: 'https://k8s.example.com:6443',
environmentType: 2, // Kubernetes environment
kubernetesConfig: {
serverUrl: 'https://k8s.example.com:6443',
token: 'your-k8s-token',
},
})
import * as portainer from 'pulumi-portainer'
// Deploy a Docker Compose stack
const webStack = new portainer.Stack('web-application', {
name: 'web-app',
environmentId: dockerEnv.id,
type: 2, // Docker Compose stack
stackFileContent: `
version: '3.8'
services:
web:
image: nginx:alpine
ports:
- "80:80"
deploy:
replicas: 2
db:
image: postgres:13
environment:
POSTGRES_DB: myapp
POSTGRES_USER: user
POSTGRES_PASSWORD: password
volumes:
- postgres_data:/var/lib/postgresql/data
volumes:
postgres_data:
`,
})
// Deploy a Kubernetes stack
const k8sStack = new portainer.Stack('k8s-application', {
name: 'k8s-app',
environmentId: k8sEnv.id,
type: 1, // Kubernetes stack
stackFileContent: `
apiVersion: apps/v1
kind: Deployment
metadata:
name: web-deployment
spec:
replicas: 3
selector:
matchLabels:
app: web
template:
metadata:
labels:
app: web
spec:
containers:
- name: web
image: nginx:alpine
ports:
- containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
name: web-service
spec:
selector:
app: web
ports:
- port: 80
targetPort: 80
type: LoadBalancer
`,
})
import * as portainer from 'pulumi-portainer'
// Create a user
const devUser = new portainer.User('developer', {
username: 'john.developer',
password: 'secure-password',
role: 2, // Standard user role
})
// Create a team
const devTeam = new portainer.Team('development-team', {
name: 'Development Team',
})
// Add user to team
const teamMembership = new portainer.TeamMembership('dev-team-membership', {
teamId: devTeam.id,
userId: devUser.id,
role: 1, // Team leader role
})
import * as portainer from 'pulumi-portainer'
// Create a Docker Hub registry
const dockerHubRegistry = new portainer.Registry('dockerhub', {
name: 'Docker Hub',
type: 1, // Docker Hub
url: 'docker.io',
authentication: true,
username: 'your-dockerhub-username',
password: 'your-dockerhub-password',
})
// Create a private registry
const privateRegistry = new portainer.Registry('private-registry', {
name: 'Private Registry',
type: 3, // Custom registry
url: 'registry.example.com',
authentication: true,
username: 'registry-user',
password: 'registry-password',
})
import * as portainer from 'pulumi-portainer'
// Create resource control for stack
const stackResourceControl = new portainer.ResourceControl('stack-access', {
resourceId: webStack.id.apply((id) => `${dockerEnv.id}_${id}`),
type: 'stack',
public: false,
teams: [devTeam.id],
users: [],
})
// Create endpoint group
const endpointGroup = new portainer.EndpointGroup('production-group', {
name: 'Production Environments',
description: 'All production Docker and Kubernetes environments',
})
// Associate environment with group
const endpointAssociation = new portainer.EndpointAssociation(
'env-group-assoc',
{
endpointId: dockerEnv.id,
groupId: endpointGroup.id,
},
)
import * as portainer from 'pulumi-portainer'
// Create edge group
const edgeGroup = new portainer.EdgeGroup('iot-devices', {
name: 'IoT Edge Devices',
dynamic: false,
tagIds: [],
})
// Create edge stack
const edgeStack = new portainer.EdgeStack('iot-monitoring', {
name: 'IoT Monitoring Stack',
stackFileContent: `
version: '3.8'
services:
monitoring-agent:
image: monitoring/agent:latest
restart: always
environment:
- ENDPOINT_URL=https://monitoring.example.com
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
`,
deploymentType: 0, // Compose stack
edgeGroups: [edgeGroup.id],
})
For detailed API documentation, see the generated documentation in your IDE or visit the Pulumi Registry.
import * as portainer from 'pulumi-portainer'
// Test with a simple resource query
const environments = portainer.getEnvironments({})
You can find more examples in common use cases:
This provider is a derived work of the Terraform Provider distributed under MPL 2.0.
If you encounter a bug or missing feature, please consult the source terraform-provider-portainer repo.
For Pulumi-specific issues, please open an issue in the pulumi-any-terraform repository.
This package is distributed under the MIT License. The underlying Terraform provider is distributed under MPL 2.0.
FAQs
A Pulumi provider for managing Portainer container management platform resources, dynamically bridged from the Terraform Portainer provider with support for environments, stacks, users, teams, registries, and container orchestration.
The npm package pulumi-portainer receives a total of 90 weekly downloads. As such, pulumi-portainer popularity was classified as not popular.
We found that pulumi-portainer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.

Security News
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads

Research
/Security News
A malicious Chrome extension posing as an Ethereum wallet steals seed phrases by encoding them into Sui transactions, enabling full wallet takeover.