-
Notifications
You must be signed in to change notification settings - Fork 160
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1583 from hashicorp/create-pull-request/patch
release: v0.63.0
- Loading branch information
Showing
15 changed files
with
793 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
146 changes: 146 additions & 0 deletions
146
website/docs/cdktf/csharp/r/team_notification_configuration.html.markdown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,146 @@ | ||
--- | ||
layout: "tfe" | ||
page_title: "Terraform Enterprise: tfe_team_notification_configuration" | ||
description: |- | ||
Manages team notifications configurations. | ||
--- | ||
|
||
|
||
<!-- Please do not edit this file, it is generated. --> | ||
# tfe_team_notification_configuration | ||
|
||
HCP Terraform can be configured to send notifications to a team for certain events. | ||
Team notification configurations allow you to specify a URL, destination type, and what events will trigger the notification. | ||
Each team can have up to 20 notification configurations, and they apply to configured events for all workspaces that the configured team has access to. | ||
|
||
## Example Usage | ||
|
||
Basic usage: | ||
|
||
```hcl | ||
resource "tfe_organization" "test" { | ||
name = "my-org-name" | ||
email = "[email protected]" | ||
} | ||
resource "tfe_team" "test" { | ||
name = "my-team-name" | ||
organization = tfe_organization.test.id | ||
} | ||
resource "tfe_team_notification_configuration" "test" { | ||
name = "my-test-notification-configuration" | ||
enabled = true | ||
destination_type = "generic" | ||
triggers = ["change_request:created"] | ||
url = "https://example.com" | ||
team_id = tfe_team.test.id | ||
} | ||
``` | ||
|
||
With `DestinationType` of `Email`: | ||
|
||
```hcl | ||
resource "tfe_organization" "test" { | ||
name = "my-org-name" | ||
email = "[email protected]" | ||
} | ||
resource "tfe_team" "test" { | ||
name = "my-team-name" | ||
organization = tfe_organization.test.id | ||
} | ||
data "tfe_organization_membership" "test" { | ||
organization = tfe_organization.test.name | ||
email = "[email protected]" | ||
} | ||
resource "tfe_team_organization_member" "test" { | ||
team_id = tfe_team.test.id | ||
organization_membership_id = data.tfe_organization_membership.test.id | ||
} | ||
resource "tfe_team_notification_configuration" "test" { | ||
name = "my-test-email-notification-configuration" | ||
enabled = true | ||
destination_type = "email" | ||
email_user_ids = [tfe_organization_membership.test.user_id] | ||
triggers = ["change_request:created"] | ||
team_id = tfe_team.test.id | ||
} | ||
``` | ||
|
||
(**TFE only**) With `DestinationType` of `Email`, using `EmailAddresses` list and `EmailUsers`: | ||
|
||
```hcl | ||
resource "tfe_organization" "test" { | ||
name = "my-org-name" | ||
email = "[email protected]" | ||
} | ||
resource "tfe_team" "test" { | ||
name = "my-team-name" | ||
organization = tfe_organization.test.id | ||
} | ||
data "tfe_organization_membership" "test" { | ||
organization = tfe_organization.test.name | ||
email = "[email protected]" | ||
} | ||
resource "tfe_team_organization_member" "test" { | ||
team_id = tfe_team.test.id | ||
organization_membership_id = data.tfe_organization_membership.test.id | ||
} | ||
resource "tfe_team_notification_configuration" "test" { | ||
name = "my-test-email-notification-configuration" | ||
enabled = true | ||
destination_type = "email" | ||
email_user_ids = [tfe_organization_membership.test.user_id] | ||
email_addresses = ["[email protected]", "[email protected]", "[email protected]"] | ||
triggers = ["change_request:created"] | ||
team_id = tfe_team.test.id | ||
} | ||
``` | ||
|
||
## Argument Reference | ||
|
||
The following arguments are supported: | ||
|
||
- `Name` - (Required) Name of the notification configuration. | ||
- `DestinationType` - (Required) The type of notification configuration payload to send. | ||
Valid values are: | ||
- `Generic` | ||
- `Email` available in HCP Terraform or Terraform Enterprise v202005-1 or later | ||
- `Slack` | ||
- `MicrosoftTeams` available in HCP Terraform or Terraform Enterprise v202206-1 or later | ||
- `TeamId` - (Required) The ID of the team that owns the notification configuration. | ||
- `Url` - (Required if `DestinationType` is `Generic`, `MicrosoftTeams`, or `Slack`) The HTTP or HTTPS URL of the notification configuration where notification requests will be made. This value _must not_ be provided if `DestinationType` is `Email`. | ||
- `EmailAddresses` - (Optional) **TFE only** A list of email addresses. This value | ||
_must not_ be provided if `DestinationType` is `Generic`, `MicrosoftTeams`, or `Slack`. | ||
- `EmailUserIds` - (Optional) A list of user IDs. This value _must not_ be provided | ||
if `DestinationType` is `Generic`, `MicrosoftTeams`, or `Slack`. | ||
- `Enabled` - (Optional) Whether the notification configuration should be enabled or not. | ||
Disabled configurations will not send any notifications. Defaults to `False`. | ||
- `Token` - (Optional) A write-only secure token for the notification configuration, which can | ||
be used by the receiving server to verify request authenticity when configured for notification | ||
configurations with a destination type of `Generic`. Defaults to `Null`. | ||
This value _must not_ be provided if `DestinationType` is `Email`, `MicrosoftTeams`, or `Slack`. | ||
- `Triggers` - (Optional) The array of triggers for which this notification configuration will | ||
send notifications. Currently, the only valid value is `ChangeRequest:created`. | ||
|
||
## Attributes Reference | ||
|
||
- `Id` - The ID of the notification configuration. | ||
|
||
## Import | ||
|
||
Team notification configurations can be imported; use `<NOTIFICATION CONFIGURATION ID>` as the import ID. For example: | ||
|
||
```shell | ||
terraform import tfe_team_notification_configuration.test nc-qV9JnKRkmtMa4zcA | ||
``` | ||
|
||
<!-- cache-key: cdktf-0.17.0-pre.15 input-e19a07b2d6595b58e8595b5ac25d781ff68c58ce67d0af5d239cd0cd444484fa --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
146 changes: 146 additions & 0 deletions
146
website/docs/cdktf/go/r/team_notification_configuration.html.markdown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,146 @@ | ||
--- | ||
layout: "tfe" | ||
page_title: "Terraform Enterprise: tfe_team_notification_configuration" | ||
description: |- | ||
Manages team notifications configurations. | ||
--- | ||
|
||
|
||
<!-- Please do not edit this file, it is generated. --> | ||
# tfe_team_notification_configuration | ||
|
||
HCP Terraform can be configured to send notifications to a team for certain events. | ||
Team notification configurations allow you to specify a URL, destination type, and what events will trigger the notification. | ||
Each team can have up to 20 notification configurations, and they apply to configured events for all workspaces that the configured team has access to. | ||
|
||
## Example Usage | ||
|
||
Basic usage: | ||
|
||
```hcl | ||
resource "tfe_organization" "test" { | ||
name = "my-org-name" | ||
email = "[email protected]" | ||
} | ||
resource "tfe_team" "test" { | ||
name = "my-team-name" | ||
organization = tfe_organization.test.id | ||
} | ||
resource "tfe_team_notification_configuration" "test" { | ||
name = "my-test-notification-configuration" | ||
enabled = true | ||
destination_type = "generic" | ||
triggers = ["change_request:created"] | ||
url = "https://example.com" | ||
team_id = tfe_team.test.id | ||
} | ||
``` | ||
|
||
With `DestinationType` of `Email`: | ||
|
||
```hcl | ||
resource "tfe_organization" "test" { | ||
name = "my-org-name" | ||
email = "[email protected]" | ||
} | ||
resource "tfe_team" "test" { | ||
name = "my-team-name" | ||
organization = tfe_organization.test.id | ||
} | ||
data "tfe_organization_membership" "test" { | ||
organization = tfe_organization.test.name | ||
email = "[email protected]" | ||
} | ||
resource "tfe_team_organization_member" "test" { | ||
team_id = tfe_team.test.id | ||
organization_membership_id = data.tfe_organization_membership.test.id | ||
} | ||
resource "tfe_team_notification_configuration" "test" { | ||
name = "my-test-email-notification-configuration" | ||
enabled = true | ||
destination_type = "email" | ||
email_user_ids = [tfe_organization_membership.test.user_id] | ||
triggers = ["change_request:created"] | ||
team_id = tfe_team.test.id | ||
} | ||
``` | ||
|
||
(**TFE only**) With `DestinationType` of `Email`, using `EmailAddresses` list and `EmailUsers`: | ||
|
||
```hcl | ||
resource "tfe_organization" "test" { | ||
name = "my-org-name" | ||
email = "[email protected]" | ||
} | ||
resource "tfe_team" "test" { | ||
name = "my-team-name" | ||
organization = tfe_organization.test.id | ||
} | ||
data "tfe_organization_membership" "test" { | ||
organization = tfe_organization.test.name | ||
email = "[email protected]" | ||
} | ||
resource "tfe_team_organization_member" "test" { | ||
team_id = tfe_team.test.id | ||
organization_membership_id = data.tfe_organization_membership.test.id | ||
} | ||
resource "tfe_team_notification_configuration" "test" { | ||
name = "my-test-email-notification-configuration" | ||
enabled = true | ||
destination_type = "email" | ||
email_user_ids = [tfe_organization_membership.test.user_id] | ||
email_addresses = ["[email protected]", "[email protected]", "[email protected]"] | ||
triggers = ["change_request:created"] | ||
team_id = tfe_team.test.id | ||
} | ||
``` | ||
|
||
## Argument Reference | ||
|
||
The following arguments are supported: | ||
|
||
- `Name` - (Required) Name of the notification configuration. | ||
- `DestinationType` - (Required) The type of notification configuration payload to send. | ||
Valid values are: | ||
- `Generic` | ||
- `Email` available in HCP Terraform or Terraform Enterprise v202005-1 or later | ||
- `Slack` | ||
- `MicrosoftTeams` available in HCP Terraform or Terraform Enterprise v202206-1 or later | ||
- `TeamId` - (Required) The ID of the team that owns the notification configuration. | ||
- `Url` - (Required if `DestinationType` is `Generic`, `MicrosoftTeams`, or `Slack`) The HTTP or HTTPS URL of the notification configuration where notification requests will be made. This value _must not_ be provided if `DestinationType` is `Email`. | ||
- `EmailAddresses` - (Optional) **TFE only** A list of email addresses. This value | ||
_must not_ be provided if `DestinationType` is `Generic`, `MicrosoftTeams`, or `Slack`. | ||
- `EmailUserIds` - (Optional) A list of user IDs. This value _must not_ be provided | ||
if `DestinationType` is `Generic`, `MicrosoftTeams`, or `Slack`. | ||
- `Enabled` - (Optional) Whether the notification configuration should be enabled or not. | ||
Disabled configurations will not send any notifications. Defaults to `False`. | ||
- `Token` - (Optional) A write-only secure token for the notification configuration, which can | ||
be used by the receiving server to verify request authenticity when configured for notification | ||
configurations with a destination type of `Generic`. Defaults to `Null`. | ||
This value _must not_ be provided if `DestinationType` is `Email`, `MicrosoftTeams`, or `Slack`. | ||
- `Triggers` - (Optional) The array of triggers for which this notification configuration will | ||
send notifications. Currently, the only valid value is `ChangeRequest:created`. | ||
|
||
## Attributes Reference | ||
|
||
- `Id` - The ID of the notification configuration. | ||
|
||
## Import | ||
|
||
Team notification configurations can be imported; use `<NOTIFICATION CONFIGURATION ID>` as the import ID. For example: | ||
|
||
```shell | ||
terraform import tfe_team_notification_configuration.test nc-qV9JnKRkmtMa4zcA | ||
``` | ||
|
||
<!-- cache-key: cdktf-0.17.0-pre.15 input-e19a07b2d6595b58e8595b5ac25d781ff68c58ce67d0af5d239cd0cd444484fa --> |
Oops, something went wrong.