Motivation:
Building Builds: TeamCity Pipelines as Code using Terraform
Main projects is in need of new maintainers:
cvbarros/go-teamcity#94.
cvbarros#113
This project continue development with new features
Teamcity Provider is listed on the Terraform Registry.
The easiest to get started way is to follow instructions for requiring
providers.
Example:
terraform {
required_providers {
teamcity = {
source = "64mb/teamcity"
version = ">= 0.0.1"
}
}
}
provider "teamcity" {
# Configuration options
}
Once configured, running terraform init
will download the provider automatically from the registry.
Another way to install this provider is to use one of the binary distributions available as Releases. It contains pre-compiled bundles for Linux, MacOS and Windows.
Download and unpack the version for your OS/arch.
In the example below, we use MacOS (darwin_amd64) and version v1.0.1
:
VERSION=v1.0.1
wget https://github.com/64mb/terraform-provider-teamcity/releases/download/$VERSION/terraform-provider-teamcity_darwin_amd64_$VERSION.zip
tar -xvf terraform-provider-teamcity_darwin_amd64_$VERSION.zip
Then, copy the output file to your ~/.terraform.d/plugins
directory.
For Windows, use the directory: %APPDATA%\terraform.d\plugins
Note: If you never installed any terraform providers before, you'll have to create that directory.
cp terraform-provider-teamcity_$VERSION ~/.terraform.d/plugins/
Clone the repository to the directory of your choice, then from the root of repository, run the target below.
It is advisable to checkout a tag corresponding to a version first, instead of master
.
If the plugins directory doesn't exist, you have to create it first.
$ VERSION=v1.0.1 make install
This will build a binary for your platform and place it on the plugins directory.
Documentation on available on Terraform Registry: https://registry.terraform.io/providers/cvbarros/teamcity/latest/docs
Contributions to documentation are invaluable!
If you'd like to help keep it error-free and up to date, please see CONTRIBUTING.
You can find several sample configurations under /examples
.
As a best effort basis, the samples will be following
the same terraform version as the provider is built against.
There is a .terraform-version
file that indicates the
minimum terraform version to which the samples are compatible. Use of tfenv is recommended, so you can run multiple
versions of terraform locally and switch based on the .terraform-version
file.
Please feel free to open an issue if you encounter any problems, or contribute to new sample configurations.
Please see CONTRIBUTING.