Skip to content

TimDurward/terraform-provider-slack

Repository files navigation

Terraform Provider for Slack CircleCI

This is a Slack provider for Terraform

The provider allows for creation & destruction of public Slack channels

Installation

Requirements

terraform-provider-slack is based on Terraform, this means that you need

Installation from binaries (recommended)

The recommended way to install terraform-provider-slack is use the binary distributions from the Releases page. The packages are available for Linux and macOS.

Download the latest release for your OS.

Linux

> wget https://github.com/TimDurward/terraform-provider-slack/releases/download/v0.2.0/terraform-provider-slack_linux_amd64
# Now copy the binary to the Terraform's plugins folder.
mkdir -p ~/.terraform.d/plugins/
mv terraform-provider-slack_linux_amd64 ~/.terraform.d/plugins/

Mac

> wget https://github.com/TimDurward/terraform-provider-slack/releases/download/v0.2.0/terraform-provider-slack_darwin_amd64
# Now copy the binary to the Terraform's plugins folder.
mkdir -p ~/.terraform.d/plugins/
mv terraform-provider-slack_darwin_amd64 ~/.terraform.d/plugins/

Compiling from source

Compile from source easily using Makefile.

*This is only necessary if your target OS/Architecture isn't listed in releases

make build

# Target is compiled at '$GOBIN/terraform-provider-slack'
mv $GOBIN/terraform-provider-slack ~/.terraform.d/plugins/

Example

provider "slack" {
  api_token = "SLACK_API_TOKEN"
}

resource "slack_channel" "jenkins_ci" {
  channel_name = "jenkins"
  channel_topic = "Jenkins Integration for production deploys"
}