This is a Slack provider for Terraform
The provider allows for creation & destruction of public Slack channels
terraform-provider-slack is based on Terraform, this means that you need
- Terraform >=0.10.0
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.
> 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/
> 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/
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/
provider "slack" {
api_token = "SLACK_API_TOKEN"
}
data "slack_user" "name" {
name = "Jane"
real_name = "Jane Doe"
email = "[email protected]"
}
resource "slack_channel" "jenkins_ci" {
channel_name = "jenkins"
channel_topic = "Jenkins Integration for production deploys"
}