A Terraform provider for managing PipeOps infrastructure and DevOps automations.
- Project Management: Create and manage PipeOps projects
- Environment Management: Configure development, staging, and production environments
- Server Management: Provision and manage infrastructure servers
- Data Sources: Query existing PipeOps resources
Once published, you can use it directly:
terraform {
required_providers {
pipeops = {
source = "PipeOpsHQ/pipeops"
version = "~> 1.0"
}
}
}Download the binary for your platform from GitHub Releases:
# Example for macOS ARM64
VERSION="v1.0.0"
OS_ARCH="darwin_arm64"
# Download
curl -L "https://github.com/PipeOpsHQ/terraform-provider-pipeops/releases/download/${VERSION}/terraform-provider-pipeops_${VERSION}_${OS_ARCH}.zip" -o provider.zip
# Extract and install
unzip provider.zip
mkdir -p ~/.terraform.d/plugins/github.com/PipeOpsHQ/pipeops/1.0.0/${OS_ARCH}
mv terraform-provider-pipeops_* ~/.terraform.d/plugins/github.com/PipeOpsHQ/pipeops/1.0.0/${OS_ARCH}/Then use in your Terraform:
terraform {
required_providers {
pipeops = {
source = "github.com/PipeOpsHQ/pipeops"
version = "~> 1.0"
}
}
}# Clone the repository
git clone https://github.com/PipeOpsHQ/terraform-provider-pipeops.git
cd terraform-provider-pipeops
# Build the provider
make build
# Install to local Terraform plugins directory
make installSee TERRAFORM_REGISTRY.md for detailed publishing and installation instructions.
provider "pipeops" {
token = "your-api-token" # or set PIPEOPS_API_TOKEN
base_url = "https://api.pipeops.io" # optional
}PIPEOPS_API_TOKEN: Your PipeOps API tokenPIPEOPS_BASE_URL: PipeOps API base URL (default: https://api.pipeops.io)
resource "pipeops_project" "example" {
name = "my-application"
description = "My awesome application"
workspace_id = "workspace-123"
repo_url = "https://github.com/user/repo"
repo_branch = "main"
}resource "pipeops_environment" "production" {
name = "production"
project_id = pipeops_project.example.id
description = "Production environment"
type = "production"
}resource "pipeops_server" "app_server" {
name = "app-server-01"
project_id = pipeops_project.example.id
server_type = "web"
region = "us-east-1"
size = "small"
}data "pipeops_project" "existing" {
id = "project-123"
}
output "project_name" {
value = data.pipeops_project.existing.name
}See the examples directory for complete working examples.
terraform {
required_providers {
pipeops = {
source = "PipeOpsHQ/pipeops"
}
}
}
provider "pipeops" {
token = var.pipeops_token
}
resource "pipeops_project" "app" {
name = "production-app"
workspace_id = var.workspace_id
description = "Production application"
}
resource "pipeops_environment" "prod" {
name = "production"
project_id = pipeops_project.app.id
type = "production"
}
resource "pipeops_environment" "staging" {
name = "staging"
project_id = pipeops_project.app.id
type = "staging"
}
resource "pipeops_server" "web" {
name = "web-server"
project_id = pipeops_project.app.id
region = "us-east-1"
size = "medium"
}make buildmake test# Build and install locally
make install
# Use in your Terraform configuration
cd examples/basic
terraform init
terraform plan
terraform applyManages a PipeOps project.
Arguments:
name(Required): Project nameworkspace_id(Required): Workspace IDdescription(Optional): Project descriptionrepo_url(Optional): Repository URLrepo_branch(Optional): Repository branch
Attributes:
id: Project IDcreated_at: Creation timestampupdated_at: Last update timestamp
Manages a PipeOps environment.
Arguments:
name(Required): Environment nameproject_id(Required): Project IDdescription(Optional): Environment descriptiontype(Optional): Environment type
Attributes:
id: Environment IDcreated_at: Creation timestampupdated_at: Last update timestamp
Manages a PipeOps server.
Arguments:
name(Required): Server nameproject_id(Required): Project IDserver_type(Optional): Server typeregion(Optional): Server regionsize(Optional): Server size
Attributes:
id: Server IDstatus: Server statusip_address: Server IP addresscreated_at: Creation timestampupdated_at: Last update timestamp
Fetches information about a PipeOps project.
Arguments:
id(Required): Project ID
Attributes:
- All project attributes
Resources can be imported using their ID:
terraform import pipeops_project.example project-123
terraform import pipeops_environment.prod env-456
terraform import pipeops_server.web server-789Contributions are welcome! Please see CONTRIBUTING.md for details.
This provider is distributed under the terms specified in the LICENSE file.