Skip to content

Commit

Permalink
Merge pull request #1090 from hashicorp/nf/oct23-update-cdktf-docs
Browse files Browse the repository at this point in the history
cdktf: update documentation
  • Loading branch information
nfagerlund authored Oct 5, 2023
2 parents 8995fb5 + 7668e03 commit 69123a1
Show file tree
Hide file tree
Showing 162 changed files with 3,222 additions and 3,438 deletions.
29 changes: 26 additions & 3 deletions website/docs/cdktf/csharp/d/organization_membership.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ description: |-
Get information on an organization membership.
---


<!-- Please do not edit this file, it is generated. -->
# Data Source: tfe_organization_membership

Use this data source to get information about an organization membership.
Expand Down Expand Up @@ -57,15 +59,36 @@ class MyConvertedCode : TerraformStack
}
```

### Fetch by organization membership ID

```csharp
using Constructs;
using HashiCorp.Cdktf;
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
using Gen.Providers.Tfe;
class MyConvertedCode : TerraformStack
{
public MyConvertedCode(Construct scope, string name) : base(scope, name)
{
new DataTfeOrganizationMembership.DataTfeOrganizationMembership(this, "test", new DataTfeOrganizationMembershipConfig {
Organization = "my-org-name",
OrganizationMembershipId = "ou-xxxxxxxxxxx"
});
}
}
```

## Argument Reference

The following arguments are supported:

* `Organization` - (Required) Name of the organization.
* `Organization` - (Optional) Name of the organization.
* `Email` - (Optional) Email of the user.
* `Username` - (Optional) The username of the user.
* `OrganizationMembershipId` - (Optional) ID belonging to the organziation membership.

~> **NOTE:** While `Email` and `Username` are optional arguments, one or the other is required.
~> **NOTE:** While `Email` and `Username` are optional arguments, one or the other is required if `OrganizationMembershipId` argument is not provided.

## Attributes Reference

Expand All @@ -75,4 +98,4 @@ In addition to all arguments above, the following attributes are exported:
* `UserId` - The ID of the user associated with the organization membership.
* `Username` - The username of the user associated with the organization membership.

<!-- cache-key: cdktf-0.17.0-pre.15 input-4a14b3c66d2d0654b6af772796f3c1bdf8871760782092fd770887fd1a21bb84 -->
<!-- cache-key: cdktf-0.17.0-pre.15 input-d0160d0a09a0b3ce6035db02657e5b320810e469cbd9da4ae71b7158b313258f -->
3 changes: 2 additions & 1 deletion website/docs/cdktf/csharp/d/policy_set.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ The following arguments are supported:
* `Kind` - The policy-as-code framework for the policy. Valid values are "sentinel" and "opa".
* `Overridable` - Whether users can override this policy when it fails during a run. Only valid for OPA policies.
* `WorkspaceIds` - IDs of the workspaces that use the policy set.
* `ExcludedWorkspaceIds` - IDs of the workspaces that do not use the policy set.
* `ProjectIds` - IDs of the projects that use the policy set.
* `PolicyIds` - IDs of the policies attached to the policy set.
* `PoliciesPath` - The sub-path within the attached VCS repository when using `VcsRepo`.
Expand All @@ -66,4 +67,4 @@ The `VcsRepo` block contains:
* `OauthTokenId` - OAuth token ID of the configured VCS connection.


<!-- cache-key: cdktf-0.17.0-pre.15 input-54cb92dfae22abe76f4a8306daadcae6353d03b00d72dfbb74c8950c625507e0 -->
<!-- cache-key: cdktf-0.17.0-pre.15 input-bff8c51389c3dbd386e33f4eb88fd654798f5c7d466c1606e6c90d22ca8ae19a -->
45 changes: 45 additions & 0 deletions website/docs/cdktf/csharp/d/teams.html.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
layout: "tfe"
page_title: "Terraform Enterprise: tfe_teams"
description: |-
Get information on Teams.
---


<!-- Please do not edit this file, it is generated. -->
# Data Source: tfe_teams

Use this data source to get a list of Teams in an Organization and a map of their IDs. The Teams returned may be a subset of all teams in an Organization based on the permissions of the API token.

## Example Usage

```csharp
using Constructs;
using HashiCorp.Cdktf;
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
using Gen.Providers.Tfe;
class MyConvertedCode : TerraformStack
{
public MyConvertedCode(Construct scope, string name) : base(scope, name)
{
new DataTfeTeams.DataTfeTeams(this, "foo", new DataTfeTeamsConfig {
Organization = "my-org-name"
});
}
}
```

## Argument Reference

The following arguments are supported:

* `Organization` - (Optional) Name of the organization.

## Attributes Reference

In addition to all arguments above, the following attributes are exported:
* `Id` - Name of the organization.
* `Names` - A list of team names in an organization.
* `Ids` - A map of team names in an organization and their IDs.
<!-- cache-key: cdktf-0.17.0-pre.15 input-cf3ee1827f2be48f369b644c694e42391fe00d2d4bd827ba913b0bf211d958c0 -->
5 changes: 4 additions & 1 deletion website/docs/cdktf/csharp/d/variable_set.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ description: |-
Get information on organization variable sets.
---


<!-- Please do not edit this file, it is generated. -->
# Data Source: tfe_variable_set

This data source is used to retrieve a named variable set
Expand Down Expand Up @@ -47,5 +49,6 @@ The following arguments are supported:
* `Global` - Whether or not the variable set applies to all workspaces in the organization.
* `WorkspaceIds` - IDs of the workspaces that use the variable set.
* `VariableIds` - IDs of the variables attached to the variable set.
* `ProjectIds` - IDs of the projects that use the variable set.

<!-- cache-key: cdktf-0.17.0-pre.15 input-d19707264366858a1d24d44e993aa1bb8dc96f8eae127bcd58f0769f48077a4f -->
<!-- cache-key: cdktf-0.17.0-pre.15 input-ae45fb346c802a01a9f7b3651d998c5c2a99783e046d2e156817923efbbe7dc3 -->
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.48.0"
version = "~> 0.49.2"
}
}
}
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.48.0"
version = "~> 0.49.2"
...
}
```
Expand All @@ -103,7 +103,7 @@ For more information on provider installation and constraining provider versions
provider "tfe" {
hostname = var.hostname # Optional, defaults to Terraform Cloud `AppTerraformIo`
token = var.token
version = "~> 0.48.0"
version = "~> 0.49.2"
}
# 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-a5e1d5b687ea945c66490b8d5558c062336d41c52db56dadeb96156a725efed6 -->
<!-- cache-key: cdktf-0.17.0-pre.15 input-33fe894f2a52223676bdccc7d758f6743af2cb3c4901d8dbb5367eb16795f07a -->
2 changes: 1 addition & 1 deletion website/docs/cdktf/csharp/r/registry_module.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -212,4 +212,4 @@ terraform import tfe_registry_module.test my-org-name/public/namespace/name/prov
terraform import tfe_registry_module.test my-org-name/name/provider/mod-qV9JnKRkmtMa4zcA
```

<!-- cache-key: cdktf-0.17.0-pre.15 input-73fb04cba01303aff48c3c32c7ea49194a8f795307ef90c104807e23257c79ac -->
<!-- cache-key: cdktf-0.17.0-pre.15 input-d0184f94e79f432f50dea11aef3a9b7449006807fb197c05220e48a2f1f3f71e -->
10 changes: 5 additions & 5 deletions website/docs/cdktf/csharp/r/team_project_access.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ that affect the project itself and all workspaces in the project, by using `Proj

The following permissions apply to the project itself.

| project-access | Description, Default, Valid Values |
| project_access | Description, Default, Valid Values |
|---------------------|---------------------------------------------|
| `Settings` | The permission to grant for the project's settings. Default: `Read`. Valid strings: `Read`, `Update`, or `Delete` |
| `Teams` | The permission to grant for the project's teams. Default: `None`, Valid strings: `None`, `Read`, or `Manage` |
Expand All @@ -71,7 +71,7 @@ The following permissions apply to the project itself.

The following permissions apply to all workpsaces (and future workspaces) in the project.

| workspace-access | Description, Default, Valid Values |
| workspace_access | Description, Default, Valid Values |
|----------------------|-------------------------------------------------------|
| `Runs` | The permission to grant project's workspaces' runs. Default: `Read`. Valid strings: `Read`, `Plan`, or `Apply`. |
| `SentinelMocks` | The permission to grant project's workspaces' Sentinel mocks. Default: `None`. Valid strings: `None`, or `Read`. |
Expand Down Expand Up @@ -106,13 +106,13 @@ class MyConvertedCode : TerraformStack
});
new TeamProjectAccess.TeamProjectAccess(this, "custom", new TeamProjectAccessConfig {
Access = "custom",
ProjectAccess = new [] { new Struct {
ProjectAccess = new [] { new TeamProjectAccessProjectAccess {
Settings = "read",
Teams = "none"
} },
ProjectId = Token.AsString(tfeProjectTest.Id),
TeamId = Token.AsString(tfeTeamDev.Id),
WorkspaceAccess = new [] { new Struct {
WorkspaceAccess = new [] { new TeamProjectAccessWorkspaceAccess {
Create = true,
Delete = false,
Locking = true,
Expand Down Expand Up @@ -141,4 +141,4 @@ example:
terraform import tfe_team_project_access.admin tprj-2pmtXpZa4YzVMTPi
```

<!-- cache-key: cdktf-0.17.0-pre.15 input-59adea41bbc7af7bc7a002d9559654563be61c40bff73cd4d03e018ea34597df -->
<!-- cache-key: cdktf-0.17.0-pre.15 input-854ab92b8935bb95bbbbbfaddb8b56a313c125e5e13f6684debaa55ee93499f5 -->
24 changes: 12 additions & 12 deletions website/docs/cdktf/csharp/r/workspace.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ description: |-
Manages workspaces.
---


<!-- Please do not edit this file, it is generated. -->
# tfe_workspace

Provides a workspace resource.
Expand Down Expand Up @@ -73,31 +75,30 @@ class MyConvertedCode : TerraformStack
The following arguments are supported:

* `Name` - (Required) Name of the workspace.
* `Organization` - (Optional) Name of the organization. If omitted, organization must be defined in the provider config.
* `Description` - (Optional) A description for the workspace.
* `AgentPoolId` - (Optional) The ID of an agent pool to assign to the workspace. Requires `ExecutionMode`
to be set to `Agent`. This value _must not_ be provided if `ExecutionMode` is set to any other value or if `Operations` is
provided.
* `AllowDestroyPlan` - (Optional) Whether destroy plans can be queued on the workspace.
* `AutoApply` - (Optional) Whether to automatically apply changes when a
Terraform plan is successful. Defaults to `False`.
* `AssessmentsEnabled` - (Optional) Whether to regularly run health assessments such as drift detection on the workspace. Defaults to `False`.
* `AutoApply` - (Optional) Whether to automatically apply changes when a Terraform plan is successful. Defaults to `False`.
* `Description` - (Optional) A description for the workspace.
* `ExecutionMode` - (Optional) Which [execution mode](https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings#execution-mode)
to use. Using Terraform Cloud, valid values are `Remote`, `Local` or`Agent`.
Defaults to `Remote`. Using Terraform Enterprise, only `Remote`and `Local`
execution modes are valid. When set to `Local`, the workspace will be used
for state storage only. This value _must not_ be provided if `Operations`
is provided.
* `AssessmentsEnabled` - (Optional) Whether to regularly run health assessments such as drift detection on the workspace. Defaults to `False`.
* `FileTriggersEnabled` - (Optional) Whether to filter runs based on the changed files
in a VCS push. Defaults to `True`. If enabled, the working directory and
trigger prefixes describe a set of paths which must contain changes for a
VCS push to trigger a run. If disabled, any push will trigger a run.
* `ForceDelete` - (Optional) If this attribute is present on a workspace that is being deleted through the provider, it will use the existing force delete API. If this attribute is not present or false it will safe delete the workspace.
* `GlobalRemoteState` - (Optional) Whether the workspace allows all workspaces in the organization to access its state data during runs. If false, then only specifically approved workspaces can access its state (`RemoteStateConsumerIds`).
* `RemoteStateConsumerIds` - (Optional) The set of workspace IDs set as explicit remote state consumers for the given workspace.
* `Operations` - **Deprecated** Whether to use remote execution mode.
Defaults to `True`. When set to `False`, the workspace will be used for
state storage only. This value _must not_ be provided if `ExecutionMode` is
provided.
* `Organization` - (Optional) Name of the organization. If omitted, organization must be defined in the provider config.
* `ProjectId` - (Optional) ID of the project where the workspace should be created.
* `QueueAllRuns` - (Optional) Whether the workspace should start
automatically performing runs immediately after its creation. Defaults to
Expand All @@ -107,6 +108,7 @@ The following arguments are supported:
is `False`. The provider uses `True` as any workspace provisioned with
`False` would need to then have a run manually queued out-of-band before
accepting webhooks.
* `RemoteStateConsumerIds` - (Optional) The set of workspace IDs set as explicit remote state consumers for the given workspace.
* `SourceName` - (Optional) A friendly name for the application or client
creating this workspace. If set, this will be displayed on the workspace as
"Created via <SOURCE NAME>".
Expand Down Expand Up @@ -135,15 +137,13 @@ The following arguments are supported:
(like `~> 1.0.0`); if you specify a constraint, the workspace will always use
the newest release that meets that constraint. Defaults to the latest
available version.
* `TriggerPatterns` - (Optional) List of [glob patterns](https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings/vcs#glob-patterns-for-automatic-run-triggering) that describe the files Terraform Cloud monitors for changes. Trigger patterns are always appended to the root directory of the repository. Mutually exclusive with `TriggerPrefixes`.
* `TriggerPrefixes` - (Optional) List of repository-root-relative paths which describe all locations
to be tracked for changes.
* `TriggerPatterns` - (Optional) List of [glob patterns](https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings/vcs#glob-patterns-for-automatic-run-triggering) that describe the files Terraform Cloud monitors for changes. Trigger patterns are always appended to the root directory of the repository. Mutually exclusive with `TriggerPrefixes`.
* `WorkingDirectory` - (Optional) A relative path that Terraform will execute
within. Defaults to the root of your repository.
* `VcsRepo` - (Optional) Settings for the workspace's VCS repository, enabling the [UI/VCS-driven run workflow](https://developer.hashicorp.com/terraform/cloud-docs/run/ui).
Omit this argument to utilize the [CLI-driven](https://developer.hashicorp.com/terraform/cloud-docs/run/cli) and [API-driven](https://developer.hashicorp.com/terraform/cloud-docs/run/api)
workflows, where runs are not driven by webhooks on your VCS provider.
* `ForceDelete` - (Optional) If this attribute is present on a workspace that is being deleted through the provider, it will use the existing force delete API. If this attribute is not present or false it will safe delete the workspace.
* `WorkingDirectory` - (Optional) A relative path that Terraform will execute within. Defaults to the root of your repository.

The `VcsRepo` block supports:

Expand All @@ -152,11 +152,11 @@ The `VcsRepo` block supports:
in your VCS provider. The format for Azure DevOps is `<ado organization>/<ado project>/_git/<ado repository>`.
* `Branch` - (Optional) The repository branch that Terraform will execute from.
This defaults to the repository's default branch (e.g. main).
* `GithubAppInstallationId` - (Optional) The installation id of the Github App. This conflicts with `OauthTokenId` and can only be used if `OauthTokenId` is not used.
* `IngressSubmodules` - (Optional) Whether submodules should be fetched when
cloning the VCS repository. Defaults to `False`.
* `OauthTokenId` - (Optional) The VCS Connection (OAuth Connection + Token) to use.
This ID can be obtained from a `TfeOauthClient` resource. This conflicts with `GithubAppInstallationId` and can only be used if `GithubAppInstallationId` is not used.
* `GithubAppInstallationId` - (Optional) The installation id of the Github App. This conflicts with `OauthTokenId` and can only be used if `OauthTokenId` is not used.
* `TagsRegex` - (Optional) A regular expression used to trigger a Workspace run for matching Git tags. This option conflicts with `TriggerPatterns` and `TriggerPrefixes`. Should only set this value if the former is not being used.

## Attributes Reference
Expand All @@ -180,4 +180,4 @@ terraform import tfe_workspace.test ws-CH5in3chf8RJjrVd
terraform import tfe_workspace.test my-org-name/my-wkspace-name
```

<!-- cache-key: cdktf-0.17.0-pre.15 input-de112f4c52db39d25f8b816c1c51371daa657d8ca222b05af6488fed41372ef3 -->
<!-- cache-key: cdktf-0.17.0-pre.15 input-1d97132dd27c5c2de3f8a57af632a1e6455a32862dd3149f72527b836d7707f5 -->
Loading

0 comments on commit 69123a1

Please sign in to comment.