⚠ Warning
The Terraform Provider for Octopus Deploy is under active development. Its functionalty can and will change; it is a v0.* product until its robustness can be assured. Please be aware that types like resources can and will be modified over time. It is strongly recommended to validate and plan configuration prior to committing changes via apply.
About
This repository contains the source code for the Terraform Provider for Octopus Deploy. It supports provisioning/configuring of Octopus Deploy instances via Terraform. Documentation and guides for using this provider are located on the Terraform Registry: Documentation.
🪄 Installation and Configuration
The Terraform Provider for Octopus Deploy is available via the Terraform Registry: OctopusDeployLabs/octopusdeploy. To install this provider, copy and paste this code into your Terraform configuration:
terraform {
required_providers {
octopusdeploy = {
source = "OctopusDeployLabs/octopusdeploy"
version = "version-number" # example: 0.7.62
}
}
}
data "octopusdeploy_space" "space" {
provider = octopusdeploy.unscoped
name = "Development Team"
}
provider "octopusdeploy" {
# configuration options
address = "https://octopus.example.com" # (required; string) the service endpoint of the Octopus REST API
api_key = "API-XXXXXXXXXXXXX" # (required; string) the API key to use with the Octopus REST API
space_id = data.octopusdeploy_space.space.id # (optional; string) the space ID in Octopus Deploy
}
If space_id is not specified the Terraform Provider for Octopus Deploy will assume the default space.
Environment Variables
You can provide your Octopus Server configuration via the OCTOPUS_URL and OCTOPUS_APIKEY environment variables, representing your Octopus Server address and API Key, respectively.
provider "octopusdeploy" {}
Run terraform init to initialize this provider and enable resource management.
🛠 Build Instructions
A build of this Terraform Provider can be created using the Makefile provided in the source:
% make build -f Makefile
This will generate a binary that will be installed to the local plugins folder. Once installed, the provider may be used through the following configuration:
terraform {
required_providers {
octopusdeploy = {
source = "octopus.com/com/octopusdeploy"
version = "0.7.64"
}
}
}
provider "octopusdeploy" {
address = # address
api_key = # API key
space_id = # space ID
}
🤝 Contributions
Contributions are welcome! ❤ Please read our Contributing Guide for information about how to get involved in this project.