Skip to content

Terraform module to manage the following Terraform Cloud/Enterprise resource (tfe_notification_configuration)

License

Notifications You must be signed in to change notification settings

dhoppeIT/terraform-tfe-notification

Repository files navigation

terraform-tfe-notification

Terraform module to manage the following Terraform Cloud/Enterprise resource:

  • tfe_notification_configuration

Graph

Graph

Usage

Copy and paste into your Terraform configuration, insert the variables and run terraform init:

module "tfe_organization" {
  source  = "dhoppeIT/organization/tfe"
  version = "~> 0.1"

  name  = "dhoppeIT"
  email = "terraform@dhoppe.it"
}

module "tfe_workspace" {
  source  = "dhoppeIT/workspace/tfe"
  version = "~> 0.2"

  name         = "terraform"
  organization = module.tfe_organization.name
}

module "tfe_notification" {
  source  = "dhoppeIT/notification/tfe"
  version = "~> 0.1"

  name             = "slack"
  enabled          = true
  destination_type = "slack"
  triggers = [
    "run:needs_attention",
    "run:errored"
  ]
  url          = "https://hooks.slack.com/services/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"
  workspace_id = module.tfe_workspace.id
}

Requirements

Name Version
terraform >= 1.0
tfe ~> 0.26

Providers

Name Version
tfe 0.39.0

Modules

No modules.

Resources

Name Type
tfe_notification_configuration.default resource

Inputs

Name Description Type Default Required
destination_type The type of notification configuration payload to send string n/a yes
email_addresses A list of email addresses list(string) null no
email_user_ids A list of user IDs list(string) null no
enabled Whether the notification configuration should be enabled or not bool false no
name Name of the notification configuration string n/a yes
token A write-only secure token for the notification configuration string null no
triggers The array of triggers for which this notification configuration will send notifications list(string) [] no
url The HTTP or HTTPS URL of the notification configuration where notification requests will be made string null no
workspace_id The id of the workspace that owns the notification configuration string n/a yes

Outputs

Name Description
id The ID of the notification configuration

Authors

Created and maintained by Dennis Hoppe.

License

Apache 2 licensed. See LICENSE for full details.