All Projects → terra-farm → terraform-provider-octopus

terra-farm / terraform-provider-octopus

Licence: MIT License
Octopus provider for Terraform

Programming Languages

go
31211 projects - #10 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to terraform-provider-octopus

terraform-provider-jxadmin
A Jenkins X provider for terraform
Stars: ✭ 14 (-36.36%)
Mutual labels:  terraform-provider
Ensconce
A .net command line tool for aiding deployment of server components.
Stars: ✭ 15 (-31.82%)
Mutual labels:  octopus-deploy
terraform-provider-vix
VMware VIX provider for Terraform
Stars: ✭ 96 (+336.36%)
Mutual labels:  terraform-provider
terraform-provider-launchdarkly
Terraform LaunchDarkly provider
Stars: ✭ 16 (-27.27%)
Mutual labels:  terraform-provider
terraform-provider-influxdb
Terraform InfluxDB provider
Stars: ✭ 19 (-13.64%)
Mutual labels:  terraform-provider
terraform-provider-ovirt
Terraform provider for oVirt 4.x
Stars: ✭ 125 (+468.18%)
Mutual labels:  terraform-provider
terraform-provider-dockermachine
Docker machine provider for Terraform
Stars: ✭ 20 (-9.09%)
Mutual labels:  terraform-provider
terraform-provider-jira
Terraform Provider for JIRA
Stars: ✭ 59 (+168.18%)
Mutual labels:  terraform-provider
terraform-provider-citrixadc
Terraform Custom Provider for Citrix ADC (formerly Citrix NetScaler)
Stars: ✭ 89 (+304.55%)
Mutual labels:  terraform-provider
terraform-provider-panos
Terraform Panos provider
Stars: ✭ 56 (+154.55%)
Mutual labels:  terraform-provider
terraform-provider-statuscake
Terraform StatusCake provider.
Stars: ✭ 26 (+18.18%)
Mutual labels:  terraform-provider
go-graylog
Graylog API client for Go and terraform provider for Graylog
Stars: ✭ 45 (+104.55%)
Mutual labels:  terraform-provider
terraform-provider-opennebula
Terraform provider for OpenNebula
Stars: ✭ 38 (+72.73%)
Mutual labels:  terraform-provider
terraform-provider-mackerel
Terraform provider for Mackerel
Stars: ✭ 16 (-27.27%)
Mutual labels:  terraform-provider
terraform-provider-logzio
Terraform provider for logz.io alerts, endpoints and users
Stars: ✭ 18 (-18.18%)
Mutual labels:  terraform-provider
terraform-provider-junos
Terraform's provider for Junos devices
Stars: ✭ 44 (+100%)
Mutual labels:  terraform-provider
terraform-provider-inwx
terraform provider for INWX
Stars: ✭ 23 (+4.55%)
Mutual labels:  terraform-provider
terraform-provider-spinnaker
Terraform Provider to manage spinnaker pipelines
Stars: ✭ 36 (+63.64%)
Mutual labels:  terraform-provider
terraform-provider-redshift
Provider for AWS Redshift entities, eg Users, Groups, Permissions, Schemas, Databases
Stars: ✭ 46 (+109.09%)
Mutual labels:  terraform-provider
terraform-provider-elasticstack
Terraform provider for Elastic Stack
Stars: ✭ 61 (+177.27%)
Mutual labels:  terraform-provider

terraform-octopus

A plugin for Terraform to control / integrate with Octopus Deploy.

This is a work in progress. More providers and data-sources are planned, as well as a Provisioner to install the Octopus tentacle.

Tested against Octopus Deploy v3.3.17.

The following resource types are currently supported:

  • octopus_environment: Creates and manages an Octopus Deploy environment
  • octopus_variable: Creates and manages an Octopus Deploy variable (currently only project-level variables are supported)

Note that variables are matched on both name and combined scopes (Environments, Roles, Machines, Actions). If a variable already exists with the specified name and scopes, the provider will start managing the existing variable.

The following data-source types are currently supported:

  • octopus_environment: Tracks an existing Octopus Deploy environment
  • octopus_machine: Tracks an existing Octopus Deploy machine
  • octopus_project: Tracks an existing Octopus Deploy project
  • octopus_variable: Tracks an existing Octopus Deploy variable (currently only project-level variables are supported)

Data-sources are similar to variables, except they are read-only. The provider will read and track their state but never modify it.

To get started:

  • On windows, create / update $HOME\terraform.rc
  • On Linux / OSX, create / update ~/.terraformrc

And add the following contents:

providers {
	octopus = "path-to-the-folder/containing/terraform-provider-octopus"
}

Create a folder containing a single .tf file:

#
# This configuration will create an Octopus environment called "MyEnvironment" and configure a project-level variable named "MyVariable" to be scoped to it.
#

provider "octopus" {
	server_url   = "https://my-octopus-server/"
	api_key      = "my-octopus-api-key"
}

# Projects are a data source - the provider can read from them but not create or manage them.
data "octopus_project" "my_project" {
	slug         = "terraformtest" # The last segment of the URL in the browser when viewing the project home page.
}

data "octopus_machine" "my_machine" {
	slug         = "Machines-351" # The last segment of the URL in the browser when viewing the machine details home page.
}

resource "octopus_environment" "my_environment" {
	name         = "MyEnvironment"
}

resource "octopus_variable" "my_variable" {
	# This is the Id (or slug) of the project in which the variable is defined.
	project      = "${data.octopus_project.my_project.id}"

	name         = "MyVariable"
	value        = "Hello World"

	# The scopes (environment, role, machine, action) to which the variable applies.
	environments = ["${octopus_environment.my_environment.id}"]
}
  1. Run terraform plan -out tf.plan.
  2. Verify that everything looks ok.
  3. Run terraform apply tf.plan
  4. Have a look around and
  5. Run terraform show to inspect the current state.
  6. when it's time to clean up...
  7. Run terraform plan -destroy -out tf.plan
  8. Verify that everything looks ok.
  9. Run terraform apply tf.plan
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].