diff --git a/CHANGELOG.md b/CHANGELOG.md index 159c4a780..fc436c232 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ ENHANCEMENTS: * `d/tfe_workspace`: Add an `auto_destroy_at` attribute for reading a scheduled auto-destroy, by @notchairmk [1354](https://github.com/hashicorp/terraform-provider-tfe/pull/1354) * `r/tfe_registry_module`: Add `initial_version` support for Branch Based Modules by @aaabdelgany [#1363](https://github.com/hashicorp/terraform-provider-tfe/pull/1363) * `r/tfe_oauth_client`: Add `agent_pool_id` as an optional argument to enable Private VCS support, by @roleesinhaHC [1255](https://github.com/hashicorp/terraform-provider-tfe/pull/1255) +* `r/tfe_project`: Increase the Project name length from 36 to 40 characters @hs26gill [#1351](https://github.com/hashicorp/terraform-provider-tfe/pull/1351) BUG FIXES: * `r/tfe_registry_module`: Prevents constant diff after a successful apply when `tags` and `tests_enabled` is not set by @Uk1288 [#1357](https://github.com/hashicorp/terraform-provider-tfe/pull/1357) @@ -17,9 +18,6 @@ BUG FIXES: FEATURES: * `r/tfe_team`: Add attributes `manage_teams`, `manage_organization_access`, and `access_secret_teams` to `organization_access` on `tfe_team` by @juliannatetreault [#1313](https://github.com/hashicorp/terraform-provider-tfe/pull/1313) -ENHANCEMENTS: -* `r/tfe_project`: Increase the Project name length from 36 to 40 characters @hs26gill [#1351](https://github.com/hashicorp/terraform-provider-tfe/pull/1351) - ## v0.54.0 ENHANCEMENTS: diff --git a/website/docs/cdktf/csharp/d/ip_ranges.html.markdown b/website/docs/cdktf/csharp/d/ip_ranges.html.markdown index 88e31258f..d176d35f9 100644 --- a/website/docs/cdktf/csharp/d/ip_ranges.html.markdown +++ b/website/docs/cdktf/csharp/d/ip_ranges.html.markdown @@ -5,6 +5,8 @@ description: |- Get HCP Terraform and Terraform Enterprise's IP ranges of its services --- + + # Data Source: tfe_ip_ranges Use this data source to retrieve a list of HCP Terraform's IP ranges. For more information about these IP ranges, view our [documentation about HCP Terraform IP Ranges](https://developer.hashicorp.com/terraform/cloud-docs/architectural-details/ip-ranges). @@ -43,4 +45,4 @@ The following attributes are exported: * `Vcs` - The list of IP ranges in CIDR notation used for connecting to VCS providers. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/csharp/d/oauth_client.html.markdown b/website/docs/cdktf/csharp/d/oauth_client.html.markdown index 88facddb5..8278ecadc 100644 --- a/website/docs/cdktf/csharp/d/oauth_client.html.markdown +++ b/website/docs/cdktf/csharp/d/oauth_client.html.markdown @@ -5,6 +5,8 @@ description: |- Get information on an OAuth client. --- + + # Data Source: tfe_oauth_client Use this data source to get information about an OAuth client. @@ -81,7 +83,7 @@ be set. * `OauthClientId` - (Optional) ID of the OAuth client. * `Organization` - (Optional) The name of the organization in which to search. * `ServiceProvider` - (Optional) The API identifier of the OAuth service provider. If set, - must be one of: `AdoServer`, `AdoServices`,`BitbucketDataCenter`, `BitbucketHosted`, `BitbucketServer`(deprecated), + must be one of: `AdoServer`, `AdoServices`, `BitbucketDataCenter`, `BitbucketHosted`, `BitbucketServer`(deprecated), `Github`, `GithubEnterprise`, `GitlabHosted`, `GitlabCommunityEdition`, or `GitlabEnterpriseEdition`. @@ -99,5 +101,6 @@ In addition to all arguments above, the following attributes are exported: * `Organization` - The organization in which the OAuth client is registered. * `ServiceProvider` - The API identifier of the OAuth service provider. * `ServiceProviderDisplayName` - The display name of the OAuth service provider. - - \ No newline at end of file +* `OrganizationScoped` - Whether or not the agent pool can be used by all workspaces and projects in the organization. +* `ProjectIds` - IDs of the projects that use the oauth client. + \ No newline at end of file diff --git a/website/docs/cdktf/csharp/d/organization.html.markdown b/website/docs/cdktf/csharp/d/organization.html.markdown index da3f0a42e..caa7ddf97 100644 --- a/website/docs/cdktf/csharp/d/organization.html.markdown +++ b/website/docs/cdktf/csharp/d/organization.html.markdown @@ -49,4 +49,4 @@ In addition to all arguments above, the following attributes are exported: * `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. * `DefaultProjectId` - ID of the organization's default project. All workspaces created without specifying a project ID are created in this project. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/csharp/d/organization_membership.html.markdown b/website/docs/cdktf/csharp/d/organization_membership.html.markdown index 2ee63b153..461260411 100644 --- a/website/docs/cdktf/csharp/d/organization_membership.html.markdown +++ b/website/docs/cdktf/csharp/d/organization_membership.html.markdown @@ -98,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. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/csharp/d/organization_run_task.html.markdown b/website/docs/cdktf/csharp/d/organization_run_task.html.markdown index 6d6651039..6511cff64 100644 --- a/website/docs/cdktf/csharp/d/organization_run_task.html.markdown +++ b/website/docs/cdktf/csharp/d/organization_run_task.html.markdown @@ -5,6 +5,8 @@ description: |- Get information on a Run task. --- + + # Data Source: tfe_organization_run_task [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. @@ -48,4 +50,4 @@ In addition to all arguments above, the following attributes are exported: * `Id` - The ID of the task. * `Url` - URL to send a task payload. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/csharp/d/slug.html.markdown b/website/docs/cdktf/csharp/d/slug.html.markdown index 97b8add0b..e458e21ca 100644 --- a/website/docs/cdktf/csharp/d/slug.html.markdown +++ b/website/docs/cdktf/csharp/d/slug.html.markdown @@ -4,6 +4,8 @@ page_title: "Terraform Enterprise: tfe_slug" description: |- Manages files. --- + + # Data Source: tfe_slug This data source is used to represent configuration files on a local filesystem @@ -48,4 +50,4 @@ The following arguments are supported: * `SourcePath` - (Required) The path to the directory where the files are located. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/csharp/d/workspace.html.markdown b/website/docs/cdktf/csharp/d/workspace.html.markdown index 3d1c9023a..f3302b5c4 100644 --- a/website/docs/cdktf/csharp/d/workspace.html.markdown +++ b/website/docs/cdktf/csharp/d/workspace.html.markdown @@ -48,11 +48,8 @@ In addition to all arguments above, the following attributes are exported: * `AllowDestroyPlan` - Indicates whether destroy plans can be queued on the workspace. * `AutoApply` - Indicates whether to automatically apply changes when a Terraform plan is successful. * `AutoApplyRunTrigger` - Whether the workspace will automatically apply changes for runs that were created by run triggers from another workspace. -<<<<<<< HEAD +* `AutoDestroyAt` - Future date/time string at which point all resources in a workspace will be scheduled to be deleted. * `AssessmentsEnabled` - (Available only in HCP Terraform) Indicates whether health assessments such as drift detection are enabled for the workspace. -======= -* `AssessmentsEnabled` - (Available only in Terraform Cloud) Indicates whether health assessments such as drift detection are enabled for the workspace. ->>>>>>> adf61bce (cdktf: update documentation) * `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`). * `GlobalRemoteState` - (Optional) Whether the workspace should allow all workspaces in the organization to access its state data during runs. If false, then only specifically approved workspaces can access its state (determined by the `RemoteStateConsumerIds` argument). * `RemoteStateConsumerIds` - (Optional) A set of workspace IDs that will be set as the remote state consumers for the given workspace. Cannot be used if `GlobalRemoteState` is set to `True`. @@ -92,4 +89,4 @@ The `VcsRepo` block contains: * `OauthTokenId` - OAuth token ID of the configured VCS connection. * `TagsRegex` - A regular expression used to trigger a Workspace run for matching Git tags. - + \ No newline at end of file diff --git a/website/docs/cdktf/csharp/d/workspace_run_task.html.markdown b/website/docs/cdktf/csharp/d/workspace_run_task.html.markdown index c69ab0109..0161b2f8d 100644 --- a/website/docs/cdktf/csharp/d/workspace_run_task.html.markdown +++ b/website/docs/cdktf/csharp/d/workspace_run_task.html.markdown @@ -5,6 +5,8 @@ description: |- Get information on a Workspace Run task. --- + + # Data Source: tfe_workspace_task [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. @@ -46,4 +48,4 @@ In addition to all arguments above, the following attributes are exported: * `Id` - The ID of the Workspace Run task. * `Stage` - Which stage the task will run in. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/csharp/index.html.markdown b/website/docs/cdktf/csharp/index.html.markdown index 070fd2e93..232ef7ff2 100644 --- a/website/docs/cdktf/csharp/index.html.markdown +++ b/website/docs/cdktf/csharp/index.html.markdown @@ -77,7 +77,7 @@ automatically installed by `terraform init` in the future: terraform { required_providers { tfe = { - version = "~> 0.55.0" + version = "~> 0.56.0" } } } @@ -90,7 +90,7 @@ The above snippet using `RequiredProviders` is for Terraform 0.13+; if you are u ```hcl provider "tfe" { - version = "~> 0.55.0" + version = "~> 0.56.0" ... } ``` @@ -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.55.0" + version = "~> 0.56.0" } # Create an organization @@ -116,10 +116,10 @@ resource "tfe_organization" "org" { The following arguments are supported: -* `Hostname` - (Optional) The HCP Terraform and Terraform Enterprise hostname to connect to. +* `Hostname` - (Optional) The HCP Terraform or Terraform Enterprise hostname to connect to. Defaults to `app.terraform.io`. Can be overridden by setting the `TfeHostname` environment variable. -* `Token` - (Optional) The token used to authenticate with HCP Terraform and Terraform Enterprise. +* `Token` - (Optional) The token used to authenticate with HCP Terraform or Terraform Enterprise. See [Authentication](#authentication) above for more information. * `SslSkipVerify` - (Optional) Whether or not to skip certificate verifications. Defaults to `False`. Can be overridden setting the `TfeSslSkipVerify` @@ -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. - + \ No newline at end of file diff --git a/website/docs/cdktf/csharp/r/agent_pool_allowed_workspaces.html.markdown b/website/docs/cdktf/csharp/r/agent_pool_allowed_workspaces.html.markdown index 89e616d85..fa7a50fd3 100644 --- a/website/docs/cdktf/csharp/r/agent_pool_allowed_workspaces.html.markdown +++ b/website/docs/cdktf/csharp/r/agent_pool_allowed_workspaces.html.markdown @@ -19,34 +19,36 @@ for Business account. In this example, the agent pool and workspace are connected through other resources that manage the agent pool permissions as well as the workspace execution mode. Notice that the `TfeWorkspaceSettings` uses the agent pool reference found in `TfeAgentPoolAllowedWorkspaces` in order to create the permission to use the agent pool before assigning it. -```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) - { - var tfeOrganizationTestOrganization = new Organization.Organization(this, "test-organization", new OrganizationConfig { - Email = "admin@company.com", - Name = "my-org-name" - }); - var tfeWorkspaceTestWorkspace = new Workspace.Workspace(this, "test-workspace", new WorkspaceConfig { - Name = "my-workspace-name", - Organization = Token.AsString(tfeOrganizationTestOrganization.Name) - }); - var tfeAgentPoolTestAgentPool = new AgentPool.AgentPool(this, "test-agent-pool", new AgentPoolConfig { - Name = "my-agent-pool-name", - Organization = Token.AsString(tfeOrganizationTestOrganization.Name), - OrganizationScoped = false - }); - new AgentPoolAllowedWorkspaces.AgentPoolAllowedWorkspaces(this, "test-allowed-workspaces", new AgentPoolAllowedWorkspacesConfig { - AgentPoolId = Token.AsString(tfeAgentPoolTestAgentPool.Id), - AllowedWorkspaceIds = new [] { Token.AsString(tfeWorkspaceTestWorkspace.Id) } - }); - } +```hcl +resource "tfe_organization" "test-organization" { + name = "my-org-name" + email = "admin@company.com" +} + +// Ensure workspace and agent pool are create first +resource "tfe_workspace" "test-workspace" { + name = "my-workspace-name" + organization = tfe_organization.test-organization.name +} + +resource "tfe_agent_pool" "test-agent-pool" { + name = "my-agent-pool-name" + organization = tfe_organization.test-organization.name + organization_scoped = false +} + +// Ensure permissions are assigned second +resource "tfe_agent_pool_allowed_workspaces" "allowed" { + agent_pool_id = tfe_agent_pool.test-agent-pool.id + allowed_workspace_ids = [for key, value in tfe_workspace.test.*.id : value] +} + +// Lastly, ensure the workspace agent execution is assigned last by +// referencing allowed_workspaces +resource "tfe_workspace_settings" "test-workspace-settings" { + workspace_id = tfe_workspace.test-workspace.id + execution_mode = "agent" + agent_pool_id = tfe_agent_pool_allowed_workspaces.allowed.id } ``` @@ -66,5 +68,4 @@ A resource can be imported; use `` as the import ID. For example: terraform import tfe_agent_pool_allowed_workspaces.foobar apool-rW0KoLSlnuNb5adB ``` - - + \ No newline at end of file diff --git a/website/docs/cdktf/csharp/r/agent_token.html.markdown b/website/docs/cdktf/csharp/r/agent_token.html.markdown index 46388e5e8..c581bdd0c 100644 --- a/website/docs/cdktf/csharp/r/agent_token.html.markdown +++ b/website/docs/cdktf/csharp/r/agent_token.html.markdown @@ -5,6 +5,8 @@ description: |- Manages agent tokens --- + + # tfe_agent_token Each agent pool has its own set of tokens which are not shared across pools. @@ -53,4 +55,4 @@ The following arguments are supported: * `Description` - The description of agent token. * `Token` - The generated token. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/csharp/r/notification_configuration.html.markdown b/website/docs/cdktf/csharp/r/notification_configuration.html.markdown index af6e18b37..95202609e 100644 --- a/website/docs/cdktf/csharp/r/notification_configuration.html.markdown +++ b/website/docs/cdktf/csharp/r/notification_configuration.html.markdown @@ -184,4 +184,4 @@ Notification configurations can be imported; use ` \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/csharp/r/oauth_client.html.markdown b/website/docs/cdktf/csharp/r/oauth_client.html.markdown index 7af1ab940..ca6f44f31 100644 --- a/website/docs/cdktf/csharp/r/oauth_client.html.markdown +++ b/website/docs/cdktf/csharp/r/oauth_client.html.markdown @@ -5,6 +5,8 @@ description: |- Manages OAuth clients. --- + + # tfe_oauth_client An OAuth Client represents the connection between an organization and a VCS @@ -32,6 +34,7 @@ class MyConvertedCode : TerraformStack Name = "my-github-oauth-client", OauthToken = "my-vcs-provider-token", Organization = "my-org-name", + OrganizationScoped = true, ServiceProvider = "github" }); } @@ -70,11 +73,11 @@ class MyConvertedCode : TerraformStack } ``` -#### BitBucket Data Center Usage +#### Bitbucket Data Center Usage -See [documentation for HCP Terraform and Terraform Enterprise setup](https://developer.hashicorp.com/terraform/cloud-docs/vcs/bitbucket-data-center). +See [documentation for HCP Terraform and Terraform Enterprise setup](https://developer.hashicorp.com/terraform/cloud-docs/vcs/bitbucket-server). -When using BitBucket Data Center, you must use three required fields: `Key`, `Secret`, `RsaPublicKey`. +When using Bitbucket Data Center, you must use three required fields: `Key`, `Secret`, `RsaPublicKey`. ```csharp @@ -121,20 +124,22 @@ The following arguments are supported: * `PrivateKey` - (Required for `AdoServer`) The text of the private key associated with your Azure DevOps Server account * `Key` - The OAuth Client key can refer to a Consumer Key, Application Key, or another type of client key for the VCS provider. -* `Secret` - (Required for `BitbucketDataCenter`) The OAuth Client secret is used for BitBucket Data Center, this secret is the - the text of the SSH private key associated with your BitBucket Data Center +* `Secret` - (Required for `BitbucketDataCenter`) The OAuth Client secret is used for Bitbucket Data Center, this secret is the + the text of the SSH private key associated with your Bitbucket Data Center Application Link. -* `RsaPublicKey` - (Required for `BitbucketDataCenter`) Required for BitBucket +* `RsaPublicKey` - (Required for `BitbucketDataCenter`) Required for Bitbucket Data Center in conjunction with the secret. Not used for any other providers. The -text of the SSH public key associated with your BitBucket Data Center Application +text of the SSH public key associated with your Bitbucket Data Center Application Link. * `ServiceProvider` - (Required) The VCS provider being connected with. Valid - options are `AdoServer`, `AdoServices`, `BitbucketHosted`, `BitbucketDataCenter`, `BitbucketServer`(deprecated), `Github`, `GithubEnterprise`, `GitlabHosted`, + options are `AdoServer`, `AdoServices`, `BitbucketDataCenter`, `BitbucketHosted`, `BitbucketServer`(deprecated), `Github`, `GithubEnterprise`, `GitlabHosted`, `GitlabCommunityEdition`, or `GitlabEnterpriseEdition`. +* `AgentPoolId` - (Optional) An existing agent pool ID within the organization that has Private VCS support enabled. +* `OrganizationScoped` - (Optional) Whether or not the oauth client is scoped to all projects and workspaces in the organization. Defaults to `True`. ## Attributes Reference * `Id` - The ID of the OAuth client. * `OauthTokenId` - The ID of the OAuth token associated with the OAuth client. - + \ No newline at end of file diff --git a/website/docs/cdktf/csharp/r/opa_version.html.markdown b/website/docs/cdktf/csharp/r/opa_version.html.markdown index 73ffd4d52..210bfec54 100644 --- a/website/docs/cdktf/csharp/r/opa_version.html.markdown +++ b/website/docs/cdktf/csharp/r/opa_version.html.markdown @@ -63,6 +63,6 @@ terraform import tfe_opa_version.test tool-L4oe7rNwn7J4E5Yr terraform import tfe_opa_version.test 0.58.0 ``` --> **Note:** You can fetch a OPA version ID from the URL of an existing version in the Terraform Cloud UI. The ID is in the format `tool-` +-> **Note:** You can fetch a OPA version ID from the URL of an existing version in the HCP Terraform UI. The ID is in the format `tool-` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/csharp/r/organization.html.markdown b/website/docs/cdktf/csharp/r/organization.html.markdown index 761199855..4cf348fc1 100644 --- a/website/docs/cdktf/csharp/r/organization.html.markdown +++ b/website/docs/cdktf/csharp/r/organization.html.markdown @@ -65,4 +65,4 @@ example: terraform import tfe_organization.test my-org-name ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/csharp/r/organization_default_settings.html.markdown b/website/docs/cdktf/csharp/r/organization_default_settings.html.markdown index b3e87d051..48c95b721 100644 --- a/website/docs/cdktf/csharp/r/organization_default_settings.html.markdown +++ b/website/docs/cdktf/csharp/r/organization_default_settings.html.markdown @@ -62,7 +62,7 @@ The following arguments are supported: Organization default execution mode can be imported; use `` as the import ID. For example: ```shell -terraform import tfe_organization_default_execution_mode.test my-org-name +terraform import tfe_organization_default_settings.test my-org-name ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/csharp/r/organization_membership.html.markdown b/website/docs/cdktf/csharp/r/organization_membership.html.markdown index 77ac662b7..299df5162 100644 --- a/website/docs/cdktf/csharp/r/organization_membership.html.markdown +++ b/website/docs/cdktf/csharp/r/organization_membership.html.markdown @@ -5,6 +5,8 @@ description: |- Add or remove a user from an organization. --- + + # tfe_organization_membership Add or remove a user from an organization. @@ -67,4 +69,4 @@ terraform import tfe_organization_membership.test my-org-name/user@example.com terraform import tfe_organization_membership.test ou-wAs3zYmWAhYK7peR ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/csharp/r/organization_run_task.html.markdown b/website/docs/cdktf/csharp/r/organization_run_task.html.markdown index c8cdf6f7b..abcfc8ab0 100644 --- a/website/docs/cdktf/csharp/r/organization_run_task.html.markdown +++ b/website/docs/cdktf/csharp/r/organization_run_task.html.markdown @@ -5,6 +5,8 @@ description: |- Manages Run tasks. --- + + # tfe_organization_run_task [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. @@ -61,4 +63,4 @@ import ID. For example: terraform import tfe_organization_run_task.test my-org-name/task-name ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/csharp/r/project.html.markdown b/website/docs/cdktf/csharp/r/project.html.markdown index 5ac9089b8..9c50dca63 100644 --- a/website/docs/cdktf/csharp/r/project.html.markdown +++ b/website/docs/cdktf/csharp/r/project.html.markdown @@ -5,6 +5,8 @@ description: |- Manages projects. --- + + # tfe_project Provides a project resource. @@ -41,6 +43,7 @@ The following arguments are supported: * `Name` - (Required) Name of the project. * `Organization` - (Optional) Name of the organization. If omitted, organization must be defined in the provider config. +* `Description` - (Optional) A description for the project. ## Attributes Reference @@ -56,4 +59,4 @@ Projects can be imported; use `` as the import ID. For example: terraform import tfe_project.test prj-niVoeESBXT8ZREhr ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/csharp/r/project_oauth_client.html.markdown b/website/docs/cdktf/csharp/r/project_oauth_client.html.markdown new file mode 100644 index 000000000..2f3916804 --- /dev/null +++ b/website/docs/cdktf/csharp/r/project_oauth_client.html.markdown @@ -0,0 +1,77 @@ +--- +layout: "tfe" +page_title: "Terraform Enterprise: tfe_project_oauth_client" +description: |- + Add an oauth client to a project +--- + + + +# tfe_project_oauth_client + +Adds and removes oauth clients from a project + +## Example Usage + +Basic 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) + { + var tfeOrganizationTest = new Organization.Organization(this, "test", new OrganizationConfig { + Email = "admin@company.com", + Name = "my-org-name" + }); + var tfeProjectTest = new Project.Project(this, "test_1", new ProjectConfig { + Name = "my-project-name", + Organization = Token.AsString(tfeOrganizationTest.Name) + }); + /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ + tfeProjectTest.OverrideLogicalId("test"); + var tfeOauthClientTest = new OauthClient.OauthClient(this, "test_2", new OauthClientConfig { + ApiUrl = "https://api.github.com", + HttpUrl = "https://github.com", + OauthToken = "oauth_token_id", + Organization = tfeOrganizationTest, + ServiceProvider = "github" + }); + /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ + tfeOauthClientTest.OverrideLogicalId("test"); + var tfeProjectOauthClientTest = + new ProjectOauthClient.ProjectOauthClient(this, "test_3", new ProjectOauthClientConfig { + OauthClientId = Token.AsString(tfeOauthClientTest.Id), + ProjectId = Token.AsString(tfeProjectTest.Id) + }); + /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ + tfeProjectOauthClientTest.OverrideLogicalId("test"); + } +} +``` + +## Argument Reference + +The following arguments are supported: + +* `OauthClientId` - (Required) ID of the oauth client. +* `ProjectId` - (Required) Project ID to add the oauth client to. + +## Attributes Reference + +* `Id` - The ID of the oauth client attachment. ID format: `_` + +## Import + +Project OAuth Clients can be imported; use `//`. For example: + +```shell +terraform import tfe_project_oauth_client.test 'my-org-name/project/oauth-client-name' +``` + + \ No newline at end of file diff --git a/website/docs/cdktf/csharp/r/registry_module.html.markdown b/website/docs/cdktf/csharp/r/registry_module.html.markdown index d80995cfa..a492ff599 100644 --- a/website/docs/cdktf/csharp/r/registry_module.html.markdown +++ b/website/docs/cdktf/csharp/r/registry_module.html.markdown @@ -213,6 +213,7 @@ The following arguments are supported: * `Organization` - (Optional) The name of the organization associated with the registry module. It must be set if `ModuleProvider` is used, or if `VcsRepo` is used via a GitHub App. * `Namespace` - (Optional) The namespace of a public registry module. It can be used if `ModuleProvider` is set and `RegistryName` is public. * `RegistryName` - (Optional) Whether the registry module is private or public. It can be used if `ModuleProvider` is set. +* `InitialVersion` - (Optional) This specifies the initial version for a branch based module. It can be used if `VcsRepoBranch` is set. If it is omitted, the initial modules version will default to `000`. The `TestConfig` block supports * `TestsEnabled` - (Optional) Specifies whether tests run for the registry module. Tests are only supported for branch-based publishing. @@ -256,4 +257,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 ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/csharp/r/run_trigger.html.markdown b/website/docs/cdktf/csharp/r/run_trigger.html.markdown index 10be6cd02..b772f3fae 100644 --- a/website/docs/cdktf/csharp/r/run_trigger.html.markdown +++ b/website/docs/cdktf/csharp/r/run_trigger.html.markdown @@ -5,6 +5,8 @@ description: |- Manages run triggers --- + + # tfe_run_trigger HCP Terraform provides a way to connect your workspace to one or more workspaces within your organization, @@ -66,4 +68,4 @@ Run triggers can be imported; use `` as the import ID. For examp terraform import tfe_run_trigger.test rt-qV9JnKRkmtMa4zcA ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/csharp/r/sentinel_version.html.markdown b/website/docs/cdktf/csharp/r/sentinel_version.html.markdown index 11d841fd2..5f3d58945 100644 --- a/website/docs/cdktf/csharp/r/sentinel_version.html.markdown +++ b/website/docs/cdktf/csharp/r/sentinel_version.html.markdown @@ -65,4 +65,4 @@ terraform import tfe_sentinel_version.test 0.24.0 -> **Note:** You can fetch a Sentinel version ID from the URL of an existing version in the HCP Terraform UI. The ID is in the format `tool-` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/csharp/r/team.html.markdown b/website/docs/cdktf/csharp/r/team.html.markdown index 23b676ab4..5c650d064 100644 --- a/website/docs/cdktf/csharp/r/team.html.markdown +++ b/website/docs/cdktf/csharp/r/team.html.markdown @@ -5,6 +5,8 @@ description: |- Manages teams. --- + + # tfe_team Manages teams. @@ -77,6 +79,9 @@ The `OrganizationAccess` block supports: * `ManageRunTasks` - (Optional) Allow members to create, edit, and delete the organization's run tasks. * `ManageProjects` - (Optional) Allow members to create and administrate all projects within the organization. Requires `ManageWorkspaces` to be set to `True`. * `ManageMembership` - (Optional) Allow members to add/remove users from the organization, and to add/remove users from visible teams. +* `ManageTeams` - (Optional) Allow members to create, update, and delete teams. +* `ManageOrganizationAccess` - (Optional) Allow members to update the organization access settings of teams. +* `AccessSecretTeams` - (Optional) Allow members access to secret teams up to the level of permissions granted by their team permissions setting. ## Attributes Reference @@ -95,4 +100,4 @@ or terraform import tfe_team.test my-org-name/my-team-name ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/csharp/r/team_organization_member.html.markdown b/website/docs/cdktf/csharp/r/team_organization_member.html.markdown index 990182cae..e394e8d6c 100644 --- a/website/docs/cdktf/csharp/r/team_organization_member.html.markdown +++ b/website/docs/cdktf/csharp/r/team_organization_member.html.markdown @@ -5,6 +5,8 @@ description: |- Add or remove a user from a team. --- + + # tfe_team_organization_member Add or remove a team member using a @@ -73,4 +75,4 @@ or terraform import tfe_team_organization_member.test my-org-name/user@company.com/my-team-name ``` ~> **NOTE:** The `//` import ID format cannot be used if there are `/` characters in the user's email. These users must be imported with the `/` format instead - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/csharp/r/team_organization_members.html.markdown b/website/docs/cdktf/csharp/r/team_organization_members.html.markdown index 248c30f82..3ac78ae43 100644 --- a/website/docs/cdktf/csharp/r/team_organization_members.html.markdown +++ b/website/docs/cdktf/csharp/r/team_organization_members.html.markdown @@ -5,6 +5,8 @@ description: |- Add or remove users from a team based on their organization memberships. --- + + # tfe_team_organization_members Add or remove one or more team members using a @@ -112,4 +114,4 @@ as the import ID. For example: terraform import tfe_team_organization_members.test team-47qC3LmA47piVan7 ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/csharp/r/terraform_version.html.markdown b/website/docs/cdktf/csharp/r/terraform_version.html.markdown index 171d72745..779a17f2e 100644 --- a/website/docs/cdktf/csharp/r/terraform_version.html.markdown +++ b/website/docs/cdktf/csharp/r/terraform_version.html.markdown @@ -5,6 +5,8 @@ description: |- Manages Terraform versions --- + + # tfe_terraform_version Manage Terraform versions available on HCP Terraform and Terraform Enterprise. @@ -63,4 +65,4 @@ terraform import tfe_terraform_version.test 1.1.2 -> **Note:** You can fetch a Terraform version ID from the URL of an existing version in the HCP Terraform UI. The ID is in the format `tool-` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/csharp/r/tfe_test_variable.html.markdown b/website/docs/cdktf/csharp/r/tfe_test_variable.html.markdown new file mode 100644 index 000000000..0ea52ed7c --- /dev/null +++ b/website/docs/cdktf/csharp/r/tfe_test_variable.html.markdown @@ -0,0 +1,55 @@ +--- +layout: "tfe" +page_title: "Terraform Enterprise: tfe_test_variable" +description: |- + Manages environmet variables used for testing by modules in the Private Module Registry. +--- + + + +# tfe_test_variable + +Creates, updates and destroys environment variables used for testing in the Private Module Registry. + +## Example Usage + +```hcl +resource "tfe_organization" "test_org" { + name = "my-org-name" + email = "admin@company.com" +} + +resource "tfe_oauth_client" "test_client" { + organization = tfe_organization.test.name + api_url = "https://api.github.com" + http_url = "https://github.com" + oauth_token = "my-token-123" + service_provider = "github" +} + +resource "tfe_registry_module" "test_module" { + organization = "test-module" + vcs_repo { + display_identifier = "GH_NAME/REPO_NAME" + identifier = "GH_NAME/REPO_NAME" + oauth_token_id = tfe_oauth_client.test.oauth_token_id + branch = "main" + tags = false +} + test_config { + tests_enabled = true + } +} + +resource "tfe_test_variable" "tf_test_test_variable" { + key = "key_test" + value = "value_test" + description = "some description" + category = "env" + organization = tfe_organization.test.name + module_name = tfe_registry_module.test.name + module_provider = tfe_registry_module.test.module_provider +} +``` + + \ No newline at end of file diff --git a/website/docs/cdktf/csharp/r/variable.html.markdown b/website/docs/cdktf/csharp/r/variable.html.markdown index 736515ccc..9abe235a1 100644 --- a/website/docs/cdktf/csharp/r/variable.html.markdown +++ b/website/docs/cdktf/csharp/r/variable.html.markdown @@ -5,6 +5,8 @@ description: |- Manages variables. --- + + # tfe_variable Creates, updates and destroys variables. @@ -175,4 +177,4 @@ example: terraform import tfe_variable.test my-org-name/varset-47qC3LmA47piVan7/var-5rTwnSaRPogw6apb ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/csharp/r/workspace.html.markdown b/website/docs/cdktf/csharp/r/workspace.html.markdown index 87f303c48..2e201172b 100644 --- a/website/docs/cdktf/csharp/r/workspace.html.markdown +++ b/website/docs/cdktf/csharp/r/workspace.html.markdown @@ -12,6 +12,7 @@ description: |- Provides a workspace resource. ~> **NOTE:** Setting the execution mode and agent pool affinity directly on the workspace is deprecated in favor of using both [tfe_workspace_settings](workspace_settings) and [tfe_organization_default_settings](organization_default_settings), since they allow more precise control and fully support [agent_pool_allowed_workspaces](agent_pool_allowed_workspaces). Use caution when unsetting `ExecutionMode`, as it now leaves any prior value unmanaged instead of reverting to the old default value of `"remote"`. + ~> **NOTE:** Using `GlobalRemoteState` or `RemoteStateConsumerIds` requires using the provider with HCP Terraform or an instance of Terraform Enterprise at least as recent as v202104-1. ## Example Usage @@ -88,6 +89,10 @@ The following arguments are supported: * `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`. * `AutoApplyRunTrigger` - (Optional) Whether to automatically apply changes for runs that were created by run triggers from another workspace. Defaults to `False`. +* `AutoDestroyAt` - (Optional) A future date/time string at which point all resources in a workspace will be scheduled for deletion. Must be a string in RFC3339 format (e.g. "2100-01-01T00:00:00Z"). + +~> **NOTE:** `AutoDestroyAt` is not intended for workspaces containing production resources or long-lived workspaces. Since this attribute is in-part managed by HCP Terraform, using `IgnoreChanges` for this attribute may be preferred. + * `Description` - (Optional) A description for the workspace. * `ExecutionMode` - (Optional) **Deprecated** Which [execution mode](https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings#execution-mode) to use. Use [tfe_workspace_settings](workspace_settings) instead. * `FileTriggersEnabled` - (Optional) Whether to filter runs based on the changed files @@ -187,4 +192,4 @@ terraform import tfe_workspace.test ws-CH5in3chf8RJjrVd terraform import tfe_workspace.test my-org-name/my-wkspace-name ``` - + \ No newline at end of file diff --git a/website/docs/cdktf/csharp/r/workspace_run.html.markdown b/website/docs/cdktf/csharp/r/workspace_run.html.markdown index ee1a71395..46c76e7b9 100644 --- a/website/docs/cdktf/csharp/r/workspace_run.html.markdown +++ b/website/docs/cdktf/csharp/r/workspace_run.html.markdown @@ -219,4 +219,4 @@ 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. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/csharp/r/workspace_run_task.html.markdown b/website/docs/cdktf/csharp/r/workspace_run_task.html.markdown index af04183ce..fa8e28183 100644 --- a/website/docs/cdktf/csharp/r/workspace_run_task.html.markdown +++ b/website/docs/cdktf/csharp/r/workspace_run_task.html.markdown @@ -5,6 +5,8 @@ description: |- Manages Workspace Run tasks. --- + + # tfe_workspace_run_task [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. @@ -45,4 +47,4 @@ import ID. For example: terraform import tfe_workspace_run_task.test my-org-name/workspace/task-name ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/csharp/r/workspace_settings.markdown b/website/docs/cdktf/csharp/r/workspace_settings.markdown index d4dbc523c..4f9bb5847 100644 --- a/website/docs/cdktf/csharp/r/workspace_settings.markdown +++ b/website/docs/cdktf/csharp/r/workspace_settings.markdown @@ -118,7 +118,7 @@ The following arguments are supported: * `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. * `ExecutionMode` - (Optional) Which [execution mode](https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings#execution-mode) - to use. Using HCP Terraform, valid values are `Remote`, `Local` or `Agent`. Using Terraform Enterprise, only `Remote` and `Local` execution modes are valid. When set to `Local`, the workspace will be used for state storage only. **Important:** If you omit this attribute, the resource configures the workspace to use your organization's default execution mode (which in turn defaults to `Remote`), removing any explicit value that might have previously been set for the workspace. + to use. Using HCP Terraform, valid values are `Remote`, `Local` or `Agent`. When set to `Local`, the workspace will be used for state storage only. **Important:** If you omit this attribute, the resource configures the workspace to use your organization's default execution mode (which in turn defaults to `Remote`), removing any explicit value that might have previously been set for the workspace. ## Attributes Reference @@ -142,4 +142,4 @@ terraform import tfe_workspace_settings.test ws-CH5in3chf8RJjrVd terraform import tfe_workspace_settings.test my-org-name/my-wkspace-name ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/go/d/ip_ranges.html.markdown b/website/docs/cdktf/go/d/ip_ranges.html.markdown index 6b0294d06..649843dfc 100644 --- a/website/docs/cdktf/go/d/ip_ranges.html.markdown +++ b/website/docs/cdktf/go/d/ip_ranges.html.markdown @@ -5,6 +5,8 @@ description: |- Get HCP Terraform and Terraform Enterprise's IP ranges of its services --- + + # Data Source: tfe_ip_ranges Use this data source to retrieve a list of HCP Terraform's IP ranges. For more information about these IP ranges, view our [documentation about HCP Terraform IP Ranges](https://developer.hashicorp.com/terraform/cloud-docs/architectural-details/ip-ranges). @@ -47,4 +49,4 @@ The following attributes are exported: * `Vcs` - The list of IP ranges in CIDR notation used for connecting to VCS providers. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/go/d/oauth_client.html.markdown b/website/docs/cdktf/go/d/oauth_client.html.markdown index 2eab6b217..6fd5616f2 100644 --- a/website/docs/cdktf/go/d/oauth_client.html.markdown +++ b/website/docs/cdktf/go/d/oauth_client.html.markdown @@ -5,6 +5,8 @@ description: |- Get information on an OAuth client. --- + + # Data Source: tfe_oauth_client Use this data source to get information about an OAuth client. @@ -90,7 +92,7 @@ be set. * `OauthClientId` - (Optional) ID of the OAuth client. * `Organization` - (Optional) The name of the organization in which to search. * `ServiceProvider` - (Optional) The API identifier of the OAuth service provider. If set, - must be one of: `AdoServer`, `AdoServices`, `BitbucketDataCenter`, `BitbucketHosted`, `BitbucketServer`(deprecated), + must be one of: `AdoServer`, `AdoServices`, `BitbucketDataCenter`, `BitbucketHosted`, `BitbucketServer`(deprecated), `Github`, `GithubEnterprise`, `GitlabHosted`, `GitlabCommunityEdition`, or `GitlabEnterpriseEdition`. @@ -108,5 +110,6 @@ In addition to all arguments above, the following attributes are exported: * `Organization` - The organization in which the OAuth client is registered. * `ServiceProvider` - The API identifier of the OAuth service provider. * `ServiceProviderDisplayName` - The display name of the OAuth service provider. - - +* `OrganizationScoped` - Whether or not the agent pool can be used by all workspaces and projects in the organization. +* `ProjectIds` - IDs of the projects that use the oauth client. + \ No newline at end of file diff --git a/website/docs/cdktf/go/d/organization.html.markdown b/website/docs/cdktf/go/d/organization.html.markdown index 9c3136c58..413cd8bf7 100644 --- a/website/docs/cdktf/go/d/organization.html.markdown +++ b/website/docs/cdktf/go/d/organization.html.markdown @@ -52,4 +52,4 @@ In addition to all arguments above, the following attributes are exported: * `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. * `DefaultProjectId` - ID of the organization's default project. All workspaces created without specifying a project ID are created in this project. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/go/d/organization_membership.html.markdown b/website/docs/cdktf/go/d/organization_membership.html.markdown index 66d8edf1a..cb6226338 100644 --- a/website/docs/cdktf/go/d/organization_membership.html.markdown +++ b/website/docs/cdktf/go/d/organization_membership.html.markdown @@ -107,4 +107,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. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/go/d/organization_run_task.html.markdown b/website/docs/cdktf/go/d/organization_run_task.html.markdown index 7828a5c2d..e9a8abf43 100644 --- a/website/docs/cdktf/go/d/organization_run_task.html.markdown +++ b/website/docs/cdktf/go/d/organization_run_task.html.markdown @@ -5,6 +5,8 @@ description: |- Get information on a Run task. --- + + # Data Source: tfe_organization_run_task [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. @@ -51,4 +53,4 @@ In addition to all arguments above, the following attributes are exported: * `Id` - The ID of the task. * `Url` - URL to send a task payload. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/go/d/slug.html.markdown b/website/docs/cdktf/go/d/slug.html.markdown index 92813d2bd..8fffb8026 100644 --- a/website/docs/cdktf/go/d/slug.html.markdown +++ b/website/docs/cdktf/go/d/slug.html.markdown @@ -4,6 +4,8 @@ page_title: "Terraform Enterprise: tfe_slug" description: |- Manages files. --- + + # Data Source: tfe_slug This data source is used to represent configuration files on a local filesystem @@ -52,4 +54,4 @@ The following arguments are supported: * `SourcePath` - (Required) The path to the directory where the files are located. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/go/d/workspace.html.markdown b/website/docs/cdktf/go/d/workspace.html.markdown index aafa7b257..7354910ea 100644 --- a/website/docs/cdktf/go/d/workspace.html.markdown +++ b/website/docs/cdktf/go/d/workspace.html.markdown @@ -51,6 +51,7 @@ In addition to all arguments above, the following attributes are exported: * `AllowDestroyPlan` - Indicates whether destroy plans can be queued on the workspace. * `AutoApply` - Indicates whether to automatically apply changes when a Terraform plan is successful. * `AutoApplyRunTrigger` - Whether the workspace will automatically apply changes for runs that were created by run triggers from another workspace. +* `AutoDestroyAt` - Future date/time string at which point all resources in a workspace will be scheduled to be deleted. * `AssessmentsEnabled` - (Available only in HCP Terraform) Indicates whether health assessments such as drift detection are enabled for the workspace. * `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`). * `GlobalRemoteState` - (Optional) Whether the workspace should allow all workspaces in the organization to access its state data during runs. If false, then only specifically approved workspaces can access its state (determined by the `RemoteStateConsumerIds` argument). @@ -91,4 +92,4 @@ The `VcsRepo` block contains: * `OauthTokenId` - OAuth token ID of the configured VCS connection. * `TagsRegex` - A regular expression used to trigger a Workspace run for matching Git tags. - + \ No newline at end of file diff --git a/website/docs/cdktf/go/d/workspace_run_task.html.markdown b/website/docs/cdktf/go/d/workspace_run_task.html.markdown index 36c184ffc..5ab0edf6c 100644 --- a/website/docs/cdktf/go/d/workspace_run_task.html.markdown +++ b/website/docs/cdktf/go/d/workspace_run_task.html.markdown @@ -5,6 +5,8 @@ description: |- Get information on a Workspace Run task. --- + + # Data Source: tfe_workspace_task [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. @@ -49,4 +51,4 @@ In addition to all arguments above, the following attributes are exported: * `Id` - The ID of the Workspace Run task. * `Stage` - Which stage the task will run in. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/go/index.html.markdown b/website/docs/cdktf/go/index.html.markdown index 070fd2e93..232ef7ff2 100644 --- a/website/docs/cdktf/go/index.html.markdown +++ b/website/docs/cdktf/go/index.html.markdown @@ -77,7 +77,7 @@ automatically installed by `terraform init` in the future: terraform { required_providers { tfe = { - version = "~> 0.55.0" + version = "~> 0.56.0" } } } @@ -90,7 +90,7 @@ The above snippet using `RequiredProviders` is for Terraform 0.13+; if you are u ```hcl provider "tfe" { - version = "~> 0.55.0" + version = "~> 0.56.0" ... } ``` @@ -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.55.0" + version = "~> 0.56.0" } # Create an organization @@ -116,10 +116,10 @@ resource "tfe_organization" "org" { The following arguments are supported: -* `Hostname` - (Optional) The HCP Terraform and Terraform Enterprise hostname to connect to. +* `Hostname` - (Optional) The HCP Terraform or Terraform Enterprise hostname to connect to. Defaults to `app.terraform.io`. Can be overridden by setting the `TfeHostname` environment variable. -* `Token` - (Optional) The token used to authenticate with HCP Terraform and Terraform Enterprise. +* `Token` - (Optional) The token used to authenticate with HCP Terraform or Terraform Enterprise. See [Authentication](#authentication) above for more information. * `SslSkipVerify` - (Optional) Whether or not to skip certificate verifications. Defaults to `False`. Can be overridden setting the `TfeSslSkipVerify` @@ -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. - + \ No newline at end of file diff --git a/website/docs/cdktf/go/r/agent_pool_allowed_workspaces.html.markdown b/website/docs/cdktf/go/r/agent_pool_allowed_workspaces.html.markdown index 3eb86ba12..fa7a50fd3 100644 --- a/website/docs/cdktf/go/r/agent_pool_allowed_workspaces.html.markdown +++ b/website/docs/cdktf/go/r/agent_pool_allowed_workspaces.html.markdown @@ -19,42 +19,36 @@ for Business account. In this example, the agent pool and workspace are connected through other resources that manage the agent pool permissions as well as the workspace execution mode. Notice that the `TfeWorkspaceSettings` uses the agent pool reference found in `TfeAgentPoolAllowedWorkspaces` in order to create the permission to use the agent pool before assigning it. -```go -import constructs "github.com/aws/constructs-go/constructs" -import "github.com/hashicorp/terraform-cdk-go/cdktf" -/*Provider bindings are generated by running cdktf get. -See https://cdk.tf/provider-generation for more details.*/ -import "github.com/aws-samples/dummy/gen/providers/tfe/organization" -import "github.com/aws-samples/dummy/gen/providers/tfe/workspace" -import "github.com/aws-samples/dummy/gen/providers/tfe/agentPool" -import "github.com/aws-samples/dummy/gen/providers/tfe/agentPoolAllowedWorkspaces" -type myConvertedCode struct { - terraformStack +```hcl +resource "tfe_organization" "test-organization" { + name = "my-org-name" + email = "admin@company.com" } -func newMyConvertedCode(scope construct, name *string) *myConvertedCode { - this := &myConvertedCode{} - cdktf.NewTerraformStack_Override(this, scope, name) - tfeOrganizationTestOrganization := organization.NewOrganization(this, jsii.String("test-organization"), &organizationConfig{ - email: jsii.String("admin@company.com"), - name: jsii.String("my-org-name"), - }) - tfeWorkspaceTestWorkspace := workspace.NewWorkspace(this, jsii.String("test-workspace"), &workspaceConfig{ - name: jsii.String("my-workspace-name"), - organization: cdktf.Token_AsString(tfeOrganizationTestOrganization.name), - }) - tfeAgentPoolTestAgentPool := agentPool.NewAgentPool(this, jsii.String("test-agent-pool"), &agentPoolConfig{ - name: jsii.String("my-agent-pool-name"), - organization: cdktf.Token_*AsString(tfeOrganizationTestOrganization.name), - organizationScoped: jsii.Boolean(false), - }) - agentPoolAllowedWorkspaces.NewAgentPoolAllowedWorkspaces(this, jsii.String("test-allowed-workspaces"), &agentPoolAllowedWorkspacesConfig{ - agentPoolId: cdktf.Token_*AsString(tfeAgentPoolTestAgentPool.id), - allowedWorkspaceIds: []*string{ - cdktf.Token_*AsString(tfeWorkspaceTestWorkspace.id), - }, - }) - return this +// Ensure workspace and agent pool are create first +resource "tfe_workspace" "test-workspace" { + name = "my-workspace-name" + organization = tfe_organization.test-organization.name +} + +resource "tfe_agent_pool" "test-agent-pool" { + name = "my-agent-pool-name" + organization = tfe_organization.test-organization.name + organization_scoped = false +} + +// Ensure permissions are assigned second +resource "tfe_agent_pool_allowed_workspaces" "allowed" { + agent_pool_id = tfe_agent_pool.test-agent-pool.id + allowed_workspace_ids = [for key, value in tfe_workspace.test.*.id : value] +} + +// Lastly, ensure the workspace agent execution is assigned last by +// referencing allowed_workspaces +resource "tfe_workspace_settings" "test-workspace-settings" { + workspace_id = tfe_workspace.test-workspace.id + execution_mode = "agent" + agent_pool_id = tfe_agent_pool_allowed_workspaces.allowed.id } ``` @@ -74,5 +68,4 @@ A resource can be imported; use `` as the import ID. For example: terraform import tfe_agent_pool_allowed_workspaces.foobar apool-rW0KoLSlnuNb5adB ``` - - + \ No newline at end of file diff --git a/website/docs/cdktf/go/r/agent_token.html.markdown b/website/docs/cdktf/go/r/agent_token.html.markdown index c4f5ddc9a..e9755c2cc 100644 --- a/website/docs/cdktf/go/r/agent_token.html.markdown +++ b/website/docs/cdktf/go/r/agent_token.html.markdown @@ -5,6 +5,8 @@ description: |- Manages agent tokens --- + + # tfe_agent_token Each agent pool has its own set of tokens which are not shared across pools. @@ -58,4 +60,4 @@ The following arguments are supported: * `Description` - The description of agent token. * `Token` - The generated token. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/go/r/notification_configuration.html.markdown b/website/docs/cdktf/go/r/notification_configuration.html.markdown index da58281f4..7064271a5 100644 --- a/website/docs/cdktf/go/r/notification_configuration.html.markdown +++ b/website/docs/cdktf/go/r/notification_configuration.html.markdown @@ -221,4 +221,4 @@ Notification configurations can be imported; use ` \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/go/r/oauth_client.html.markdown b/website/docs/cdktf/go/r/oauth_client.html.markdown index a2385138a..e553ce593 100644 --- a/website/docs/cdktf/go/r/oauth_client.html.markdown +++ b/website/docs/cdktf/go/r/oauth_client.html.markdown @@ -5,6 +5,8 @@ description: |- Manages OAuth clients. --- + + # tfe_oauth_client An OAuth Client represents the connection between an organization and a VCS @@ -35,6 +37,7 @@ func newMyConvertedCode(scope construct, name *string) *myConvertedCode { name: jsii.String("my-github-oauth-client"), oauthToken: jsii.String("my-vcs-provider-token"), organization: jsii.String("my-org-name"), + organizationScoped: jsii.Boolean(true), serviceProvider: jsii.String("github"), }) return this @@ -73,11 +76,11 @@ func newMyConvertedCode(scope construct, name *string) *myConvertedCode { } ``` -#### BitBucket Data Center Usage +#### Bitbucket Data Center Usage -See [documentation for HCP Terraform and Terraform Enterprise setup](https://developer.hashicorp.com/terraform/cloud-docs/vcs/bitbucket-data-center). +See [documentation for HCP Terraform and Terraform Enterprise setup](https://developer.hashicorp.com/terraform/cloud-docs/vcs/bitbucket-server). -When using BitBucket Data Center, you must use three required fields: `Key`, `Secret`, `RsaPublicKey`. +When using Bitbucket Data Center, you must use three required fields: `Key`, `Secret`, `RsaPublicKey`. ```go @@ -124,17 +127,19 @@ The following arguments are supported: * `Secret` - (Required for `BitbucketDataCenter`) The OAuth Client secret is used for Bitbucket Data Center, this secret is the the text of the SSH private key associated with your Bitbucket Data Center Application Link. -* `RsaPublicKey` - (Required for `BitbucketDataCenter`) Required for Bitbucket Data Center - in conjunction with the secret. Not used for any other providers. The +* `RsaPublicKey` - (Required for `BitbucketDataCenter`) Required for Bitbucket + Data Center in conjunction with the secret. Not used for any other providers. The text of the SSH public key associated with your Bitbucket Data Center Application Link. * `ServiceProvider` - (Required) The VCS provider being connected with. Valid options are `AdoServer`, `AdoServices`, `BitbucketDataCenter`, `BitbucketHosted`, `BitbucketServer`(deprecated), `Github`, `GithubEnterprise`, `GitlabHosted`, `GitlabCommunityEdition`, or `GitlabEnterpriseEdition`. +* `AgentPoolId` - (Optional) An existing agent pool ID within the organization that has Private VCS support enabled. +* `OrganizationScoped` - (Optional) Whether or not the oauth client is scoped to all projects and workspaces in the organization. Defaults to `True`. ## Attributes Reference * `Id` - The ID of the OAuth client. * `OauthTokenId` - The ID of the OAuth token associated with the OAuth client. - + \ No newline at end of file diff --git a/website/docs/cdktf/go/r/opa_version.html.markdown b/website/docs/cdktf/go/r/opa_version.html.markdown index 787153ae7..c3f21d91c 100644 --- a/website/docs/cdktf/go/r/opa_version.html.markdown +++ b/website/docs/cdktf/go/r/opa_version.html.markdown @@ -68,4 +68,4 @@ terraform import tfe_opa_version.test 0.58.0 -> **Note:** You can fetch a OPA version ID from the URL of an existing version in the HCP Terraform UI. The ID is in the format `tool-` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/go/r/organization.html.markdown b/website/docs/cdktf/go/r/organization.html.markdown index 104e0968f..7943c62fa 100644 --- a/website/docs/cdktf/go/r/organization.html.markdown +++ b/website/docs/cdktf/go/r/organization.html.markdown @@ -68,4 +68,4 @@ example: terraform import tfe_organization.test my-org-name ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/go/r/organization_default_settings.html.markdown b/website/docs/cdktf/go/r/organization_default_settings.html.markdown index 4fb9e6bea..4a7900ac9 100644 --- a/website/docs/cdktf/go/r/organization_default_settings.html.markdown +++ b/website/docs/cdktf/go/r/organization_default_settings.html.markdown @@ -70,7 +70,7 @@ The following arguments are supported: Organization default execution mode can be imported; use `` as the import ID. For example: ```shell -terraform import tfe_organization_default_execution_mode.test my-org-name +terraform import tfe_organization_default_settings.test my-org-name ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/go/r/organization_membership.html.markdown b/website/docs/cdktf/go/r/organization_membership.html.markdown index eb82ce5f7..85b12eb8f 100644 --- a/website/docs/cdktf/go/r/organization_membership.html.markdown +++ b/website/docs/cdktf/go/r/organization_membership.html.markdown @@ -5,6 +5,8 @@ description: |- Add or remove a user from an organization. --- + + # tfe_organization_membership Add or remove a user from an organization. @@ -70,4 +72,4 @@ terraform import tfe_organization_membership.test my-org-name/user@example.com terraform import tfe_organization_membership.test ou-wAs3zYmWAhYK7peR ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/go/r/organization_run_task.html.markdown b/website/docs/cdktf/go/r/organization_run_task.html.markdown index 0f1853c50..ad05b2e94 100644 --- a/website/docs/cdktf/go/r/organization_run_task.html.markdown +++ b/website/docs/cdktf/go/r/organization_run_task.html.markdown @@ -5,6 +5,8 @@ description: |- Manages Run tasks. --- + + # tfe_organization_run_task [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. @@ -64,4 +66,4 @@ import ID. For example: terraform import tfe_organization_run_task.test my-org-name/task-name ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/go/r/project.html.markdown b/website/docs/cdktf/go/r/project.html.markdown index a91d42a3e..98bbdcbf3 100644 --- a/website/docs/cdktf/go/r/project.html.markdown +++ b/website/docs/cdktf/go/r/project.html.markdown @@ -5,6 +5,8 @@ description: |- Manages projects. --- + + # tfe_project Provides a project resource. @@ -45,6 +47,7 @@ The following arguments are supported: * `Name` - (Required) Name of the project. * `Organization` - (Optional) Name of the organization. If omitted, organization must be defined in the provider config. +* `Description` - (Optional) A description for the project. ## Attributes Reference @@ -60,4 +63,4 @@ Projects can be imported; use `` as the import ID. For example: terraform import tfe_project.test prj-niVoeESBXT8ZREhr ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/go/r/project_oauth_client.html.markdown b/website/docs/cdktf/go/r/project_oauth_client.html.markdown new file mode 100644 index 000000000..cc3bf57c4 --- /dev/null +++ b/website/docs/cdktf/go/r/project_oauth_client.html.markdown @@ -0,0 +1,83 @@ +--- +layout: "tfe" +page_title: "Terraform Enterprise: tfe_project_oauth_client" +description: |- + Add an oauth client to a project +--- + + + +# tfe_project_oauth_client + +Adds and removes oauth clients from a project + +## Example Usage + +Basic usage: + +```go +import constructs "github.com/aws/constructs-go/constructs" +import "github.com/hashicorp/terraform-cdk-go/cdktf" +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import "github.com/aws-samples/dummy/gen/providers/tfe/organization" +import "github.com/aws-samples/dummy/gen/providers/tfe/project" +import "github.com/aws-samples/dummy/gen/providers/tfe/oauthClient" +import "github.com/aws-samples/dummy/gen/providers/tfe/projectOauthClient" +type myConvertedCode struct { + terraformStack +} + +func newMyConvertedCode(scope construct, name *string) *myConvertedCode { + this := &myConvertedCode{} + cdktf.NewTerraformStack_Override(this, scope, name) + tfeOrganizationTest := organization.NewOrganization(this, jsii.String("test"), &organizationConfig{ + email: jsii.String("admin@company.com"), + name: jsii.String("my-org-name"), + }) + tfeProjectTest := project.NewProject(this, jsii.String("test_1"), &projectConfig{ + name: jsii.String("my-project-name"), + organization: cdktf.Token_AsString(tfeOrganizationTest.name), + }) + /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ + tfeProjectTest.OverrideLogicalId(jsii.String("test")) + tfeOauthClientTest := oauthClient.NewOauthClient(this, jsii.String("test_2"), &oauthClientConfig{ + apiUrl: jsii.String("https://api.github.com"), + httpUrl: jsii.String("https://github.com"), + oauthToken: jsii.String("oauth_token_id"), + organization: tfeOrganizationTest, + serviceProvider: jsii.String("github"), + }) + /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ + tfeOauthClientTest.OverrideLogicalId(jsii.String("test")) + tfeProjectOauthClientTest := + projectOauthClient.NewProjectOauthClient(this, jsii.String("test_3"), &projectOauthClientConfig{ + oauthClientId: cdktf.Token_*AsString(tfeOauthClientTest.id), + projectId: cdktf.Token_*AsString(tfeProjectTest.id), + }) + /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ + tfeProjectOauthClientTest.OverrideLogicalId(jsii.String("test")) + return this +} +``` + +## Argument Reference + +The following arguments are supported: + +* `OauthClientId` - (Required) ID of the oauth client. +* `ProjectId` - (Required) Project ID to add the oauth client to. + +## Attributes Reference + +* `Id` - The ID of the oauth client attachment. ID format: `_` + +## Import + +Project OAuth Clients can be imported; use `//`. For example: + +```shell +terraform import tfe_project_oauth_client.test 'my-org-name/project/oauth-client-name' +``` + + \ No newline at end of file diff --git a/website/docs/cdktf/go/r/registry_module.html.markdown b/website/docs/cdktf/go/r/registry_module.html.markdown index a147e6820..fbec6d07f 100644 --- a/website/docs/cdktf/go/r/registry_module.html.markdown +++ b/website/docs/cdktf/go/r/registry_module.html.markdown @@ -243,6 +243,7 @@ The following arguments are supported: * `Organization` - (Optional) The name of the organization associated with the registry module. It must be set if `ModuleProvider` is used, or if `VcsRepo` is used via a GitHub App. * `Namespace` - (Optional) The namespace of a public registry module. It can be used if `ModuleProvider` is set and `RegistryName` is public. * `RegistryName` - (Optional) Whether the registry module is private or public. It can be used if `ModuleProvider` is set. +* `InitialVersion` - (Optional) This specifies the initial version for a branch based module. It can be used if `VcsRepoBranch` is set. If it is omitted, the initial modules version will default to `000`. The `TestConfig` block supports * `TestsEnabled` - (Optional) Specifies whether tests run for the registry module. Tests are only supported for branch-based publishing. @@ -286,4 +287,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 ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/go/r/run_trigger.html.markdown b/website/docs/cdktf/go/r/run_trigger.html.markdown index 2e3f1f1b9..635b34659 100644 --- a/website/docs/cdktf/go/r/run_trigger.html.markdown +++ b/website/docs/cdktf/go/r/run_trigger.html.markdown @@ -5,6 +5,8 @@ description: |- Manages run triggers --- + + # tfe_run_trigger HCP Terraform provides a way to connect your workspace to one or more workspaces within your organization, @@ -71,4 +73,4 @@ Run triggers can be imported; use `` as the import ID. For examp terraform import tfe_run_trigger.test rt-qV9JnKRkmtMa4zcA ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/go/r/sentinel_version.html.markdown b/website/docs/cdktf/go/r/sentinel_version.html.markdown index f8604a4be..db708c236 100644 --- a/website/docs/cdktf/go/r/sentinel_version.html.markdown +++ b/website/docs/cdktf/go/r/sentinel_version.html.markdown @@ -68,4 +68,4 @@ terraform import tfe_sentinel_version.test 0.24.0 -> **Note:** You can fetch a Sentinel version ID from the URL of an existing version in the HCP Terraform UI. The ID is in the format `tool-` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/go/r/team.html.markdown b/website/docs/cdktf/go/r/team.html.markdown index a522d8074..abfbcca33 100644 --- a/website/docs/cdktf/go/r/team.html.markdown +++ b/website/docs/cdktf/go/r/team.html.markdown @@ -5,6 +5,8 @@ description: |- Manages teams. --- + + # tfe_team Manages teams. @@ -83,6 +85,9 @@ The `OrganizationAccess` block supports: * `ManageRunTasks` - (Optional) Allow members to create, edit, and delete the organization's run tasks. * `ManageProjects` - (Optional) Allow members to create and administrate all projects within the organization. Requires `ManageWorkspaces` to be set to `True`. * `ManageMembership` - (Optional) Allow members to add/remove users from the organization, and to add/remove users from visible teams. +* `ManageTeams` - (Optional) Allow members to create, update, and delete teams. +* `ManageOrganizationAccess` - (Optional) Allow members to update the organization access settings of teams. +* `AccessSecretTeams` - (Optional) Allow members access to secret teams up to the level of permissions granted by their team permissions setting. ## Attributes Reference @@ -101,4 +106,4 @@ or terraform import tfe_team.test my-org-name/my-team-name ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/go/r/team_organization_member.html.markdown b/website/docs/cdktf/go/r/team_organization_member.html.markdown index 3bca2cdf7..7dffc5f3a 100644 --- a/website/docs/cdktf/go/r/team_organization_member.html.markdown +++ b/website/docs/cdktf/go/r/team_organization_member.html.markdown @@ -5,6 +5,8 @@ description: |- Add or remove a user from a team. --- + + # tfe_team_organization_member Add or remove a team member using a @@ -78,4 +80,4 @@ or terraform import tfe_team_organization_member.test my-org-name/user@company.com/my-team-name ``` ~> **NOTE:** The `//` import ID format cannot be used if there are `/` characters in the user's email. These users must be imported with the `/` format instead - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/go/r/team_organization_members.html.markdown b/website/docs/cdktf/go/r/team_organization_members.html.markdown index 1ea1c7c40..2acdcd983 100644 --- a/website/docs/cdktf/go/r/team_organization_members.html.markdown +++ b/website/docs/cdktf/go/r/team_organization_members.html.markdown @@ -5,6 +5,8 @@ description: |- Add or remove users from a team based on their organization memberships. --- + + # tfe_team_organization_members Add or remove one or more team members using a @@ -55,10 +57,10 @@ func newMyConvertedCode(scope construct, name *string) *myConvertedCode { tfeTeamOrganizationMembersTest := teamOrganizationMembers.NewTeamOrganizationMembers(this, jsii.String("test_3"), &teamOrganizationMembersConfig{ organizationMembershipIds: []*string{ - cdktf.*token_AsString(tfeOrganizationMembershipTest.id), - cdktf.*token_*AsString(tfeOrganizationMembershipSample.id), + cdktf.Token_AsString(tfeOrganizationMembershipTest.id), + cdktf.Token_*AsString(tfeOrganizationMembershipSample.id), }, - teamId: cdktf.*token_*AsString(tfeTeamTest.id), + teamId: cdktf.Token_*AsString(tfeTeamTest.id), }) /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ tfeTeamOrganizationMembersTest.OverrideLogicalId(jsii.String("test")) @@ -83,7 +85,7 @@ type myConvertedCode struct { func newMyConvertedCode(scope construct, name *string) *myConvertedCode { this := &myConvertedCode{} cdktf.NewTerraformStack_Override(this, scope, name) - allUsers := cdktf.fn_Toset([]interface{}{ + allUsers := cdktf.Fn_Toset([]interface{}{ jsii.String("user1@hashicorp.com"), jsii.String("user2@hashicorp.com"), }) @@ -128,4 +130,4 @@ as the import ID. For example: terraform import tfe_team_organization_members.test team-47qC3LmA47piVan7 ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/go/r/terraform_version.html.markdown b/website/docs/cdktf/go/r/terraform_version.html.markdown index acdb57ea4..f47102343 100644 --- a/website/docs/cdktf/go/r/terraform_version.html.markdown +++ b/website/docs/cdktf/go/r/terraform_version.html.markdown @@ -5,6 +5,8 @@ description: |- Manages Terraform versions --- + + # tfe_terraform_version Manage Terraform versions available on HCP Terraform and Terraform Enterprise. @@ -13,25 +15,11 @@ Manage Terraform versions available on HCP Terraform and Terraform Enterprise. Basic Usage: -```go -import constructs "github.com/aws/constructs-go/constructs" -import cdktf "github.com/hashicorp/terraform-cdk-go/cdktf" -/*Provider bindings are generated by running cdktf get. -See https://cdk.tf/provider-generation for more details.*/ -import "github.com/aws-samples/dummy/gen/providers/tfe/terraformVersion" -type myConvertedCode struct { - terraformStack -} - -func newMyConvertedCode(scope construct, name *string) *myConvertedCode { - this := &myConvertedCode{} - cdktf.NewTerraformStack_Override(this, scope, name) - terraformVersion.NewTerraformVersion(this, jsii.String("test"), &terraformVersionConfig{ - sha: jsii.String("e75ac73deb69a6b3aa667cb0b8b731aee79e2904"), - url: jsii.String("https://tfe-host.com/path/to/terraform.zip"), - version: jsii.String("1.1.2-custom"), - }) - return this +```hcl +resource "tfe_terraform_version" "test" { + version = "1.1.2-custom" + url = "https://tfe-host.com/path/to/terraform.zip" + sha = "e75ac73deb69a6b3aa667cb0b8b731aee79e2904" } ``` @@ -66,4 +54,4 @@ terraform import tfe_terraform_version.test 1.1.2 -> **Note:** You can fetch a Terraform version ID from the URL of an existing version in the HCP Terraform UI. The ID is in the format `tool-` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/go/r/tfe_test_variable.html.markdown b/website/docs/cdktf/go/r/tfe_test_variable.html.markdown new file mode 100644 index 000000000..0ea52ed7c --- /dev/null +++ b/website/docs/cdktf/go/r/tfe_test_variable.html.markdown @@ -0,0 +1,55 @@ +--- +layout: "tfe" +page_title: "Terraform Enterprise: tfe_test_variable" +description: |- + Manages environmet variables used for testing by modules in the Private Module Registry. +--- + + + +# tfe_test_variable + +Creates, updates and destroys environment variables used for testing in the Private Module Registry. + +## Example Usage + +```hcl +resource "tfe_organization" "test_org" { + name = "my-org-name" + email = "admin@company.com" +} + +resource "tfe_oauth_client" "test_client" { + organization = tfe_organization.test.name + api_url = "https://api.github.com" + http_url = "https://github.com" + oauth_token = "my-token-123" + service_provider = "github" +} + +resource "tfe_registry_module" "test_module" { + organization = "test-module" + vcs_repo { + display_identifier = "GH_NAME/REPO_NAME" + identifier = "GH_NAME/REPO_NAME" + oauth_token_id = tfe_oauth_client.test.oauth_token_id + branch = "main" + tags = false +} + test_config { + tests_enabled = true + } +} + +resource "tfe_test_variable" "tf_test_test_variable" { + key = "key_test" + value = "value_test" + description = "some description" + category = "env" + organization = tfe_organization.test.name + module_name = tfe_registry_module.test.name + module_provider = tfe_registry_module.test.module_provider +} +``` + + \ No newline at end of file diff --git a/website/docs/cdktf/go/r/variable.html.markdown b/website/docs/cdktf/go/r/variable.html.markdown index 24801da02..721c5e3e4 100644 --- a/website/docs/cdktf/go/r/variable.html.markdown +++ b/website/docs/cdktf/go/r/variable.html.markdown @@ -5,6 +5,8 @@ description: |- Manages variables. --- + + # tfe_variable Creates, updates and destroys variables. @@ -185,4 +187,4 @@ example: terraform import tfe_variable.test my-org-name/varset-47qC3LmA47piVan7/var-5rTwnSaRPogw6apb ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/go/r/workspace.html.markdown b/website/docs/cdktf/go/r/workspace.html.markdown index c7511d8ab..014239fae 100644 --- a/website/docs/cdktf/go/r/workspace.html.markdown +++ b/website/docs/cdktf/go/r/workspace.html.markdown @@ -12,6 +12,7 @@ description: |- Provides a workspace resource. ~> **NOTE:** Setting the execution mode and agent pool affinity directly on the workspace is deprecated in favor of using both [tfe_workspace_settings](workspace_settings) and [tfe_organization_default_settings](organization_default_settings), since they allow more precise control and fully support [agent_pool_allowed_workspaces](agent_pool_allowed_workspaces). Use caution when unsetting `ExecutionMode`, as it now leaves any prior value unmanaged instead of reverting to the old default value of `"remote"`. + ~> **NOTE:** Using `GlobalRemoteState` or `RemoteStateConsumerIds` requires using the provider with HCP Terraform or an instance of Terraform Enterprise at least as recent as v202104-1. ## Example Usage @@ -38,7 +39,7 @@ func newMyConvertedCode(scope construct, name *string) *myConvertedCode { }) workspace.NewWorkspace(this, jsii.String("test"), &workspaceConfig{ name: jsii.String("my-workspace-name"), - organization: cdktf.Token_AsString(tfeOrganizationTestOrganization.name), + organization: cdktf.*token_AsString(tfeOrganizationTestOrganization.name), tagNames: []*string{ jsii.String("test"), jsii.String("app"), @@ -83,7 +84,7 @@ func newMyConvertedCode(scope construct, name *string) *myConvertedCode { vcsRepo: &workspaceVcsRepo{ branch: jsii.String("main"), identifier: jsii.String("my-org-name/vcs-repository"), - oauthTokenId: cdktf.Token_AsString(tfeOauthClientTest.oauthTokenId), + oauthTokenId: cdktf.*token_AsString(tfeOauthClientTest.oauthTokenId), }, }) return this @@ -100,6 +101,10 @@ The following arguments are supported: * `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`. * `AutoApplyRunTrigger` - (Optional) Whether to automatically apply changes for runs that were created by run triggers from another workspace. Defaults to `False`. +* `AutoDestroyAt` - (Optional) A future date/time string at which point all resources in a workspace will be scheduled for deletion. Must be a string in RFC3339 format (e.g. "2100-01-01T00:00:00Z"). + +~> **NOTE:** `AutoDestroyAt` is not intended for workspaces containing production resources or long-lived workspaces. Since this attribute is in-part managed by HCP Terraform, using `IgnoreChanges` for this attribute may be preferred. + * `Description` - (Optional) A description for the workspace. * `ExecutionMode` - (Optional) **Deprecated** Which [execution mode](https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings#execution-mode) to use. Use [tfe_workspace_settings](workspace_settings) instead. * `FileTriggersEnabled` - (Optional) Whether to filter runs based on the changed files @@ -199,4 +204,4 @@ terraform import tfe_workspace.test ws-CH5in3chf8RJjrVd terraform import tfe_workspace.test my-org-name/my-wkspace-name ``` - + \ No newline at end of file diff --git a/website/docs/cdktf/go/r/workspace_run.html.markdown b/website/docs/cdktf/go/r/workspace_run.html.markdown index 17d31514f..f61f1da07 100644 --- a/website/docs/cdktf/go/r/workspace_run.html.markdown +++ b/website/docs/cdktf/go/r/workspace_run.html.markdown @@ -57,7 +57,7 @@ func newMyConvertedCode(scope construct, name *string) *myConvertedCode { vcsRepo: &workspaceVcsRepo{ branch: jsii.String("main"), identifier: jsii.String("my-org-name/vcs-repository"), - oauthTokenId: cdktf.Token_AsString(tfeOauthClientTest.oauthTokenId), + oauthTokenId: cdktf.*token_AsString(tfeOauthClientTest.oauthTokenId), }, }) tfeWorkspaceParent := workspace.NewWorkspace(this, jsii.String("parent"), &workspaceConfig{ @@ -67,7 +67,7 @@ func newMyConvertedCode(scope construct, name *string) *myConvertedCode { vcsRepo: &workspaceVcsRepo{ branch: jsii.String("main"), identifier: jsii.String("my-org-name/vcs-repository"), - oauthTokenId: cdktf.Token_*AsString(tfeOauthClientTest.oauthTokenId), + oauthTokenId: cdktf.*token_*AsString(tfeOauthClientTest.oauthTokenId), }, }) tfeWorkspaceRunWsRunParent := workspaceRun.NewWorkspaceRun(this, jsii.String("ws_run_parent"), &workspaceRunConfig{ @@ -83,7 +83,7 @@ func newMyConvertedCode(scope construct, name *string) *myConvertedCode { retryBackoffMin: jsii.Number(10), waitForRun: jsii.Boolean(true), }, - workspaceId: cdktf.Token_*AsString(tfeWorkspaceParent.id), + workspaceId: cdktf.*token_*AsString(tfeWorkspaceParent.id), }) workspaceRun.NewWorkspaceRun(this, jsii.String("ws_run_child"), &workspaceRunConfig{ apply: &workspaceRunApply{ @@ -100,7 +100,7 @@ func newMyConvertedCode(scope construct, name *string) *myConvertedCode { retryBackoffMin: jsii.Number(10), waitForRun: jsii.Boolean(true), }, - workspaceId: cdktf.Token_*AsString(tfeWorkspaceChild.id), + workspaceId: cdktf.*token_*AsString(tfeWorkspaceChild.id), }) return this } @@ -142,7 +142,7 @@ func newMyConvertedCode(scope construct, name *string) *myConvertedCode { vcsRepo: &workspaceVcsRepo{ branch: jsii.String("main"), identifier: jsii.String("my-org-name/vcs-repository"), - oauthTokenId: cdktf.Token_AsString(tfeOauthClientTest.oauthTokenId), + oauthTokenId: cdktf.*token_AsString(tfeOauthClientTest.oauthTokenId), }, }) workspaceRun.NewWorkspaceRun(this, jsii.String("ws_run_parent"), &workspaceRunConfig{ @@ -153,7 +153,7 @@ func newMyConvertedCode(scope construct, name *string) *myConvertedCode { manualConfirm: jsii.Boolean(true), waitForRun: jsii.Boolean(true), }, - workspaceId: cdktf.Token_*AsString(tfeWorkspaceParent.id), + workspaceId: cdktf.*token_*AsString(tfeWorkspaceParent.id), }) return this } @@ -195,7 +195,7 @@ func newMyConvertedCode(scope construct, name *string) *myConvertedCode { vcsRepo: &workspaceVcsRepo{ branch: jsii.String("main"), identifier: jsii.String("my-org-name/vcs-repository"), - oauthTokenId: cdktf.Token_AsString(tfeOauthClientTest.oauthTokenId), + oauthTokenId: cdktf.*token_AsString(tfeOauthClientTest.oauthTokenId), }, }) workspaceRun.NewWorkspaceRun(this, jsii.String("ws_run_parent"), &workspaceRunConfig{ @@ -208,7 +208,7 @@ func newMyConvertedCode(scope construct, name *string) *myConvertedCode { retry: jsii.Boolean(false), waitForRun: jsii.Boolean(true), }, - workspaceId: cdktf.Token_*AsString(tfeWorkspaceParent.id), + workspaceId: cdktf.*token_*AsString(tfeWorkspaceParent.id), }) return this } @@ -239,4 +239,4 @@ 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. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/go/r/workspace_run_task.html.markdown b/website/docs/cdktf/go/r/workspace_run_task.html.markdown index af04183ce..fa8e28183 100644 --- a/website/docs/cdktf/go/r/workspace_run_task.html.markdown +++ b/website/docs/cdktf/go/r/workspace_run_task.html.markdown @@ -5,6 +5,8 @@ description: |- Manages Workspace Run tasks. --- + + # tfe_workspace_run_task [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. @@ -45,4 +47,4 @@ import ID. For example: terraform import tfe_workspace_run_task.test my-org-name/workspace/task-name ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/go/r/workspace_settings.markdown b/website/docs/cdktf/go/r/workspace_settings.markdown index 2ae60b1cf..de2b5da63 100644 --- a/website/docs/cdktf/go/r/workspace_settings.markdown +++ b/website/docs/cdktf/go/r/workspace_settings.markdown @@ -36,11 +36,11 @@ func newMyConvertedCode(scope construct, name *string) *myConvertedCode { }) tfeWorkspaceTest := workspace.NewWorkspace(this, jsii.String("test"), &workspaceConfig{ name: jsii.String("my-workspace-name"), - organization: cdktf.Token_AsString(tfeOrganizationTestOrganization.name), + organization: cdktf.*token_AsString(tfeOrganizationTestOrganization.name), }) workspaceSettings.NewWorkspaceSettings(this, jsii.String("test-settings"), &workspaceSettingsConfig{ executionMode: jsii.String("local"), - workspaceId: cdktf.Token_*AsString(tfeWorkspaceTest.id), + workspaceId: cdktf.*token_*AsString(tfeWorkspaceTest.id), }) return this } @@ -71,25 +71,25 @@ func newMyConvertedCode(scope construct, name *string) *myConvertedCode { }) tfeWorkspaceTest := workspace.NewWorkspace(this, jsii.String("test"), &workspaceConfig{ name: jsii.String("my-workspace-name"), - organization: cdktf.Token_AsString(tfeOrganizationTestOrganization.name), + organization: cdktf.*token_AsString(tfeOrganizationTestOrganization.name), }) tfeAgentPoolTestAgentPool := agentPool.NewAgentPool(this, jsii.String("test-agent-pool"), &agentPoolConfig{ name: jsii.String("my-agent-pool-name"), - organization: cdktf.Token_*AsString(tfeOrganizationTestOrganization.name), + organization: cdktf.*token_*AsString(tfeOrganizationTestOrganization.name), }) tfeAgentPoolAllowedWorkspacesTest := agentPoolAllowedWorkspaces.NewAgentPoolAllowedWorkspaces(this, jsii.String("test_3"), &agentPoolAllowedWorkspacesConfig{ - agentPoolId: cdktf.Token_*AsString(tfeAgentPoolTestAgentPool.id), + agentPoolId: cdktf.*token_*AsString(tfeAgentPoolTestAgentPool.id), allowedWorkspaceIds: []*string{ - cdktf.Token_*AsString(tfeWorkspaceTest.id), + cdktf.*token_*AsString(tfeWorkspaceTest.id), }, }) /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ tfeAgentPoolAllowedWorkspacesTest.OverrideLogicalId(jsii.String("test")) workspaceSettings.NewWorkspaceSettings(this, jsii.String("test-settings"), &workspaceSettingsConfig{ - agentPoolId: cdktf.Token_*AsString(tfeAgentPoolAllowedWorkspacesTest.agentPoolId), + agentPoolId: cdktf.*token_*AsString(tfeAgentPoolAllowedWorkspacesTest.agentPoolId), executionMode: jsii.String("agent"), - workspaceId: cdktf.Token_*AsString(tfeWorkspaceTest.id), + workspaceId: cdktf.*token_*AsString(tfeWorkspaceTest.id), }) return this } @@ -117,12 +117,12 @@ func newMyConvertedCode(scope construct, name *string) *myConvertedCode { }) tfeWorkspaceSettingsTest := workspaceSettings.NewWorkspaceSettings(this, jsii.String("test_1"), &workspaceSettingsConfig{ - workspaceId: cdktf.Token_AsString(dataTfeWorkspaceTest.id), + workspaceId: cdktf.*token_AsString(dataTfeWorkspaceTest.id), }) /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ tfeWorkspaceSettingsTest.OverrideLogicalId(jsii.String("test")) cdktf.NewTerraformOutput(this, jsii.String("workspace-explicit-local-execution"), &TerraformOutputConfig{ - Value: cdktf.Fn_Alltrue(cdktf.Token_AsAny([]interface{}{ + Value: cdktf.*fn_Alltrue(cdktf.*token_*AsAny([]interface{}{ cdktf.Op_Eq(tfeWorkspaceSettingsTest.executionMode, jsii.String("local")), cdktf.propertyAccess(tfeWorkspaceSettingsTest.overwrites, []interface{}{ jsii.String("0"), @@ -142,7 +142,7 @@ The following arguments are supported: * `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. * `ExecutionMode` - (Optional) Which [execution mode](https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings#execution-mode) - to use. Using HCP Terraform, valid values are `Remote`, `Local` or `Agent`. Using Terraform Enterprise, only `Remote` and `Local` execution modes are valid. When set to `Local`, the workspace will be used for state storage only. **Important:** If you omit this attribute, the resource configures the workspace to use your organization's default execution mode (which in turn defaults to `Remote`), removing any explicit value that might have previously been set for the workspace. + to use. Using HCP Terraform, valid values are `Remote`, `Local` or `Agent`. When set to `Local`, the workspace will be used for state storage only. **Important:** If you omit this attribute, the resource configures the workspace to use your organization's default execution mode (which in turn defaults to `Remote`), removing any explicit value that might have previously been set for the workspace. ## Attributes Reference @@ -166,4 +166,4 @@ terraform import tfe_workspace_settings.test ws-CH5in3chf8RJjrVd terraform import tfe_workspace_settings.test my-org-name/my-wkspace-name ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/java/d/ip_ranges.html.markdown b/website/docs/cdktf/java/d/ip_ranges.html.markdown index 26c254cb9..cf625dd97 100644 --- a/website/docs/cdktf/java/d/ip_ranges.html.markdown +++ b/website/docs/cdktf/java/d/ip_ranges.html.markdown @@ -5,6 +5,8 @@ description: |- Get HCP Terraform and Terraform Enterprise's IP ranges of its services --- + + # Data Source: tfe_ip_ranges Use this data source to retrieve a list of HCP Terraform's IP ranges. For more information about these IP ranges, view our [documentation about HCP Terraform IP Ranges](https://developer.hashicorp.com/terraform/cloud-docs/architectural-details/ip-ranges). @@ -42,4 +44,4 @@ The following attributes are exported: * `vcs` - The list of IP ranges in CIDR notation used for connecting to VCS providers. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/java/d/oauth_client.html.markdown b/website/docs/cdktf/java/d/oauth_client.html.markdown index 571a40b3d..12a04b23b 100644 --- a/website/docs/cdktf/java/d/oauth_client.html.markdown +++ b/website/docs/cdktf/java/d/oauth_client.html.markdown @@ -5,6 +5,8 @@ description: |- Get information on an OAuth client. --- + + # Data Source: tfe_oauth_client Use this data source to get information about an OAuth client. @@ -78,7 +80,7 @@ be set. * `oauthClientId` - (Optional) ID of the OAuth client. * `organization` - (Optional) The name of the organization in which to search. * `serviceProvider` - (Optional) The API identifier of the OAuth service provider. If set, - must be one of: `adoServer`, `adoServices`, `bitbucketDataCenter`, `bitbucketHosted`, `bitbucketServer`(deprecated), + must be one of: `adoServer`, `adoServices`, `bitbucketDataCenter`, `bitbucketHosted`, `bitbucketServer`(deprecated), `github`, `githubEnterprise`, `gitlabHosted`, `gitlabCommunityEdition`, or `gitlabEnterpriseEdition`. @@ -96,5 +98,6 @@ In addition to all arguments above, the following attributes are exported: * `organization` - The organization in which the OAuth client is registered. * `serviceProvider` - The API identifier of the OAuth service provider. * `serviceProviderDisplayName` - The display name of the OAuth service provider. - - \ No newline at end of file +* `organizationScoped` - Whether or not the agent pool can be used by all workspaces and projects in the organization. +* `projectIds` - IDs of the projects that use the oauth client. + \ No newline at end of file diff --git a/website/docs/cdktf/java/d/organization.html.markdown b/website/docs/cdktf/java/d/organization.html.markdown index c0a56628d..80f4a4522 100644 --- a/website/docs/cdktf/java/d/organization.html.markdown +++ b/website/docs/cdktf/java/d/organization.html.markdown @@ -48,4 +48,4 @@ In addition to all arguments above, the following attributes are exported: * `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. * `defaultProjectId` - ID of the organization's default project. All workspaces created without specifying a project ID are created in this project. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/java/d/organization_membership.html.markdown b/website/docs/cdktf/java/d/organization_membership.html.markdown index 95270a8e3..bffd9db37 100644 --- a/website/docs/cdktf/java/d/organization_membership.html.markdown +++ b/website/docs/cdktf/java/d/organization_membership.html.markdown @@ -95,4 +95,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. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/java/d/organization_run_task.html.markdown b/website/docs/cdktf/java/d/organization_run_task.html.markdown index 54f03175b..f980f88e1 100644 --- a/website/docs/cdktf/java/d/organization_run_task.html.markdown +++ b/website/docs/cdktf/java/d/organization_run_task.html.markdown @@ -5,6 +5,8 @@ description: |- Get information on a Run task. --- + + # Data Source: tfe_organization_run_task [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. @@ -47,4 +49,4 @@ In addition to all arguments above, the following attributes are exported: * `id` - The ID of the task. * `url` - URL to send a task payload. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/java/d/slug.html.markdown b/website/docs/cdktf/java/d/slug.html.markdown index 04646bb98..e1a0dd463 100644 --- a/website/docs/cdktf/java/d/slug.html.markdown +++ b/website/docs/cdktf/java/d/slug.html.markdown @@ -4,6 +4,8 @@ page_title: "Terraform Enterprise: tfe_slug" description: |- Manages files. --- + + # Data Source: tfe_slug This data source is used to represent configuration files on a local filesystem @@ -48,4 +50,4 @@ The following arguments are supported: * `sourcePath` - (Required) The path to the directory where the files are located. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/java/d/workspace.html.markdown b/website/docs/cdktf/java/d/workspace.html.markdown index 6e5340ca3..6cfed24c1 100644 --- a/website/docs/cdktf/java/d/workspace.html.markdown +++ b/website/docs/cdktf/java/d/workspace.html.markdown @@ -47,6 +47,7 @@ In addition to all arguments above, the following attributes are exported: * `allowDestroyPlan` - Indicates whether destroy plans can be queued on the workspace. * `autoApply` - Indicates whether to automatically apply changes when a Terraform plan is successful. * `autoApplyRunTrigger` - Whether the workspace will automatically apply changes for runs that were created by run triggers from another workspace. +* `autoDestroyAt` - Future date/time string at which point all resources in a workspace will be scheduled to be deleted. * `assessmentsEnabled` - (Available only in HCP Terraform) Indicates whether health assessments such as drift detection are enabled for the workspace. * `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`). * `globalRemoteState` - (Optional) Whether the workspace should allow all workspaces in the organization to access its state data during runs. If false, then only specifically approved workspaces can access its state (determined by the `remoteStateConsumerIds` argument). @@ -87,4 +88,4 @@ The `vcsRepo` block contains: * `oauthTokenId` - OAuth token ID of the configured VCS connection. * `tagsRegex` - A regular expression used to trigger a Workspace run for matching Git tags. - + \ No newline at end of file diff --git a/website/docs/cdktf/java/d/workspace_run_task.html.markdown b/website/docs/cdktf/java/d/workspace_run_task.html.markdown index 648f04556..dff04f382 100644 --- a/website/docs/cdktf/java/d/workspace_run_task.html.markdown +++ b/website/docs/cdktf/java/d/workspace_run_task.html.markdown @@ -5,6 +5,8 @@ description: |- Get information on a Workspace Run task. --- + + # Data Source: tfe_workspace_task [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. @@ -45,4 +47,4 @@ In addition to all arguments above, the following attributes are exported: * `id` - The ID of the Workspace Run task. * `stage` - Which stage the task will run in. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/java/index.html.markdown b/website/docs/cdktf/java/index.html.markdown index 9b5606874..be83ab0b1 100644 --- a/website/docs/cdktf/java/index.html.markdown +++ b/website/docs/cdktf/java/index.html.markdown @@ -77,7 +77,7 @@ automatically installed by `terraform init` in the future: terraform { required_providers { tfe = { - version = "~> 0.55.0" + version = "~> 0.56.0" } } } @@ -90,7 +90,7 @@ The above snippet using `requiredProviders` is for Terraform 0.13+; if you are u ```hcl provider "tfe" { - version = "~> 0.55.0" + version = "~> 0.56.0" ... } ``` @@ -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.55.0" + version = "~> 0.56.0" } # Create an organization @@ -116,10 +116,10 @@ resource "tfe_organization" "org" { The following arguments are supported: -* `hostname` - (Optional) The HCP Terraform and Terraform Enterprise hostname to connect to. +* `hostname` - (Optional) The HCP Terraform or Terraform Enterprise hostname to connect to. Defaults to `app.terraform.io`. Can be overridden by setting the `tfeHostname` environment variable. -* `token` - (Optional) The token used to authenticate with HCP Terraform and Terraform Enterprise. +* `token` - (Optional) The token used to authenticate with HCP Terraform or Terraform Enterprise. See [Authentication](#authentication) above for more information. * `sslSkipVerify` - (Optional) Whether or not to skip certificate verifications. Defaults to `false`. Can be overridden setting the `tfeSslSkipVerify` @@ -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. - + \ No newline at end of file diff --git a/website/docs/cdktf/java/r/agent_pool_allowed_workspaces.html.markdown b/website/docs/cdktf/java/r/agent_pool_allowed_workspaces.html.markdown index 66bacc0fa..d83bc9dd9 100644 --- a/website/docs/cdktf/java/r/agent_pool_allowed_workspaces.html.markdown +++ b/website/docs/cdktf/java/r/agent_pool_allowed_workspaces.html.markdown @@ -19,36 +19,36 @@ for Business account. In this example, the agent pool and workspace are connected through other resources that manage the agent pool permissions as well as the workspace execution mode. Notice that the `tfeWorkspaceSettings` uses the agent pool reference found in `tfeAgentPoolAllowedWorkspaces` in order to create the permission to use the agent pool before assigning it. -```java -import software.constructs.*; -import com.hashicorp.cdktf.*; -/*Provider bindings are generated by running cdktf get. -See https://cdk.tf/provider-generation for more details.*/ -import gen.providers.tfe.organization.*; -import gen.providers.tfe.workspace.*; -import gen.providers.tfe.agentPool.*; -import gen.providers.tfe.agentPoolAllowedWorkspaces.*; -public class MyConvertedCode extends TerraformStack { - public MyConvertedCode(Construct scope, String name) { - super(scope, name); - Organization tfeOrganizationTestOrganization = new Organization(this, "test-organization", new OrganizationConfig() - .email("admin@company.com") - .name("my-org-name") - ); - Workspace tfeWorkspaceTestWorkspace = new Workspace(this, "test-workspace", new WorkspaceConfig() - .name("my-workspace-name") - .organization(Token.asString(tfeOrganizationTestOrganization.getName())) - ); - AgentPool tfeAgentPoolTestAgentPool = new AgentPool(this, "test-agent-pool", new AgentPoolConfig() - .name("my-agent-pool-name") - .organization(Token.asString(tfeOrganizationTestOrganization.getName())) - .organizationScoped(false) - ); - new AgentPoolAllowedWorkspaces(this, "test-allowed-workspaces", new AgentPoolAllowedWorkspacesConfig() - .agentPoolId(Token.asString(tfeAgentPoolTestAgentPool.getId())) - .allowedWorkspaceIds(List.of(Token.asString(tfeWorkspaceTestWorkspace.getId()))) - ); - } +```hcl +resource "tfe_organization" "test-organization" { + name = "my-org-name" + email = "admin@company.com" +} + +// Ensure workspace and agent pool are create first +resource "tfe_workspace" "test-workspace" { + name = "my-workspace-name" + organization = tfe_organization.test-organization.name +} + +resource "tfe_agent_pool" "test-agent-pool" { + name = "my-agent-pool-name" + organization = tfe_organization.test-organization.name + organization_scoped = false +} + +// Ensure permissions are assigned second +resource "tfe_agent_pool_allowed_workspaces" "allowed" { + agent_pool_id = tfe_agent_pool.test-agent-pool.id + allowed_workspace_ids = [for key, value in tfe_workspace.test.*.id : value] +} + +// Lastly, ensure the workspace agent execution is assigned last by +// referencing allowed_workspaces +resource "tfe_workspace_settings" "test-workspace-settings" { + workspace_id = tfe_workspace.test-workspace.id + execution_mode = "agent" + agent_pool_id = tfe_agent_pool_allowed_workspaces.allowed.id } ``` @@ -68,5 +68,4 @@ A resource can be imported; use `` as the import ID. For example: terraform import tfe_agent_pool_allowed_workspaces.foobar apool-rW0KoLSlnuNb5adB ``` - - + \ No newline at end of file diff --git a/website/docs/cdktf/java/r/agent_token.html.markdown b/website/docs/cdktf/java/r/agent_token.html.markdown index ee927bb0d..c1478039c 100644 --- a/website/docs/cdktf/java/r/agent_token.html.markdown +++ b/website/docs/cdktf/java/r/agent_token.html.markdown @@ -5,6 +5,8 @@ description: |- Manages agent tokens --- + + # tfe_agent_token Each agent pool has its own set of tokens which are not shared across pools. @@ -54,4 +56,4 @@ The following arguments are supported: * `description` - The description of agent token. * `token` - The generated token. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/java/r/notification_configuration.html.markdown b/website/docs/cdktf/java/r/notification_configuration.html.markdown index 1d8226dbf..aba940a88 100644 --- a/website/docs/cdktf/java/r/notification_configuration.html.markdown +++ b/website/docs/cdktf/java/r/notification_configuration.html.markdown @@ -189,4 +189,4 @@ Notification configurations can be imported; use ` \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/java/r/oauth_client.html.markdown b/website/docs/cdktf/java/r/oauth_client.html.markdown index 809b05412..090382fa4 100644 --- a/website/docs/cdktf/java/r/oauth_client.html.markdown +++ b/website/docs/cdktf/java/r/oauth_client.html.markdown @@ -5,6 +5,8 @@ description: |- Manages OAuth clients. --- + + # tfe_oauth_client An OAuth Client represents the connection between an organization and a VCS @@ -31,6 +33,7 @@ public class MyConvertedCode extends TerraformStack { .name("my-github-oauth-client") .oauthToken("my-vcs-provider-token") .organization("my-org-name") + .organizationScoped(true) .serviceProvider("github") ); } @@ -65,11 +68,11 @@ public class MyConvertedCode extends TerraformStack { } ``` -#### BitBucket Data Center Usage +#### Bitbucket Data Center Usage -See [documentation for HCP Terraform and Terraform Enterprise setup](https://developer.hashicorp.com/terraform/cloud-docs/vcs/bitbucket-data-center). +See [documentation for HCP Terraform and Terraform Enterprise setup](https://developer.hashicorp.com/terraform/cloud-docs/vcs/bitbucket-server). -When using BitBucket Data Center, you must use three required fields: `key`, `secret`, `rsaPublicKey`. +When using Bitbucket Data Center, you must use three required fields: `key`, `secret`, `rsaPublicKey`. ```java @@ -109,20 +112,22 @@ The following arguments are supported: * `privateKey` - (Required for `adoServer`) The text of the private key associated with your Azure DevOps Server account * `key` - The OAuth Client key can refer to a Consumer Key, Application Key, or another type of client key for the VCS provider. - * `secret` - (Required for `bitbucketDataCenter`) The OAuth Client secret is used for Bitbucket Data Center, this secret is the - the text of the SSH private key associated with your BitBucket Data Center - Application Link. -* `rsaPublicKey` - (Required for `bitbucketDataCenter`) Required for BitBucket +* `secret` - (Required for `bitbucketDataCenter`) The OAuth Client secret is used for Bitbucket Data Center, this secret is the + the text of the SSH private key associated with your Bitbucket Data Center +Application Link. +* `rsaPublicKey` - (Required for `bitbucketDataCenter`) Required for Bitbucket Data Center in conjunction with the secret. Not used for any other providers. The -text of the SSH public key associated with your BitBucket Data Center Application +text of the SSH public key associated with your Bitbucket Data Center Application Link. * `serviceProvider` - (Required) The VCS provider being connected with. Valid - options are `adoServer`, `adoServices`, `bitbucketHosted`, `bitbucketServer`(deprecated), `bitbucketDataCenter`, `github`, `githubEnterprise`, `gitlabHosted`, + options are `adoServer`, `adoServices`, `bitbucketDataCenter`, `bitbucketHosted`, `bitbucketServer`(deprecated), `github`, `githubEnterprise`, `gitlabHosted`, `gitlabCommunityEdition`, or `gitlabEnterpriseEdition`. +* `agentPoolId` - (Optional) An existing agent pool ID within the organization that has Private VCS support enabled. +* `organizationScoped` - (Optional) Whether or not the oauth client is scoped to all projects and workspaces in the organization. Defaults to `true`. ## Attributes Reference * `id` - The ID of the OAuth client. * `oauthTokenId` - The ID of the OAuth token associated with the OAuth client. - + \ No newline at end of file diff --git a/website/docs/cdktf/java/r/opa_version.html.markdown b/website/docs/cdktf/java/r/opa_version.html.markdown index ec06ecbe8..eaa114d2c 100644 --- a/website/docs/cdktf/java/r/opa_version.html.markdown +++ b/website/docs/cdktf/java/r/opa_version.html.markdown @@ -64,4 +64,4 @@ terraform import tfe_opa_version.test 0.58.0 -> **Note:** You can fetch a OPA version ID from the URL of an existing version in the HCP Terraform UI. The ID is in the format `tool-` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/java/r/organization.html.markdown b/website/docs/cdktf/java/r/organization.html.markdown index 31a21048f..36046b8ad 100644 --- a/website/docs/cdktf/java/r/organization.html.markdown +++ b/website/docs/cdktf/java/r/organization.html.markdown @@ -64,4 +64,4 @@ example: terraform import tfe_organization.test my-org-name ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/java/r/organization_default_settings.html.markdown b/website/docs/cdktf/java/r/organization_default_settings.html.markdown index b973f6bd3..b23517bc7 100644 --- a/website/docs/cdktf/java/r/organization_default_settings.html.markdown +++ b/website/docs/cdktf/java/r/organization_default_settings.html.markdown @@ -64,7 +64,7 @@ The following arguments are supported: Organization default execution mode can be imported; use `` as the import ID. For example: ```shell -terraform import tfe_organization_default_execution_mode.test my-org-name +terraform import tfe_organization_default_settings.test my-org-name ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/java/r/organization_membership.html.markdown b/website/docs/cdktf/java/r/organization_membership.html.markdown index d79169891..c39e28566 100644 --- a/website/docs/cdktf/java/r/organization_membership.html.markdown +++ b/website/docs/cdktf/java/r/organization_membership.html.markdown @@ -5,6 +5,8 @@ description: |- Add or remove a user from an organization. --- + + # tfe_organization_membership Add or remove a user from an organization. @@ -66,4 +68,4 @@ terraform import tfe_organization_membership.test my-org-name/user@example.com terraform import tfe_organization_membership.test ou-wAs3zYmWAhYK7peR ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/java/r/organization_run_task.html.markdown b/website/docs/cdktf/java/r/organization_run_task.html.markdown index 06e680375..56b8ce966 100644 --- a/website/docs/cdktf/java/r/organization_run_task.html.markdown +++ b/website/docs/cdktf/java/r/organization_run_task.html.markdown @@ -5,6 +5,8 @@ description: |- Manages Run tasks. --- + + # tfe_organization_run_task [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. @@ -60,4 +62,4 @@ import ID. For example: terraform import tfe_organization_run_task.test my-org-name/task-name ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/java/r/project.html.markdown b/website/docs/cdktf/java/r/project.html.markdown index 8c4d0c64f..936742163 100644 --- a/website/docs/cdktf/java/r/project.html.markdown +++ b/website/docs/cdktf/java/r/project.html.markdown @@ -5,6 +5,8 @@ description: |- Manages projects. --- + + # tfe_project Provides a project resource. @@ -41,6 +43,7 @@ The following arguments are supported: * `name` - (Required) Name of the project. * `organization` - (Optional) Name of the organization. If omitted, organization must be defined in the provider config. +* `description` - (Optional) A description for the project. ## Attributes Reference @@ -56,4 +59,4 @@ Projects can be imported; use `` as the import ID. For example: terraform import tfe_project.test prj-niVoeESBXT8ZREhr ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/java/r/project_oauth_client.html.markdown b/website/docs/cdktf/java/r/project_oauth_client.html.markdown new file mode 100644 index 000000000..a2413c782 --- /dev/null +++ b/website/docs/cdktf/java/r/project_oauth_client.html.markdown @@ -0,0 +1,79 @@ +--- +layout: "tfe" +page_title: "Terraform Enterprise: tfe_project_oauth_client" +description: |- + Add an oauth client to a project +--- + + + +# tfe_project_oauth_client + +Adds and removes oauth clients from a project + +## Example Usage + +Basic usage: + +```java +import software.constructs.*; +import com.hashicorp.cdktf.*; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import gen.providers.tfe.organization.*; +import gen.providers.tfe.project.*; +import gen.providers.tfe.oauthClient.*; +import gen.providers.tfe.projectOauthClient.*; +public class MyConvertedCode extends TerraformStack { + public MyConvertedCode(Construct scope, String name) { + super(scope, name); + Organization tfeOrganizationTest = new Organization(this, "test", new OrganizationConfig() + .email("admin@company.com") + .name("my-org-name") + ); + Project tfeProjectTest = new Project(this, "test_1", new ProjectConfig() + .name("my-project-name") + .organization(Token.asString(tfeOrganizationTest.getName())) + ); + /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ + tfeProjectTest.overrideLogicalId("test"); + OauthClient tfeOauthClientTest = new OauthClient(this, "test_2", new OauthClientConfig() + .apiUrl("https://api.github.com") + .httpUrl("https://github.com") + .oauthToken("oauth_token_id") + .organization(tfeOrganizationTest) + .serviceProvider("github") + ); + /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ + tfeOauthClientTest.overrideLogicalId("test"); + ProjectOauthClient tfeProjectOauthClientTest = + new ProjectOauthClient(this, "test_3", new ProjectOauthClientConfig() + .oauthClientId(Token.asString(tfeOauthClientTest.getId())) + .projectId(Token.asString(tfeProjectTest.getId())) + ); + /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ + tfeProjectOauthClientTest.overrideLogicalId("test"); + } +} +``` + +## Argument Reference + +The following arguments are supported: + +* `oauthClientId` - (Required) ID of the oauth client. +* `projectId` - (Required) Project ID to add the oauth client to. + +## Attributes Reference + +* `id` - The ID of the oauth client attachment. ID format: `_` + +## Import + +Project OAuth Clients can be imported; use `//`. For example: + +```shell +terraform import tfe_project_oauth_client.test 'my-org-name/project/oauth-client-name' +``` + + \ No newline at end of file diff --git a/website/docs/cdktf/java/r/registry_module.html.markdown b/website/docs/cdktf/java/r/registry_module.html.markdown index f6d681f47..e1e6536e0 100644 --- a/website/docs/cdktf/java/r/registry_module.html.markdown +++ b/website/docs/cdktf/java/r/registry_module.html.markdown @@ -217,6 +217,7 @@ The following arguments are supported: * `organization` - (Optional) The name of the organization associated with the registry module. It must be set if `moduleProvider` is used, or if `vcsRepo` is used via a GitHub App. * `namespace` - (Optional) The namespace of a public registry module. It can be used if `moduleProvider` is set and `registryName` is public. * `registryName` - (Optional) Whether the registry module is private or public. It can be used if `moduleProvider` is set. +* `initialVersion` - (Optional) This specifies the initial version for a branch based module. It can be used if `vcsRepoBranch` is set. If it is omitted, the initial modules version will default to `000`. The `testConfig` block supports * `testsEnabled` - (Optional) Specifies whether tests run for the registry module. Tests are only supported for branch-based publishing. @@ -260,4 +261,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 ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/java/r/run_trigger.html.markdown b/website/docs/cdktf/java/r/run_trigger.html.markdown index aa1f0d6f3..9927a06eb 100644 --- a/website/docs/cdktf/java/r/run_trigger.html.markdown +++ b/website/docs/cdktf/java/r/run_trigger.html.markdown @@ -5,6 +5,8 @@ description: |- Manages run triggers --- + + # tfe_run_trigger HCP Terraform provides a way to connect your workspace to one or more workspaces within your organization, @@ -67,4 +69,4 @@ Run triggers can be imported; use `` as the import ID. For examp terraform import tfe_run_trigger.test rt-qV9JnKRkmtMa4zcA ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/java/r/sentinel_version.html.markdown b/website/docs/cdktf/java/r/sentinel_version.html.markdown index a3b78d9b4..cc654810c 100644 --- a/website/docs/cdktf/java/r/sentinel_version.html.markdown +++ b/website/docs/cdktf/java/r/sentinel_version.html.markdown @@ -64,4 +64,4 @@ terraform import tfe_sentinel_version.test 0.24.0 -> **Note:** You can fetch a Sentinel version ID from the URL of an existing version in the HCP Terraform UI. The ID is in the format `tool-` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/java/r/team.html.markdown b/website/docs/cdktf/java/r/team.html.markdown index a845bccfc..59fc3bc18 100644 --- a/website/docs/cdktf/java/r/team.html.markdown +++ b/website/docs/cdktf/java/r/team.html.markdown @@ -5,6 +5,8 @@ description: |- Manages teams. --- + + # tfe_team Manages teams. @@ -75,6 +77,9 @@ The `organizationAccess` block supports: * `manageRunTasks` - (Optional) Allow members to create, edit, and delete the organization's run tasks. * `manageProjects` - (Optional) Allow members to create and administrate all projects within the organization. Requires `manageWorkspaces` to be set to `true`. * `manageMembership` - (Optional) Allow members to add/remove users from the organization, and to add/remove users from visible teams. +* `manageTeams` - (Optional) Allow members to create, update, and delete teams. +* `manageOrganizationAccess` - (Optional) Allow members to update the organization access settings of teams. +* `accessSecretTeams` - (Optional) Allow members access to secret teams up to the level of permissions granted by their team permissions setting. ## Attributes Reference @@ -93,4 +98,4 @@ or terraform import tfe_team.test my-org-name/my-team-name ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/java/r/team_organization_member.html.markdown b/website/docs/cdktf/java/r/team_organization_member.html.markdown index 5eaa5550e..52fde7098 100644 --- a/website/docs/cdktf/java/r/team_organization_member.html.markdown +++ b/website/docs/cdktf/java/r/team_organization_member.html.markdown @@ -5,6 +5,8 @@ description: |- Add or remove a user from a team. --- + + # tfe_team_organization_member Add or remove a team member using a @@ -74,4 +76,4 @@ or terraform import tfe_team_organization_member.test my-org-name/user@company.com/my-team-name ``` ~> **NOTE:** The `//` import ID format cannot be used if there are `/` characters in the user's email. These users must be imported with the `/` format instead - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/java/r/team_organization_members.html.markdown b/website/docs/cdktf/java/r/team_organization_members.html.markdown index bb5fd68a2..cafc86f92 100644 --- a/website/docs/cdktf/java/r/team_organization_members.html.markdown +++ b/website/docs/cdktf/java/r/team_organization_members.html.markdown @@ -5,6 +5,8 @@ description: |- Add or remove users from a team based on their organization memberships. --- + + # tfe_team_organization_members Add or remove one or more team members using a @@ -114,4 +116,4 @@ as the import ID. For example: terraform import tfe_team_organization_members.test team-47qC3LmA47piVan7 ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/java/r/terraform_version.html.markdown b/website/docs/cdktf/java/r/terraform_version.html.markdown index e35695f98..5097f256a 100644 --- a/website/docs/cdktf/java/r/terraform_version.html.markdown +++ b/website/docs/cdktf/java/r/terraform_version.html.markdown @@ -5,6 +5,8 @@ description: |- Manages Terraform versions --- + + # tfe_terraform_version Manage Terraform versions available on HCP Terraform and Terraform Enterprise. @@ -62,4 +64,4 @@ terraform import tfe_terraform_version.test 1.1.2 -> **Note:** You can fetch a Terraform version ID from the URL of an existing version in the HCP Terraform UI. The ID is in the format `tool-` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/java/r/tfe_test_variable.html.markdown b/website/docs/cdktf/java/r/tfe_test_variable.html.markdown new file mode 100644 index 000000000..0ea52ed7c --- /dev/null +++ b/website/docs/cdktf/java/r/tfe_test_variable.html.markdown @@ -0,0 +1,55 @@ +--- +layout: "tfe" +page_title: "Terraform Enterprise: tfe_test_variable" +description: |- + Manages environmet variables used for testing by modules in the Private Module Registry. +--- + + + +# tfe_test_variable + +Creates, updates and destroys environment variables used for testing in the Private Module Registry. + +## Example Usage + +```hcl +resource "tfe_organization" "test_org" { + name = "my-org-name" + email = "admin@company.com" +} + +resource "tfe_oauth_client" "test_client" { + organization = tfe_organization.test.name + api_url = "https://api.github.com" + http_url = "https://github.com" + oauth_token = "my-token-123" + service_provider = "github" +} + +resource "tfe_registry_module" "test_module" { + organization = "test-module" + vcs_repo { + display_identifier = "GH_NAME/REPO_NAME" + identifier = "GH_NAME/REPO_NAME" + oauth_token_id = tfe_oauth_client.test.oauth_token_id + branch = "main" + tags = false +} + test_config { + tests_enabled = true + } +} + +resource "tfe_test_variable" "tf_test_test_variable" { + key = "key_test" + value = "value_test" + description = "some description" + category = "env" + organization = tfe_organization.test.name + module_name = tfe_registry_module.test.name + module_provider = tfe_registry_module.test.module_provider +} +``` + + \ No newline at end of file diff --git a/website/docs/cdktf/java/r/variable.html.markdown b/website/docs/cdktf/java/r/variable.html.markdown index 477cd345c..abb112f84 100644 --- a/website/docs/cdktf/java/r/variable.html.markdown +++ b/website/docs/cdktf/java/r/variable.html.markdown @@ -5,6 +5,8 @@ description: |- Manages variables. --- + + # tfe_variable Creates, updates and destroys variables. @@ -177,4 +179,4 @@ example: terraform import tfe_variable.test my-org-name/varset-47qC3LmA47piVan7/var-5rTwnSaRPogw6apb ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/java/r/workspace.html.markdown b/website/docs/cdktf/java/r/workspace.html.markdown index 0ca2f132a..2202dc699 100644 --- a/website/docs/cdktf/java/r/workspace.html.markdown +++ b/website/docs/cdktf/java/r/workspace.html.markdown @@ -12,6 +12,7 @@ description: |- Provides a workspace resource. ~> **NOTE:** Setting the execution mode and agent pool affinity directly on the workspace is deprecated in favor of using both [tfe_workspace_settings](workspace_settings) and [tfe_organization_default_settings](organization_default_settings), since they allow more precise control and fully support [agent_pool_allowed_workspaces](agent_pool_allowed_workspaces). Use caution when unsetting `executionMode`, as it now leaves any prior value unmanaged instead of reverting to the old default value of `"remote"`. + ~> **NOTE:** Using `globalRemoteState` or `remoteStateConsumerIds` requires using the provider with HCP Terraform or an instance of Terraform Enterprise at least as recent as v202104-1. ## Example Usage @@ -89,6 +90,10 @@ The following arguments are supported: * `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`. * `autoApplyRunTrigger` - (Optional) Whether to automatically apply changes for runs that were created by run triggers from another workspace. Defaults to `false`. +* `autoDestroyAt` - (Optional) A future date/time string at which point all resources in a workspace will be scheduled for deletion. Must be a string in RFC3339 format (e.g. "2100-01-01T00:00:00Z"). + +~> **NOTE:** `autoDestroyAt` is not intended for workspaces containing production resources or long-lived workspaces. Since this attribute is in-part managed by HCP Terraform, using `ignoreChanges` for this attribute may be preferred. + * `description` - (Optional) A description for the workspace. * `executionMode` - (Optional) **Deprecated** Which [execution mode](https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings#execution-mode) to use. Use [tfe_workspace_settings](workspace_settings) instead. * `fileTriggersEnabled` - (Optional) Whether to filter runs based on the changed files @@ -188,4 +193,4 @@ terraform import tfe_workspace.test ws-CH5in3chf8RJjrVd terraform import tfe_workspace.test my-org-name/my-wkspace-name ``` - + \ No newline at end of file diff --git a/website/docs/cdktf/java/r/workspace_run.html.markdown b/website/docs/cdktf/java/r/workspace_run.html.markdown index cef85d937..954f4de90 100644 --- a/website/docs/cdktf/java/r/workspace_run.html.markdown +++ b/website/docs/cdktf/java/r/workspace_run.html.markdown @@ -225,4 +225,4 @@ 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. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/java/r/workspace_run_task.html.markdown b/website/docs/cdktf/java/r/workspace_run_task.html.markdown index 0947c38b7..3ec9bba3e 100644 --- a/website/docs/cdktf/java/r/workspace_run_task.html.markdown +++ b/website/docs/cdktf/java/r/workspace_run_task.html.markdown @@ -5,6 +5,8 @@ description: |- Manages Workspace Run tasks. --- + + # tfe_workspace_run_task [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. @@ -45,4 +47,4 @@ import ID. For example: terraform import tfe_workspace_run_task.test my-org-name/workspace/task-name ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/java/r/workspace_settings.markdown b/website/docs/cdktf/java/r/workspace_settings.markdown index b26d65803..75e92d0d9 100644 --- a/website/docs/cdktf/java/r/workspace_settings.markdown +++ b/website/docs/cdktf/java/r/workspace_settings.markdown @@ -122,7 +122,7 @@ The following arguments are supported: * `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. * `executionMode` - (Optional) Which [execution mode](https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings#execution-mode) - to use. Using HCP Terraform, valid values are `remote`, `local` or `agent`. Using Terraform Enterprise, only `remote` and `local` execution modes are valid. When set to `local`, the workspace will be used for state storage only. **Important:** If you omit this attribute, the resource configures the workspace to use your organization's default execution mode (which in turn defaults to `remote`), removing any explicit value that might have previously been set for the workspace. + to use. Using HCP Terraform, valid values are `remote`, `local` or `agent`. When set to `local`, the workspace will be used for state storage only. **Important:** If you omit this attribute, the resource configures the workspace to use your organization's default execution mode (which in turn defaults to `remote`), removing any explicit value that might have previously been set for the workspace. ## Attributes Reference @@ -146,4 +146,4 @@ terraform import tfe_workspace_settings.test ws-CH5in3chf8RJjrVd terraform import tfe_workspace_settings.test my-org-name/my-wkspace-name ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/github_installation.html.markdown b/website/docs/cdktf/python/d/github_installation.html.markdown index 407d3b977..30c40a42b 100644 --- a/website/docs/cdktf/python/d/github_installation.html.markdown +++ b/website/docs/cdktf/python/d/github_installation.html.markdown @@ -25,7 +25,7 @@ class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) tfe.data_tfe_github_app_installation.DataTfeGithubAppInstallation(self, "gha_installation", - installation_id=12345 + installation_id=12345678 ) ``` @@ -41,7 +41,7 @@ class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) tfe.data_tfe_github_app_installation.DataTfeGithubAppInstallation(self, "gha_installation", - name="installation_name" + name="github_username_or_organization" ) ``` @@ -59,4 +59,5 @@ Must be one of: `installation_id` or `name`. In addition to all arguments above, the following attributes are exported: * `id` - The internal ID of the Github Installation. This is different from the `installation_id`. - + + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/ip_ranges.html.markdown b/website/docs/cdktf/python/d/ip_ranges.html.markdown index fd2a980e7..20aa4d148 100644 --- a/website/docs/cdktf/python/d/ip_ranges.html.markdown +++ b/website/docs/cdktf/python/d/ip_ranges.html.markdown @@ -42,4 +42,4 @@ The following attributes are exported: * `vcs` - The list of IP ranges in CIDR notation used for connecting to VCS providers. - + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/no_code_module.html.markdown b/website/docs/cdktf/python/d/no_code_module.html.markdown index 76a3c8037..72ccc9fb9 100644 --- a/website/docs/cdktf/python/d/no_code_module.html.markdown +++ b/website/docs/cdktf/python/d/no_code_module.html.markdown @@ -13,28 +13,15 @@ Use this data source to read the details of an existing No-Code-Allowed module. ## Example Usage -```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import Token, TerraformStack -# -# Provider bindings are generated by running `cdktf get`. -# See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.data_tfe_no_code_module import DataTfeNoCodeModule -from imports.tfe.no_code_module import NoCodeModule -class MyConvertedCode(TerraformStack): - def __init__(self, scope, name): - super().__init__(scope, name) - foobar = NoCodeModule(self, "foobar", - organization=Token.as_string(tfe_organization_foobar.id), - registry_module=Token.as_string(tfe_registry_module_foobar.id) - ) - data_tfe_no_code_module_foobar = DataTfeNoCodeModule(self, "foobar_1", - id=foobar.id - ) - # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. - data_tfe_no_code_module_foobar.override_logical_id("foobar") +```hcl +resource "tfe_no_code_module" "foobar" { + organization = tfe_organization.foobar.id + registry_module = tfe_registry_module.foobar.id +} + +data "tfe_no_code_module" "foobar" { + id = tfe_no_code_module.foobar.id +} ``` ## Argument Reference @@ -52,4 +39,4 @@ The following arguments are supported: * `version_pin` - Version number the no-code module is pinned to. * `enabled` - Indicates if this no-code module is currently enabled - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/oauth_client.html.markdown b/website/docs/cdktf/python/d/oauth_client.html.markdown index 13a412c05..c5c3cd4c5 100644 --- a/website/docs/cdktf/python/d/oauth_client.html.markdown +++ b/website/docs/cdktf/python/d/oauth_client.html.markdown @@ -74,7 +74,7 @@ be set. * `oauth_client_id` - (Optional) ID of the OAuth client. * `organization` - (Optional) The name of the organization in which to search. * `service_provider` - (Optional) The API identifier of the OAuth service provider. If set, - must be one of: `ado_server`, `ado_services`, `bitbucket_data_center`, `bitbucket_hosted`, `bitbucket_server`(deprecated), + must be one of: `ado_server`, `ado_services`, `bitbucket_data_center`, `bitbucket_hosted`, `bitbucket_server`(deprecated), `github`, `github_enterprise`, `gitlab_hosted`, `gitlab_community_edition`, or `gitlab_enterprise_edition`. @@ -92,5 +92,6 @@ In addition to all arguments above, the following attributes are exported: * `organization` - The organization in which the OAuth client is registered. * `service_provider` - The API identifier of the OAuth service provider. * `service_provider_display_name` - The display name of the OAuth service provider. - - +* `organization_scoped` - Whether or not the agent pool can be used by all workspaces and projects in the organization. +* `project_ids` - IDs of the projects that use the oauth client. + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/organization.html.markdown b/website/docs/cdktf/python/d/organization.html.markdown index 41bc85607..f1a02dd0b 100644 --- a/website/docs/cdktf/python/d/organization.html.markdown +++ b/website/docs/cdktf/python/d/organization.html.markdown @@ -45,4 +45,5 @@ In addition to all arguments above, the following attributes are exported: * `send_passing_statuses_for_untriggered_speculative_plans` - 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. * `aggregated_commit_status_enabled` - 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. * `default_project_id` - ID of the organization's default project. All workspaces created without specifying a project ID are created in this project. - + + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/organization_membership.html.markdown b/website/docs/cdktf/python/d/organization_membership.html.markdown index 8f9932c99..384dbd925 100644 --- a/website/docs/cdktf/python/d/organization_membership.html.markdown +++ b/website/docs/cdktf/python/d/organization_membership.html.markdown @@ -89,4 +89,4 @@ In addition to all arguments above, the following attributes are exported: * `user_id` - The ID of the user associated with the organization membership. * `username` - The username of the user associated with the organization membership. - + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/organization_run_task.html.markdown b/website/docs/cdktf/python/d/organization_run_task.html.markdown index 0bfc0dc1e..5954b8b39 100644 --- a/website/docs/cdktf/python/d/organization_run_task.html.markdown +++ b/website/docs/cdktf/python/d/organization_run_task.html.markdown @@ -47,4 +47,4 @@ In addition to all arguments above, the following attributes are exported: * `id` - The ID of the task. * `url` - URL to send a task payload. - + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/policy_set.html.markdown b/website/docs/cdktf/python/d/policy_set.html.markdown index 7792c0828..1a5e415fc 100644 --- a/website/docs/cdktf/python/d/policy_set.html.markdown +++ b/website/docs/cdktf/python/d/policy_set.html.markdown @@ -66,4 +66,4 @@ The `vcs_repo` block contains: * `oauth_token_id` - OAuth token ID of the configured VCS connection. - + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/registry_gpg_key.html.markdown b/website/docs/cdktf/python/d/registry_gpg_key.html.markdown index a89adf1e9..3c1958eca 100644 --- a/website/docs/cdktf/python/d/registry_gpg_key.html.markdown +++ b/website/docs/cdktf/python/d/registry_gpg_key.html.markdown @@ -14,18 +14,15 @@ Use this data source to get information about a private registry GPG key. ## Example Usage ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.data_tfe_registry_gpg_key import DataTfeRegistryGpgKey -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - DataTfeRegistryGpgKey(self, "example", + tfe.data_tfe_registry_gpg_key.DataTfeRegistryGpgKey(self, "example", id="13DFECCA3B58CE4A", organization="my-org-name" ) @@ -44,4 +41,4 @@ The following arguments are supported: * `created_at` - The time when the GPG key was created. * `updated_at` - The time when the GPG key was last updated. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/registry_gpg_keys.html.markdown b/website/docs/cdktf/python/d/registry_gpg_keys.html.markdown index 3320a1c75..381cfb0e9 100644 --- a/website/docs/cdktf/python/d/registry_gpg_keys.html.markdown +++ b/website/docs/cdktf/python/d/registry_gpg_keys.html.markdown @@ -14,18 +14,15 @@ Use this data source to get information about all private registry GPG keys of a ## Example Usage ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.data_tfe_registry_gpg_keys import DataTfeRegistryGpgKeys -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - DataTfeRegistryGpgKeys(self, "all", + tfe.data_tfe_registry_gpg_keys.DataTfeRegistryGpgKeys(self, "all", organization="my-org-name" ) ``` @@ -45,4 +42,4 @@ The following arguments are supported: * `created_at` - The time when the GPG key was created. * `updated_at` - The time when the GPG key was last updated. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/registry_provider.html.markdown b/website/docs/cdktf/python/d/registry_provider.html.markdown index 2fa766eb4..1bc8c11a0 100644 --- a/website/docs/cdktf/python/d/registry_provider.html.markdown +++ b/website/docs/cdktf/python/d/registry_provider.html.markdown @@ -16,18 +16,15 @@ Use this data source to get information about a public or private provider in th A private provider: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.registry_provider import RegistryProvider -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - RegistryProvider(self, "example", + tfe.registry_provider.RegistryProvider(self, "example", name="my-provider", organization="my-org-name" ) @@ -36,18 +33,15 @@ class MyConvertedCode(TerraformStack): A public provider: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.registry_provider import RegistryProvider -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - RegistryProvider(self, "example", + tfe.registry_provider.RegistryProvider(self, "example", name="aws", namespace="hashicorp", organization="my-org-name", @@ -70,4 +64,4 @@ The following arguments are supported: * `created_at` - The time when the provider was created. * `updated_at` - The time when the provider was last updated. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/registry_providers.html.markdown b/website/docs/cdktf/python/d/registry_providers.html.markdown index 666812347..03eec5f49 100644 --- a/website/docs/cdktf/python/d/registry_providers.html.markdown +++ b/website/docs/cdktf/python/d/registry_providers.html.markdown @@ -16,18 +16,15 @@ Use this data source to get information about public and private providers in th All providers: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.data_tfe_registry_providers import DataTfeRegistryProviders -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - DataTfeRegistryProviders(self, "all", + tfe.data_tfe_registry_providers.DataTfeRegistryProviders(self, "all", organization="my-org-name" ) ``` @@ -35,18 +32,15 @@ class MyConvertedCode(TerraformStack): All private providers: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.data_tfe_registry_providers import DataTfeRegistryProviders -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - DataTfeRegistryProviders(self, "private", + tfe.data_tfe_registry_providers.DataTfeRegistryProviders(self, "private", organization="my-org-name", registry_name="private" ) @@ -55,18 +49,15 @@ class MyConvertedCode(TerraformStack): Providers with "hashicorp" in their namespace or name: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.data_tfe_registry_providers import DataTfeRegistryProviders -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - DataTfeRegistryProviders(self, "hashicorp", + tfe.data_tfe_registry_providers.DataTfeRegistryProviders(self, "hashicorp", organization="my-org-name", search="hashicorp" ) @@ -91,4 +82,4 @@ The following arguments are supported: * `created_at` - Time when the provider was created. * `updated_at` - Time when the provider was last updated. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/slug.html.markdown b/website/docs/cdktf/python/d/slug.html.markdown index 7335bc887..d202cf85d 100644 --- a/website/docs/cdktf/python/d/slug.html.markdown +++ b/website/docs/cdktf/python/d/slug.html.markdown @@ -47,4 +47,4 @@ The following arguments are supported: * `source_path` - (Required) The path to the directory where the files are located. - + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/workspace.html.markdown b/website/docs/cdktf/python/d/workspace.html.markdown index 64a5d731d..a69e861ae 100644 --- a/website/docs/cdktf/python/d/workspace.html.markdown +++ b/website/docs/cdktf/python/d/workspace.html.markdown @@ -45,6 +45,7 @@ In addition to all arguments above, the following attributes are exported: * `allow_destroy_plan` - Indicates whether destroy plans can be queued on the workspace. * `auto_apply` - Indicates whether to automatically apply changes when a Terraform plan is successful. * `auto_apply_run_trigger` - Whether the workspace will automatically apply changes for runs that were created by run triggers from another workspace. +* `auto_destroy_at` - Future date/time string at which point all resources in a workspace will be scheduled to be deleted. * `assessments_enabled` - (Available only in HCP Terraform) Indicates whether health assessments such as drift detection are enabled for the workspace. * `file_triggers_enabled` - Indicates whether runs are triggered based on the changed files in a VCS push (if `true`) or always triggered on every push (if `false`). * `global_remote_state` - (Optional) Whether the workspace should allow all workspaces in the organization to access its state data during runs. If false, then only specifically approved workspaces can access its state (determined by the `remote_state_consumer_ids` argument). @@ -85,4 +86,4 @@ The `vcs_repo` block contains: * `oauth_token_id` - OAuth token ID of the configured VCS connection. * `tags_regex` - A regular expression used to trigger a Workspace run for matching Git tags. - + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/workspace_run_task.html.markdown b/website/docs/cdktf/python/d/workspace_run_task.html.markdown index 5ca5e8c3b..166b9b4ae 100644 --- a/website/docs/cdktf/python/d/workspace_run_task.html.markdown +++ b/website/docs/cdktf/python/d/workspace_run_task.html.markdown @@ -45,4 +45,4 @@ In addition to all arguments above, the following attributes are exported: * `id` - The ID of the Workspace Run task. * `stage` - Which stage the task will run in. - + \ No newline at end of file diff --git a/website/docs/cdktf/python/index.html.markdown b/website/docs/cdktf/python/index.html.markdown index fa8b69331..76e099e07 100644 --- a/website/docs/cdktf/python/index.html.markdown +++ b/website/docs/cdktf/python/index.html.markdown @@ -77,7 +77,7 @@ automatically installed by `terraform init` in the future: terraform { required_providers { tfe = { - version = "~> 0.55.0" + version = "~> 0.56.0" } } } @@ -90,7 +90,7 @@ The above snippet using `required_providers` is for Terraform 0.13+; if you are ```hcl provider "tfe" { - version = "~> 0.55.0" + version = "~> 0.56.0" ... } ``` @@ -101,9 +101,9 @@ For more information on provider installation and constraining provider versions ```hcl provider "tfe" { - hostname = var.hostname # Optional, defaults to Terraform Cloud `app.terraform.io` + hostname = var.hostname # Optional, defaults to HCP Terraform `app.terraform.io` token = var.token - version = "~> 0.55.0" + version = "~> 0.56.0" } # Create an organization @@ -116,10 +116,10 @@ resource "tfe_organization" "org" { The following arguments are supported: -* `hostname` - (Optional) The HCP Terraform and Terraform Enterprise hostname to connect to. +* `hostname` - (Optional) The HCP Terraform or Terraform Enterprise hostname to connect to. Defaults to `app.terraform.io`. Can be overridden by setting the `TFE_HOSTNAME` environment variable. -* `token` - (Optional) The token used to authenticate with HCP Terraform and Terraform Enterprise. +* `token` - (Optional) The token used to authenticate with HCP Terraform or Terraform Enterprise. See [Authentication](#authentication) above for more information. * `ssl_skip_verify` - (Optional) Whether or not to skip certificate verifications. Defaults to `false`. Can be overridden setting the `TFE_SSL_SKIP_VERIFY` @@ -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 `TFE_ORGANIZATION` environment variable. - + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/admin_organization_settings.markdown b/website/docs/cdktf/python/r/admin_organization_settings.markdown index 6701ab676..4ecb2b61b 100644 --- a/website/docs/cdktf/python/r/admin_organization_settings.markdown +++ b/website/docs/cdktf/python/r/admin_organization_settings.markdown @@ -66,8 +66,4 @@ The following arguments are supported: * `sso_enabled` - True if SSO is enabled in this organization -## Import - -This resource does not manage the creation of an organization and there is no need to import it. - - + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/agent_pool_allowed_workspaces.html.markdown b/website/docs/cdktf/python/r/agent_pool_allowed_workspaces.html.markdown index f7ce8f7b8..b1079118b 100644 --- a/website/docs/cdktf/python/r/agent_pool_allowed_workspaces.html.markdown +++ b/website/docs/cdktf/python/r/agent_pool_allowed_workspaces.html.markdown @@ -19,34 +19,37 @@ for Business account. In this example, the agent pool and workspace are connected through other resources that manage the agent pool permissions as well as the workspace execution mode. Notice that the `tfe_workspace_settings` uses the agent pool reference found in `tfe_agent_pool_allowed_workspaces` in order to create the permission to use the agent pool before assigning it. -```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. -# See https://cdk.tf/provider-generation for more details. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): - def __init__(self, scope, name): - super().__init__(scope, name) - tfe_organization_test_organization = tfe.organization.Organization(self, "test-organization", - email="admin@company.com", - name="my-org-name" - ) - tfe_workspace_test_workspace = tfe.workspace.Workspace(self, "test-workspace", - name="my-workspace-name", - organization=cdktf.Token.as_string(tfe_organization_test_organization.name) - ) - tfe_agent_pool_test_agent_pool = tfe.agent_pool.AgentPool(self, "test-agent-pool", - name="my-agent-pool-name", - organization=cdktf.Token.as_string(tfe_organization_test_organization.name), - organization_scoped=False - ) - tfe.agent_pool_allowed_workspaces.AgentPoolAllowedWorkspaces(self, "test-allowed-workspaces", - agent_pool_id=cdktf.Token.as_string(tfe_agent_pool_test_agent_pool.id), - allowed_workspace_ids=[ - cdktf.Token.as_string(tfe_workspace_test_workspace.id) - ] - ) +```hcl +resource "tfe_organization" "test-organization" { + name = "my-org-name" + email = "admin@company.com" +} + +// Ensure workspace and agent pool are create first +resource "tfe_workspace" "test-workspace" { + name = "my-workspace-name" + organization = tfe_organization.test-organization.name +} + +resource "tfe_agent_pool" "test-agent-pool" { + name = "my-agent-pool-name" + organization = tfe_organization.test-organization.name + organization_scoped = false +} + +// Ensure permissions are assigned second +resource "tfe_agent_pool_allowed_workspaces" "allowed" { + agent_pool_id = tfe_agent_pool.test-agent-pool.id + allowed_workspace_ids = [for key, value in tfe_workspace.test.*.id : value] +} + +// Lastly, ensure the workspace agent execution is assigned last by +// referencing allowed_workspaces +resource "tfe_workspace_settings" "test-workspace-settings" { + workspace_id = tfe_workspace.test-workspace.id + execution_mode = "agent" + agent_pool_id = tfe_agent_pool_allowed_workspaces.allowed.id +} ``` ## Argument Reference @@ -65,5 +68,4 @@ A resource can be imported; use `` as the import ID. For example: terraform import tfe_agent_pool_allowed_workspaces.foobar apool-rW0KoLSlnuNb5adB ``` - - + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/agent_token.html.markdown b/website/docs/cdktf/python/r/agent_token.html.markdown index a0a13b601..1212cdb4c 100644 --- a/website/docs/cdktf/python/r/agent_token.html.markdown +++ b/website/docs/cdktf/python/r/agent_token.html.markdown @@ -52,4 +52,4 @@ The following arguments are supported: * `description` - The description of agent token. * `token` - The generated token. - + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/notification_configuration.html.markdown b/website/docs/cdktf/python/r/notification_configuration.html.markdown index 0c1438778..c93d5a3a0 100644 --- a/website/docs/cdktf/python/r/notification_configuration.html.markdown +++ b/website/docs/cdktf/python/r/notification_configuration.html.markdown @@ -180,4 +180,4 @@ Notification configurations can be imported; use ` + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/oauth_client.html.markdown b/website/docs/cdktf/python/r/oauth_client.html.markdown index 8d3ebec8b..254b2d6d8 100644 --- a/website/docs/cdktf/python/r/oauth_client.html.markdown +++ b/website/docs/cdktf/python/r/oauth_client.html.markdown @@ -33,6 +33,7 @@ class MyConvertedCode(cdktf.TerraformStack): name="my-github-oauth-client", oauth_token="my-vcs-provider-token", organization="my-org-name", + organization_scoped=True, service_provider="github" ) ``` @@ -63,11 +64,11 @@ class MyConvertedCode(cdktf.TerraformStack): ) ``` -#### BitBucket Data Center Usage +#### Bitbucket Data Center Usage -See [documentation for HCP Terraform and Terraform Enterprise setup](https://developer.hashicorp.com/terraform/cloud-docs/vcs/bitbucket-data-center). +See [documentation for HCP Terraform and Terraform Enterprise setup](https://developer.hashicorp.com/terraform/cloud-docs/vcs/bitbucket-server). -When using BitBucket Data Center, you must use three required fields: `key`, `secret`, `rsa_public_key`. +When using Bitbucket Data Center, you must use three required fields: `key`, `secret`, `rsa_public_key`. ```python @@ -108,16 +109,19 @@ The following arguments are supported: * `secret` - (Required for `bitbucket_data_center`) The OAuth Client secret is used for Bitbucket Data Center, this secret is the the text of the SSH private key associated with your Bitbucket Data Center Application Link. -* `rsa_public_key` - (Required for `bitbucket_data_center`) Required for Bitbucket Data Center in conjunction with the secret. Not used for any other providers. The +* `rsa_public_key` - (Required for `bitbucket_data_center`) Required for Bitbucket + Data Center in conjunction with the secret. Not used for any other providers. The text of the SSH public key associated with your Bitbucket Data Center Application Link. * `service_provider` - (Required) The VCS provider being connected with. Valid options are `ado_server`, `ado_services`, `bitbucket_data_center`, `bitbucket_hosted`, `bitbucket_server`(deprecated), `github`, `github_enterprise`, `gitlab_hosted`, `gitlab_community_edition`, or `gitlab_enterprise_edition`. +* `agent_pool_id` - (Optional) An existing agent pool ID within the organization that has Private VCS support enabled. +* `organization_scoped` - (Optional) Whether or not the oauth client is scoped to all projects and workspaces in the organization. Defaults to `true`. ## Attributes Reference * `id` - The ID of the OAuth client. * `oauth_token_id` - The ID of the OAuth token associated with the OAuth client. - + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/opa_version.html.markdown b/website/docs/cdktf/python/r/opa_version.html.markdown index 243e8df08..53c439b40 100644 --- a/website/docs/cdktf/python/r/opa_version.html.markdown +++ b/website/docs/cdktf/python/r/opa_version.html.markdown @@ -16,18 +16,15 @@ Manage OPA versions available on Terraform Enterprise. Basic Usage: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.opa_version import OpaVersion -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - OpaVersion(self, "test", + tfe.opa_version.OpaVersion(self, "test", sha="e75ac73deb69a6b3aa667cb0b8b731aee79e2904", url="https://tfe-host.com/path/to/opa", version="0.58.0-custom" @@ -65,4 +62,4 @@ terraform import tfe_opa_version.test 0.58.0 -> **Note:** You can fetch a OPA version ID from the URL of an existing version in the HCP Terraform UI. The ID is in the format `tool-` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/organization.html.markdown b/website/docs/cdktf/python/r/organization.html.markdown index 30461b99d..efd445db9 100644 --- a/website/docs/cdktf/python/r/organization.html.markdown +++ b/website/docs/cdktf/python/r/organization.html.markdown @@ -62,4 +62,4 @@ example: terraform import tfe_organization.test my-org-name ``` - + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/organization_default_settings.html.markdown b/website/docs/cdktf/python/r/organization_default_settings.html.markdown index b96435924..4333e747a 100644 --- a/website/docs/cdktf/python/r/organization_default_settings.html.markdown +++ b/website/docs/cdktf/python/r/organization_default_settings.html.markdown @@ -16,35 +16,30 @@ Primarily, this is used to set the default execution mode of an organization. Se Basic usage: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.agent_pool import AgentPool -from imports.tfe.organization import Organization -from imports.tfe.organization_default_settings import OrganizationDefaultSettings -from imports.tfe.workspace import Workspace -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - test = Organization(self, "test", + tfe_organization_test = tfe.organization.Organization(self, "test", email="admin@company.com", name="my-org-name" ) - my_agents = AgentPool(self, "my_agents", + tfe_agent_pool_my_agents = tfe.agent_pool.AgentPool(self, "my_agents", name="agent_smiths", - organization=test.name + organization=cdktf.Token.as_string(tfe_organization_test.name) ) - org_default = OrganizationDefaultSettings(self, "org_default", - default_agent_pool_id=my_agents.id, + tfe_organization_default_settings_org_default = + tfe.organization_default_settings.OrganizationDefaultSettings(self, "org_default", + default_agent_pool_id=cdktf.Token.as_string(tfe_agent_pool_my_agents.id), default_execution_mode="agent", - organization=test.name + organization=cdktf.Token.as_string(tfe_organization_test.name) ) - Workspace(self, "my_workspace", - depends_on=[org_default], + tfe.workspace.Workspace(self, "my_workspace", + depends_on=[tfe_organization_default_settings_org_default], name="my-workspace" ) ``` @@ -64,7 +59,7 @@ The following arguments are supported: Organization default execution mode can be imported; use `` as the import ID. For example: ```shell -terraform import tfe_organization_default_execution_mode.test my-org-name +terraform import tfe_organization_default_settings.test my-org-name ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/organization_membership.html.markdown b/website/docs/cdktf/python/r/organization_membership.html.markdown index 504dc7ab2..58bdae797 100644 --- a/website/docs/cdktf/python/r/organization_membership.html.markdown +++ b/website/docs/cdktf/python/r/organization_membership.html.markdown @@ -66,4 +66,4 @@ terraform import tfe_organization_membership.test my-org-name/user@example.com terraform import tfe_organization_membership.test ou-wAs3zYmWAhYK7peR ``` - + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/organization_run_task.html.markdown b/website/docs/cdktf/python/r/organization_run_task.html.markdown index 49ab61168..68451ccda 100644 --- a/website/docs/cdktf/python/r/organization_run_task.html.markdown +++ b/website/docs/cdktf/python/r/organization_run_task.html.markdown @@ -60,4 +60,4 @@ import ID. For example: terraform import tfe_organization_run_task.test my-org-name/task-name ``` - + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/policy_set.html.markdown b/website/docs/cdktf/python/r/policy_set.html.markdown index f006acbee..3bb9ac5db 100644 --- a/website/docs/cdktf/python/r/policy_set.html.markdown +++ b/website/docs/cdktf/python/r/policy_set.html.markdown @@ -21,60 +21,39 @@ for workspaces that the policy set is attached to. Basic usage (VCS-based policy set): -```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import Token, TerraformStack -# -# Provider bindings are generated by running `cdktf get`. -# See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.policy_set import PolicySet -class MyConvertedCode(TerraformStack): - def __init__(self, scope, name): - super().__init__(scope, name) - PolicySet(self, "test", - agent_enabled=Token.as_boolean("true"), - description="A brand new policy set", - kind="sentinel", - name="my-policy-set", - organization="my-org-name", - policies_path="policies/my-policy-set", - policy_tool_version="0.24.1", - vcs_repo=PolicySetVcsRepo( - branch="main", - identifier="my-org-name/my-policy-set-repository", - ingress_submodules=False, - oauth_token_id=Token.as_string(tfe_oauth_client_test.oauth_token_id) - ), - workspace_ids=[Token.as_string(tfe_workspace_test.id)] - ) +```hcl +resource "tfe_policy_set" "test" { + name = "my-policy-set" + description = "A brand new policy set" + organization = "my-org-name" + kind = "sentinel" + agent_enabled = "true" + policy_tool_version = "0.24.1" + policies_path = "policies/my-policy-set" + workspace_ids = [tfe_workspace.test.id] + + vcs_repo { + identifier = "my-org-name/my-policy-set-repository" + branch = "main" + ingress_submodules = false + oauth_token_id = tfe_oauth_client.test.oauth_token_id + } +} ``` Using manually-specified policies: -```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import Token, TerraformStack -# -# Provider bindings are generated by running `cdktf get`. -# See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.policy_set import PolicySet -class MyConvertedCode(TerraformStack): - def __init__(self, scope, name): - super().__init__(scope, name) - PolicySet(self, "test", - agent_enabled=Token.as_boolean("true"), - description="A brand new policy set", - kind="sentinel", - name="my-policy-set", - organization="my-org-name", - policy_ids=[Token.as_string(tfe_sentinel_policy_test.id)], - policy_tool_version="0.24.1", - workspace_ids=[Token.as_string(tfe_workspace_test.id)] - ) +```hcl +resource "tfe_policy_set" "test" { + name = "my-policy-set" + description = "A brand new policy set" + organization = "my-org-name" + kind = "sentinel" + agent_enabled = "true" + policy_tool_version = "0.24.1" + policy_ids = [tfe_sentinel_policy.test.id] + workspace_ids = [tfe_workspace.test.id] +} ``` Manually uploaded policy set, in lieu of VCS: @@ -156,4 +135,4 @@ Policy sets can be imported; use `` as the import ID. For example terraform import tfe_policy_set.test polset-wAs3zYmWAhYK7peR ``` - + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/project.html.markdown b/website/docs/cdktf/python/r/project.html.markdown index 478467ba7..7f7830a41 100644 --- a/website/docs/cdktf/python/r/project.html.markdown +++ b/website/docs/cdktf/python/r/project.html.markdown @@ -40,6 +40,7 @@ The following arguments are supported: * `name` - (Required) Name of the project. * `organization` - (Optional) Name of the organization. If omitted, organization must be defined in the provider config. +* `description` - (Optional) A description for the project. ## Attributes Reference @@ -55,4 +56,4 @@ Projects can be imported; use `` as the import ID. For example: terraform import tfe_project.test prj-niVoeESBXT8ZREhr ``` - + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/project_oauth_client.html.markdown b/website/docs/cdktf/python/r/project_oauth_client.html.markdown new file mode 100644 index 000000000..19132c9d0 --- /dev/null +++ b/website/docs/cdktf/python/r/project_oauth_client.html.markdown @@ -0,0 +1,74 @@ +--- +layout: "tfe" +page_title: "Terraform Enterprise: tfe_project_oauth_client" +description: |- + Add an oauth client to a project +--- + + + +# tfe_project_oauth_client + +Adds and removes oauth clients from a project + +## Example Usage + +Basic usage: + +```python +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. +# See https://cdk.tf/provider-generation for more details. +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): + def __init__(self, scope, name): + super().__init__(scope, name) + tfe_organization_test = tfe.organization.Organization(self, "test", + email="admin@company.com", + name="my-org-name" + ) + tfe_project_test = tfe.project.Project(self, "test_1", + name="my-project-name", + organization=cdktf.Token.as_string(tfe_organization_test.name) + ) + # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. + tfe_project_test.override_logical_id("test") + tfe_oauth_client_test = tfe.oauth_client.OauthClient(self, "test_2", + api_url="https://api.github.com", + http_url="https://github.com", + oauth_token="oauth_token_id", + organization=tfe_organization_test, + service_provider="github" + ) + # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. + tfe_oauth_client_test.override_logical_id("test") + tfe_project_oauth_client_test = + tfe.project_oauth_client.ProjectOauthClient(self, "test_3", + oauth_client_id=cdktf.Token.as_string(tfe_oauth_client_test.id), + project_id=cdktf.Token.as_string(tfe_project_test.id) + ) + # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. + tfe_project_oauth_client_test.override_logical_id("test") +``` + +## Argument Reference + +The following arguments are supported: + +* `oauth_client_id` - (Required) ID of the oauth client. +* `project_id` - (Required) Project ID to add the oauth client to. + +## Attributes Reference + +* `id` - The ID of the oauth client attachment. ID format: `_` + +## Import + +Project OAuth Clients can be imported; use `//`. For example: + +```shell +terraform import tfe_project_oauth_client.test 'my-org-name/project/oauth-client-name' +``` + + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/registry_gpg_key.html.markdown b/website/docs/cdktf/python/r/registry_gpg_key.html.markdown index e087f01bb..256e03929 100644 --- a/website/docs/cdktf/python/r/registry_gpg_key.html.markdown +++ b/website/docs/cdktf/python/r/registry_gpg_key.html.markdown @@ -16,22 +16,11 @@ The provided GPG key must be ASCII-armored, i.e. starting with: ## Example Usage -```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import Fn, Token, TerraformStack -# -# Provider bindings are generated by running `cdktf get`. -# See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.registry_gpg_key import RegistryGpgKey -class MyConvertedCode(TerraformStack): - def __init__(self, scope, name): - super().__init__(scope, name) - RegistryGpgKey(self, "example", - ascii_armor=Token.as_string(Fn.file("my-public-key.asc")), - organization="my-org-name" - ) +```hcl +resource "tfe_registry_gpg_key" "example" { + organization = "my-org-name" + ascii_armor = file("my-public-key.asc") +} ``` ## Argument Reference @@ -56,4 +45,4 @@ example: terraform import tfe_registry_gpg_key.example my-org-name/34365D9472D7468F ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/registry_module.html.markdown b/website/docs/cdktf/python/r/registry_module.html.markdown index d06643317..a2cb12413 100644 --- a/website/docs/cdktf/python/r/registry_module.html.markdown +++ b/website/docs/cdktf/python/r/registry_module.html.markdown @@ -47,31 +47,26 @@ class MyConvertedCode(cdktf.TerraformStack): Create private registry module with tests enabled: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.oauth_client import OauthClient -from imports.tfe.organization import Organization -from imports.tfe.registry_module import RegistryModule -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - test_organization = Organization(self, "test-organization", + tfe_organization_test_organization = tfe.organization.Organization(self, "test-organization", email="admin@company.com", name="my-org-name" ) - test_oauth_client = OauthClient(self, "test-oauth-client", + tfe_oauth_client_test_oauth_client = tfe.oauth_client.OauthClient(self, "test-oauth-client", api_url="https://api.github.com", http_url="https://github.com", oauth_token="my-vcs-provider-token", - organization=test_organization.name, + organization=cdktf.Token.as_string(tfe_organization_test_organization.name), service_provider="github" ) - RegistryModule(self, "test-registry-module", + tfe.registry_module.RegistryModule(self, "test-registry-module", test_config=[RegistryModuleTestConfig( tests_enabled=True ) @@ -80,7 +75,7 @@ class MyConvertedCode(TerraformStack): branch="main", display_identifier="my-org-name/terraform-provider-name", identifier="my-org-name/terraform-provider-name", - oauth_token_id=test_oauth_client.oauth_token_id + oauth_token_id=cdktf.Token.as_string(tfe_oauth_client_test_oauth_client.oauth_token_id) ) ) ``` @@ -201,6 +196,7 @@ The following arguments are supported: * `organization` - (Optional) The name of the organization associated with the registry module. It must be set if `module_provider` is used, or if `vcs_repo` is used via a GitHub App. * `namespace` - (Optional) The namespace of a public registry module. It can be used if `module_provider` is set and `registry_name` is public. * `registry_name` - (Optional) Whether the registry module is private or public. It can be used if `module_provider` is set. +* `initial_version` - (Optional) This specifies the initial version for a branch based module. It can be used if `vcs_repo.branch` is set. If it is omitted, the initial modules version will default to `0.0.0`. The `test_config` block supports * `tests_enabled` - (Optional) Specifies whether tests run for the registry module. Tests are only supported for branch-based publishing. @@ -244,4 +240,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 ``` - + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/registry_provider.html.markdown b/website/docs/cdktf/python/r/registry_provider.html.markdown index d53e4fb92..4090c9498 100644 --- a/website/docs/cdktf/python/r/registry_provider.html.markdown +++ b/website/docs/cdktf/python/r/registry_provider.html.markdown @@ -16,25 +16,22 @@ Manages public and private providers in the private registry. Create private provider: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.organization import Organization -from imports.tfe.registry_provider import RegistryProvider -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - example = Organization(self, "example", + tfe_organization_example = tfe.organization.Organization(self, "example", email="admin@company.com", name="my-org-name" ) - tfe_registry_provider_example = RegistryProvider(self, "example_1", + tfe_registry_provider_example = + tfe.registry_provider.RegistryProvider(self, "example_1", name="my-provider", - organization=example.name + organization=cdktf.Token.as_string(tfe_organization_example.name) ) # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. tfe_registry_provider_example.override_logical_id("example") @@ -43,26 +40,23 @@ class MyConvertedCode(TerraformStack): Create public provider: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.organization import Organization -from imports.tfe.registry_provider import RegistryProvider -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - example = Organization(self, "example", + tfe_organization_example = tfe.organization.Organization(self, "example", email="admin@company.com", name="my-org-name" ) - tfe_registry_provider_example = RegistryProvider(self, "example_1", + tfe_registry_provider_example = + tfe.registry_provider.RegistryProvider(self, "example_1", name="aws", namespace="hashicorp", - organization=example.name, + organization=cdktf.Token.as_string(tfe_organization_example.name), registry_name="public" ) # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. @@ -100,4 +94,4 @@ Or a public provider: terraform import tfe_registry_provider.example my-org-name/public/hashicorp/aws ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/run_trigger.html.markdown b/website/docs/cdktf/python/r/run_trigger.html.markdown index 1d0ac8fb9..333d594d1 100644 --- a/website/docs/cdktf/python/r/run_trigger.html.markdown +++ b/website/docs/cdktf/python/r/run_trigger.html.markdown @@ -65,4 +65,4 @@ Run triggers can be imported; use `` as the import ID. For examp terraform import tfe_run_trigger.test rt-qV9JnKRkmtMa4zcA ``` - + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/sentinel_version.html.markdown b/website/docs/cdktf/python/r/sentinel_version.html.markdown index 9cdc86f21..0a29f1298 100644 --- a/website/docs/cdktf/python/r/sentinel_version.html.markdown +++ b/website/docs/cdktf/python/r/sentinel_version.html.markdown @@ -16,18 +16,15 @@ Manage Sentinel versions available on HCP Terraform and Terraform Enterprise. Basic Usage: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.sentinel_version import SentinelVersion -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - SentinelVersion(self, "test", + tfe.sentinel_version.SentinelVersion(self, "test", sha="e75ac73deb69a6b3aa667cb0b8b731aee79e2904", url="https://tfe-host.com/path/to/sentinel.zip", version="0.24.0-custom" @@ -65,4 +62,4 @@ terraform import tfe_sentinel_version.test 0.24.0 -> **Note:** You can fetch a Sentinel version ID from the URL of an existing version in the HCP Terraform UI. The ID is in the format `tool-` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/team.html.markdown b/website/docs/cdktf/python/r/team.html.markdown index 98dbf8cbf..8fb5f2fb3 100644 --- a/website/docs/cdktf/python/r/team.html.markdown +++ b/website/docs/cdktf/python/r/team.html.markdown @@ -73,6 +73,9 @@ The `organization_access` block supports: * `manage_run_tasks` - (Optional) Allow members to create, edit, and delete the organization's run tasks. * `manage_projects` - (Optional) Allow members to create and administrate all projects within the organization. Requires `manage_workspaces` to be set to `true`. * `manage_membership` - (Optional) Allow members to add/remove users from the organization, and to add/remove users from visible teams. +* `manage_teams` - (Optional) Allow members to create, update, and delete teams. +* `manage_organization_access` - (Optional) Allow members to update the organization access settings of teams. +* `access_secret_teams` - (Optional) Allow members access to secret teams up to the level of permissions granted by their team permissions setting. ## Attributes Reference @@ -91,4 +94,4 @@ or terraform import tfe_team.test my-org-name/my-team-name ``` - + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/team_organization_member.html.markdown b/website/docs/cdktf/python/r/team_organization_member.html.markdown index 7628e87ec..6fa75bf24 100644 --- a/website/docs/cdktf/python/r/team_organization_member.html.markdown +++ b/website/docs/cdktf/python/r/team_organization_member.html.markdown @@ -72,4 +72,4 @@ or terraform import tfe_team_organization_member.test my-org-name/user@company.com/my-team-name ``` ~> **NOTE:** The `//` import ID format cannot be used if there are `/` characters in the user's email. These users must be imported with the `/` format instead - + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/team_organization_members.html.markdown b/website/docs/cdktf/python/r/team_organization_members.html.markdown index 3c8682bab..80b4b0f7a 100644 --- a/website/docs/cdktf/python/r/team_organization_members.html.markdown +++ b/website/docs/cdktf/python/r/team_organization_members.html.markdown @@ -113,4 +113,4 @@ as the import ID. For example: terraform import tfe_team_organization_members.test team-47qC3LmA47piVan7 ``` - + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/team_project_access.html.markdown b/website/docs/cdktf/python/r/team_project_access.html.markdown index 06919c267..4357e8d35 100644 --- a/website/docs/cdktf/python/r/team_project_access.html.markdown +++ b/website/docs/cdktf/python/r/team_project_access.html.markdown @@ -15,31 +15,22 @@ Associate a team to permissions on a project. Basic usage: -```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. -# See https://cdk.tf/provider-generation for more details. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): - def __init__(self, scope, name): - super().__init__(scope, name) - tfe_project_test = tfe.project.Project(self, "test", - name="myproject", - organization="my-org-name" - ) - tfe_team_admin = tfe.team.Team(self, "admin", - name="my-admin-team", - organization="my-org-name" - ) - tfe_team_project_access_admin = - tfe.team_project_access.TeamProjectAccess(self, "admin_2", - access="admin", - project_id=cdktf.Token.as_string(tfe_project_test.id), - team_id=cdktf.Token.as_string(tfe_team_admin.id) - ) - # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. - tfe_team_project_access_admin.override_logical_id("admin") +```hcl +resource "tfe_team" "admin" { + name = "my-admin-team" + organization = "my-org-name" +} + +resource "tfe_project" "test" { + name = "myproject" + organization = "my-org-name" +} + +resource "tfe_team_project_access" "admin" { + access = "admin" + team_id = tfe_team.admin.id + project_id = tfe_project.test.id +} ``` ## Argument Reference @@ -83,45 +74,38 @@ The following permissions apply to all workspaces (and future workspaces) in the ## Example Usage with Custom Project Permissions -```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. -# See https://cdk.tf/provider-generation for more details. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): - def __init__(self, scope, name): - super().__init__(scope, name) - tfe_project_test = tfe.project.Project(self, "test", - name="myproject", - organization="my-org-name" - ) - tfe_team_dev = tfe.team.Team(self, "dev", - name="my-dev-team", - organization="my-org-name" - ) - tfe.team_project_access.TeamProjectAccess(self, "custom", - access="custom", - project_access=[TeamProjectAccessProjectAccess( - settings="read", - teams="none" - ) - ], - project_id=cdktf.Token.as_string(tfe_project_test.id), - team_id=cdktf.Token.as_string(tfe_team_dev.id), - workspace_access=[TeamProjectAccessWorkspaceAccess( - create=True, - delete=False, - locking=True, - move=False, - run_tasks=False, - runs="apply", - sentinel_mocks="none", - state_versions="write", - variables="write" - ) - ] - ) +```hcl +resource "tfe_team" "dev" { + name = "my-dev-team" + organization = "my-org-name" +} + +resource "tfe_project" "test" { + name = "myproject" + organization = "my-org-name" +} + +resource "tfe_team_project_access" "custom" { + access = "custom" + team_id = tfe_team.dev.id + project_id = tfe_project.test.id + + project_access { + settings = "read" + teams = "none" + } + workspace_access { + state_versions = "write" + sentinel_mocks = "none" + runs = "apply" + variables = "write" + create = true + locking = true + move = false + delete = false + run_tasks = false + } +} ``` ## Attributes Reference @@ -137,4 +121,4 @@ example: terraform import tfe_team_project_access.admin tprj-2pmtXpZa4YzVMTPi ``` - + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/terraform_version.html.markdown b/website/docs/cdktf/python/r/terraform_version.html.markdown index 1dfbb2b45..d8ae0eb59 100644 --- a/website/docs/cdktf/python/r/terraform_version.html.markdown +++ b/website/docs/cdktf/python/r/terraform_version.html.markdown @@ -62,4 +62,4 @@ terraform import tfe_terraform_version.test 1.1.2 -> **Note:** You can fetch a Terraform version ID from the URL of an existing version in the HCP Terraform UI. The ID is in the format `tool-` - + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/tfe_test_variable.html.markdown b/website/docs/cdktf/python/r/tfe_test_variable.html.markdown new file mode 100644 index 000000000..0ea52ed7c --- /dev/null +++ b/website/docs/cdktf/python/r/tfe_test_variable.html.markdown @@ -0,0 +1,55 @@ +--- +layout: "tfe" +page_title: "Terraform Enterprise: tfe_test_variable" +description: |- + Manages environmet variables used for testing by modules in the Private Module Registry. +--- + + + +# tfe_test_variable + +Creates, updates and destroys environment variables used for testing in the Private Module Registry. + +## Example Usage + +```hcl +resource "tfe_organization" "test_org" { + name = "my-org-name" + email = "admin@company.com" +} + +resource "tfe_oauth_client" "test_client" { + organization = tfe_organization.test.name + api_url = "https://api.github.com" + http_url = "https://github.com" + oauth_token = "my-token-123" + service_provider = "github" +} + +resource "tfe_registry_module" "test_module" { + organization = "test-module" + vcs_repo { + display_identifier = "GH_NAME/REPO_NAME" + identifier = "GH_NAME/REPO_NAME" + oauth_token_id = tfe_oauth_client.test.oauth_token_id + branch = "main" + tags = false +} + test_config { + tests_enabled = true + } +} + +resource "tfe_test_variable" "tf_test_test_variable" { + key = "key_test" + value = "value_test" + description = "some description" + category = "env" + organization = tfe_organization.test.name + module_name = tfe_registry_module.test.name + module_provider = tfe_registry_module.test.module_provider +} +``` + + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/variable.html.markdown b/website/docs/cdktf/python/r/variable.html.markdown index 7d5f39b8c..7789ecaa1 100644 --- a/website/docs/cdktf/python/r/variable.html.markdown +++ b/website/docs/cdktf/python/r/variable.html.markdown @@ -171,4 +171,4 @@ example: terraform import tfe_variable.test my-org-name/varset-47qC3LmA47piVan7/var-5rTwnSaRPogw6apb ``` - + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/workspace.html.markdown b/website/docs/cdktf/python/r/workspace.html.markdown index 1be5e8685..ed82765a0 100644 --- a/website/docs/cdktf/python/r/workspace.html.markdown +++ b/website/docs/cdktf/python/r/workspace.html.markdown @@ -46,31 +46,30 @@ import constructs as constructs import cdktf as cdktf # Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -<<<<<<< HEAD -# -from imports.tfe.oauth_client import OauthClient -from imports.tfe.organization import Organization -from imports.tfe.workspace import Workspace -class MyConvertedCode(TerraformStack): -======= import ...gen.providers.tfe as tfe class MyConvertedCode(cdktf.TerraformStack): ->>>>>>> adf61bce (cdktf: update documentation) def __init__(self, scope, name): super().__init__(scope, name) tfe_organization_test_organization = tfe.organization.Organization(self, "test-organization", email="admin@company.com", name="my-org-name" ) - tfe_agent_pool_test_agent_pool = tfe.agent_pool.AgentPool(self, "test-agent-pool", - name="my-agent-pool-name", - organization=cdktf.Token.as_string(tfe_organization_test_organization.name) + tfe_oauth_client_test = tfe.oauth_client.OauthClient(self, "test", + api_url="https://api.github.com", + http_url="https://github.com", + oauth_token="oauth_token_id", + organization=tfe_organization_test_organization, + service_provider="github" ) - tfe.workspace.Workspace(self, "test", - agent_pool_id=cdktf.Token.as_string(tfe_agent_pool_test_agent_pool.id), - execution_mode="agent", - name="my-workspace-name", - organization=cdktf.Token.as_string(tfe_organization_test_organization.name) + tfe.workspace.Workspace(self, "parent", + name="parent-ws", + organization=tfe_organization_test_organization, + queue_all_runs=False, + vcs_repo=WorkspaceVcsRepo( + branch="main", + identifier="my-org-name/vcs-repository", + oauth_token_id=cdktf.Token.as_string(tfe_oauth_client_test.oauth_token_id) + ) ) ``` @@ -84,6 +83,10 @@ The following arguments are supported: * `assessments_enabled` - (Optional) Whether to regularly run health assessments such as drift detection on the workspace. Defaults to `false`. * `auto_apply` - (Optional) Whether to automatically apply changes when a Terraform plan is successful. Defaults to `false`. * `auto_apply_run_trigger` - (Optional) Whether to automatically apply changes for runs that were created by run triggers from another workspace. Defaults to `false`. +* `auto_destroy_at` - (Optional) A future date/time string at which point all resources in a workspace will be scheduled for deletion. Must be a string in RFC3339 format (e.g. "2100-01-01T00:00:00Z"). + +~> **NOTE:** `auto_destroy_at` is not intended for workspaces containing production resources or long-lived workspaces. Since this attribute is in-part managed by HCP Terraform, using `ignore_changes` for this attribute may be preferred. + * `description` - (Optional) A description for the workspace. * `execution_mode` - (Optional) **Deprecated** Which [execution mode](https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings#execution-mode) to use. Use [tfe_workspace_settings](workspace_settings) instead. * `file_triggers_enabled` - (Optional) Whether to filter runs based on the changed files @@ -183,4 +186,4 @@ terraform import tfe_workspace.test ws-CH5in3chf8RJjrVd terraform import tfe_workspace.test my-org-name/my-wkspace-name ``` - + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/workspace_run.html.markdown b/website/docs/cdktf/python/r/workspace_run.html.markdown index 5550f2faa..507deebd5 100644 --- a/website/docs/cdktf/python/r/workspace_run.html.markdown +++ b/website/docs/cdktf/python/r/workspace_run.html.markdown @@ -210,4 +210,4 @@ 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. - + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/workspace_run_task.html.markdown b/website/docs/cdktf/python/r/workspace_run_task.html.markdown index 4057850fb..7a88fbf31 100644 --- a/website/docs/cdktf/python/r/workspace_run_task.html.markdown +++ b/website/docs/cdktf/python/r/workspace_run_task.html.markdown @@ -47,4 +47,4 @@ import ID. For example: terraform import tfe_workspace_run_task.test my-org-name/workspace/task-name ``` - + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/workspace_settings.markdown b/website/docs/cdktf/python/r/workspace_settings.markdown index 5bed20c55..f2c8f0a41 100644 --- a/website/docs/cdktf/python/r/workspace_settings.markdown +++ b/website/docs/cdktf/python/r/workspace_settings.markdown @@ -16,105 +16,91 @@ Manages or reads execution mode and agent pool settings for a workspace. This al Basic usage: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.organization import Organization -from imports.tfe.workspace import Workspace -from imports.tfe.workspace_settings import WorkspaceSettings -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - test_organization = Organization(self, "test-organization", + tfe_organization_test_organization = tfe.organization.Organization(self, "test-organization", email="admin@company.com", name="my-org-name" ) - test = Workspace(self, "test", + tfe_workspace_test = tfe.workspace.Workspace(self, "test", name="my-workspace-name", - organization=test_organization.name + organization=cdktf.Token.as_string(tfe_organization_test_organization.name) ) - WorkspaceSettings(self, "test-settings", + tfe.workspace_settings.WorkspaceSettings(self, "test-settings", execution_mode="local", - workspace_id=test.id + workspace_id=cdktf.Token.as_string(tfe_workspace_test.id) ) ``` With `execution_mode` of `agent`: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import Token, TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.agent_pool import AgentPool -from imports.tfe.agent_pool_allowed_workspaces import AgentPoolAllowedWorkspaces -from imports.tfe.organization import Organization -from imports.tfe.workspace import Workspace -from imports.tfe.workspace_settings import WorkspaceSettings -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - test_organization = Organization(self, "test-organization", + tfe_organization_test_organization = tfe.organization.Organization(self, "test-organization", email="admin@company.com", name="my-org-name" ) - test = Workspace(self, "test", + tfe_workspace_test = tfe.workspace.Workspace(self, "test", name="my-workspace-name", - organization=test_organization.name + organization=cdktf.Token.as_string(tfe_organization_test_organization.name) ) - test_agent_pool = AgentPool(self, "test-agent-pool", + tfe_agent_pool_test_agent_pool = tfe.agent_pool.AgentPool(self, "test-agent-pool", name="my-agent-pool-name", - organization=test_organization.name + organization=cdktf.Token.as_string(tfe_organization_test_organization.name) ) - tfe_agent_pool_allowed_workspaces_test = AgentPoolAllowedWorkspaces(self, "test_3", - agent_pool_id=test_agent_pool.id, - allowed_workspace_ids=[test.id] + tfe_agent_pool_allowed_workspaces_test = + tfe.agent_pool_allowed_workspaces.AgentPoolAllowedWorkspaces(self, "test_3", + agent_pool_id=cdktf.Token.as_string(tfe_agent_pool_test_agent_pool.id), + allowed_workspace_ids=[cdktf.Token.as_string(tfe_workspace_test.id)] ) # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. tfe_agent_pool_allowed_workspaces_test.override_logical_id("test") - WorkspaceSettings(self, "test-settings", - agent_pool_id=Token.as_string(tfe_agent_pool_allowed_workspaces_test.agent_pool_id), + tfe.workspace_settings.WorkspaceSettings(self, "test-settings", + agent_pool_id=cdktf.Token.as_string(tfe_agent_pool_allowed_workspaces_test.agent_pool_id), execution_mode="agent", - workspace_id=test.id + workspace_id=cdktf.Token.as_string(tfe_workspace_test.id) ) ``` This resource may be used as a data source when no optional arguments are defined: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import Token, TerraformOutput, Op, Fn, TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.data_tfe_workspace import DataTfeWorkspace -from imports.tfe.workspace_settings import WorkspaceSettings -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - test = DataTfeWorkspace(self, "test", + data_tfe_workspace_test = tfe.data_tfe_workspace.DataTfeWorkspace(self, "test", name="my-workspace-name", organization="my-org-name" ) - tfe_workspace_settings_test = WorkspaceSettings(self, "test_1", - workspace_id=Token.as_string(test.id) + tfe_workspace_settings_test = + tfe.workspace_settings.WorkspaceSettings(self, "test_1", + workspace_id=cdktf.Token.as_string(data_tfe_workspace_test.id) ) # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. tfe_workspace_settings_test.override_logical_id("test") - TerraformOutput(self, "workspace-explicit-local-execution", - value=Fn.alltrue( - Token.as_any([ - Op.eq(tfe_workspace_settings_test.execution_mode, "local"), - Fn.lookup_nested(tfe_workspace_settings_test.overwrites, ["0", "\"execution_mode\"" + cdktf.TerraformOutput(self, "workspace-explicit-local-execution", + value=cdktf.Fn.alltrue( + cdktf.Token.as_any([ + cdktf.Op.eq(tfe_workspace_settings_test.execution_mode, "local"), + cdktf.property_access(tfe_workspace_settings_test.overwrites, ["0", "\"execution_mode\"" ]) ])) ) @@ -128,7 +114,7 @@ The following arguments are supported: * `agent_pool_id` - (Optional) The ID of an agent pool to assign to the workspace. Requires `execution_mode` to be set to `agent`. This value _must not_ be provided if `execution_mode` is set to any other value. * `execution_mode` - (Optional) Which [execution mode](https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings#execution-mode) - to use. Using HCP Terraform, valid values are `remote`, `local` or `agent`. Using Terraform Enterprise, only `remote` and `local` execution modes are valid. When set to `local`, the workspace will be used for state storage only. **Important:** If you omit this attribute, the resource configures the workspace to use your organization's default execution mode (which in turn defaults to `remote`), removing any explicit value that might have previously been set for the workspace. + to use. Using HCP Terraform, valid values are `remote`, `local` or `agent`. When set to `local`, the workspace will be used for state storage only. **Important:** If you omit this attribute, the resource configures the workspace to use your organization's default execution mode (which in turn defaults to `remote`), removing any explicit value that might have previously been set for the workspace. ## Attributes Reference @@ -152,4 +138,4 @@ terraform import tfe_workspace_settings.test ws-CH5in3chf8RJjrVd terraform import tfe_workspace_settings.test my-org-name/my-wkspace-name ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/github_installation.html.markdown b/website/docs/cdktf/typescript/d/github_installation.html.markdown index 729f3c70c..7aefb2d43 100644 --- a/website/docs/cdktf/typescript/d/github_installation.html.markdown +++ b/website/docs/cdktf/typescript/d/github_installation.html.markdown @@ -28,7 +28,7 @@ class MyConvertedCode extends cdktf.TerraformStack { this, "gha_installation", { - installationId: 12345, + installationId: 12345678, } ); } @@ -51,7 +51,7 @@ class MyConvertedCode extends cdktf.TerraformStack { this, "gha_installation", { - name: "installation_name", + name: "github_username_or_organization", } ); } @@ -63,7 +63,7 @@ class MyConvertedCode extends cdktf.TerraformStack { The following arguments are supported. At least one of `name`, `installationId` must be set. -* `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://github.com/settings/installations/12345678`. +* `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`. * `name` - (Optional) Name of the Github user or organization account that installed the app. Must be one of: `installationId` or `name`. @@ -73,4 +73,5 @@ Must be one of: `installationId` or `name`. In addition to all arguments above, the following attributes are exported: * `id` - The internal ID of the Github Installation. This is different from the `installationId`. - + + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/ip_ranges.html.markdown b/website/docs/cdktf/typescript/d/ip_ranges.html.markdown index 0b3f9604a..5f2274fae 100644 --- a/website/docs/cdktf/typescript/d/ip_ranges.html.markdown +++ b/website/docs/cdktf/typescript/d/ip_ranges.html.markdown @@ -49,4 +49,4 @@ The following attributes are exported: * `vcs` - The list of IP ranges in CIDR notation used for connecting to VCS providers. - + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/no_code_module.html.markdown b/website/docs/cdktf/typescript/d/no_code_module.html.markdown index e680d7bd9..e8a11ff3b 100644 --- a/website/docs/cdktf/typescript/d/no_code_module.html.markdown +++ b/website/docs/cdktf/typescript/d/no_code_module.html.markdown @@ -13,35 +13,15 @@ Use this data source to read the details of an existing No-Code-Allowed module. ## Example Usage -```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { Token, TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { DataTfeNoCodeModule } from "./.gen/providers/tfe/data-tfe-no-code-module"; -import { NoCodeModule } from "./.gen/providers/tfe/no-code-module"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { - super(scope, name); - const foobar = new NoCodeModule(this, "foobar", { - organization: Token.asString(tfeOrganizationFoobar.id), - registryModule: Token.asString(tfeRegistryModuleFoobar.id), - }); - const dataTfeNoCodeModuleFoobar = new DataTfeNoCodeModule( - this, - "foobar_1", - { - id: foobar.id, - } - ); - /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ - dataTfeNoCodeModuleFoobar.overrideLogicalId("foobar"); - } +```hcl +resource "tfe_no_code_module" "foobar" { + organization = tfe_organization.foobar.id + registry_module = tfe_registry_module.foobar.id } +data "tfe_no_code_module" "foobar" { + id = tfe_no_code_module.foobar.id +} ``` ## Argument Reference @@ -59,4 +39,4 @@ The following arguments are supported: * `versionPin` - Version number the no-code module is pinned to. * `enabled` - Indicates if this no-code module is currently enabled - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/oauth_client.html.markdown b/website/docs/cdktf/typescript/d/oauth_client.html.markdown index a1424e2df..448720d0e 100644 --- a/website/docs/cdktf/typescript/d/oauth_client.html.markdown +++ b/website/docs/cdktf/typescript/d/oauth_client.html.markdown @@ -83,9 +83,9 @@ be set. * `oauthClientId` - (Optional) ID of the OAuth client. * `organization` - (Optional) The name of the organization in which to search. * `serviceProvider` - (Optional) The API identifier of the OAuth service provider. If set, - must be one of: `ado_server`, `ado_services`, `bitbucket_data_center`, `bitbucket_hosted`, `bitbucket_server`(deprecated), - `github`, `github_enterprise`, `gitlab_hosted`, `gitlab_community_edition`, or - `gitlab_enterprise_edition`. + must be one of: `adoServer`, `adoServices`, `bitbucketDataCenter`, `bitbucketHosted`, `bitbucketServer`(deprecated), + `github`, `githubEnterprise`, `gitlabHosted`, `gitlabCommunityEdition`, or + `gitlabEnterpriseEdition`. ## Attributes Reference @@ -101,5 +101,6 @@ In addition to all arguments above, the following attributes are exported: * `organization` - The organization in which the OAuth client is registered. * `serviceProvider` - The API identifier of the OAuth service provider. * `serviceProviderDisplayName` - The display name of the OAuth service provider. - - +* `organizationScoped` - Whether or not the agent pool can be used by all workspaces and projects in the organization. +* `projectIds` - IDs of the projects that use the oauth client. + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/organization.html.markdown b/website/docs/cdktf/typescript/d/organization.html.markdown index 81ca0afca..6d36e1b08 100644 --- a/website/docs/cdktf/typescript/d/organization.html.markdown +++ b/website/docs/cdktf/typescript/d/organization.html.markdown @@ -42,10 +42,11 @@ In addition to all arguments above, the following attributes are exported: * `email` - Admin email address. * `externalId` - An identifier for the organization. * `assessmentsEnforced` - (Available only in HCP Terraform) Whether to force health assessments (drift detection) on all eligible workspaces or allow workspaces to set thier own preferences. -* `collaboratorAuthPolicy` - Authentication policy (`password` or `two_factor_mandatory`). Defaults to `password`. +* `collaboratorAuthPolicy` - Authentication policy (`password` or `twoFactorMandatory`). Defaults to `password`. * `costEstimationEnabled` - Whether or not the cost estimation feature is enabled for all workspaces in the organization. Defaults to true. In a HCP Terraform organization which does not have Teams & Governance features, this value is always false and cannot be changed. In Terraform Enterprise, Cost Estimation must also be enabled in Site Administration. * `ownersTeamSamlRoleId` - The name of the "owners" team. * `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. * `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. * `defaultProjectId` - ID of the organization's default project. All workspaces created without specifying a project ID are created in this project. - + + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/organization_membership.html.markdown b/website/docs/cdktf/typescript/d/organization_membership.html.markdown index 67c15a000..2041d6609 100644 --- a/website/docs/cdktf/typescript/d/organization_membership.html.markdown +++ b/website/docs/cdktf/typescript/d/organization_membership.html.markdown @@ -110,4 +110,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. - + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/organization_run_task.html.markdown b/website/docs/cdktf/typescript/d/organization_run_task.html.markdown index 3d2ce438b..1550da59f 100644 --- a/website/docs/cdktf/typescript/d/organization_run_task.html.markdown +++ b/website/docs/cdktf/typescript/d/organization_run_task.html.markdown @@ -54,4 +54,4 @@ In addition to all arguments above, the following attributes are exported: * `id` - The ID of the task. * `url` - URL to send a task payload. - + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/policy_set.html.markdown b/website/docs/cdktf/typescript/d/policy_set.html.markdown index 1a242fe1b..85028b02e 100644 --- a/website/docs/cdktf/typescript/d/policy_set.html.markdown +++ b/website/docs/cdktf/typescript/d/policy_set.html.markdown @@ -69,4 +69,4 @@ The `vcsRepo` block contains: * `oauthTokenId` - OAuth token ID of the configured VCS connection. - + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/registry_gpg_key.html.markdown b/website/docs/cdktf/typescript/d/registry_gpg_key.html.markdown index f85d500f4..265d57fbc 100644 --- a/website/docs/cdktf/typescript/d/registry_gpg_key.html.markdown +++ b/website/docs/cdktf/typescript/d/registry_gpg_key.html.markdown @@ -14,18 +14,15 @@ Use this data source to get information about a private registry GPG key. ## Example Usage ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { DataTfeRegistryGpgKey } from "./.gen/providers/tfe/data-tfe-registry-gpg-key"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - new DataTfeRegistryGpgKey(this, "example", { + new tfe.dataTfeRegistryGpgKey.DataTfeRegistryGpgKey(this, "example", { id: "13DFECCA3B58CE4A", organization: "my-org-name", }); @@ -47,4 +44,4 @@ The following arguments are supported: * `createdAt` - The time when the GPG key was created. * `updatedAt` - The time when the GPG key was last updated. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/registry_gpg_keys.html.markdown b/website/docs/cdktf/typescript/d/registry_gpg_keys.html.markdown index 67edda778..83d0e0d82 100644 --- a/website/docs/cdktf/typescript/d/registry_gpg_keys.html.markdown +++ b/website/docs/cdktf/typescript/d/registry_gpg_keys.html.markdown @@ -14,18 +14,15 @@ Use this data source to get information about all private registry GPG keys of a ## Example Usage ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { DataTfeRegistryGpgKeys } from "./.gen/providers/tfe/data-tfe-registry-gpg-keys"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - new DataTfeRegistryGpgKeys(this, "all", { + new tfe.dataTfeRegistryGpgKeys.DataTfeRegistryGpgKeys(this, "all", { organization: "my-org-name", }); } @@ -48,4 +45,4 @@ The following arguments are supported: * `createdAt` - The time when the GPG key was created. * `updatedAt` - The time when the GPG key was last updated. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/registry_provider.html.markdown b/website/docs/cdktf/typescript/d/registry_provider.html.markdown index 42abcc627..d5bd8c2c2 100644 --- a/website/docs/cdktf/typescript/d/registry_provider.html.markdown +++ b/website/docs/cdktf/typescript/d/registry_provider.html.markdown @@ -16,18 +16,15 @@ Use this data source to get information about a public or private provider in th A private provider: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { RegistryProvider } from "./.gen/providers/tfe/registry-provider"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - new RegistryProvider(this, "example", { + new tfe.registryProvider.RegistryProvider(this, "example", { name: "my-provider", organization: "my-org-name", }); @@ -39,18 +36,15 @@ class MyConvertedCode extends TerraformStack { A public provider: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { RegistryProvider } from "./.gen/providers/tfe/registry-provider"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - new RegistryProvider(this, "example", { + new tfe.registryProvider.RegistryProvider(this, "example", { name: "aws", namespace: "hashicorp", organization: "my-org-name", @@ -76,4 +70,4 @@ The following arguments are supported: * `createdAt` - The time when the provider was created. * `updatedAt` - The time when the provider was last updated. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/registry_providers.html.markdown b/website/docs/cdktf/typescript/d/registry_providers.html.markdown index 799f83f46..aaf6fb892 100644 --- a/website/docs/cdktf/typescript/d/registry_providers.html.markdown +++ b/website/docs/cdktf/typescript/d/registry_providers.html.markdown @@ -16,18 +16,15 @@ Use this data source to get information about public and private providers in th All providers: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { DataTfeRegistryProviders } from "./.gen/providers/tfe/data-tfe-registry-providers"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - new DataTfeRegistryProviders(this, "all", { + new tfe.dataTfeRegistryProviders.DataTfeRegistryProviders(this, "all", { organization: "my-org-name", }); } @@ -38,18 +35,15 @@ class MyConvertedCode extends TerraformStack { All private providers: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { DataTfeRegistryProviders } from "./.gen/providers/tfe/data-tfe-registry-providers"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - new DataTfeRegistryProviders(this, "private", { + new tfe.dataTfeRegistryProviders.DataTfeRegistryProviders(this, "private", { organization: "my-org-name", registryName: "private", }); @@ -61,21 +55,22 @@ class MyConvertedCode extends TerraformStack { Providers with "hashicorp" in their namespace or name: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { DataTfeRegistryProviders } from "./.gen/providers/tfe/data-tfe-registry-providers"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - new DataTfeRegistryProviders(this, "hashicorp", { - organization: "my-org-name", - search: "hashicorp", - }); + new tfe.dataTfeRegistryProviders.DataTfeRegistryProviders( + this, + "hashicorp", + { + organization: "my-org-name", + search: "hashicorp", + } + ); } } @@ -100,4 +95,4 @@ The following arguments are supported: * `createdAt` - Time when the provider was created. * `updatedAt` - Time when the provider was last updated. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/slug.html.markdown b/website/docs/cdktf/typescript/d/slug.html.markdown index 7146f5fc4..38f3e825e 100644 --- a/website/docs/cdktf/typescript/d/slug.html.markdown +++ b/website/docs/cdktf/typescript/d/slug.html.markdown @@ -13,7 +13,7 @@ intended to be uploaded to HCP Terraform and Terraform Enterprise, in lieu of th sourced from a configured VCS provider. A unique checksum is generated for the specified local directory, which allows -resources such as `tfe_policy_set` track the files and upload a new gzip compressed +resources such as `tfePolicySet` track the files and upload a new gzip compressed tar file containing configuration files (a Terraform "slug") when those files change. ## Example Usage @@ -50,4 +50,4 @@ The following arguments are supported: * `sourcePath` - (Required) The path to the directory where the files are located. - + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/workspace.html.markdown b/website/docs/cdktf/typescript/d/workspace.html.markdown index 280e4a2d8..6bb108f22 100644 --- a/website/docs/cdktf/typescript/d/workspace.html.markdown +++ b/website/docs/cdktf/typescript/d/workspace.html.markdown @@ -48,6 +48,7 @@ In addition to all arguments above, the following attributes are exported: * `allowDestroyPlan` - Indicates whether destroy plans can be queued on the workspace. * `autoApply` - Indicates whether to automatically apply changes when a Terraform plan is successful. * `autoApplyRunTrigger` - Whether the workspace will automatically apply changes for runs that were created by run triggers from another workspace. +* `autoDestroyAt` - Future date/time string at which point all resources in a workspace will be scheduled to be deleted. * `assessmentsEnabled` - (Available only in HCP Terraform) Indicates whether health assessments such as drift detection are enabled for the workspace. * `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`). * `globalRemoteState` - (Optional) Whether the workspace should allow all workspaces in the organization to access its state data during runs. If false, then only specifically approved workspaces can access its state (determined by the `remoteStateConsumerIds` argument). @@ -73,7 +74,7 @@ In addition to all arguments above, the following attributes are exported: * `triggerPatterns` - List of [glob patterns](https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings/vcs#glob-patterns-for-automatic-run-triggering) that describe the files HCP Terraform monitors for changes. Trigger patterns are always appended to the root directory of the repository. * `vcsRepo` - Settings for the workspace's VCS repository. * `workingDirectory` - A relative path that Terraform will execute within. -* `executionMode` - Indicates the [execution mode](https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings#execution-mode) of the workspace. **Note:** This value might be derived from an organization-level default or set on the workspace itself; see the [`tfe_workspace_settings` resource](tfe_workspace_settings) for details. +* `executionMode` - Indicates the [execution mode](https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings#execution-mode) of the workspace. **Note:** This value might be derived from an organization-level default or set on the workspace itself; see the [`tfeWorkspaceSettings` resource](tfe_workspace_settings) for details. * `htmlUrl` - The URL to the browsable HTML overview of the workspace @@ -88,4 +89,4 @@ The `vcsRepo` block contains: * `oauthTokenId` - OAuth token ID of the configured VCS connection. * `tagsRegex` - A regular expression used to trigger a Workspace run for matching Git tags. - + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/workspace_run_task.html.markdown b/website/docs/cdktf/typescript/d/workspace_run_task.html.markdown index 69c36eda8..561ceec3b 100644 --- a/website/docs/cdktf/typescript/d/workspace_run_task.html.markdown +++ b/website/docs/cdktf/typescript/d/workspace_run_task.html.markdown @@ -48,4 +48,4 @@ In addition to all arguments above, the following attributes are exported: * `id` - The ID of the Workspace Run task. * `stage` - Which stage the task will run in. - + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/index.html.markdown b/website/docs/cdktf/typescript/index.html.markdown index 151cc7d81..be83ab0b1 100644 --- a/website/docs/cdktf/typescript/index.html.markdown +++ b/website/docs/cdktf/typescript/index.html.markdown @@ -43,8 +43,8 @@ There are several ways to provide the required token: - **Set the `token` argument in the provider configuration.** You can set the `token` argument in the provider configuration. Use an input variable for the token. -- **Set the `TFE_TOKEN` environment variable:** The provider can read the -`TFE_TOKEN` environment variable and the token stored there to authenticate. +- **Set the `tfeToken` environment variable:** The provider can read the +`tfeToken` environment variable and the token stored there to authenticate. When configuring the input variable for either of these options, mark them as sensitive. @@ -62,9 +62,9 @@ Terraform on your local command line, it can automatically discover the credenti [`terraform login`](https://developer.hashicorp.com/terraform/cli/commands/login). - **Set a `credentials` block in your CLI config file (.terraformrc):** See the [CLI Configuration File documentation](/docs/commands/cli-config.html). -If you used the `TF_CLI_CONFIG_FILE` environment variable to specify a +If you used the `tfCliConfigFile` environment variable to specify a non-default location for .terraformrc, the provider will also use that location. -Using a `credentials_helper` block is not supported. +Using a `credentialsHelper` block is not supported. ## Versions @@ -77,7 +77,7 @@ automatically installed by `terraform init` in the future: terraform { required_providers { tfe = { - version = "~> 0.50.0" + version = "~> 0.56.0" } } } @@ -86,11 +86,11 @@ terraform { As this provider is still at version zero, you should constrain the acceptable provider versions on the minor version. -The above snippet using `required_providers` is for Terraform 0.13+; if you are using Terraform version 0.12, you can constrain by adding the version constraint to the `provider` block instead: +The above snippet using `requiredProviders` is for Terraform 0.13+; if you are using Terraform version 0.12, you can constrain by adding the version constraint to the `provider` block instead: ```hcl provider "tfe" { - version = "~> 0.55.0" + version = "~> 0.56.0" ... } ``` @@ -101,9 +101,9 @@ For more information on provider installation and constraining provider versions ```hcl provider "tfe" { - hostname = var.hostname # Optional, defaults to Terraform Cloud `appTerraformIo` + hostname = var.hostname # Optional, defaults to HCP Terraform `appTerraformIo` token = var.token - version = "~> 0.55.0" + version = "~> 0.56.0" } # Create an organization @@ -116,17 +116,17 @@ resource "tfe_organization" "org" { The following arguments are supported: -* `hostname` - (Optional) The HCP Terraform and Terraform Enterprise hostname to connect to. +* `hostname` - (Optional) The HCP Terraform or Terraform Enterprise hostname to connect to. Defaults to `app.terraform.io`. Can be overridden by setting the - `TFE_HOSTNAME` environment variable. -* `token` - (Optional) The token used to authenticate with HCP Terraform and Terraform Enterprise. + `tfeHostname` environment variable. +* `token` - (Optional) The token used to authenticate with HCP Terraform or Terraform Enterprise. See [Authentication](#authentication) above for more information. * `sslSkipVerify` - (Optional) Whether or not to skip certificate verifications. - Defaults to `false`. Can be overridden setting the `TFE_SSL_SKIP_VERIFY` + Defaults to `false`. Can be overridden setting the `tfeSslSkipVerify` environment variable. * `organization` - (Optional) The default organization that resources should belong to. If provided, it's usually possible to omit resource-specific `organization` arguments. Ensure that the organization already exists prior to using this argument. - This can also be specified using the `TFE_ORGANIZATION` environment variable. + This can also be specified using the `tfeOrganization` environment variable. - + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/admin_organization_settings.markdown b/website/docs/cdktf/typescript/r/admin_organization_settings.markdown index 1f0bdf6a7..1aaced2ae 100644 --- a/website/docs/cdktf/typescript/r/admin_organization_settings.markdown +++ b/website/docs/cdktf/typescript/r/admin_organization_settings.markdown @@ -66,8 +66,4 @@ The following arguments are supported: * `ssoEnabled` - True if SSO is enabled in this organization -## Import - -This resource does not manage the creation of an organization and there is no need to import it. - - + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/agent_pool_allowed_workspaces.html.markdown b/website/docs/cdktf/typescript/r/agent_pool_allowed_workspaces.html.markdown index d9a33d1d3..d83bc9dd9 100644 --- a/website/docs/cdktf/typescript/r/agent_pool_allowed_workspaces.html.markdown +++ b/website/docs/cdktf/typescript/r/agent_pool_allowed_workspaces.html.markdown @@ -17,59 +17,39 @@ for Business account. ## Example Usage -In this example, the agent pool and workspace are connected through other resources that manage the agent pool permissions as well as the workspace execution mode. Notice that the `tfe_workspace_settings` uses the agent pool reference found in `tfe_agent_pool_allowed_workspaces` in order to create the permission to use the agent pool before assigning it. - -```typescript -import * as constructs from "constructs"; -import * as cdktf from "cdktf"; -/*Provider bindings are generated by running cdktf get. -See https://cdk.tf/provider-generation for more details.*/ -import * as tfe from "./.gen/providers/tfe"; -class MyConvertedCode extends cdktf.TerraformStack { - constructor(scope: constructs.Construct, name: string) { - super(scope, name); - const tfeOrganizationTestOrganization = new tfe.organization.Organization( - this, - "test-organization", - { - email: "admin@company.com", - name: "my-org-name", - } - ); - const tfeWorkspaceTestWorkspace = new tfe.workspace.Workspace( - this, - "test-workspace", - { - name: "my-workspace-name", - organization: cdktf.Token.asString( - tfeOrganizationTestOrganization.name - ), - } - ); - const tfeAgentPoolTestAgentPool = new tfe.agentPool.AgentPool( - this, - "test-agent-pool", - { - name: "my-agent-pool-name", - organization: cdktf.Token.asString( - tfeOrganizationTestOrganization.name - ), - organizationScoped: false, - } - ); - new tfe.agentPoolAllowedWorkspaces.AgentPoolAllowedWorkspaces( - this, - "test-allowed-workspaces", - { - agentPoolId: cdktf.Token.asString(tfeAgentPoolTestAgentPool.id), - allowedWorkspaceIds: [ - cdktf.Token.asString(tfeWorkspaceTestWorkspace.id), - ], - } - ); - } +In this example, the agent pool and workspace are connected through other resources that manage the agent pool permissions as well as the workspace execution mode. Notice that the `tfeWorkspaceSettings` uses the agent pool reference found in `tfeAgentPoolAllowedWorkspaces` in order to create the permission to use the agent pool before assigning it. + +```hcl +resource "tfe_organization" "test-organization" { + name = "my-org-name" + email = "admin@company.com" +} + +// Ensure workspace and agent pool are create first +resource "tfe_workspace" "test-workspace" { + name = "my-workspace-name" + organization = tfe_organization.test-organization.name +} + +resource "tfe_agent_pool" "test-agent-pool" { + name = "my-agent-pool-name" + organization = tfe_organization.test-organization.name + organization_scoped = false } +// Ensure permissions are assigned second +resource "tfe_agent_pool_allowed_workspaces" "allowed" { + agent_pool_id = tfe_agent_pool.test-agent-pool.id + allowed_workspace_ids = [for key, value in tfe_workspace.test.*.id : value] +} + +// Lastly, ensure the workspace agent execution is assigned last by +// referencing allowed_workspaces +resource "tfe_workspace_settings" "test-workspace-settings" { + workspace_id = tfe_workspace.test-workspace.id + execution_mode = "agent" + agent_pool_id = tfe_agent_pool_allowed_workspaces.allowed.id +} ``` ## Argument Reference @@ -88,5 +68,4 @@ A resource can be imported; use `` as the import ID. For example: terraform import tfe_agent_pool_allowed_workspaces.foobar apool-rW0KoLSlnuNb5adB ``` - - + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/agent_token.html.markdown b/website/docs/cdktf/typescript/r/agent_token.html.markdown index 10ad0157b..c8629c52c 100644 --- a/website/docs/cdktf/typescript/r/agent_token.html.markdown +++ b/website/docs/cdktf/typescript/r/agent_token.html.markdown @@ -63,4 +63,4 @@ The following arguments are supported: * `description` - The description of agent token. * `token` - The generated token. - + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/notification_configuration.html.markdown b/website/docs/cdktf/typescript/r/notification_configuration.html.markdown index 6513e8520..55c9a5082 100644 --- a/website/docs/cdktf/typescript/r/notification_configuration.html.markdown +++ b/website/docs/cdktf/typescript/r/notification_configuration.html.markdown @@ -115,7 +115,7 @@ class MyConvertedCode extends cdktf.TerraformStack { ``` -(**TFE only**) With `destinationType` of `email`, using `emailAddresses` list and `email_users`: +(**TFE only**) With `destinationType` of `email`, using `emailAddresses` list and `emailUsers`: ```typescript import * as constructs from "constructs"; @@ -184,22 +184,22 @@ The following arguments are supported: * `generic` * `email` available in HCP Terraform or Terraform Enterprise v202005-1 or later * `slack` - * `microsoft-teams` available in HCP Terraform or Terraform Enterprise v202206-1 or later + * `microsoftTeams` available in HCP Terraform or Terraform Enterprise v202206-1 or later * `emailAddresses` - (Optional) **TFE only** A list of email addresses. This value - _must not_ be provided if `destinationType` is `generic`, `microsoft-teams`, or `slack`. + _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`, `microsoft-teams`, or `slack`. + 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`, `microsoft-teams`, or `slack`. + 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. Valid values are `run:created`, `run:planning`, `run:needs_attention`, `run:applying` - `run:completed`, `run:errored`, `assessment:check_failure`, `assessment:drifted`, or `assessment:failed`. + send notifications. Valid values are `run:created`, `run:planning`, `run:needsAttention`, `run:applying` + `run:completed`, `run:errored`, `assessment:checkFailure`, `assessment:drifted`, or `assessment:failed`. If omitted, no notification triggers are configured. -* `url` - (Required if `destinationType` is `generic`, `microsoft-teams`, or `slack`) The HTTP or HTTPS URL of the notification +* `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`. * `workspaceId` - (Required) The id of the workspace that owns the notification configuration. @@ -216,4 +216,4 @@ Notification configurations can be imported; use ` + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/oauth_client.html.markdown b/website/docs/cdktf/typescript/r/oauth_client.html.markdown index 5895085b5..bae635a3f 100644 --- a/website/docs/cdktf/typescript/r/oauth_client.html.markdown +++ b/website/docs/cdktf/typescript/r/oauth_client.html.markdown @@ -33,6 +33,7 @@ class MyConvertedCode extends cdktf.TerraformStack { name: "my-github-oauth-client", oauthToken: "my-vcs-provider-token", organization: "my-org-name", + organizationScoped: true, serviceProvider: "github", }); } @@ -70,11 +71,11 @@ class MyConvertedCode extends cdktf.TerraformStack { ``` -#### BitBucket Data Center Usage +#### Bitbucket Data Center Usage -See [documentation for HCP Terraform and Terraform Enterprise setup](https://developer.hashicorp.com/terraform/cloud-docs/vcs/bitbucket-data-center). +See [documentation for HCP Terraform and Terraform Enterprise setup](https://developer.hashicorp.com/terraform/cloud-docs/vcs/bitbucket-server). -When using BitBucket Data Center, you must use three required fields: `key`, `secret`, `rsaPublicKey`. +When using Bitbucket Data Center, you must use three required fields: `key`, `secret`, `rsaPublicKey`. ```typescript @@ -110,27 +111,29 @@ The following arguments are supported: * `name` - (Optional) Display name for the OAuth Client. Defaults to the `serviceProvider` if not supplied. * `organization` - (Optional) Name of the organization. If omitted, organization must be defined in the provider config. * `apiUrl` - (Required) The base URL of your VCS provider's API (e.g. - `https://api.github.com` or `https://ghe.example.com/api/v3`). + `https://apiGithubCom` or `https://gheExampleCom/api/v3`). * `httpUrl` - (Required) The homepage of your VCS provider (e.g. - `https://github.com` or `https://ghe.example.com`). -* `oauthToken` - The token string you were given by your VCS provider, e.g. `ghp_xxxxxxxxxxxxxxx` for a GitHub personal access token. For more information on how to generate this token string for your VCS provider, see the [Create an OAuth Client](https://developer.hashicorp.com/terraform/cloud-docs/api-docs/oauth-clients#create-an-oauth-client) documentation. -* `privateKey` - (Required for `ado_server`) The text of the private key associated with your Azure DevOps Server account + `https://githubCom` or `https://gheExampleCom`). +* `oauthToken` - The token string you were given by your VCS provider, e.g. `ghpXxxxxxxxxxxxxxx` for a GitHub personal access token. For more information on how to generate this token string for your VCS provider, see the [Create an OAuth Client](https://developer.hashicorp.com/terraform/cloud-docs/api-docs/oauth-clients#create-an-oauth-client) documentation. +* `privateKey` - (Required for `adoServer`) The text of the private key associated with your Azure DevOps Server account * `key` - The OAuth Client key can refer to a Consumer Key, Application Key, or another type of client key for the VCS provider. -* `secret` - (Required for `bitbucket_data_center`) The OAuth Client secret is used for Bitbucket Data Center, this secret is the +* `secret` - (Required for `bitbucketDataCenter`) The OAuth Client secret is used for Bitbucket Data Center, this secret is the the text of the SSH private key associated with your Bitbucket Data Center Application Link. -* `rsaPublicKey` - (Required for `bitbucket_data_center`) Required for BitBucket - Server in conjunction with the secret. Not used for any other providers. The +* `rsaPublicKey` - (Required for `bitbucketDataCenter`) Required for Bitbucket + Data Center in conjunction with the secret. Not used for any other providers. The text of the SSH public key associated with your Bitbucket Data Center Application Link. * `serviceProvider` - (Required) The VCS provider being connected with. Valid - options are `ado_server`, `ado_services`, `bitbucket_data_center`, `bitbucket_hosted`, `bitbucket_server`(deprecated), `github`, `github_enterprise`, `gitlab_hosted`, - `gitlab_community_edition`, or `gitlab_enterprise_edition`. + options are `adoServer`, `adoServices`, `bitbucketDataCenter`, `bitbucketHosted`, `bitbucketServer`(deprecated), `github`, `githubEnterprise`, `gitlabHosted`, + `gitlabCommunityEdition`, or `gitlabEnterpriseEdition`. +* `agentPoolId` - (Optional) An existing agent pool ID within the organization that has Private VCS support enabled. +* `organizationScoped` - (Optional) Whether or not the oauth client is scoped to all projects and workspaces in the organization. Defaults to `true`. ## Attributes Reference * `id` - The ID of the OAuth client. * `oauthTokenId` - The ID of the OAuth token associated with the OAuth client. - + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/opa_version.html.markdown b/website/docs/cdktf/typescript/r/opa_version.html.markdown index 616a73c82..fb467bb53 100644 --- a/website/docs/cdktf/typescript/r/opa_version.html.markdown +++ b/website/docs/cdktf/typescript/r/opa_version.html.markdown @@ -16,18 +16,15 @@ Manage OPA versions available on Terraform Enterprise. Basic Usage: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { OpaVersion } from "./.gen/providers/tfe/opa-version"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - new OpaVersion(this, "test", { + new tfe.opaVersion.OpaVersion(this, "test", { sha: "e75ac73deb69a6b3aa667cb0b8b731aee79e2904", url: "https://tfe-host.com/path/to/opa", version: "0.58.0-custom", @@ -68,4 +65,4 @@ terraform import tfe_opa_version.test 0.58.0 -> **Note:** You can fetch a OPA version ID from the URL of an existing version in the HCP Terraform UI. The ID is in the format `tool-` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/organization.html.markdown b/website/docs/cdktf/typescript/r/organization.html.markdown index dac894796..b04caf9de 100644 --- a/website/docs/cdktf/typescript/r/organization.html.markdown +++ b/website/docs/cdktf/typescript/r/organization.html.markdown @@ -44,16 +44,12 @@ The following arguments are supported: * `sessionRememberMinutes` - (Optional) Session expiration. Defaults to `20160`. * `collaboratorAuthPolicy` - (Optional) Authentication policy (`password` - or `two_factor_mandatory`). Defaults to `password`. + or `twoFactorMandatory`). Defaults to `password`. * `ownersTeamSamlRoleId` - (Optional) The name of the "owners" team. * `costEstimationEnabled` - (Optional) Whether or not the cost estimation feature is enabled for all workspaces in the organization. Defaults to true. In a HCP Terraform organization which does not have Teams & Governance features, this value is always false and cannot be changed. In Terraform Enterprise, Cost Estimation must also be enabled in Site Administration. * `sendPassingStatusesForUntriggeredSpeculativePlans` - (Optional) 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 false. In Terraform Enterprise, this setting has no effect and cannot be changed but is also available in Site Administration. -<<<<<<< HEAD * `aggregatedCommitStatusEnabled` - (Optional) 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. If enabled, `sendPassingStatusesForUntriggeredSpeculativePlans` needs to be false. * `assessmentsEnforced` - (Optional) (Available only in HCP Terraform) Whether to force health assessments (drift detection) on all eligible workspaces or allow workspaces to set their own preferences. -======= -* `assessmentsEnforced` - (Optional) (Available only in HCP Terraform) Whether to force health assessments (drift detection) on all eligible workspaces or allow workspaces to set their own preferences. ->>>>>>> 79010b4f (Removed all references to HCP Terraform) * `allowForceDeleteWorkspaces` - (Optional) Whether workspace administrators are permitted to delete workspaces with resources under management. If false, only organization owners may delete these workspaces. Defaults to false. ## Attributes Reference @@ -69,4 +65,4 @@ example: terraform import tfe_organization.test my-org-name ``` - + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/organization_default_settings.html.markdown b/website/docs/cdktf/typescript/r/organization_default_settings.html.markdown index cf68a6606..08cdc7a91 100644 --- a/website/docs/cdktf/typescript/r/organization_default_settings.html.markdown +++ b/website/docs/cdktf/typescript/r/organization_default_settings.html.markdown @@ -9,42 +9,49 @@ description: |- # tfe_organization_default_settings -Primarily, this is used to set the default execution mode of an organization. Settings configured here will be used as the default for all workspaces in the organization, unless they specify their own values with a [`tfe_workspace_settings` resource](workspace_settings.html) (or deprecated attributes on the workspace resource). +Primarily, this is used to set the default execution mode of an organization. Settings configured here will be used as the default for all workspaces in the organization, unless they specify their own values with a [`tfeWorkspaceSettings` resource](workspace_settings.html) (or deprecated attributes on the workspace resource). ## Example Usage Basic usage: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { AgentPool } from "./.gen/providers/tfe/agent-pool"; -import { Organization } from "./.gen/providers/tfe/organization"; -import { OrganizationDefaultSettings } from "./.gen/providers/tfe/organization-default-settings"; -import { Workspace } from "./.gen/providers/tfe/workspace"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - const test = new Organization(this, "test", { - email: "admin@company.com", - name: "my-org-name", - }); - const myAgents = new AgentPool(this, "my_agents", { - name: "agent_smiths", - organization: test.name, - }); - const orgDefault = new OrganizationDefaultSettings(this, "org_default", { - defaultAgentPoolId: myAgents.id, - defaultExecutionMode: "agent", - organization: test.name, - }); - new Workspace(this, "my_workspace", { - dependsOn: [orgDefault], + const tfeOrganizationTest = new tfe.organization.Organization( + this, + "test", + { + email: "admin@company.com", + name: "my-org-name", + } + ); + const tfeAgentPoolMyAgents = new tfe.agentPool.AgentPool( + this, + "my_agents", + { + name: "agent_smiths", + organization: cdktf.Token.asString(tfeOrganizationTest.name), + } + ); + const tfeOrganizationDefaultSettingsOrgDefault = + new tfe.organizationDefaultSettings.OrganizationDefaultSettings( + this, + "org_default", + { + defaultAgentPoolId: cdktf.Token.asString(tfeAgentPoolMyAgents.id), + defaultExecutionMode: "agent", + organization: cdktf.Token.asString(tfeOrganizationTest.name), + } + ); + new tfe.workspace.Workspace(this, "my_workspace", { + dependsOn: [tfeOrganizationDefaultSettingsOrgDefault], name: "my-workspace", }); } @@ -67,7 +74,7 @@ The following arguments are supported: Organization default execution mode can be imported; use `` as the import ID. For example: ```shell -terraform import tfe_organization_default_execution_mode.test my-org-name +terraform import tfe_organization_default_settings.test my-org-name ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/organization_membership.html.markdown b/website/docs/cdktf/typescript/r/organization_membership.html.markdown index ba4af10f8..8a7b3c5d8 100644 --- a/website/docs/cdktf/typescript/r/organization_membership.html.markdown +++ b/website/docs/cdktf/typescript/r/organization_membership.html.markdown @@ -69,4 +69,4 @@ terraform import tfe_organization_membership.test my-org-name/user@example.com terraform import tfe_organization_membership.test ou-wAs3zYmWAhYK7peR ``` - + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/organization_run_task.html.markdown b/website/docs/cdktf/typescript/r/organization_run_task.html.markdown index ca4ff3bab..654ef9ec1 100644 --- a/website/docs/cdktf/typescript/r/organization_run_task.html.markdown +++ b/website/docs/cdktf/typescript/r/organization_run_task.html.markdown @@ -63,4 +63,4 @@ import ID. For example: terraform import tfe_organization_run_task.test my-org-name/task-name ``` - + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/policy_set.html.markdown b/website/docs/cdktf/typescript/r/policy_set.html.markdown index 74aa0b73b..3a3a14959 100644 --- a/website/docs/cdktf/typescript/r/policy_set.html.markdown +++ b/website/docs/cdktf/typescript/r/policy_set.html.markdown @@ -21,63 +21,38 @@ for workspaces that the policy set is attached to. Basic usage (VCS-based policy set): -```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { Token, TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { PolicySet } from "./.gen/providers/tfe/policy-set"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { - super(scope, name); - new PolicySet(this, "test", { - agentEnabled: Token.asBoolean("true"), - description: "A brand new policy set", - kind: "sentinel", - name: "my-policy-set", - organization: "my-org-name", - policiesPath: "policies/my-policy-set", - policyToolVersion: "0.24.1", - vcsRepo: { - branch: "main", - identifier: "my-org-name/my-policy-set-repository", - ingressSubmodules: false, - oauthTokenId: Token.asString(tfeOauthClientTest.oauthTokenId), - }, - workspaceIds: [Token.asString(tfeWorkspaceTest.id)], - }); +```hcl +resource "tfe_policy_set" "test" { + name = "my-policy-set" + description = "A brand new policy set" + organization = "my-org-name" + kind = "sentinel" + agent_enabled = "true" + policy_tool_version = "0.24.1" + policies_path = "policies/my-policy-set" + workspace_ids = [tfe_workspace.test.id] + + vcs_repo { + identifier = "my-org-name/my-policy-set-repository" + branch = "main" + ingress_submodules = false + oauth_token_id = tfe_oauth_client.test.oauth_token_id } } ``` Using manually-specified policies: -```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { Token, TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { PolicySet } from "./.gen/providers/tfe/policy-set"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { - super(scope, name); - new PolicySet(this, "test", { - agentEnabled: Token.asBoolean("true"), - description: "A brand new policy set", - kind: "sentinel", - name: "my-policy-set", - organization: "my-org-name", - policyIds: [Token.asString(tfeSentinelPolicyTest.id)], - policyToolVersion: "0.24.1", - workspaceIds: [Token.asString(tfeWorkspaceTest.id)], - }); - } +```hcl +resource "tfe_policy_set" "test" { + name = "my-policy-set" + description = "A brand new policy set" + organization = "my-org-name" + kind = "sentinel" + agent_enabled = "true" + policy_tool_version = "0.24.1" + policy_ids = [tfe_sentinel_policy.test.id] + workspace_ids = [tfe_workspace.test.id] } ``` @@ -128,10 +103,10 @@ The following arguments are supported: new resource if changed. This value _must not_ be provided if `policyIds` are provided. * `workspaceIds` - (Optional) A list of workspace IDs. This value _must not_ be provided if `global` is provided. -* `slug` - (Optional) A reference to the `tfe_slug` data source that contains +* `slug` - (Optional) A reference to the `tfeSlug` data source that contains the `sourcePath` to where the local policies are located. This is used when policies are located locally, and can only be used when there is no VCS repo or -explicit Policy IDs. This _requires_ the usage of the `tfe_slug` data source. +explicit Policy IDs. This _requires_ the usage of the `tfeSlug` data source. -> **Note:** When neither `vcsRepo` or `policyIds` is not specified, the current default is to create an empty non-VCS policy set. @@ -160,4 +135,4 @@ Policy sets can be imported; use `` as the import ID. For example terraform import tfe_policy_set.test polset-wAs3zYmWAhYK7peR ``` - + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/project.html.markdown b/website/docs/cdktf/typescript/r/project.html.markdown index 3ec3cb87d..d2b610ebb 100644 --- a/website/docs/cdktf/typescript/r/project.html.markdown +++ b/website/docs/cdktf/typescript/r/project.html.markdown @@ -47,6 +47,7 @@ The following arguments are supported: * `name` - (Required) Name of the project. * `organization` - (Optional) Name of the organization. If omitted, organization must be defined in the provider config. +* `description` - (Optional) A description for the project. ## Attributes Reference @@ -62,4 +63,4 @@ Projects can be imported; use `` as the import ID. For example: terraform import tfe_project.test prj-niVoeESBXT8ZREhr ``` - + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/project_oauth_client.html.markdown b/website/docs/cdktf/typescript/r/project_oauth_client.html.markdown new file mode 100644 index 000000000..6bdf50804 --- /dev/null +++ b/website/docs/cdktf/typescript/r/project_oauth_client.html.markdown @@ -0,0 +1,81 @@ +--- +layout: "tfe" +page_title: "Terraform Enterprise: tfe_project_oauth_client" +description: |- + Add an oauth client to a project +--- + + + +# tfe_project_oauth_client + +Adds and removes oauth clients from a project + +## Example Usage + +Basic usage: + +```typescript +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { + super(scope, name); + const tfeOrganizationTest = new tfe.organization.Organization( + this, + "test", + { + email: "admin@company.com", + name: "my-org-name", + } + ); + const tfeProjectTest = new tfe.project.Project(this, "test_1", { + name: "my-project-name", + organization: cdktf.Token.asString(tfeOrganizationTest.name), + }); + /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ + tfeProjectTest.overrideLogicalId("test"); + const tfeOauthClientTest = new tfe.oauthClient.OauthClient(this, "test_2", { + apiUrl: "https://api.github.com", + httpUrl: "https://github.com", + oauthToken: "oauth_token_id", + organization: tfeOrganizationTest, + serviceProvider: "github", + }); + /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ + tfeOauthClientTest.overrideLogicalId("test"); + const tfeProjectOauthClientTest = + new tfe.projectOauthClient.ProjectOauthClient(this, "test_3", { + oauthClientId: cdktf.Token.asString(tfeOauthClientTest.id), + projectId: cdktf.Token.asString(tfeProjectTest.id), + }); + /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ + tfeProjectOauthClientTest.overrideLogicalId("test"); + } +} + +``` + +## Argument Reference + +The following arguments are supported: + +* `oauthClientId` - (Required) ID of the oauth client. +* `projectId` - (Required) Project ID to add the oauth client to. + +## Attributes Reference + +* `id` - The ID of the oauth client attachment. ID format: `_` + +## Import + +Project OAuth Clients can be imported; use `//`. For example: + +```shell +terraform import tfe_project_oauth_client.test 'my-org-name/project/oauth-client-name' +``` + + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/registry_gpg_key.html.markdown b/website/docs/cdktf/typescript/r/registry_gpg_key.html.markdown index 3d4c9f943..851e98f10 100644 --- a/website/docs/cdktf/typescript/r/registry_gpg_key.html.markdown +++ b/website/docs/cdktf/typescript/r/registry_gpg_key.html.markdown @@ -16,25 +16,11 @@ The provided GPG key must be ASCII-armored, i.e. starting with: ## Example Usage -```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { Fn, Token, TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { RegistryGpgKey } from "./.gen/providers/tfe/registry-gpg-key"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { - super(scope, name); - new RegistryGpgKey(this, "example", { - asciiArmor: Token.asString(Fn.file("my-public-key.asc")), - organization: "my-org-name", - }); - } +```hcl +resource "tfe_registry_gpg_key" "example" { + organization = "my-org-name" + ascii_armor = file("my-public-key.asc") } - ``` ## Argument Reference @@ -59,4 +45,4 @@ example: terraform import tfe_registry_gpg_key.example my-org-name/34365D9472D7468F ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/registry_module.html.markdown b/website/docs/cdktf/typescript/r/registry_module.html.markdown index 67258cdb8..5bb26c416 100644 --- a/website/docs/cdktf/typescript/r/registry_module.html.markdown +++ b/website/docs/cdktf/typescript/r/registry_module.html.markdown @@ -62,31 +62,36 @@ class MyConvertedCode extends cdktf.TerraformStack { Create private registry module with tests enabled: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { OauthClient } from "./.gen/providers/tfe/oauth-client"; -import { Organization } from "./.gen/providers/tfe/organization"; -import { RegistryModule } from "./.gen/providers/tfe/registry-module"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - const testOrganization = new Organization(this, "test-organization", { - email: "admin@company.com", - name: "my-org-name", - }); - const testOauthClient = new OauthClient(this, "test-oauth-client", { - apiUrl: "https://api.github.com", - httpUrl: "https://github.com", - oauthToken: "my-vcs-provider-token", - organization: testOrganization.name, - serviceProvider: "github", - }); - new RegistryModule(this, "test-registry-module", { + const tfeOrganizationTestOrganization = new tfe.organization.Organization( + this, + "test-organization", + { + email: "admin@company.com", + name: "my-org-name", + } + ); + const tfeOauthClientTestOauthClient = new tfe.oauthClient.OauthClient( + this, + "test-oauth-client", + { + apiUrl: "https://api.github.com", + httpUrl: "https://github.com", + oauthToken: "my-vcs-provider-token", + organization: cdktf.Token.asString( + tfeOrganizationTestOrganization.name + ), + serviceProvider: "github", + } + ); + new tfe.registryModule.RegistryModule(this, "test-registry-module", { testConfig: [ { testsEnabled: true, @@ -96,7 +101,9 @@ class MyConvertedCode extends TerraformStack { branch: "main", displayIdentifier: "my-org-name/terraform-provider-name", identifier: "my-org-name/terraform-provider-name", - oauthTokenId: testOauthClient.oauthTokenId, + oauthTokenId: cdktf.Token.asString( + tfeOauthClientTestOauthClient.oauthTokenId + ), }, }); } @@ -268,6 +275,7 @@ The following arguments are supported: * `organization` - (Optional) The name of the organization associated with the registry module. It must be set if `moduleProvider` is used, or if `vcsRepo` is used via a GitHub App. * `namespace` - (Optional) The namespace of a public registry module. It can be used if `moduleProvider` is set and `registryName` is public. * `registryName` - (Optional) Whether the registry module is private or public. It can be used if `moduleProvider` is set. +* `initialVersion` - (Optional) This specifies the initial version for a branch based module. It can be used if `vcsRepoBranch` is set. If it is omitted, the initial modules version will default to `000`. The `testConfig` block supports * `testsEnabled` - (Optional) Specifies whether tests run for the registry module. Tests are only supported for branch-based publishing. @@ -311,4 +319,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 ``` - + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/registry_provider.html.markdown b/website/docs/cdktf/typescript/r/registry_provider.html.markdown index 324adacab..3094a32f4 100644 --- a/website/docs/cdktf/typescript/r/registry_provider.html.markdown +++ b/website/docs/cdktf/typescript/r/registry_provider.html.markdown @@ -16,26 +16,27 @@ Manages public and private providers in the private registry. Create private provider: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { Organization } from "./.gen/providers/tfe/organization"; -import { RegistryProvider } from "./.gen/providers/tfe/registry-provider"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - const example = new Organization(this, "example", { - email: "admin@company.com", - name: "my-org-name", - }); - const tfeRegistryProviderExample = new RegistryProvider(this, "example_1", { - name: "my-provider", - organization: example.name, - }); + const tfeOrganizationExample = new tfe.organization.Organization( + this, + "example", + { + email: "admin@company.com", + name: "my-org-name", + } + ); + const tfeRegistryProviderExample = + new tfe.registryProvider.RegistryProvider(this, "example_1", { + name: "my-provider", + organization: cdktf.Token.asString(tfeOrganizationExample.name), + }); /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ tfeRegistryProviderExample.overrideLogicalId("example"); } @@ -46,28 +47,29 @@ class MyConvertedCode extends TerraformStack { Create public provider: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { Organization } from "./.gen/providers/tfe/organization"; -import { RegistryProvider } from "./.gen/providers/tfe/registry-provider"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - const example = new Organization(this, "example", { - email: "admin@company.com", - name: "my-org-name", - }); - const tfeRegistryProviderExample = new RegistryProvider(this, "example_1", { - name: "aws", - namespace: "hashicorp", - organization: example.name, - registryName: "public", - }); + const tfeOrganizationExample = new tfe.organization.Organization( + this, + "example", + { + email: "admin@company.com", + name: "my-org-name", + } + ); + const tfeRegistryProviderExample = + new tfe.registryProvider.RegistryProvider(this, "example_1", { + name: "aws", + namespace: "hashicorp", + organization: cdktf.Token.asString(tfeOrganizationExample.name), + registryName: "public", + }); /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ tfeRegistryProviderExample.overrideLogicalId("example"); } @@ -106,4 +108,4 @@ Or a public provider: terraform import tfe_registry_provider.example my-org-name/public/hashicorp/aws ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/run_trigger.html.markdown b/website/docs/cdktf/typescript/r/run_trigger.html.markdown index 1c6bc9701..cf77d93e0 100644 --- a/website/docs/cdktf/typescript/r/run_trigger.html.markdown +++ b/website/docs/cdktf/typescript/r/run_trigger.html.markdown @@ -80,4 +80,4 @@ Run triggers can be imported; use `` as the import ID. For examp terraform import tfe_run_trigger.test rt-qV9JnKRkmtMa4zcA ``` - + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/sentinel_version.html.markdown b/website/docs/cdktf/typescript/r/sentinel_version.html.markdown index f439c7125..ebfaa56c0 100644 --- a/website/docs/cdktf/typescript/r/sentinel_version.html.markdown +++ b/website/docs/cdktf/typescript/r/sentinel_version.html.markdown @@ -16,18 +16,15 @@ Manage Sentinel versions available on HCP Terraform and Terraform Enterprise. Basic Usage: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { SentinelVersion } from "./.gen/providers/tfe/sentinel-version"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - new SentinelVersion(this, "test", { + new tfe.sentinelVersion.SentinelVersion(this, "test", { sha: "e75ac73deb69a6b3aa667cb0b8b731aee79e2904", url: "https://tfe-host.com/path/to/sentinel.zip", version: "0.24.0-custom", @@ -68,4 +65,4 @@ terraform import tfe_sentinel_version.test 0.24.0 -> **Note:** You can fetch a Sentinel version ID from the URL of an existing version in the HCP Terraform UI. The ID is in the format `tool-` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/team.html.markdown b/website/docs/cdktf/typescript/r/team.html.markdown index 2726bf8a9..78feb8f71 100644 --- a/website/docs/cdktf/typescript/r/team.html.markdown +++ b/website/docs/cdktf/typescript/r/team.html.markdown @@ -79,6 +79,9 @@ The `organizationAccess` block supports: * `manageRunTasks` - (Optional) Allow members to create, edit, and delete the organization's run tasks. * `manageProjects` - (Optional) Allow members to create and administrate all projects within the organization. Requires `manageWorkspaces` to be set to `true`. * `manageMembership` - (Optional) Allow members to add/remove users from the organization, and to add/remove users from visible teams. +* `manageTeams` - (Optional) Allow members to create, update, and delete teams. +* `manageOrganizationAccess` - (Optional) Allow members to update the organization access settings of teams. +* `accessSecretTeams` - (Optional) Allow members access to secret teams up to the level of permissions granted by their team permissions setting. ## Attributes Reference @@ -97,4 +100,4 @@ or terraform import tfe_team.test my-org-name/my-team-name ``` - + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/team_organization_member.html.markdown b/website/docs/cdktf/typescript/r/team_organization_member.html.markdown index c7e1877b3..5c5c81837 100644 --- a/website/docs/cdktf/typescript/r/team_organization_member.html.markdown +++ b/website/docs/cdktf/typescript/r/team_organization_member.html.markdown @@ -77,4 +77,4 @@ or terraform import tfe_team_organization_member.test my-org-name/user@company.com/my-team-name ``` ~> **NOTE:** The `//` import ID format cannot be used if there are `/` characters in the user's email. These users must be imported with the `/` format instead - + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/team_organization_members.html.markdown b/website/docs/cdktf/typescript/r/team_organization_members.html.markdown index 12151468f..37b905299 100644 --- a/website/docs/cdktf/typescript/r/team_organization_members.html.markdown +++ b/website/docs/cdktf/typescript/r/team_organization_members.html.markdown @@ -131,8 +131,4 @@ as the import ID. For example: terraform import tfe_team_organization_members.test team-47qC3LmA47piVan7 ``` -<<<<<<< HEAD - -======= - ->>>>>>> adf61bce (cdktf: update documentation) + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/team_project_access.html.markdown b/website/docs/cdktf/typescript/r/team_project_access.html.markdown index b221ebff0..85e1d7183 100644 --- a/website/docs/cdktf/typescript/r/team_project_access.html.markdown +++ b/website/docs/cdktf/typescript/r/team_project_access.html.markdown @@ -75,7 +75,7 @@ The following permissions apply to all workspaces (and future workspaces) in the |----------------------|-------------------------------------------------------| | `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`. | -| `stateVersions` | The permission to grant project's workspaces' state versions. Default: `none` Valid strings: `none`, `read-outputs`, `read`, or `write`.| +| `stateVersions` | The permission to grant project's workspaces' state versions. Default: `none` Valid strings: `none`, `readOutputs`, `read`, or `write`.| | `variables` | The permission to grant project's workspaces' variables. Default `none`. Valid strings: `none`, `read`, or `write`. | | `create` | The permission to create project's workspaces in the project. Default: `false`. Valid booleans `true`, `false` | | `locking` | The permission to manually lock or unlock the project's workspaces. Default `false`. Valid booleans `true`, `false` | @@ -86,50 +86,38 @@ The following permissions apply to all workspaces (and future workspaces) in the ## Example Usage with Custom Project Permissions -```typescript -import * as constructs from "constructs"; -import * as cdktf from "cdktf"; -/*Provider bindings are generated by running cdktf get. -See https://cdk.tf/provider-generation for more details.*/ -import * as tfe from "./.gen/providers/tfe"; -class MyConvertedCode extends cdktf.TerraformStack { - constructor(scope: constructs.Construct, name: string) { - super(scope, name); - const tfeProjectTest = new tfe.project.Project(this, "test", { - name: "myproject", - organization: "my-org-name", - }); - const tfeTeamDev = new tfe.team.Team(this, "dev", { - name: "my-dev-team", - organization: "my-org-name", - }); - new tfe.teamProjectAccess.TeamProjectAccess(this, "custom", { - access: "custom", - projectAccess: [ - { - settings: "read", - teams: "none", - }, - ], - projectId: cdktf.Token.asString(tfeProjectTest.id), - teamId: cdktf.Token.asString(tfeTeamDev.id), - workspaceAccess: [ - { - create: true, - delete: false, - locking: true, - move: false, - runTasks: false, - runs: "apply", - sentinelMocks: "none", - stateVersions: "write", - variables: "write", - }, - ], - }); - } +```hcl +resource "tfe_team" "dev" { + name = "my-dev-team" + organization = "my-org-name" } +resource "tfe_project" "test" { + name = "myproject" + organization = "my-org-name" +} + +resource "tfe_team_project_access" "custom" { + access = "custom" + team_id = tfe_team.dev.id + project_id = tfe_project.test.id + + project_access { + settings = "read" + teams = "none" + } + workspace_access { + state_versions = "write" + sentinel_mocks = "none" + runs = "apply" + variables = "write" + create = true + locking = true + move = false + delete = false + run_tasks = false + } +} ``` ## Attributes Reference @@ -145,4 +133,4 @@ example: terraform import tfe_team_project_access.admin tprj-2pmtXpZa4YzVMTPi ``` - + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/terraform_version.html.markdown b/website/docs/cdktf/typescript/r/terraform_version.html.markdown index 7ac1306ee..ae044a10a 100644 --- a/website/docs/cdktf/typescript/r/terraform_version.html.markdown +++ b/website/docs/cdktf/typescript/r/terraform_version.html.markdown @@ -65,4 +65,4 @@ terraform import tfe_terraform_version.test 1.1.2 -> **Note:** You can fetch a Terraform version ID from the URL of an existing version in the HCP Terraform UI. The ID is in the format `tool-` - + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/tfe_test_variable.html.markdown b/website/docs/cdktf/typescript/r/tfe_test_variable.html.markdown new file mode 100644 index 000000000..0ea52ed7c --- /dev/null +++ b/website/docs/cdktf/typescript/r/tfe_test_variable.html.markdown @@ -0,0 +1,55 @@ +--- +layout: "tfe" +page_title: "Terraform Enterprise: tfe_test_variable" +description: |- + Manages environmet variables used for testing by modules in the Private Module Registry. +--- + + + +# tfe_test_variable + +Creates, updates and destroys environment variables used for testing in the Private Module Registry. + +## Example Usage + +```hcl +resource "tfe_organization" "test_org" { + name = "my-org-name" + email = "admin@company.com" +} + +resource "tfe_oauth_client" "test_client" { + organization = tfe_organization.test.name + api_url = "https://api.github.com" + http_url = "https://github.com" + oauth_token = "my-token-123" + service_provider = "github" +} + +resource "tfe_registry_module" "test_module" { + organization = "test-module" + vcs_repo { + display_identifier = "GH_NAME/REPO_NAME" + identifier = "GH_NAME/REPO_NAME" + oauth_token_id = tfe_oauth_client.test.oauth_token_id + branch = "main" + tags = false +} + test_config { + tests_enabled = true + } +} + +resource "tfe_test_variable" "tf_test_test_variable" { + key = "key_test" + value = "value_test" + description = "some description" + category = "env" + organization = tfe_organization.test.name + module_name = tfe_registry_module.test.name + module_provider = tfe_registry_module.test.module_provider +} +``` + + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/variable.html.markdown b/website/docs/cdktf/typescript/r/variable.html.markdown index 7a2783483..65115c35e 100644 --- a/website/docs/cdktf/typescript/r/variable.html.markdown +++ b/website/docs/cdktf/typescript/r/variable.html.markdown @@ -185,4 +185,4 @@ example: terraform import tfe_variable.test my-org-name/varset-47qC3LmA47piVan7/var-5rTwnSaRPogw6apb ``` - + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/workspace.html.markdown b/website/docs/cdktf/typescript/r/workspace.html.markdown index dd11c8fb7..a1b073f5c 100644 --- a/website/docs/cdktf/typescript/r/workspace.html.markdown +++ b/website/docs/cdktf/typescript/r/workspace.html.markdown @@ -65,21 +65,22 @@ class MyConvertedCode extends cdktf.TerraformStack { name: "my-org-name", } ); - const tfeAgentPoolTestAgentPool = new tfe.agentPool.AgentPool( - this, - "test-agent-pool", - { - name: "my-agent-pool-name", - organization: cdktf.Token.asString( - tfeOrganizationTestOrganization.name - ), - } - ); - new tfe.workspace.Workspace(this, "test", { - agentPoolId: cdktf.Token.asString(tfeAgentPoolTestAgentPool.id), - executionMode: "agent", - name: "my-workspace-name", - organization: cdktf.Token.asString(tfeOrganizationTestOrganization.name), + const tfeOauthClientTest = new tfe.oauthClient.OauthClient(this, "test", { + apiUrl: "https://api.github.com", + httpUrl: "https://github.com", + oauthToken: "oauth_token_id", + organization: tfeOrganizationTestOrganization, + serviceProvider: "github", + }); + new tfe.workspace.Workspace(this, "parent", { + name: "parent-ws", + organization: tfeOrganizationTestOrganization, + queueAllRuns: false, + vcsRepo: { + branch: "main", + identifier: "my-org-name/vcs-repository", + oauthTokenId: cdktf.Token.asString(tfeOauthClientTest.oauthTokenId), + }, }); } } @@ -96,6 +97,10 @@ The following arguments are supported: * `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`. * `autoApplyRunTrigger` - (Optional) Whether to automatically apply changes for runs that were created by run triggers from another workspace. Defaults to `false`. +* `autoDestroyAt` - (Optional) A future date/time string at which point all resources in a workspace will be scheduled for deletion. Must be a string in RFC3339 format (e.g. "2100-01-01T00:00:00Z"). + +~> **NOTE:** `autoDestroyAt` is not intended for workspaces containing production resources or long-lived workspaces. Since this attribute is in-part managed by HCP Terraform, using `ignoreChanges` for this attribute may be preferred. + * `description` - (Optional) A description for the workspace. * `executionMode` - (Optional) **Deprecated** Which [execution mode](https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings#execution-mode) to use. Use [tfe_workspace_settings](workspace_settings) instead. * `fileTriggersEnabled` - (Optional) Whether to filter runs based on the changed files @@ -152,7 +157,7 @@ will be used. (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 HCP Terraform monitors for changes. Trigger patterns are always appended to the root directory of the repository. Mutually exclusive with `trigger-prefixes`. +* `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 HCP Terraform 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. * `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). @@ -171,7 +176,7 @@ The `vcsRepo` block supports: * `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 `tfe_oauth_client` resource. This conflicts with `githubAppInstallationId` and can only be used if `githubAppInstallationId` is not used. + This ID can be obtained from a `tfeOauthClient` resource. This conflicts with `githubAppInstallationId` and can only be used if `githubAppInstallationId` 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 @@ -195,4 +200,4 @@ terraform import tfe_workspace.test ws-CH5in3chf8RJjrVd terraform import tfe_workspace.test my-org-name/my-wkspace-name ``` - + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/workspace_run.html.markdown b/website/docs/cdktf/typescript/r/workspace_run.html.markdown index 5d7f547bb..61a417d34 100644 --- a/website/docs/cdktf/typescript/r/workspace_run.html.markdown +++ b/website/docs/cdktf/typescript/r/workspace_run.html.markdown @@ -14,10 +14,10 @@ Provides a resource to manage the _initial_ and/or _final_ Terraform run in a gi 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 `tfe_workspace` 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 `tfe_variable` resources themselves depend on the `tfe_workspace`. By managing an initial `apply` with `wait_for_run = false` that depends on your `tfe_variables`, 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 `tfe_workspace` resource's default safe deletion behavior. +- **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. -The `tfe_workspace_run` 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 `tfe_workspace_run` resource that includes an `apply` block will queue a new apply when added to a config. +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. ## Example Usage @@ -223,16 +223,16 @@ Both `apply` and `destroy` block supports: * `manualConfirm` - (Required) If set to true a human will have to manually confirm a plan in HCP Terraform's UI to start an apply. If set to false, this resource will be automatically applied. Defaults to `false`. * If `waitForRun` is set to `false`, this auto-apply will be done by HCP Terraform. * If `waitForRun` is set to `true`, the apply will be confirmed by the provider. The exception is the case of policy check soft-failed where a human has to perform an override by manually confirming the plan even though `manualConfirm` is set to false. - * Note that this setting will override the workspace's default apply mode. To use the workspace default apply mode, look up the setting for `autoApply` with the `tfe_workspace` data source. + * Note that this setting will override the workspace's default apply mode. To use the workspace default apply mode, look up the setting for `autoApply` with the `tfeWorkspace` data source. * `retry` - (Optional) Whether or not to retry on plan or apply errors. When set to true, `retryAttempts` must also be greater than zero inorder for retries to happen. Defaults to `true`. * `retryAttempts` - (Optional) The number to retry attempts made after an initial error. Defaults to `3`. * `retryBackoffMin` - (Optional) The minimum time in seconds to backoff before attempting a retry. Defaults to `1`. * `retryBackoffMax` - (Optional) The maximum time in seconds to backoff before attempting a retry. Defaults to `30`. -* `waitForRun` - (Optional) Whether or not to wait for a run to reach completion before considering this a success. When set to `false`, the provider considers the `tfe_workspace_run` resource to have been created immediately after the run has been queued. When set to `true`, the provider waits for a successful apply on the target workspace to have applied successfully (or if it resulted in a no-change plan). Defaults to `true`. +* `waitForRun` - (Optional) Whether or not to wait for a run to reach completion before considering this a success. When set to `false`, the provider considers the `tfeWorkspaceRun` resource to have been created immediately after the run has been queued. When set to `true`, the provider waits for a successful apply on the target workspace to have applied successfully (or if it resulted in a no-change plan). Defaults to `true`. ## Attributes Reference 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. - + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/workspace_run_task.html.markdown b/website/docs/cdktf/typescript/r/workspace_run_task.html.markdown index 459eaab6e..3ec9bba3e 100644 --- a/website/docs/cdktf/typescript/r/workspace_run_task.html.markdown +++ b/website/docs/cdktf/typescript/r/workspace_run_task.html.markdown @@ -32,7 +32,7 @@ The following arguments are supported: * `enforcementLevel` - (Required) The enforcement level of the task. Valid values are `advisory` and `mandatory`. * `taskId` - (Required) The id of the Run task to associate to the Workspace. * `workspaceId` - (Required) The id of the workspace to associate the Run task to. -* `stage` - (Optional) The stage to run the task in. Valid values are `pre_plan`, `post_plan`, and `pre_apply`. +* `stage` - (Optional) The stage to run the task in. Valid values are `prePlan`, `postPlan`, and `preApply`. ## Attributes Reference @@ -47,4 +47,4 @@ import ID. For example: terraform import tfe_workspace_run_task.test my-org-name/workspace/task-name ``` - + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/workspace_settings.markdown b/website/docs/cdktf/typescript/r/workspace_settings.markdown index 5ce4c9141..1551ccdf1 100644 --- a/website/docs/cdktf/typescript/r/workspace_settings.markdown +++ b/website/docs/cdktf/typescript/r/workspace_settings.markdown @@ -16,30 +16,29 @@ Manages or reads execution mode and agent pool settings for a workspace. This al Basic usage: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { Organization } from "./.gen/providers/tfe/organization"; -import { Workspace } from "./.gen/providers/tfe/workspace"; -import { WorkspaceSettings } from "./.gen/providers/tfe/workspace-settings"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - const testOrganization = new Organization(this, "test-organization", { - email: "admin@company.com", - name: "my-org-name", - }); - const test = new Workspace(this, "test", { + const tfeOrganizationTestOrganization = new tfe.organization.Organization( + this, + "test-organization", + { + email: "admin@company.com", + name: "my-org-name", + } + ); + const tfeWorkspaceTest = new tfe.workspace.Workspace(this, "test", { name: "my-workspace-name", - organization: testOrganization.name, + organization: cdktf.Token.asString(tfeOrganizationTestOrganization.name), }); - new WorkspaceSettings(this, "test-settings", { + new tfe.workspaceSettings.WorkspaceSettings(this, "test-settings", { executionMode: "local", - workspaceId: test.id, + workspaceId: cdktf.Token.asString(tfeWorkspaceTest.id), }); } } @@ -49,49 +48,53 @@ class MyConvertedCode extends TerraformStack { With `executionMode` of `agent`: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { Token, TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { AgentPool } from "./.gen/providers/tfe/agent-pool"; -import { AgentPoolAllowedWorkspaces } from "./.gen/providers/tfe/agent-pool-allowed-workspaces"; -import { Organization } from "./.gen/providers/tfe/organization"; -import { Workspace } from "./.gen/providers/tfe/workspace"; -import { WorkspaceSettings } from "./.gen/providers/tfe/workspace-settings"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - const testOrganization = new Organization(this, "test-organization", { - email: "admin@company.com", - name: "my-org-name", - }); - const test = new Workspace(this, "test", { + const tfeOrganizationTestOrganization = new tfe.organization.Organization( + this, + "test-organization", + { + email: "admin@company.com", + name: "my-org-name", + } + ); + const tfeWorkspaceTest = new tfe.workspace.Workspace(this, "test", { name: "my-workspace-name", - organization: testOrganization.name, - }); - const testAgentPool = new AgentPool(this, "test-agent-pool", { - name: "my-agent-pool-name", - organization: testOrganization.name, + organization: cdktf.Token.asString(tfeOrganizationTestOrganization.name), }); - const tfeAgentPoolAllowedWorkspacesTest = new AgentPoolAllowedWorkspaces( + const tfeAgentPoolTestAgentPool = new tfe.agentPool.AgentPool( this, - "test_3", + "test-agent-pool", { - agentPoolId: testAgentPool.id, - allowedWorkspaceIds: [test.id], + name: "my-agent-pool-name", + organization: cdktf.Token.asString( + tfeOrganizationTestOrganization.name + ), } ); + const tfeAgentPoolAllowedWorkspacesTest = + new tfe.agentPoolAllowedWorkspaces.AgentPoolAllowedWorkspaces( + this, + "test_3", + { + agentPoolId: cdktf.Token.asString(tfeAgentPoolTestAgentPool.id), + allowedWorkspaceIds: [cdktf.Token.asString(tfeWorkspaceTest.id)], + } + ); /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ tfeAgentPoolAllowedWorkspacesTest.overrideLogicalId("test"); - new WorkspaceSettings(this, "test-settings", { - agentPoolId: Token.asString( + new tfe.workspaceSettings.WorkspaceSettings(this, "test-settings", { + agentPoolId: cdktf.Token.asString( tfeAgentPoolAllowedWorkspacesTest.agentPoolId ), executionMode: "agent", - workspaceId: test.id, + workspaceId: cdktf.Token.asString(tfeWorkspaceTest.id), }); } } @@ -101,32 +104,33 @@ class MyConvertedCode extends TerraformStack { This resource may be used as a data source when no optional arguments are defined: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { Token, TerraformOutput, Op, Fn, TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { DataTfeWorkspace } from "./.gen/providers/tfe/data-tfe-workspace"; -import { WorkspaceSettings } from "./.gen/providers/tfe/workspace-settings"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - const test = new DataTfeWorkspace(this, "test", { - name: "my-workspace-name", - organization: "my-org-name", - }); - const tfeWorkspaceSettingsTest = new WorkspaceSettings(this, "test_1", { - workspaceId: Token.asString(test.id), - }); + const dataTfeWorkspaceTest = new tfe.dataTfeWorkspace.DataTfeWorkspace( + this, + "test", + { + name: "my-workspace-name", + organization: "my-org-name", + } + ); + const tfeWorkspaceSettingsTest = + new tfe.workspaceSettings.WorkspaceSettings(this, "test_1", { + workspaceId: cdktf.Token.asString(dataTfeWorkspaceTest.id), + }); /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ tfeWorkspaceSettingsTest.overrideLogicalId("test"); - new TerraformOutput(this, "workspace-explicit-local-execution", { - value: Fn.alltrue( - Token.asAny([ - Op.eq(tfeWorkspaceSettingsTest.executionMode, "local"), - Fn.lookupNested(tfeWorkspaceSettingsTest.overwrites, [ + new cdktf.TerraformOutput(this, "workspace-explicit-local-execution", { + value: cdktf.Fn.alltrue( + cdktf.Token.asAny([ + cdktf.Op.eq(tfeWorkspaceSettingsTest.executionMode, "local"), + cdktf.propertyAccess(tfeWorkspaceSettingsTest.overwrites, [ "0", '"execution_mode"', ]), @@ -146,7 +150,7 @@ The following arguments are supported: * `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. * `executionMode` - (Optional) Which [execution mode](https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings#execution-mode) - to use. Using HCP Terraform, valid values are `remote`, `local` or `agent`. Using Terraform Enterprise, only `remote` and `local` execution modes are valid. When set to `local`, the workspace will be used for state storage only. **Important:** If you omit this attribute, the resource configures the workspace to use your organization's default execution mode (which in turn defaults to `remote`), removing any explicit value that might have previously been set for the workspace. + to use. Using HCP Terraform, valid values are `remote`, `local` or `agent`. When set to `local`, the workspace will be used for state storage only. **Important:** If you omit this attribute, the resource configures the workspace to use your organization's default execution mode (which in turn defaults to `remote`), removing any explicit value that might have previously been set for the workspace. ## Attributes Reference @@ -155,7 +159,7 @@ In addition to all arguments above, the following attributes are exported: * `id` - The workspace ID. * `overwrites` - Can be used to check whether a setting is currently inheriting its value from another resource. - `executionMode` - Set to `true` if the execution mode of the workspace is being determined by the setting on the workspace itself. It will be `false` if the execution mode is inherited from another resource (e.g. the organization's default execution mode) - - `agent_pool` - Set to `true` if the agent pool of the workspace is being determined by the setting on the workspace itself. It will be `false` if the agent pool is inherited from another resource (e.g. the organization's default agent pool) + - `agentPool` - Set to `true` if the agent pool of the workspace is being determined by the setting on the workspace itself. It will be `false` if the agent pool is inherited from another resource (e.g. the organization's default agent pool) ## Import @@ -170,4 +174,4 @@ terraform import tfe_workspace_settings.test ws-CH5in3chf8RJjrVd terraform import tfe_workspace_settings.test my-org-name/my-wkspace-name ``` - \ No newline at end of file + \ No newline at end of file