Skip to content

Commit 842fdd0

Browse files
release: v0.60.0 (#1518)
* cdktf: update documentation * Empty-Commit --------- Co-authored-by: sebasslash <[email protected]> Co-authored-by: Sebastian Rivera <[email protected]>
1 parent 66b790b commit 842fdd0

File tree

219 files changed

+5334
-4528
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

219 files changed

+5334
-4528
lines changed
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
---
2+
layout: "tfe"
3+
page_title: "Terraform Enterprise: tfe_github_app_installation"
4+
description: |-
5+
Get information on the Github App Installation.
6+
---
7+
8+
9+
<!-- Please do not edit this file, it is generated. -->
10+
# Data Source: tfe_github_app_installation
11+
12+
Use this data source to get information about the Github App Installation.
13+
14+
## Example Usage
15+
16+
### Finding a Github App Installation by its installation ID
17+
18+
```csharp
19+
using Constructs;
20+
using HashiCorp.Cdktf;
21+
/*Provider bindings are generated by running cdktf get.
22+
See https://cdk.tf/provider-generation for more details.*/
23+
using Gen.Providers.Tfe;
24+
class MyConvertedCode : TerraformStack
25+
{
26+
public MyConvertedCode(Construct scope, string name) : base(scope, name)
27+
{
28+
new DataTfeGithubAppInstallation.DataTfeGithubAppInstallation(this, "gha_installation", new DataTfeGithubAppInstallationConfig {
29+
InstallationId = 12345678
30+
});
31+
}
32+
}
33+
```
34+
35+
### Finding a Github App Installation by its name
36+
37+
```csharp
38+
using Constructs;
39+
using HashiCorp.Cdktf;
40+
/*Provider bindings are generated by running cdktf get.
41+
See https://cdk.tf/provider-generation for more details.*/
42+
using Gen.Providers.Tfe;
43+
class MyConvertedCode : TerraformStack
44+
{
45+
public MyConvertedCode(Construct scope, string name) : base(scope, name)
46+
{
47+
new DataTfeGithubAppInstallation.DataTfeGithubAppInstallation(this, "gha_installation", new DataTfeGithubAppInstallationConfig {
48+
Name = "github_username_or_organization"
49+
});
50+
}
51+
}
52+
```
53+
54+
## Argument Reference
55+
56+
The following arguments are supported. At least one of `Name`, `InstallationId` must be set.
57+
58+
* `InstallationId` - (Optional) ID of the Github Installation. The installation ID can be found in the URL slug when visiting the installation's configuration page, e.g `Https://githubCom/settings/installations/12345678`.
59+
* `Name` - (Optional) Name of the Github user or organization account that installed the app.
60+
61+
Must be one of: `InstallationId` or `Name`.
62+
63+
## Attributes Reference
64+
65+
In addition to all arguments above, the following attributes are exported:
66+
67+
* `Id` - The internal ID of the Github Installation. This is different from the `InstallationId`.
68+
69+
<!-- cache-key: cdktf-0.17.0-pre.15 input-5d439ec2ae1e837495b8cb500e2fcfe96d47a32f9fce3a10ffac876fe18a89dc -->

website/docs/cdktf/csharp/d/organization.html.markdown

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ In addition to all arguments above, the following attributes are exported:
4747
* `OwnersTeamSamlRoleId` - The name of the "owners" team.
4848
* `SendPassingStatusesForUntriggeredSpeculativePlans` - Whether or not to send VCS status updates for untriggered speculative plans. This can be useful if large numbers of untriggered workspaces are exhausting request limits for connected version control service providers like GitHub. Defaults to true. In Terraform Enterprise, this setting has no effect and cannot be changed but is also available in Site Administration.
4949
* `AggregatedCommitStatusEnabled` - Whether or not to enable Aggregated Status Checks. This can be useful for monorepo repositories with multiple workspaces receiving status checks for events such as a pull request.
50+
* `SpeculativePlanManagementEnabled` - Whether or not to enable Speculative Plan Management. If true, pending VCS-triggered speculative plans from outdated commits will be cancelled if a newer commit is pushed to the same branch.
5051
* `DefaultProjectId` - ID of the organization's default project. All workspaces created without specifying a project ID are created in this project.
5152

52-
<!-- cache-key: cdktf-0.17.0-pre.15 input-ef8f010996544db238976f7a2b7dfb50d77204d9275aeacc742c10b942f7c3e6 -->
53+
<!-- cache-key: cdktf-0.17.0-pre.15 input-9b73f546422e0ab13be41c89f26de4669725b44bfaf8e4720bbd31f838e37f2f -->
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
layout: "tfe"
3+
page_title: "Terraform Enterprise: tfe_organization_run_task_global_settings"
4+
description: |-
5+
Get information on a Run task's global settings.
6+
---
7+
8+
9+
<!-- Please do not edit this file, it is generated. -->
10+
# Data Source: tfe_organization_run_task_global_settings
11+
12+
[Run tasks](https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings/run-tasks) allow HCP Terraform to interact with external systems at specific points in the HCP Terraform run lifecycle. Run tasks are reusable configurations that you can attach to any workspace in an organization.
13+
14+
The tfe_organization_run_task_global_settings resource creates, updates and destroys the [global settings](https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings/run-tasks#global-run-tasks) for an [Organization Run task](https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings/run-tasks#creating-a-run-task). Your organization must have the `GlobalRunTask` [entitlement](https://developer.hashicorp.com/terraform/cloud-docs/api-docs#feature-entitlements) to use global run tasks.
15+
16+
## Example Usage
17+
18+
```csharp
19+
using Constructs;
20+
using HashiCorp.Cdktf;
21+
/*Provider bindings are generated by running cdktf get.
22+
See https://cdk.tf/provider-generation for more details.*/
23+
using Gen.Providers.Tfe;
24+
class MyConvertedCode : TerraformStack
25+
{
26+
public MyConvertedCode(Construct scope, string name) : base(scope, name)
27+
{
28+
new DataTfeOrganizationRunTaskGlobalSettings.DataTfeOrganizationRunTaskGlobalSettings(this, "example", new DataTfeOrganizationRunTaskGlobalSettingsConfig {
29+
TaskId = "task-abc123"
30+
});
31+
}
32+
}
33+
```
34+
35+
## Argument Reference
36+
37+
The following arguments are supported:
38+
39+
* `TaskId` - (Required) The id of the Run task with the global settings.
40+
41+
## Attributes Reference
42+
43+
In addition to all arguments above, the following attributes are exported:
44+
45+
* `Enabled` - Whether the run task will be applied globally.
46+
* `EnforcementLevel` - The enforcement level of the global task. Valid values are `Advisory` and `Mandatory`.
47+
* `Stages` - The stages to run the task in. Valid values are one or more of `PrePlan`, `PostPlan`, `PreApply` and `post apply`.
48+
49+
<!-- cache-key: cdktf-0.17.0-pre.15 input-28126418850a686e0d2f6cf108d96720ece413d7749e5fd727286729c468b717 -->

website/docs/cdktf/csharp/d/project.html.markdown

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,14 @@ description: |-
55
Get information on a Project.
66
---
77

8+
9+
<!-- Please do not edit this file, it is generated. -->
810
# Data Source: tfe_project
911

1012
Use this data source to get information about a project.
1113

14+
~> **NOTE:** The `WorkspaceIds` and `WorkspaceNames` attributes are not guaranteed to return values in the same order, so they cannot be reliably mapped to one another. To map workspace names to IDs reliably, it is recommended to pass those names into the `TfeWorkspaceIds` data source.
15+
1216
## Example Usage
1317

1418
```csharp
@@ -42,4 +46,6 @@ In addition to all arguments above, the following attributes are exported:
4246

4347
* `Id` - The project ID.
4448
* `WorkspaceIds` - IDs of the workspaces that are associated with the project.
45-
<!-- cache-key: cdktf-0.17.0-pre.15 input-6d3f57f584544e1199917337f5f8954b7b7709d2cb911131273294430f81b2f2 -->
49+
* `WorkspaceNames` - Names of the workspaces that are associated with the project.
50+
51+
<!-- cache-key: cdktf-0.17.0-pre.15 input-c0fb226c1ac838d85660d99cb036d77ac141264beb3f94ffd4b3e2369f67b971 -->
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
layout: "tfe"
3+
page_title: "Terraform Enterprise: tfe_projects"
4+
description: |-
5+
Get information on projects in an organization.
6+
---
7+
8+
9+
<!-- Please do not edit this file, it is generated. -->
10+
# Data Source: tfe_projects
11+
12+
Use this data source to get information about all projects in an organization.
13+
14+
## Example Usage
15+
16+
```csharp
17+
using Constructs;
18+
using HashiCorp.Cdktf;
19+
/*Provider bindings are generated by running cdktf get.
20+
See https://cdk.tf/provider-generation for more details.*/
21+
using Gen.Providers.Tfe;
22+
class MyConvertedCode : TerraformStack
23+
{
24+
public MyConvertedCode(Construct scope, string name) : base(scope, name)
25+
{
26+
new DataTfeProjects.DataTfeProjects(this, "all", new Struct {
27+
Organization = "my-org-name"
28+
});
29+
}
30+
}
31+
```
32+
33+
## Argument Reference
34+
35+
The following arguments are supported:
36+
37+
* `Organization` - (Optional) Name of the organization. If omitted, organization must be defined in the provider config.
38+
39+
## Attributes Reference
40+
41+
* `Projects` - List of projects in the organization. Each element contains the following attributes:
42+
* `Id` - ID of the project.
43+
* `Name` - Name of the project.
44+
* `Description` - Description of the organization.
45+
* `Organization` - Name of the organization.
46+
47+
48+
<!-- cache-key: cdktf-0.17.0-pre.15 input-98a90539531e97fa5e4034996187e685dd605e9a2a8a2d3a58acca240f7dc197 -->

website/docs/cdktf/csharp/d/workspace.html.markdown

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ In addition to all arguments above, the following attributes are exported:
4848
* `AllowDestroyPlan` - Indicates whether destroy plans can be queued on the workspace.
4949
* `AutoApply` - Indicates whether to automatically apply changes when a Terraform plan is successful.
5050
* `AutoApplyRunTrigger` - Whether the workspace will automatically apply changes for runs that were created by run triggers from another workspace.
51+
* `AutoDestroyActivityDuration` - A duration string representing time after workspace activity when an auto-destroy run will be triggered.
5152
* `AutoDestroyAt` - Future date/time string at which point all resources in a workspace will be scheduled to be deleted.
5253
* `AssessmentsEnabled` - (Available only in HCP Terraform) Indicates whether health assessments such as drift detection are enabled for the workspace.
5354
* `FileTriggersEnabled` - Indicates whether runs are triggered based on the changed files in a VCS push (if `True`) or always triggered on every push (if `False`).
@@ -89,4 +90,4 @@ The `VcsRepo` block contains:
8990
* `OauthTokenId` - OAuth token ID of the configured VCS connection.
9091
* `TagsRegex` - A regular expression used to trigger a Workspace run for matching Git tags.
9192

92-
<!-- cache-key: cdktf-0.17.0-pre.15 input-7500b2311f3804feb075f040e60989aa8e4fc69cc4ef327b51b7e3ab1f599d6d -->
93+
<!-- cache-key: cdktf-0.17.0-pre.15 input-ae8f9f76e2d23dc67ab5c3690201b7bf88a8d93dc83db02352e0f31425999200 -->

website/docs/cdktf/csharp/d/workspace_run_task.html.markdown

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ In addition to all arguments above, the following attributes are exported:
4646

4747
* `EnforcementLevel` - The enforcement level of the task.
4848
* `Id` - The ID of the Workspace Run task.
49-
* `Stage` - Which stage the task will run in.
49+
* `Stage` - **Deprecated** Use `Stages` instead.
50+
* `Stages` - Which stages the task will run in.
5051

51-
<!-- cache-key: cdktf-0.17.0-pre.15 input-86410a403310625b9c9007c1409553681e71bb1d5dfb652c72477e846011cede -->
52+
<!-- cache-key: cdktf-0.17.0-pre.15 input-7fbd90d138dd4a2dc68a0f3441cd300ba07517660e0b7b4fdab7dbddd51d71b5 -->

website/docs/cdktf/csharp/index.html.markdown

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ automatically installed by `terraform init` in the future:
7777
terraform {
7878
required_providers {
7979
tfe = {
80-
version = "~> 0.57.0"
80+
version = "~> 0.60.0"
8181
}
8282
}
8383
}
@@ -90,7 +90,7 @@ The above snippet using `RequiredProviders` is for Terraform 0.13+; if you are u
9090

9191
```hcl
9292
provider "tfe" {
93-
version = "~> 0.57.0"
93+
version = "~> 0.60.0"
9494
...
9595
}
9696
```
@@ -103,7 +103,7 @@ For more information on provider installation and constraining provider versions
103103
provider "tfe" {
104104
hostname = var.hostname # Optional, defaults to HCP Terraform `AppTerraformIo`
105105
token = var.token
106-
version = "~> 0.57.0"
106+
version = "~> 0.60.0"
107107
}
108108
109109
# Create an organization
@@ -129,4 +129,4 @@ The following arguments are supported:
129129
arguments. Ensure that the organization already exists prior to using this argument.
130130
This can also be specified using the `TfeOrganization` environment variable.
131131

132-
<!-- cache-key: cdktf-0.17.0-pre.15 input-d72291151cea8709b729b9dcfb06e9dae682a8cb6e399d427d05e29354451180 -->
132+
<!-- cache-key: cdktf-0.17.0-pre.15 input-a77df58c9615ebcb917fe58dd81f9e798ce819182034bd2e639ba91520a1ccad -->
Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
---
2+
layout: "tfe"
3+
page_title: "Terraform Enterprise: tfe_data_retention_policy"
4+
description: |-
5+
Manages data retention policies for organizations and workspaces
6+
---
7+
8+
9+
<!-- Please do not edit this file, it is generated. -->
10+
# tfe_data_retention_policy
11+
12+
Creates a data retention policy attached to either an organization or workspace. This resource is for Terraform Enterprise only.
13+
14+
## Example Usage
15+
16+
Creating a data retention policy for a workspace:
17+
18+
```csharp
19+
using Constructs;
20+
using HashiCorp.Cdktf;
21+
/*Provider bindings are generated by running cdktf get.
22+
See https://cdk.tf/provider-generation for more details.*/
23+
using Gen.Providers.Tfe;
24+
class MyConvertedCode : TerraformStack
25+
{
26+
public MyConvertedCode(Construct scope, string name) : base(scope, name)
27+
{
28+
var tfeOrganizationTestOrganization = new Organization.Organization(this, "test-organization", new OrganizationConfig {
29+
Email = "[email protected]",
30+
Name = "my-org-name"
31+
});
32+
var tfeWorkspaceTestWorkspace = new Workspace.Workspace(this, "test-workspace", new WorkspaceConfig {
33+
Name = "my-workspace-name",
34+
Organization = Token.AsString(tfeOrganizationTestOrganization.Name)
35+
});
36+
new DataRetentionPolicy.DataRetentionPolicy(this, "foobar", new DataRetentionPolicyConfig {
37+
DeleteOlderThan = new [] { new Struct {
38+
Days = 42
39+
} },
40+
WorkspaceId = Token.AsString(tfeWorkspaceTestWorkspace.Id)
41+
});
42+
}
43+
}
44+
```
45+
46+
Creating a data retention policy for an organization:
47+
48+
```csharp
49+
using Constructs;
50+
using HashiCorp.Cdktf;
51+
/*Provider bindings are generated by running cdktf get.
52+
See https://cdk.tf/provider-generation for more details.*/
53+
using Gen.Providers.Tfe;
54+
class MyConvertedCode : TerraformStack
55+
{
56+
public MyConvertedCode(Construct scope, string name) : base(scope, name)
57+
{
58+
var tfeOrganizationTestOrganization = new Organization.Organization(this, "test-organization", new OrganizationConfig {
59+
Email = "[email protected]",
60+
Name = "my-org-name"
61+
});
62+
new DataRetentionPolicy.DataRetentionPolicy(this, "foobar", new DataRetentionPolicyConfig {
63+
DeleteOlderThan = new [] { new Struct {
64+
Days = 1138
65+
} },
66+
Organization = Token.AsString(tfeOrganizationTestOrganization.Name)
67+
});
68+
}
69+
}
70+
```
71+
72+
Creating a data retention policy for an organization and exclude a single workspace from it:
73+
74+
```hcl
75+
resource "tfe_organization" "test-organization" {
76+
name = "my-org-name"
77+
78+
}
79+
80+
// create data retention policy the organization
81+
resource "tfe_data_retention_policy" "foobar" {
82+
organization = tfe_organization.test-organization.name
83+
84+
delete_older_than {
85+
days = 1138
86+
}
87+
}
88+
89+
resource "tfe_workspace" "test-workspace" {
90+
name = "my-workspace-name"
91+
organization = tfe_organization.test-organization.name
92+
}
93+
94+
// create a policy that prevents automatic deletion of data in the test-workspace
95+
resource "tfe_data_retention_policy" "foobar" {
96+
workspace_id = tfe_workspace.test-workspace.id
97+
98+
dont_delete {}
99+
}
100+
```
101+
102+
## Argument Reference
103+
104+
The following arguments are supported:
105+
106+
* `Organization` - (Optional) The name of the organization you want the policy to apply to. Must not be set if `WorkspaceId` is set.
107+
* `WorkspaceId` - (Optional) The ID of the workspace you want the policy to apply to. Must not be set if `Organization` is set.
108+
* `DeleteOlderThan` - (Optional) If this block is set, the created policy will apply to any data older than the configured number of days. Must not be set if `DontDelete` is set.
109+
* `DontDelete` - (Optional) If this block is set, the created policy will prevent other policies from deleting data from this workspace or organization. Must not be set if `DeleteOlderThan` is set.
110+
111+
112+
## Import
113+
114+
A resource can be imported; use `<ORGANIZATION>/<WORKSPACE NAME>` or `<ORGANIZATION>` as the import ID. For example:
115+
116+
```shell
117+
terraform import tfe_data_retention_policy.foobar my-org-name/my-workspace-name
118+
```
119+
120+
<!-- cache-key: cdktf-0.17.0-pre.15 input-f96ec458c2bca8796e296f06011ad4fc674072a5029841651f6906f053e79d76 -->

0 commit comments

Comments
 (0)