Skip to content

Commit

Permalink
Merge pull request #1583 from hashicorp/create-pull-request/patch
Browse files Browse the repository at this point in the history
release: v0.63.0
  • Loading branch information
Maed223 authored Jan 23, 2025
2 parents 74ac7d9 + 1a40db3 commit bd02421
Show file tree
Hide file tree
Showing 15 changed files with 793 additions and 48 deletions.
8 changes: 4 additions & 4 deletions website/docs/cdktf/csharp/index.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ automatically installed by `terraform init` in the future:
terraform {
required_providers {
tfe = {
version = "~> 0.62.0"
version = "~> 0.63.0"
}
}
}
Expand All @@ -90,7 +90,7 @@ The above snippet using `RequiredProviders` is for Terraform 0.13+; if you are u

```hcl
provider "tfe" {
version = "~> 0.62.0"
version = "~> 0.63.0"
...
}
```
Expand All @@ -103,7 +103,7 @@ For more information on provider installation and constraining provider versions
provider "tfe" {
hostname = var.hostname # Optional, defaults to HCP Terraform `AppTerraformIo`
token = var.token
version = "~> 0.62.0"
version = "~> 0.63.0"
}
# Create an organization
Expand All @@ -129,4 +129,4 @@ The following arguments are supported:
arguments. Ensure that the organization already exists prior to using this argument.
This can also be specified using the `TfeOrganization` environment variable.

<!-- cache-key: cdktf-0.17.0-pre.15 input-c53fd50c149df357cf3dca9ae2dec851fb9e70077b6d8995cede275a4c0c61f6 -->
<!-- cache-key: cdktf-0.17.0-pre.15 input-2f1a6a27f478b3c7a44771588b04fce2662f17f71da41499c12bfb9d8ecee69c -->
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 -->
11 changes: 7 additions & 4 deletions website/docs/cdktf/csharp/r/workspace_run.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@ There are a few main use cases this resource was designed for:

- **Workspaces that depend on other workspaces.** If a workspace will create infrastructure that other workspaces rely on (for example, a Kubernetes cluster to deploy resources into), those downstream workspaces can depend on an initial `Apply` with `wait_for_run = true`, so they aren't created before their infrastructure dependencies.
- **A more reliable `queue_all_runs = true`.** The `QueueAllRuns` argument on `TfeWorkspace` requests an initial run, which can complete asynchronously outside of the Terraform run that creates the workspace. Unfortunately, it can't be used with workspaces that require variables to be set, because the `TfeVariable` resources themselves depend on the `TfeWorkspace`. By managing an initial `Apply` with `wait_for_run = false` that depends on your `TfeVariables`, you can accomplish the same goal without a circular dependency.
- **Safe workspace destruction.** To ensure a workspace's managed resources are destroyed before deleting it, manage a `Destroy` with `wait_for_run = true`. When you destroy the whole configuration, Terraform will wait for the destroy run to complete before deleting the workspace. This pattern is compatible with the `TfeWorkspace` resource's default safe deletion behavior.
- **Safe workspace destruction.** To ensure a workspace's managed resources are destroyed before deleting it, add a `Destroy` block with `wait_for_run = true`. When you destroy the `TfeWorkspaceRun` resource, Terraform will wait for the destroy run to complete before deleting the workspace. This pattern is compatible with the `TfeWorkspace` resource's default safe deletion behavior.

The `TfeWorkspaceRun` expects to own exactly one apply during a creation and/or one destroy during a destruction. This implies that even if previous successful applies exist in the workspace, a `TfeWorkspaceRun` resource that includes an `Apply` block will queue a new apply when added to a config.

~> **NOTE:** Use caution when removing the `TfeWorkspaceRun` resource from your configuration, as destroying it with a `Destroy` block present will create a destroy run which will destroy the workspace's underlying managed resources. To avoid this behavior, remove the `Destroy` block first.

## Example Usage

Basic usage with multiple workspaces:
Expand Down Expand Up @@ -199,8 +201,8 @@ class MyConvertedCode : TerraformStack
The following arguments are supported:

* `WorkspaceId` - (Required) ID of the workspace to execute the run.
* `Apply` - (Optional) Settings for the workspace's apply run during creation.
* `Destroy` - (Optional) Settings for the workspace's destroy run during destruction.
* `Apply` - (Optional) Adding an apply block ensures an apply run is queued when the resource is created. The block controls settings for the workspace's apply run during creation.
* `Destroy` - (Optional) Adding a destroy block ensures a destroy run is queued when the resource is destroyed. The block controls settings for the workspace's destroy run during destruction.

Both `Apply` and `Destroy` block supports:

Expand All @@ -219,4 +221,5 @@ Both `Apply` and `Destroy` block supports:
In addition to all arguments above, the following attributes are exported:

* `Id` - The ID of the run created by this resource. Note, if the resource was created without an `Apply{}` configuration block, then this ID will not refer to a real run in HCP Terraform.
<!-- cache-key: cdktf-0.17.0-pre.15 input-ef1d4e75ac0c6d99c8a7fe481ebea7451bae3648d17da23e434d8dfb5749ce2b -->

<!-- cache-key: cdktf-0.17.0-pre.15 input-326dcde8ef59895f6cb1224693fc7aa8de53e6795010027c9279e6a1d68b85c8 -->
8 changes: 4 additions & 4 deletions website/docs/cdktf/go/index.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ automatically installed by `terraform init` in the future:
terraform {
required_providers {
tfe = {
version = "~> 0.62.0"
version = "~> 0.63.0"
}
}
}
Expand All @@ -90,7 +90,7 @@ The above snippet using `RequiredProviders` is for Terraform 0.13+; if you are u

```hcl
provider "tfe" {
version = "~> 0.62.0"
version = "~> 0.63.0"
...
}
```
Expand All @@ -103,7 +103,7 @@ For more information on provider installation and constraining provider versions
provider "tfe" {
hostname = var.hostname # Optional, defaults to HCP Terraform `AppTerraformIo`
token = var.token
version = "~> 0.62.0"
version = "~> 0.63.0"
}
# Create an organization
Expand All @@ -129,4 +129,4 @@ The following arguments are supported:
arguments. Ensure that the organization already exists prior to using this argument.
This can also be specified using the `TfeOrganization` environment variable.

<!-- cache-key: cdktf-0.17.0-pre.15 input-c53fd50c149df357cf3dca9ae2dec851fb9e70077b6d8995cede275a4c0c61f6 -->
<!-- cache-key: cdktf-0.17.0-pre.15 input-2f1a6a27f478b3c7a44771588b04fce2662f17f71da41499c12bfb9d8ecee69c -->
146 changes: 146 additions & 0 deletions website/docs/cdktf/go/r/team_notification_configuration.html.markdown
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 -->
Loading

0 comments on commit bd02421

Please sign in to comment.