From fbc42ad7b86bc851a1786a542397e9a832b2bca1 Mon Sep 17 00:00:00 2001 From: Brandon Croft Date: Thu, 9 Nov 2023 20:29:00 +0000 Subject: [PATCH] cdktf: update documentation --- .../cdktf/csharp/d/variable_set.html.markdown | 5 +- .../cdktf/csharp/d/workspace.html.markdown | 3 +- website/docs/cdktf/csharp/index.html.markdown | 8 +- .../cdktf/csharp/r/agent_pool.html.markdown | 4 +- ...gent_pool_allowed_workspaces.html.markdown | 52 ++-- .../cdktf/csharp/r/variable_set.html.markdown | 49 +++- .../cdktf/csharp/r/workspace.html.markdown | 3 +- .../cdktf/go/d/variable_set.html.markdown | 5 +- .../docs/cdktf/go/d/workspace.html.markdown | 3 +- website/docs/cdktf/go/index.html.markdown | 8 +- .../docs/cdktf/go/r/agent_pool.html.markdown | 4 +- ...gent_pool_allowed_workspaces.html.markdown | 56 ++-- .../cdktf/go/r/variable_set.html.markdown | 78 +++++- .../docs/cdktf/go/r/workspace.html.markdown | 3 +- .../cdktf/java/d/variable_set.html.markdown | 5 +- .../docs/cdktf/java/d/workspace.html.markdown | 3 +- website/docs/cdktf/java/index.html.markdown | 8 +- .../cdktf/java/r/agent_pool.html.markdown | 4 +- ...gent_pool_allowed_workspaces.html.markdown | 54 ++-- .../cdktf/java/r/variable_set.html.markdown | 50 +++- .../docs/cdktf/java/r/workspace.html.markdown | 3 +- .../cdktf/python/d/agent_pool.html.markdown | 17 +- .../d/github_installation.html.markdown | 32 +-- .../cdktf/python/d/ip_ranges.html.markdown | 21 +- .../cdktf/python/d/oauth_client.html.markdown | 47 ++-- .../cdktf/python/d/organization.html.markdown | 17 +- .../d/organization_members.html.markdown | 22 +- .../d/organization_membership.html.markdown | 47 ++-- .../d/organization_run_task.html.markdown | 17 +- .../python/d/organization_tags.html.markdown | 17 +- .../python/d/organizations.html.markdown | 17 +- .../docs/cdktf/python/d/outputs.html.markdown | 23 +- .../cdktf/python/d/policy_set.html.markdown | 17 +- .../docs/cdktf/python/d/project.html.markdown | 17 +- .../python/d/saml_settings.html.markdown | 42 ++- .../docs/cdktf/python/d/slug.html.markdown | 22 +- .../docs/cdktf/python/d/ssh_key.html.markdown | 17 +- .../docs/cdktf/python/d/team.html.markdown | 17 +- .../cdktf/python/d/team_access.html.markdown | 17 +- .../d/team_project_access.html.markdown | 17 +- .../docs/cdktf/python/d/teams.html.markdown | 17 +- .../cdktf/python/d/variable_set.html.markdown | 20 +- .../cdktf/python/d/variables.html.markdown | 43 ++-- .../cdktf/python/d/workspace.html.markdown | 18 +- .../python/d/workspace_ids.html.markdown | 23 +- .../python/d/workspace_run_task.html.markdown | 17 +- website/docs/cdktf/python/index.html.markdown | 51 ++-- .../r/admin_organization_settings.markdown | 74 +++--- .../cdktf/python/r/agent_pool.html.markdown | 24 +- ...gent_pool_allowed_workspaces.html.markdown | 38 ++- .../cdktf/python/r/agent_token.html.markdown | 27 +- .../python/r/no_code_module.html.markdown | 56 ++-- .../notification_configuration.html.markdown | 96 ++++--- .../cdktf/python/r/oauth_client.html.markdown | 47 ++-- .../cdktf/python/r/organization.html.markdown | 17 +- .../r/organization_membership.html.markdown | 17 +- .../organization_module_sharing.html.markdown | 17 +- .../r/organization_run_task.html.markdown | 17 +- .../python/r/organization_token.html.markdown | 48 ++-- .../docs/cdktf/python/r/policy.html.markdown | 32 +-- .../cdktf/python/r/policy_set.html.markdown | 113 +++----- .../r/policy_set_parameter.html.markdown | 28 +- .../docs/cdktf/python/r/project.html.markdown | 22 +- .../python/r/project_policy_set.html.markdown | 34 +-- .../r/project_variable_set.html.markdown | 35 ++- .../python/r/registry_module.html.markdown | 121 ++++----- .../cdktf/python/r/run_trigger.html.markdown | 33 +-- .../python/r/saml_settings.html.markdown | 35 +-- .../python/r/sentinel_policy.html.markdown | 17 +- .../docs/cdktf/python/r/ssh_key.html.markdown | 17 +- .../docs/cdktf/python/r/team.html.markdown | 32 +-- .../cdktf/python/r/team_access.html.markdown | 27 +- .../cdktf/python/r/team_member.html.markdown | 22 +- .../cdktf/python/r/team_members.html.markdown | 46 ++-- .../r/team_organization_member.html.markdown | 29 +-- .../r/team_organization_members.html.markdown | 72 +++--- .../r/team_project_access.html.markdown | 53 ++-- .../cdktf/python/r/team_token.html.markdown | 48 ++-- .../python/r/terraform_version.html.markdown | 17 +- .../cdktf/python/r/variable.html.markdown | 118 ++++----- .../cdktf/python/r/variable_set.html.markdown | 128 +++++---- .../cdktf/python/r/workspace.html.markdown | 50 ++-- .../r/workspace_policy_set.html.markdown | 35 ++- ...rkspace_policy_set_exclusion.html.markdown | 35 ++- .../python/r/workspace_run.html.markdown | 110 ++++---- .../python/r/workspace_run_task.html.markdown | 25 +- .../r/workspace_variable_set.html.markdown | 35 ++- .../typescript/d/agent_pool.html.markdown | 21 +- .../d/github_installation.html.markdown | 56 ++-- .../typescript/d/ip_ranges.html.markdown | 29 ++- .../typescript/d/oauth_client.html.markdown | 59 ++--- .../typescript/d/organization.html.markdown | 21 +- .../d/organization_members.html.markdown | 26 +- .../d/organization_membership.html.markdown | 89 +++---- .../d/organization_run_task.html.markdown | 31 +-- .../d/organization_tags.html.markdown | 21 +- .../typescript/d/organizations.html.markdown | 21 +- .../cdktf/typescript/d/outputs.html.markdown | 37 +-- .../typescript/d/policy_set.html.markdown | 21 +- .../cdktf/typescript/d/project.html.markdown | 21 +- .../typescript/d/saml_settings.html.markdown | 41 +-- .../cdktf/typescript/d/slug.html.markdown | 26 +- .../cdktf/typescript/d/ssh_key.html.markdown | 21 +- .../cdktf/typescript/d/team.html.markdown | 21 +- .../typescript/d/team_access.html.markdown | 21 +- .../d/team_project_access.html.markdown | 21 +- .../cdktf/typescript/d/teams.html.markdown | 21 +- .../typescript/d/variable_set.html.markdown | 24 +- .../typescript/d/variables.html.markdown | 79 +++--- .../typescript/d/workspace.html.markdown | 22 +- .../typescript/d/workspace_ids.html.markdown | 27 +- .../d/workspace_run_task.html.markdown | 21 +- .../docs/cdktf/typescript/index.html.markdown | 55 ++-- .../r/admin_organization_settings.markdown | 73 +++--- .../typescript/r/agent_pool.html.markdown | 38 +-- ...gent_pool_allowed_workspaces.html.markdown | 78 +++--- .../typescript/r/agent_token.html.markdown | 49 ++-- .../typescript/r/no_code_module.html.markdown | 140 +++++----- .../notification_configuration.html.markdown | 208 ++++++++------- .../typescript/r/oauth_client.html.markdown | 59 ++--- .../typescript/r/organization.html.markdown | 21 +- .../r/organization_membership.html.markdown | 21 +- .../organization_module_sharing.html.markdown | 21 +- .../r/organization_run_task.html.markdown | 21 +- .../r/organization_token.html.markdown | 51 ++-- .../cdktf/typescript/r/policy.html.markdown | 40 ++- .../typescript/r/policy_set.html.markdown | 112 +++----- .../r/policy_set_parameter.html.markdown | 48 ++-- .../cdktf/typescript/r/project.html.markdown | 36 +-- .../r/project_policy_set.html.markdown | 54 ++-- .../r/project_variable_set.html.markdown | 51 ++-- .../r/registry_module.html.markdown | 243 ++++++++++-------- .../typescript/r/run_trigger.html.markdown | 63 +++-- .../typescript/r/saml_settings.html.markdown | 34 +-- .../r/sentinel_policy.html.markdown | 21 +- .../cdktf/typescript/r/ssh_key.html.markdown | 21 +- .../cdktf/typescript/r/team.html.markdown | 40 ++- .../typescript/r/team_access.html.markdown | 31 +-- .../typescript/r/team_member.html.markdown | 26 +- .../typescript/r/team_members.html.markdown | 54 ++-- .../r/team_organization_member.html.markdown | 47 ++-- .../r/team_organization_members.html.markdown | 115 ++++----- .../r/team_project_access.html.markdown | 65 ++--- .../typescript/r/team_token.html.markdown | 56 ++-- .../r/terraform_version.html.markdown | 21 +- .../cdktf/typescript/r/variable.html.markdown | 145 +++++------ .../typescript/r/variable_set.html.markdown | 171 +++++++----- .../typescript/r/workspace.html.markdown | 88 ++++--- .../r/workspace_policy_set.html.markdown | 51 ++-- ...rkspace_policy_set_exclusion.html.markdown | 59 +++-- .../typescript/r/workspace_run.html.markdown | 182 +++++++------ .../r/workspace_run_task.html.markdown | 26 +- .../r/workspace_variable_set.html.markdown | 55 ++-- 153 files changed, 3053 insertions(+), 3422 deletions(-) diff --git a/website/docs/cdktf/csharp/d/variable_set.html.markdown b/website/docs/cdktf/csharp/d/variable_set.html.markdown index 499015be7..7ed5e75a4 100644 --- a/website/docs/cdktf/csharp/d/variable_set.html.markdown +++ b/website/docs/cdktf/csharp/d/variable_set.html.markdown @@ -46,9 +46,10 @@ The following arguments are supported: * `Organization` - Name of the organization. * `Name` - Name of the variable set. * `Description` - Description of the variable set. -* `Global` - Whether or not the variable set applies to all workspaces in the organization. +* `Global` - Whether the variable set applies to all workspaces in the organization. +* `Priority` - Whether the variables in this set are able to be over-written. * `WorkspaceIds` - IDs of the workspaces that use the variable set. * `VariableIds` - IDs of the variables attached to the variable set. * `ProjectIds` - IDs of the projects that use the variable set. - \ 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 1eba787ab..eacbfd771 100644 --- a/website/docs/cdktf/csharp/d/workspace.html.markdown +++ b/website/docs/cdktf/csharp/d/workspace.html.markdown @@ -47,6 +47,7 @@ In addition to all arguments above, the following attributes are exported: * `Id` - The workspace ID. * `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. * `AssessmentsEnabled` - (Available only in Terraform Cloud) 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 + \ 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 aa5d383c7..4f9356bba 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.49.2" + version = "~> 0.50.0" } } } @@ -90,7 +90,7 @@ The above snippet using `RequiredProviders` is for Terraform 0.13+; if you are u ```hcl provider "tfe" { - version = "~> 0.49.2" + version = "~> 0.50.0" ... } ``` @@ -103,7 +103,7 @@ For more information on provider installation and constraining provider versions provider "tfe" { hostname = var.hostname # Optional, defaults to Terraform Cloud `AppTerraformIo` token = var.token - version = "~> 0.49.2" + version = "~> 0.50.0" } # Create an organization @@ -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 + \ No newline at end of file diff --git a/website/docs/cdktf/csharp/r/agent_pool.html.markdown b/website/docs/cdktf/csharp/r/agent_pool.html.markdown index 53129cd7b..89ef473d2 100644 --- a/website/docs/cdktf/csharp/r/agent_pool.html.markdown +++ b/website/docs/cdktf/csharp/r/agent_pool.html.markdown @@ -46,7 +46,7 @@ The following arguments are supported: * `Name` - (Required) Name of the agent pool. * `Organization` - (Optional) Name of the organization. If omitted, organization must be defined in the provider config. -* `OrganizationScoped` - (Optional) Whether or not the agent pool is scoped to all workspaces in the organization. Defaults to `True`. +* `OrganizationScoped` - (Optional) Whether or not the agent pool is scoped to all workspaces in the organization. Defaults to `True`. Should be `False` when limiting workspaces that can use the agent pool with the [tfe_agent_pool_allowed_workspaces](agent_pool_allowed_workspaces.html) resource. ## Attributes Reference @@ -66,4 +66,4 @@ terraform import tfe_agent_pool.test apool-rW0KoLSlnuNb5adB terraform import tfe_workspace.test my-org-name/my-agent-pool-name ``` - \ No newline at end of file + \ 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 a722e5a15..b04692099 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,26 +19,34 @@ for Business account. Basic usage: -```hcl -resource "tfe_organization" "test-organization" { - name = "my-org-name" - email = "admin@company.com" -} - -resource "tfe_workspace" "test" { - name = "my-workspace-name" - organization = tfe_organization.test.name -} - -resource "tfe_agent_pool" "test-agent-pool" { - name = "my-agent-pool-name" - organization = tfe_organization.test-organization.name - organization_scoped = true -} - -resource "tfe_agent_pool_allowed_workspaces" "foobar" { - agent_pool_id = tfe_agent_pool.foobar.id - allowed_workspace_ids = [tfe_workspace.test.id] +```csharp +using Constructs; +using HashiCorp.Cdktf; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +using Gen.Providers.Tfe; +class MyConvertedCode : TerraformStack +{ + public MyConvertedCode(Construct scope, string name) : base(scope, name) + { + 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) } + }); + } } ``` @@ -46,7 +54,7 @@ resource "tfe_agent_pool_allowed_workspaces" "foobar" { The following arguments are supported: -* `AgentPoolId` - (Required) ID of the team. +* `AgentPoolId` - (Required) The ID of the agent pool. * `AllowedWorkspaceIds` - (Required) IDs of workspaces to be added as allowed workspaces on the agent pool. @@ -59,4 +67,4 @@ terraform import tfe_agent_pool_allowed_workspaces.foobar apool-rW0KoLSlnuNb5adB ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/csharp/r/variable_set.html.markdown b/website/docs/cdktf/csharp/r/variable_set.html.markdown index 6cd8e83dc..2be6d4b7e 100644 --- a/website/docs/cdktf/csharp/r/variable_set.html.markdown +++ b/website/docs/cdktf/csharp/r/variable_set.html.markdown @@ -5,6 +5,8 @@ description: |- Manages variable sets. --- + + # tfe_variable_set Creates, updates and destroys variable sets. @@ -120,13 +122,56 @@ class MyConvertedCode : TerraformStack } ``` +Create a priority variable set: + +```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 tfeVariableSetTest = new VariableSet.VariableSet(this, "test_1", new VariableSetConfig { + Description = "Variable set applied to all workspaces.", + Name = "Global Varset", + Organization = Token.AsString(tfeOrganizationTest.Name), + Priority = true + }); + /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ + tfeVariableSetTest.OverrideLogicalId("test"); + new Variable.Variable(this, "test-a", new VariableConfig { + Category = "terraform", + Description = "a useful description", + Key = "seperate_variable", + Value = "my_value_name", + VariableSetId = Token.AsString(tfeVariableSetTest.Id) + }); + new Variable.Variable(this, "test-b", new VariableConfig { + Category = "env", + Description = "an environment variable", + Key = "another_variable", + Value = "my_value_name", + VariableSetId = Token.AsString(tfeVariableSetTest.Id) + }); + } +} +``` + ## Argument Reference The following arguments are supported: * `Name` - (Required) Name of the variable set. * `Description` - (Optional) Description of the variable set. -* `Global` - (Optional) Whether or not the variable set applies to all workspaces in the organization. Defaults to `False`. +* `Global` - (Optional) Whether the variable set applies to all workspaces in the organization. Defaults to `False`. +* `Priority` - (Optional) Whether the variables in this set can be over-written by more specific scopes including values set on the command line. Defaults to `False`. * `Organization` - (Optional) Name of the organization. If omitted, organization must be defined in the provider config. * `WorkspaceIds` - **Deprecated** (Optional) IDs of the workspaces that use the variable set. Must not be set if `Global` is set. This argument is mutually exclusive with using the resource @@ -145,4 +190,4 @@ Variable sets can be imported; use `` as the import ID. For exa terraform import tfe_variable_set.test varset-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 455d9993a..8eae67322 100644 --- a/website/docs/cdktf/csharp/r/workspace.html.markdown +++ b/website/docs/cdktf/csharp/r/workspace.html.markdown @@ -81,6 +81,7 @@ The following arguments are supported: * `AllowDestroyPlan` - (Optional) Whether destroy plans can be queued on the workspace. * `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`. * `Description` - (Optional) A description for the workspace. * `ExecutionMode` - (Optional) Which [execution mode](https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings#execution-mode) to use. Using Terraform Cloud, valid values are `Remote`, `Local` or`Agent`. @@ -180,4 +181,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 + \ No newline at end of file diff --git a/website/docs/cdktf/go/d/variable_set.html.markdown b/website/docs/cdktf/go/d/variable_set.html.markdown index 1cfe6bbba..e91e7e99e 100644 --- a/website/docs/cdktf/go/d/variable_set.html.markdown +++ b/website/docs/cdktf/go/d/variable_set.html.markdown @@ -49,9 +49,10 @@ The following arguments are supported: * `Organization` - Name of the organization. * `Name` - Name of the variable set. * `Description` - Description of the variable set. -* `Global` - Whether or not the variable set applies to all workspaces in the organization. +* `Global` - Whether the variable set applies to all workspaces in the organization. +* `Priority` - Whether the variables in this set are able to be over-written. * `WorkspaceIds` - IDs of the workspaces that use the variable set. * `VariableIds` - IDs of the variables attached to the variable set. * `ProjectIds` - IDs of the projects that use the variable set. - \ 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 398539117..df1d3ac00 100644 --- a/website/docs/cdktf/go/d/workspace.html.markdown +++ b/website/docs/cdktf/go/d/workspace.html.markdown @@ -50,6 +50,7 @@ In addition to all arguments above, the following attributes are exported: * `Id` - The workspace ID. * `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. * `AssessmentsEnabled` - (Available only in Terraform Cloud) 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). @@ -90,4 +91,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 + \ 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 aa5d383c7..4f9356bba 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.49.2" + version = "~> 0.50.0" } } } @@ -90,7 +90,7 @@ The above snippet using `RequiredProviders` is for Terraform 0.13+; if you are u ```hcl provider "tfe" { - version = "~> 0.49.2" + version = "~> 0.50.0" ... } ``` @@ -103,7 +103,7 @@ For more information on provider installation and constraining provider versions provider "tfe" { hostname = var.hostname # Optional, defaults to Terraform Cloud `AppTerraformIo` token = var.token - version = "~> 0.49.2" + version = "~> 0.50.0" } # Create an organization @@ -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 + \ No newline at end of file diff --git a/website/docs/cdktf/go/r/agent_pool.html.markdown b/website/docs/cdktf/go/r/agent_pool.html.markdown index 72aa6f039..21da38f62 100644 --- a/website/docs/cdktf/go/r/agent_pool.html.markdown +++ b/website/docs/cdktf/go/r/agent_pool.html.markdown @@ -50,7 +50,7 @@ The following arguments are supported: * `Name` - (Required) Name of the agent pool. * `Organization` - (Optional) Name of the organization. If omitted, organization must be defined in the provider config. -* `OrganizationScoped` - (Optional) Whether or not the agent pool is scoped to all workspaces in the organization. Defaults to `True`. +* `OrganizationScoped` - (Optional) Whether or not the agent pool is scoped to all workspaces in the organization. Defaults to `True`. Should be `False` when limiting workspaces that can use the agent pool with the [tfe_agent_pool_allowed_workspaces](agent_pool_allowed_workspaces.html) resource. ## Attributes Reference @@ -70,4 +70,4 @@ terraform import tfe_agent_pool.test apool-rW0KoLSlnuNb5adB terraform import tfe_workspace.test my-org-name/my-agent-pool-name ``` - \ No newline at end of file + \ 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 a722e5a15..2a99c7204 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,26 +19,42 @@ for Business account. Basic usage: -```hcl -resource "tfe_organization" "test-organization" { - name = "my-org-name" - email = "admin@company.com" +```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 } -resource "tfe_workspace" "test" { - name = "my-workspace-name" - organization = tfe_organization.test.name -} - -resource "tfe_agent_pool" "test-agent-pool" { - name = "my-agent-pool-name" - organization = tfe_organization.test-organization.name - organization_scoped = true -} - -resource "tfe_agent_pool_allowed_workspaces" "foobar" { - agent_pool_id = tfe_agent_pool.foobar.id - allowed_workspace_ids = [tfe_workspace.test.id] +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 } ``` @@ -46,7 +62,7 @@ resource "tfe_agent_pool_allowed_workspaces" "foobar" { The following arguments are supported: -* `AgentPoolId` - (Required) ID of the team. +* `AgentPoolId` - (Required) The ID of the agent pool. * `AllowedWorkspaceIds` - (Required) IDs of workspaces to be added as allowed workspaces on the agent pool. @@ -59,4 +75,4 @@ terraform import tfe_agent_pool_allowed_workspaces.foobar apool-rW0KoLSlnuNb5adB ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/go/r/variable_set.html.markdown b/website/docs/cdktf/go/r/variable_set.html.markdown index 1a23e5a92..7b71f0dbb 100644 --- a/website/docs/cdktf/go/r/variable_set.html.markdown +++ b/website/docs/cdktf/go/r/variable_set.html.markdown @@ -5,6 +5,8 @@ description: |- Manages variable sets. --- + + # tfe_variable_set Creates, updates and destroys variable sets. @@ -38,34 +40,34 @@ func newMyConvertedCode(scope construct, name *string) *myConvertedCode { }) tfeProjectTest := project.NewProject(this, jsii.String("test_1"), &projectConfig{ name: jsii.String("projectname"), - organization: cdktf.*token_AsString(tfeOrganizationTest.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")) tfeVariableSetTest := variableSet.NewVariableSet(this, jsii.String("test_2"), &variableSetConfig{ description: jsii.String("Some description."), name: jsii.String("Test Varset"), - organization: cdktf.*token_*AsString(tfeOrganizationTest.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.*/ tfeVariableSetTest.OverrideLogicalId(jsii.String("test")) tfeWorkspaceTest := workspace.NewWorkspace(this, jsii.String("test_3"), &workspaceConfig{ name: jsii.String("my-workspace-name"), - organization: cdktf.*token_*AsString(tfeOrganizationTest.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.*/ tfeWorkspaceTest.OverrideLogicalId(jsii.String("test")) tfeWorkspaceVariableSetTest := workspaceVariableSet.NewWorkspaceVariableSet(this, jsii.String("test_4"), &workspaceVariableSetConfig{ - variableSetId: cdktf.*token_*AsString(tfeVariableSetTest.id), - workspaceId: cdktf.*token_*AsString(tfeWorkspaceTest.id), + variableSetId: cdktf.Token_*AsString(tfeVariableSetTest.id), + workspaceId: 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.*/ tfeWorkspaceVariableSetTest.OverrideLogicalId(jsii.String("test")) tfeProjectVariableSetTest := projectVariableSet.NewProjectVariableSet(this, jsii.String("test_5"), &projectVariableSetConfig{ - projectId: cdktf.*token_*AsString(tfeProjectTest.id), - variableSetId: cdktf.*token_*AsString(tfeVariableSetTest.id), + projectId: cdktf.Token_*AsString(tfeProjectTest.id), + variableSetId: cdktf.Token_*AsString(tfeVariableSetTest.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.*/ tfeProjectVariableSetTest.OverrideLogicalId(jsii.String("test")) @@ -74,14 +76,14 @@ func newMyConvertedCode(scope construct, name *string) *myConvertedCode { description: jsii.String("a useful description"), key: jsii.String("seperate_variable"), value: jsii.String("my_value_name"), - variableSetId: cdktf.*token_*AsString(tfeVariableSetTest.id), + variableSetId: cdktf.Token_*AsString(tfeVariableSetTest.id), }) variable.NewVariable(this, jsii.String("test-b"), &variableConfig{ category: jsii.String("env"), description: jsii.String("an environment variable"), key: jsii.String("another_variable"), value: jsii.String("my_value_name"), - variableSetId: cdktf.*token_*AsString(tfeVariableSetTest.id), + variableSetId: cdktf.Token_*AsString(tfeVariableSetTest.id), }) return this } @@ -112,7 +114,54 @@ func newMyConvertedCode(scope construct, name *string) *myConvertedCode { description: jsii.String("Variable set applied to all workspaces."), global: jsii.Boolean(true), name: jsii.String("Global Varset"), - organization: cdktf.*token_AsString(tfeOrganizationTest.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.*/ + tfeVariableSetTest.OverrideLogicalId(jsii.String("test")) + variable.NewVariable(this, jsii.String("test-a"), &variableConfig{ + category: jsii.String("terraform"), + description: jsii.String("a useful description"), + key: jsii.String("seperate_variable"), + value: jsii.String("my_value_name"), + variableSetId: cdktf.Token_*AsString(tfeVariableSetTest.id), + }) + variable.NewVariable(this, jsii.String("test-b"), &variableConfig{ + category: jsii.String("env"), + description: jsii.String("an environment variable"), + key: jsii.String("another_variable"), + value: jsii.String("my_value_name"), + variableSetId: cdktf.Token_*AsString(tfeVariableSetTest.id), + }) + return this +} +``` + +Create a priority variable set: + +```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/variableSet" +import "github.com/aws-samples/dummy/gen/providers/tfe/variable" +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"), + }) + tfeVariableSetTest := variableSet.NewVariableSet(this, jsii.String("test_1"), &variableSetConfig{ + description: jsii.String("Variable set applied to all workspaces."), + name: jsii.String("Global Varset"), + organization: cdktf.Token_AsString(tfeOrganizationTest.name), + priority: jsii.Boolean(true), }) /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ tfeVariableSetTest.OverrideLogicalId(jsii.String("test")) @@ -121,14 +170,14 @@ func newMyConvertedCode(scope construct, name *string) *myConvertedCode { description: jsii.String("a useful description"), key: jsii.String("seperate_variable"), value: jsii.String("my_value_name"), - variableSetId: cdktf.*token_*AsString(tfeVariableSetTest.id), + variableSetId: cdktf.Token_*AsString(tfeVariableSetTest.id), }) variable.NewVariable(this, jsii.String("test-b"), &variableConfig{ category: jsii.String("env"), description: jsii.String("an environment variable"), key: jsii.String("another_variable"), value: jsii.String("my_value_name"), - variableSetId: cdktf.*token_*AsString(tfeVariableSetTest.id), + variableSetId: cdktf.Token_*AsString(tfeVariableSetTest.id), }) return this } @@ -140,7 +189,8 @@ The following arguments are supported: * `Name` - (Required) Name of the variable set. * `Description` - (Optional) Description of the variable set. -* `Global` - (Optional) Whether or not the variable set applies to all workspaces in the organization. Defaults to `False`. +* `Global` - (Optional) Whether the variable set applies to all workspaces in the organization. Defaults to `False`. +* `Priority` - (Optional) Whether the variables in this set can be over-written by more specific scopes including values set on the command line. Defaults to `False`. * `Organization` - (Optional) Name of the organization. If omitted, organization must be defined in the provider config. * `WorkspaceIds` - **Deprecated** (Optional) IDs of the workspaces that use the variable set. Must not be set if `Global` is set. This argument is mutually exclusive with using the resource @@ -159,4 +209,4 @@ Variable sets can be imported; use `` as the import ID. For exa terraform import tfe_variable_set.test varset-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 66449648b..9f91e668a 100644 --- a/website/docs/cdktf/go/r/workspace.html.markdown +++ b/website/docs/cdktf/go/r/workspace.html.markdown @@ -93,6 +93,7 @@ The following arguments are supported: * `AllowDestroyPlan` - (Optional) Whether destroy plans can be queued on the workspace. * `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`. * `Description` - (Optional) A description for the workspace. * `ExecutionMode` - (Optional) Which [execution mode](https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings#execution-mode) to use. Using Terraform Cloud, valid values are `Remote`, `Local` or`Agent`. @@ -192,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 + \ No newline at end of file diff --git a/website/docs/cdktf/java/d/variable_set.html.markdown b/website/docs/cdktf/java/d/variable_set.html.markdown index 8e8ed5322..5368234d0 100644 --- a/website/docs/cdktf/java/d/variable_set.html.markdown +++ b/website/docs/cdktf/java/d/variable_set.html.markdown @@ -45,9 +45,10 @@ The following arguments are supported: * `organization` - Name of the organization. * `name` - Name of the variable set. * `description` - Description of the variable set. -* `global` - Whether or not the variable set applies to all workspaces in the organization. +* `global` - Whether the variable set applies to all workspaces in the organization. +* `priority` - Whether the variables in this set are able to be over-written. * `workspaceIds` - IDs of the workspaces that use the variable set. * `variableIds` - IDs of the variables attached to the variable set. * `projectIds` - IDs of the projects that use the variable set. - \ 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 ea2a6da49..371cf05ba 100644 --- a/website/docs/cdktf/java/d/workspace.html.markdown +++ b/website/docs/cdktf/java/d/workspace.html.markdown @@ -46,6 +46,7 @@ In addition to all arguments above, the following attributes are exported: * `id` - The workspace ID. * `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. * `assessmentsEnabled` - (Available only in Terraform Cloud) 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). @@ -86,4 +87,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 + \ 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 0af537aa4..a6579445d 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.49.2" + version = "~> 0.50.0" } } } @@ -90,7 +90,7 @@ The above snippet using `requiredProviders` is for Terraform 0.13+; if you are u ```hcl provider "tfe" { - version = "~> 0.49.2" + version = "~> 0.50.0" ... } ``` @@ -103,7 +103,7 @@ For more information on provider installation and constraining provider versions provider "tfe" { hostname = var.hostname # Optional, defaults to Terraform Cloud `appTerraformIo` token = var.token - version = "~> 0.49.2" + version = "~> 0.50.0" } # Create an organization @@ -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 + \ No newline at end of file diff --git a/website/docs/cdktf/java/r/agent_pool.html.markdown b/website/docs/cdktf/java/r/agent_pool.html.markdown index a0fa1612d..cad61c82c 100644 --- a/website/docs/cdktf/java/r/agent_pool.html.markdown +++ b/website/docs/cdktf/java/r/agent_pool.html.markdown @@ -46,7 +46,7 @@ The following arguments are supported: * `name` - (Required) Name of the agent pool. * `organization` - (Optional) Name of the organization. If omitted, organization must be defined in the provider config. -* `organizationScoped` - (Optional) Whether or not the agent pool is scoped to all workspaces in the organization. Defaults to `true`. +* `organizationScoped` - (Optional) Whether or not the agent pool is scoped to all workspaces in the organization. Defaults to `true`. Should be `false` when limiting workspaces that can use the agent pool with the [tfe_agent_pool_allowed_workspaces](agent_pool_allowed_workspaces.html) resource. ## Attributes Reference @@ -66,4 +66,4 @@ terraform import tfe_agent_pool.test apool-rW0KoLSlnuNb5adB terraform import tfe_workspace.test my-org-name/my-agent-pool-name ``` - \ No newline at end of file + \ 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 9458015d2..b98fae86d 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,26 +19,36 @@ for Business account. Basic usage: -```hcl -resource "tfe_organization" "test-organization" { - name = "my-org-name" - email = "admin@company.com" -} - -resource "tfe_workspace" "test" { - name = "my-workspace-name" - organization = tfe_organization.test.name -} - -resource "tfe_agent_pool" "test-agent-pool" { - name = "my-agent-pool-name" - organization = tfe_organization.test-organization.name - organization_scoped = true -} - -resource "tfe_agent_pool_allowed_workspaces" "foobar" { - agent_pool_id = tfe_agent_pool.foobar.id - allowed_workspace_ids = [tfe_workspace.test.id] +```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()))) + ); + } } ``` @@ -46,7 +56,7 @@ resource "tfe_agent_pool_allowed_workspaces" "foobar" { The following arguments are supported: -* `agentPoolId` - (Required) ID of the team. +* `agentPoolId` - (Required) The ID of the agent pool. * `allowedWorkspaceIds` - (Required) IDs of workspaces to be added as allowed workspaces on the agent pool. @@ -59,4 +69,4 @@ terraform import tfe_agent_pool_allowed_workspaces.foobar apool-rW0KoLSlnuNb5adB ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/java/r/variable_set.html.markdown b/website/docs/cdktf/java/r/variable_set.html.markdown index b77b4d9ca..f944e4120 100644 --- a/website/docs/cdktf/java/r/variable_set.html.markdown +++ b/website/docs/cdktf/java/r/variable_set.html.markdown @@ -5,6 +5,8 @@ description: |- Manages variable sets. --- + + # tfe_variable_set Creates, updates and destroys variable sets. @@ -126,13 +128,57 @@ public class MyConvertedCode extends TerraformStack { } ``` +Create a priority variable set: + +```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.variableSet.*; +import gen.providers.tfe.variable.*; +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") + ); + VariableSet tfeVariableSetTest = new VariableSet(this, "test_1", new VariableSetConfig() + .description("Variable set applied to all workspaces.") + .name("Global Varset") + .organization(Token.asString(tfeOrganizationTest.getName())) + .priority(true) + ); + /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ + tfeVariableSetTest.overrideLogicalId("test"); + new Variable(this, "test-a", new VariableConfig() + .category("terraform") + .description("a useful description") + .key("seperate_variable") + .value("my_value_name") + .variableSetId(Token.asString(tfeVariableSetTest.getId())) + ); + new Variable(this, "test-b", new VariableConfig() + .category("env") + .description("an environment variable") + .key("another_variable") + .value("my_value_name") + .variableSetId(Token.asString(tfeVariableSetTest.getId())) + ); + } +} +``` + ## Argument Reference The following arguments are supported: * `name` - (Required) Name of the variable set. * `description` - (Optional) Description of the variable set. -* `global` - (Optional) Whether or not the variable set applies to all workspaces in the organization. Defaults to `false`. +* `global` - (Optional) Whether the variable set applies to all workspaces in the organization. Defaults to `false`. +* `priority` - (Optional) Whether the variables in this set can be over-written by more specific scopes including values set on the command line. Defaults to `false`. * `organization` - (Optional) Name of the organization. If omitted, organization must be defined in the provider config. * `workspaceIds` - **Deprecated** (Optional) IDs of the workspaces that use the variable set. Must not be set if `global` is set. This argument is mutually exclusive with using the resource @@ -151,4 +197,4 @@ Variable sets can be imported; use `` as the import ID. For exa terraform import tfe_variable_set.test varset-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 702a048d7..548fdd526 100644 --- a/website/docs/cdktf/java/r/workspace.html.markdown +++ b/website/docs/cdktf/java/r/workspace.html.markdown @@ -82,6 +82,7 @@ The following arguments are supported: * `allowDestroyPlan` - (Optional) Whether destroy plans can be queued on the workspace. * `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`. * `description` - (Optional) A description for the workspace. * `executionMode` - (Optional) Which [execution mode](https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings#execution-mode) to use. Using Terraform Cloud, valid values are `remote`, `local` or`agent`. @@ -181,4 +182,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 + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/agent_pool.html.markdown b/website/docs/cdktf/python/d/agent_pool.html.markdown index 5ef505403..7293e009c 100644 --- a/website/docs/cdktf/python/d/agent_pool.html.markdown +++ b/website/docs/cdktf/python/d/agent_pool.html.markdown @@ -14,18 +14,15 @@ Use this data source to get information about an agent pool. ## 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_agent_pool import DataTfeAgentPool -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - DataTfeAgentPool(self, "test", + tfe.data_tfe_agent_pool.DataTfeAgentPool(self, "test", name="my-agent-pool-name", organization="my-org-name" ) @@ -45,4 +42,4 @@ In addition to all arguments above, the following attributes are exported: * `id` - The agent pool ID. * `organization_scoped` - Whether or not the agent pool can be used by all workspaces in the organization. - \ 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 4307e1f6a..8a6457b5a 100644 --- a/website/docs/cdktf/python/d/github_installation.html.markdown +++ b/website/docs/cdktf/python/d/github_installation.html.markdown @@ -16,18 +16,15 @@ Use this data source to get information about the Github App Installation. ### Finding a Github App Installation by its installation ID ```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_github_app_installation import DataTfeGithubAppInstallation -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - DataTfeGithubAppInstallation(self, "gha_installation", + tfe.data_tfe_github_app_installation.DataTfeGithubAppInstallation(self, "gha_installation", installation_id=12345 ) ``` @@ -35,18 +32,15 @@ class MyConvertedCode(TerraformStack): ### Finding a Github App Installation by its 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_github_app_installation import DataTfeGithubAppInstallation -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - DataTfeGithubAppInstallation(self, "gha_installation", + tfe.data_tfe_github_app_installation.DataTfeGithubAppInstallation(self, "gha_installation", name="installation_name" ) ``` @@ -65,4 +59,4 @@ 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 + \ 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 e4846574b..d51c305d5 100644 --- a/website/docs/cdktf/python/d/ip_ranges.html.markdown +++ b/website/docs/cdktf/python/d/ip_ranges.html.markdown @@ -14,20 +14,17 @@ Use this data source to retrieve a list of Terraform Cloud's IP ranges. For more ## 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 TerraformOutput, 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_ip_ranges import DataTfeIpRanges -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - addresses = DataTfeIpRanges(self, "addresses") - TerraformOutput(self, "notifications_ips", - value=addresses.notifications + data_tfe_ip_ranges_addresses = tfe.data_tfe_ip_ranges.DataTfeIpRanges(self, "addresses") + cdktf.TerraformOutput(self, "notifications_ips", + value=data_tfe_ip_ranges_addresses.notifications ) ``` @@ -45,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 + \ 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 d597ecc3c..4aec1ba13 100644 --- a/website/docs/cdktf/python/d/oauth_client.html.markdown +++ b/website/docs/cdktf/python/d/oauth_client.html.markdown @@ -16,18 +16,15 @@ Use this data source to get information about an OAuth client. ### Finding an OAuth client by its ID ```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_oauth_client import DataTfeOauthClient -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - DataTfeOauthClient(self, "client", + tfe.data_tfe_oauth_client.DataTfeOauthClient(self, "client", oauth_client_id="oc-XXXXXXX" ) ``` @@ -35,18 +32,15 @@ class MyConvertedCode(TerraformStack): ### Finding an OAuth client by its 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_oauth_client import DataTfeOauthClient -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - DataTfeOauthClient(self, "client", + tfe.data_tfe_oauth_client.DataTfeOauthClient(self, "client", name="my-oauth-client", organization="my-org" ) @@ -55,18 +49,15 @@ class MyConvertedCode(TerraformStack): ### Finding an OAuth client by its service 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.data_tfe_oauth_client import DataTfeOauthClient -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - DataTfeOauthClient(self, "client", + tfe.data_tfe_oauth_client.DataTfeOauthClient(self, "client", organization="my-org", service_provider="github" ) @@ -102,4 +93,4 @@ In addition to all arguments above, the following attributes are exported: * `service_provider` - The API identifier of the OAuth service provider. * `service_provider_display_name` - The display name of the OAuth service provider. - \ No newline at end of file + \ 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 138cd2228..5045a6657 100644 --- a/website/docs/cdktf/python/d/organization.html.markdown +++ b/website/docs/cdktf/python/d/organization.html.markdown @@ -14,18 +14,15 @@ Use this data source to get information about an organization. ## 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_organization import DataTfeOrganization -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - DataTfeOrganization(self, "foo", + tfe.data_tfe_organization.DataTfeOrganization(self, "foo", name="organization-name" ) ``` @@ -48,4 +45,4 @@ In addition to all arguments above, the following attributes are exported: * `owners_team_saml_role_id` - The name of the "owners" team. * `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. * `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 + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/organization_members.html.markdown b/website/docs/cdktf/python/d/organization_members.html.markdown index ccd7dcf24..73670ef47 100644 --- a/website/docs/cdktf/python/d/organization_members.html.markdown +++ b/website/docs/cdktf/python/d/organization_members.html.markdown @@ -14,24 +14,20 @@ Use this data source to get information about members of an organization. ## 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_organization_members import DataTfeOrganizationMembers -from imports.tfe.organization import Organization -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - bar = Organization(self, "bar", + tfe_organization_bar = tfe.organization.Organization(self, "bar", email="user@hashicorp.com", name="org-bar" ) - DataTfeOrganizationMembers(self, "foo", - organization=bar.name + tfe.data_tfe_organization_members.DataTfeOrganizationMembers(self, "foo", + organization=cdktf.Token.as_string(tfe_organization_bar.name) ) ``` @@ -52,4 +48,4 @@ The `member` block contains: * `user_id` - The ID of the user. * `organization_membership_id` - The ID of the organization membership. - \ No newline at end of file + \ 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 ffff8bf2a..cc1def6d2 100644 --- a/website/docs/cdktf/python/d/organization_membership.html.markdown +++ b/website/docs/cdktf/python/d/organization_membership.html.markdown @@ -22,18 +22,15 @@ be updated manually. ### Fetch by email ```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_organization_membership import DataTfeOrganizationMembership -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - DataTfeOrganizationMembership(self, "test", + tfe.data_tfe_organization_membership.DataTfeOrganizationMembership(self, "test", email="user@company.com", organization="my-org-name" ) @@ -42,18 +39,15 @@ class MyConvertedCode(TerraformStack): ### Fetch by username ```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_organization_membership import DataTfeOrganizationMembership -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - DataTfeOrganizationMembership(self, "test", + tfe.data_tfe_organization_membership.DataTfeOrganizationMembership(self, "test", organization="my-org-name", username="my-username" ) @@ -62,18 +56,15 @@ class MyConvertedCode(TerraformStack): ### Fetch by organization membership ID ```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_organization_membership import DataTfeOrganizationMembership -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - DataTfeOrganizationMembership(self, "test", + tfe.data_tfe_organization_membership.DataTfeOrganizationMembership(self, "test", organization="my-org-name", organization_membership_id="ou-xxxxxxxxxxx" ) @@ -98,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 + \ 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 c7ed30ddb..8429aa128 100644 --- a/website/docs/cdktf/python/d/organization_run_task.html.markdown +++ b/website/docs/cdktf/python/d/organization_run_task.html.markdown @@ -16,18 +16,15 @@ Use this data source to get information about an [Organization Run tasks](https: ## 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_organization_run_task import DataTfeOrganizationRunTask -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - DataTfeOrganizationRunTask(self, "example", + tfe.data_tfe_organization_run_task.DataTfeOrganizationRunTask(self, "example", name="task-name", organization="my-org-name" ) @@ -50,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 + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/organization_tags.html.markdown b/website/docs/cdktf/python/d/organization_tags.html.markdown index 6f11a23fa..4fffc37f9 100644 --- a/website/docs/cdktf/python/d/organization_tags.html.markdown +++ b/website/docs/cdktf/python/d/organization_tags.html.markdown @@ -14,18 +14,15 @@ Use this data source to get information about the workspace tags for a given org ## 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_organization_tags import DataTfeOrganizationTags -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - DataTfeOrganizationTags(self, "example", + tfe.data_tfe_organization_tags.DataTfeOrganizationTags(self, "example", organization="my-org-name" ) ``` @@ -47,4 +44,4 @@ The `tag` block contains: * `name` - The name of the workspace tag * `id` - The ID of the workspace tag * `workspace_count` - The number of workspaces the tag is associate with - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/organizations.html.markdown b/website/docs/cdktf/python/d/organizations.html.markdown index b3cf933e5..292e9c76f 100644 --- a/website/docs/cdktf/python/d/organizations.html.markdown +++ b/website/docs/cdktf/python/d/organizations.html.markdown @@ -14,18 +14,15 @@ Use this data source to get a list of Organizations and a map of their IDs. ## 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_organizations import DataTfeOrganizations -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - DataTfeOrganizations(self, "foo") + tfe.data_tfe_organizations.DataTfeOrganizations(self, "foo") ``` ## Argument Reference @@ -44,4 +41,4 @@ The following attributes are exported: * `names` - A list of names of every organization. * `ids` - A map of organization names and their IDs. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/outputs.html.markdown b/website/docs/cdktf/python/d/outputs.html.markdown index 2e4e48760..8f6ed2dc5 100644 --- a/website/docs/cdktf/python/d/outputs.html.markdown +++ b/website/docs/cdktf/python/d/outputs.html.markdown @@ -21,28 +21,25 @@ Using the `tfe_outputs` data source, the outputs `foo` and `bar` can be used as In the example below, assume we have outputs defined in a `my-org/my-workspace`: ```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.random.id import Id -from imports.tfe.data_tfe_outputs import DataTfeOutputs -class MyConvertedCode(TerraformStack): +import ...gen.providers.random as random +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) # The following providers are missing schema information and might need manual adjustments to synthesize correctly: random. # For a more precise conversion please use the --provider flag in convert. - foo = DataTfeOutputs(self, "foo", + data_tfe_outputs_foo = tfe.data_tfe_outputs.DataTfeOutputs(self, "foo", organization="my-org", workspace="my-workspace" ) - Id(self, "vpc_id", + random.id.Id(self, "vpc_id", byte_length=8, keepers=[{ - "bar": foo.values.bar + "bar": data_tfe_outputs_foo.values.bar } ] ) @@ -62,4 +59,4 @@ The following attributes are exported: * `values` - The current output values for the specified workspace. * `nonsensitive_values` - The current non-sensitive output values for the specified workspace, this is a subset of all output values. - \ No newline at end of file + \ 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 1650cb017..9b8aca2a9 100644 --- a/website/docs/cdktf/python/d/policy_set.html.markdown +++ b/website/docs/cdktf/python/d/policy_set.html.markdown @@ -16,18 +16,15 @@ This data source is used to retrieve a policy set defined in a specified organiz For workspace 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 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_policy_set import DataTfePolicySet -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - DataTfePolicySet(self, "test", + tfe.data_tfe_policy_set.DataTfePolicySet(self, "test", name="my-policy-set-name", organization="my-org-name" ) @@ -67,4 +64,4 @@ The `vcs_repo` block contains: * `oauth_token_id` - OAuth token ID of the configured VCS connection. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/project.html.markdown b/website/docs/cdktf/python/d/project.html.markdown index f40145ff2..4a596f35f 100644 --- a/website/docs/cdktf/python/d/project.html.markdown +++ b/website/docs/cdktf/python/d/project.html.markdown @@ -14,18 +14,15 @@ Use this data source to get information about a project. ## 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_project import DataTfeProject -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - DataTfeProject(self, "foo", + tfe.data_tfe_project.DataTfeProject(self, "foo", name="my-project-name", organization="my-org-name" ) @@ -44,4 +41,4 @@ In addition to all arguments above, the following attributes are exported: * `id` - The project ID. * `workspace_ids` - IDs of the workspaces that are associated with the project. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/saml_settings.html.markdown b/website/docs/cdktf/python/d/saml_settings.html.markdown index 376cdd483..338f92bfc 100644 --- a/website/docs/cdktf/python/d/saml_settings.html.markdown +++ b/website/docs/cdktf/python/d/saml_settings.html.markdown @@ -16,31 +16,21 @@ Use this data source to get information about SAML Settings. It applies only to 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`. -# See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.data_tfe_saml_settings import DataTfeSamlSettings -from imports.tfe.provider import TfeProvider -class MyConvertedCode(TerraformStack): - def __init__(self, scope, name): - super().__init__(scope, name) - TfeProvider(self, "tfe", - hostname=hostname.string_value, - token=token.string_value - ) - admin = TfeProvider(self, "tfe_1", - alias="admin", - hostname=hostname.string_value, - token=admin_token.string_value - ) - DataTfeSamlSettings(self, "foo", - provider=admin - ) +```hcl +provider "tfe" { + hostname = var.hostname + token = var.token +} + +provider "tfe" { + alias = "admin" + hostname = var.hostname + token = var.admin_token +} + +data "tfe_saml_settings" "foo" { + provider = tfe.admin +} ``` ## Argument Reference @@ -74,4 +64,4 @@ The following attributes are exported: * `signature_signing_method` - Signature Signing Method. * `signature_digest_method` - Signature Digest Method. - \ 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 89ee070e4..6537c5f55 100644 --- a/website/docs/cdktf/python/d/slug.html.markdown +++ b/website/docs/cdktf/python/d/slug.html.markdown @@ -21,25 +21,21 @@ tar file containing configuration files (a Terraform "slug") when those files ch Tracking a local directory to upload the Sentinel configuration and 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`. +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_slug import DataTfeSlug -from imports.tfe.policy_set import PolicySet -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - test = DataTfeSlug(self, "test", + data_tfe_slug_test = tfe.data_tfe_slug.DataTfeSlug(self, "test", source_path="policies/my-policy-set" ) - tfe_policy_set_test = PolicySet(self, "test_1", + tfe_policy_set_test = tfe.policy_set.PolicySet(self, "test_1", name="my-policy-set", organization="my-org-name", - slug=Token.as_string_map(test) + slug=cdktf.Token.as_string_map(data_tfe_slug_test) ) # 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_policy_set_test.override_logical_id("test") @@ -51,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 + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/ssh_key.html.markdown b/website/docs/cdktf/python/d/ssh_key.html.markdown index 17ae4aad2..e95a873b6 100644 --- a/website/docs/cdktf/python/d/ssh_key.html.markdown +++ b/website/docs/cdktf/python/d/ssh_key.html.markdown @@ -14,18 +14,15 @@ Use this data source to get information about a SSH 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_ssh_key import DataTfeSshKey -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - DataTfeSshKey(self, "test", + tfe.data_tfe_ssh_key.DataTfeSshKey(self, "test", name="my-ssh-key-name", organization="my-org-name" ) @@ -44,4 +41,4 @@ In addition to all arguments above, the following attributes are exported: * `id` - The ID of the SSH key. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/team.html.markdown b/website/docs/cdktf/python/d/team.html.markdown index 8dcf44b9b..3e4f2c5e4 100644 --- a/website/docs/cdktf/python/d/team.html.markdown +++ b/website/docs/cdktf/python/d/team.html.markdown @@ -14,18 +14,15 @@ Use this data source to get information about a team. ## 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_team import DataTfeTeam -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - DataTfeTeam(self, "test", + tfe.data_tfe_team.DataTfeTeam(self, "test", name="my-team-name", organization="my-org-name" ) @@ -45,4 +42,4 @@ In addition to all arguments above, the following attributes are exported: * `id` - The ID of the team. * `sso_team_id` - (Optional) The [SSO Team ID](https://developer.hashicorp.com/terraform/cloud-docs/users-teams-organizations/single-sign-on#team-names-and-sso-team-ids) of the team, if it has been defined - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/team_access.html.markdown b/website/docs/cdktf/python/d/team_access.html.markdown index 6ce1b674f..9755cf929 100644 --- a/website/docs/cdktf/python/d/team_access.html.markdown +++ b/website/docs/cdktf/python/d/team_access.html.markdown @@ -14,18 +14,15 @@ Use this data source to get information about team permissions for a workspace. ## 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_team_access import DataTfeTeamAccess -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - DataTfeTeamAccess(self, "test", + tfe.data_tfe_team_access.DataTfeTeamAccess(self, "test", team_id="my-team-id", workspace_id="my-workspace-id" ) @@ -55,4 +52,4 @@ The `permissions` block contains: * `workspace_locking` - Whether permission is granted to manually lock the workspace or not. * `run_tasks` - Boolean determining whether or not to grant the team permission to manage workspace run tasks. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/team_project_access.html.markdown b/website/docs/cdktf/python/d/team_project_access.html.markdown index 0d0da5115..503c9eb11 100644 --- a/website/docs/cdktf/python/d/team_project_access.html.markdown +++ b/website/docs/cdktf/python/d/team_project_access.html.markdown @@ -14,18 +14,15 @@ Use this data source to get information about team permissions for a project. ## 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_team_project_access import DataTfeTeamProjectAccess -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - DataTfeTeamProjectAccess(self, "test", + tfe.data_tfe_team_project_access.DataTfeTeamProjectAccess(self, "test", project_id="my-project-id", team_id="my-team-id" ) @@ -45,4 +42,4 @@ In addition to all arguments above, the following attributes are exported: * `id` The team project access ID. * `access` - The type of access granted to the team on the project. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/teams.html.markdown b/website/docs/cdktf/python/d/teams.html.markdown index 4c55522ec..d812caa3c 100644 --- a/website/docs/cdktf/python/d/teams.html.markdown +++ b/website/docs/cdktf/python/d/teams.html.markdown @@ -14,18 +14,15 @@ Use this data source to get a list of Teams in an Organization and a map of thei ## 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_teams import DataTfeTeams -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - DataTfeTeams(self, "foo", + tfe.data_tfe_teams.DataTfeTeams(self, "foo", organization="my-org-name" ) ``` @@ -42,4 +39,4 @@ In addition to all arguments above, the following attributes are exported: * `id` - Name of the organization. * `names` - A list of team names in an organization. * `ids` - A map of team names in an organization and their IDs. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/variable_set.html.markdown b/website/docs/cdktf/python/d/variable_set.html.markdown index 4922935a4..3db389fb4 100644 --- a/website/docs/cdktf/python/d/variable_set.html.markdown +++ b/website/docs/cdktf/python/d/variable_set.html.markdown @@ -16,18 +16,15 @@ This data source is used to retrieve a named variable set For workspace variables: ```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_variable_set import DataTfeVariableSet -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - DataTfeVariableSet(self, "test", + tfe.data_tfe_variable_set.DataTfeVariableSet(self, "test", name="my-variable-set-name", organization="my-org-name" ) @@ -46,9 +43,10 @@ The following arguments are supported: * `organization` - Name of the organization. * `name` - Name of the variable set. * `description` - Description of the variable set. -* `global` - Whether or not the variable set applies to all workspaces in the organization. +* `global` - Whether the variable set applies to all workspaces in the organization. +* `priority` - Whether the variables in this set are able to be over-written. * `workspace_ids` - IDs of the workspaces that use the variable set. * `variable_ids` - IDs of the variables attached to the variable set. * `project_ids` - IDs of the projects that use the variable set. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/variables.html.markdown b/website/docs/cdktf/python/d/variables.html.markdown index 77353b5c0..86ecde0ac 100644 --- a/website/docs/cdktf/python/d/variables.html.markdown +++ b/website/docs/cdktf/python/d/variables.html.markdown @@ -16,24 +16,20 @@ This data source is used to retrieve all variables defined in a specified worksp For workspace variables: ```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.data_tfe_variables import DataTfeVariables -from imports.tfe.data_tfe_workspace import DataTfeWorkspace -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" ) - data_tfe_variables_test = DataTfeVariables(self, "test_1", - workspace_id=Token.as_string(test.id) + data_tfe_variables_test = tfe.data_tfe_variables.DataTfeVariables(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. data_tfe_variables_test.override_logical_id("test") @@ -42,24 +38,21 @@ class MyConvertedCode(TerraformStack): For variable set variables: ```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.data_tfe_variable_set import DataTfeVariableSet -from imports.tfe.data_tfe_variables import DataTfeVariables -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - test = DataTfeVariableSet(self, "test", + data_tfe_variable_set_test = + tfe.data_tfe_variable_set.DataTfeVariableSet(self, "test", name="my-variable-set-name", organization="my-org-name" ) - data_tfe_variables_test = DataTfeVariables(self, "test_1", - variable_set_id=Token.as_string(test.id) + data_tfe_variables_test = tfe.data_tfe_variables.DataTfeVariables(self, "test_1", + variable_set_id=cdktf.Token.as_string(data_tfe_variable_set_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. data_tfe_variables_test.override_logical_id("test") @@ -87,4 +80,4 @@ The `variables, terraform and env` blocks contains: * `sensitive` - If the variable is marked as sensitive or not * `hcl` - If the variable is marked as HCL or not - \ No newline at end of file + \ 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 875803789..50048398f 100644 --- a/website/docs/cdktf/python/d/workspace.html.markdown +++ b/website/docs/cdktf/python/d/workspace.html.markdown @@ -16,18 +16,15 @@ Use this data source to get information about a workspace. ## 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_workspace import DataTfeWorkspace -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - DataTfeWorkspace(self, "test", + tfe.data_tfe_workspace.DataTfeWorkspace(self, "test", name="my-workspace-name", organization="my-org-name" ) @@ -47,6 +44,7 @@ In addition to all arguments above, the following attributes are exported: * `id` - The workspace ID. * `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. * `assessments_enabled` - (Available only in Terraform Cloud) 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). @@ -87,4 +85,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 + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/workspace_ids.html.markdown b/website/docs/cdktf/python/d/workspace_ids.html.markdown index 58a1fb01e..31ac562e9 100644 --- a/website/docs/cdktf/python/d/workspace_ids.html.markdown +++ b/website/docs/cdktf/python/d/workspace_ids.html.markdown @@ -14,30 +14,27 @@ Use this data source to get a map of workspace IDs. ## 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_workspace_ids import DataTfeWorkspaceIds -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - DataTfeWorkspaceIds(self, "all", + tfe.data_tfe_workspace_ids.DataTfeWorkspaceIds(self, "all", names=["*"], organization="my-org-name" ) - DataTfeWorkspaceIds(self, "app-frontend", + tfe.data_tfe_workspace_ids.DataTfeWorkspaceIds(self, "app-frontend", names=["app-frontend-prod", "app-frontend-dev1", "app-frontend-staging"], organization="my-org-name" ) - DataTfeWorkspaceIds(self, "prod-apps", + tfe.data_tfe_workspace_ids.DataTfeWorkspaceIds(self, "prod-apps", organization="my-org-name", tag_names=["prod", "app", "aws"] ) - DataTfeWorkspaceIds(self, "prod-only", + tfe.data_tfe_workspace_ids.DataTfeWorkspaceIds(self, "prod-only", exclude_tags=["app"], organization="my-org-name", tag_names=["prod"] @@ -64,4 +61,4 @@ In addition to all arguments above, the following attributes are exported: * `full_names` - A map of workspace names and their full names, which look like `/`. * `ids` - A map of workspace names and their opaque, immutable IDs, which look like `ws-`. - \ No newline at end of file + \ 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 1cb0789a7..a278338f7 100644 --- a/website/docs/cdktf/python/d/workspace_run_task.html.markdown +++ b/website/docs/cdktf/python/d/workspace_run_task.html.markdown @@ -16,18 +16,15 @@ Use this data source to get information about a [Workspace Run tasks](https://de ## 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_workspace_run_task import DataTfeWorkspaceRunTask -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - DataTfeWorkspaceRunTask(self, "foobar", + tfe.data_tfe_workspace_run_task.DataTfeWorkspaceRunTask(self, "foobar", task_id="task-def456", workspace_id="ws-abc123" ) @@ -48,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 + \ 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 488a1e9d5..b2c222f1a 100644 --- a/website/docs/cdktf/python/index.html.markdown +++ b/website/docs/cdktf/python/index.html.markdown @@ -73,13 +73,14 @@ For production use, you should constrain the acceptable provider versions via configuration, to ensure that new versions with breaking changes will not be automatically installed by `terraform init` in the future: -```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 -class MyConvertedCode(TerraformStack): - def __init__(self, scope, name): - super().__init__(scope, name) +```hcl +terraform { + required_providers { + tfe = { + version = "~> 0.50.0" + } + } +} ``` As this provider is still at version zero, you should constrain the acceptable @@ -89,7 +90,7 @@ The above snippet using `required_providers` is for Terraform 0.13+; if you are ```hcl provider "tfe" { - version = "~> 0.49.2" + version = "~> 0.50.0" ... } ``` @@ -98,27 +99,17 @@ For more information on provider installation and constraining provider versions ## 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`. -# See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.organization import Organization -from imports.tfe.provider import TfeProvider -class MyConvertedCode(TerraformStack): - def __init__(self, scope, name, *, email, name): - super().__init__(scope, name) - TfeProvider(self, "tfe", - hostname=hostname.string_value, - token=token.string_value - ) - Organization(self, "org", - email=email, - name=name - ) +```hcl +provider "tfe" { + hostname = var.hostname # Optional, defaults to Terraform Cloud `app.terraform.io` + token = var.token + version = "~> 0.50.0" +} + +# Create an organization +resource "tfe_organization" "org" { + # ... +} ``` ## Argument Reference @@ -138,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 + \ 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 a73146090..09c1f631e 100644 --- a/website/docs/cdktf/python/r/admin_organization_settings.markdown +++ b/website/docs/cdktf/python/r/admin_organization_settings.markdown @@ -17,45 +17,39 @@ incorporating an admin token in your provider config. 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`. -# See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.admin_organization_settings import AdminOrganizationSettings -from imports.tfe.organization import Organization -from imports.tfe.provider import TfeProvider -class MyConvertedCode(TerraformStack): - def __init__(self, scope, name): - super().__init__(scope, name) - TfeProvider(self, "tfe", - hostname=hostname.string_value, - token=token.string_value - ) - admin = TfeProvider(self, "tfe_1", - alias="admin", - hostname=hostname.string_value, - token=admin_token.string_value - ) - a_module_consumer = Organization(self, "a-module-consumer", - email="admin@company.com", - name="my-other-org" - ) - a_module_producer = Organization(self, "a-module-producer", - email="admin@company.com", - name="my-org" - ) - AdminOrganizationSettings(self, "test-settings", - access_beta_tools=False, - global_module_sharing=False, - module_sharing_consumer_organizations=[a_module_consumer.name], - organization=a_module_producer.name, - provider="${tfe.admin}", - workspace_limit=15 - ) +```hcl + +provider "tfe" { + hostname = var.hostname + token = var.token +} + +provider "tfe" { + alias = "admin" + hostname = var.hostname + token = var.admin_token +} + +resource "tfe_organization" "a-module-producer" { + name = "my-org" + email = "admin@company.com" +} + +resource "tfe_organization" "a-module-consumer" { + name = "my-other-org" + email = "admin@company.com" +} + +resource "tfe_admin_organization_settings" "test-settings" { + provider = tfe.admin + organization = tfe_organization.a-module-producer.name + workspace_limit = 15 + access_beta_tools = false + global_module_sharing = false + module_sharing_consumer_organizations = [ + tfe_organization.a-module-consumer.name + ] +} ``` ## Argument Reference @@ -76,4 +70,4 @@ The following arguments are supported: This resource does not manage the creation of an organization and there is no need to import it. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/agent_pool.html.markdown b/website/docs/cdktf/python/r/agent_pool.html.markdown index f7947edeb..7f5d6afd1 100644 --- a/website/docs/cdktf/python/r/agent_pool.html.markdown +++ b/website/docs/cdktf/python/r/agent_pool.html.markdown @@ -18,25 +18,21 @@ pools to run remote operations with isolated, private, or on-premises infrastruc 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 -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" ) - AgentPool(self, "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), organization_scoped=True ) ``` @@ -47,7 +43,7 @@ The following arguments are supported: * `name` - (Required) Name of the agent pool. * `organization` - (Optional) Name of the organization. If omitted, organization must be defined in the provider config. -* `organization_scoped` - (Optional) Whether or not the agent pool is scoped to all workspaces in the organization. Defaults to `true`. +* `organization_scoped` - (Optional) Whether or not the agent pool is scoped to all workspaces in the organization. Defaults to `true`. Should be `false` when limiting workspaces that can use the agent pool with the [tfe_agent_pool_allowed_workspaces](agent_pool_allowed_workspaces.html) resource. ## Attributes Reference @@ -67,4 +63,4 @@ terraform import tfe_agent_pool.test apool-rW0KoLSlnuNb5adB terraform import tfe_workspace.test my-org-name/my-agent-pool-name ``` - \ No newline at end of file + \ 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 9e24ffa93..d993f5b18 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 @@ -20,36 +20,32 @@ for Business account. 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 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 -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_workspace = tfe.workspace.Workspace(self, "test-workspace", name="my-workspace-name", - organization=Token.as_string(tfe_organization_test.name) + organization=cdktf.Token.as_string(tfe_organization_test_organization.name) ) - 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_scoped=True + organization=cdktf.Token.as_string(tfe_organization_test_organization.name), + organization_scoped=False ) - AgentPoolAllowedWorkspaces(self, "foobar", - agent_pool_id=Token.as_string(tfe_agent_pool_foobar.id), - allowed_workspace_ids=[test.id] + 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) + ] ) ``` @@ -70,4 +66,4 @@ terraform import tfe_agent_pool_allowed_workspaces.foobar apool-rW0KoLSlnuNb5adB ``` - \ No newline at end of file + \ 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 357e859cc..7cc7972c4 100644 --- a/website/docs/cdktf/python/r/agent_token.html.markdown +++ b/website/docs/cdktf/python/r/agent_token.html.markdown @@ -17,29 +17,24 @@ These tokens allow agents to communicate securely with Terraform Cloud. 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.agent_token import AgentToken -from imports.tfe.organization import Organization -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_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.id + organization=cdktf.Token.as_string(tfe_organization_test_organization.id) ) - AgentToken(self, "test-agent-token", - agent_pool_id=test_agent_pool.id, + tfe.agent_token.AgentToken(self, "test-agent-token", + agent_pool_id=cdktf.Token.as_string(tfe_agent_pool_test_agent_pool.id), description="my-agent-token-name" ) ``` @@ -57,4 +52,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/python/r/no_code_module.html.markdown b/website/docs/cdktf/python/r/no_code_module.html.markdown index 678ab8cd0..797abcd7c 100644 --- a/website/docs/cdktf/python/r/no_code_module.html.markdown +++ b/website/docs/cdktf/python/r/no_code_module.html.markdown @@ -16,33 +16,28 @@ Creates, updates and destroys no-code module for registry modules. 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 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.no_code_module import NoCodeModule -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) - foobar = Organization(self, "foobar", + tfe_organization_foobar = tfe.organization.Organization(self, "foobar", email="admin@company.com", name="my-org-name" ) - tfe_registry_module_foobar = RegistryModule(self, "foobar_1", + tfe_registry_module_foobar = tfe.registry_module.RegistryModule(self, "foobar_1", module_provider="my_provider", name="test_module", - organization=foobar.id + organization=cdktf.Token.as_string(tfe_organization_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. tfe_registry_module_foobar.override_logical_id("foobar") - tfe_no_code_module_foobar = NoCodeModule(self, "foobar_2", - organization=foobar.id, - registry_module=Token.as_string(tfe_registry_module_foobar.id) + tfe_no_code_module_foobar = tfe.no_code_module.NoCodeModule(self, "foobar_2", + organization=cdktf.Token.as_string(tfe_organization_foobar.id), + registry_module=cdktf.Token.as_string(tfe_registry_module_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. tfe_no_code_module_foobar.override_logical_id("foobar") @@ -51,33 +46,28 @@ class MyConvertedCode(TerraformStack): Creating a no-code module with variable options: ```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.no_code_module import NoCodeModule -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) - foobar = Organization(self, "foobar", + tfe_organization_foobar = tfe.organization.Organization(self, "foobar", email="admin@company.com", name="my-org-name" ) - tfe_registry_module_foobar = RegistryModule(self, "foobar_1", + tfe_registry_module_foobar = tfe.registry_module.RegistryModule(self, "foobar_1", module_provider="my_provider", name="test_module", - organization=foobar.id + organization=cdktf.Token.as_string(tfe_organization_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. tfe_registry_module_foobar.override_logical_id("foobar") - tfe_no_code_module_foobar = NoCodeModule(self, "foobar_2", - organization=foobar.id, - registry_module=Token.as_string(tfe_registry_module_foobar.id), + tfe_no_code_module_foobar = tfe.no_code_module.NoCodeModule(self, "foobar_2", + organization=cdktf.Token.as_string(tfe_organization_foobar.id), + registry_module=cdktf.Token.as_string(tfe_registry_module_foobar.id), variable_options=[NoCodeModuleVariableOptions( name="ami", options=["ami-0", "ami-1", "ami-2"], @@ -119,4 +109,4 @@ No-code modules can be imported; use `` as the import ID. For terraform import tfe_no_code_module.test nocode-qV9JnKRkmtMa4zcA ``` - \ No newline at end of file + \ 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 39c9d68ef..d84e282c3 100644 --- a/website/docs/cdktf/python/r/notification_configuration.html.markdown +++ b/website/docs/cdktf/python/r/notification_configuration.html.markdown @@ -19,36 +19,32 @@ Each workspace can have up to 20 notification configurations, and they apply to 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 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.notification_configuration import NotificationConfiguration -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): 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" ) - tfe_workspace_test = Workspace(self, "test_1", + tfe_workspace_test = tfe.workspace.Workspace(self, "test_1", name="my-workspace-name", - organization=test.id + organization=cdktf.Token.as_string(tfe_organization_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_test.override_logical_id("test") - tfe_notification_configuration_test = NotificationConfiguration(self, "test_2", + tfe_notification_configuration_test = + tfe.notification_configuration.NotificationConfiguration(self, "test_2", destination_type="generic", enabled=True, name="my-test-notification-configuration", triggers=["run:created", "run:planning", "run:errored"], url="https://example.com", - workspace_id=Token.as_string(tfe_workspace_test.id) + workspace_id=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_notification_configuration_test.override_logical_id("test") @@ -57,43 +53,41 @@ class MyConvertedCode(TerraformStack): With `destination_type` of `email`: ```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.notification_configuration import NotificationConfiguration -from imports.tfe.organization import Organization -from imports.tfe.organization_membership import OrganizationMembership -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" ) - tfe_organization_membership_test = OrganizationMembership(self, "test_1", + tfe_organization_membership_test = + tfe.organization_membership.OrganizationMembership(self, "test_1", email="test.member@company.com", organization="my-org-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_organization_membership_test.override_logical_id("test") - tfe_workspace_test = Workspace(self, "test_2", + tfe_workspace_test = tfe.workspace.Workspace(self, "test_2", name="my-workspace-name", - organization=test.id + organization=cdktf.Token.as_string(tfe_organization_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_test.override_logical_id("test") - tfe_notification_configuration_test = NotificationConfiguration(self, "test_3", + tfe_notification_configuration_test = + tfe.notification_configuration.NotificationConfiguration(self, "test_3", destination_type="email", - email_user_ids=[Token.as_string(tfe_organization_membership_test.user_id)], + email_user_ids=[ + cdktf.Token.as_string(tfe_organization_membership_test.user_id) + ], enabled=True, name="my-test-email-notification-configuration", triggers=["run:created", "run:planning", "run:errored"], - workspace_id=Token.as_string(tfe_workspace_test.id) + workspace_id=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_notification_configuration_test.override_logical_id("test") @@ -102,45 +96,43 @@ class MyConvertedCode(TerraformStack): (**TFE only**) With `destination_type` of `email`, using `email_addresses` list and `email_users`: ```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.notification_configuration import NotificationConfiguration -from imports.tfe.organization import Organization -from imports.tfe.organization_membership import OrganizationMembership -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" ) - tfe_organization_membership_test = OrganizationMembership(self, "test_1", + tfe_organization_membership_test = + tfe.organization_membership.OrganizationMembership(self, "test_1", email="test.member@company.com", organization="my-org-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_organization_membership_test.override_logical_id("test") - tfe_workspace_test = Workspace(self, "test_2", + tfe_workspace_test = tfe.workspace.Workspace(self, "test_2", name="my-workspace-name", - organization=test.id + organization=cdktf.Token.as_string(tfe_organization_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_test.override_logical_id("test") - tfe_notification_configuration_test = NotificationConfiguration(self, "test_3", + tfe_notification_configuration_test = + tfe.notification_configuration.NotificationConfiguration(self, "test_3", destination_type="email", email_addresses=["user1@company.com", "user2@company.com", "user3@company.com" ], - email_user_ids=[Token.as_string(tfe_organization_membership_test.user_id)], + email_user_ids=[ + cdktf.Token.as_string(tfe_organization_membership_test.user_id) + ], enabled=True, name="my-test-email-notification-configuration", triggers=["run:created", "run:planning", "run:errored"], - workspace_id=Token.as_string(tfe_workspace_test.id) + workspace_id=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_notification_configuration_test.override_logical_id("test") @@ -188,4 +180,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/python/r/oauth_client.html.markdown b/website/docs/cdktf/python/r/oauth_client.html.markdown index 7b06126a3..f739902ae 100644 --- a/website/docs/cdktf/python/r/oauth_client.html.markdown +++ b/website/docs/cdktf/python/r/oauth_client.html.markdown @@ -19,18 +19,15 @@ provider. 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.oauth_client import OauthClient -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - OauthClient(self, "test", + tfe.oauth_client.OauthClient(self, "test", api_url="https://api.github.com", http_url="https://github.com", name="my-github-oauth-client", @@ -47,18 +44,15 @@ See [documentation for TFC/E setup](https://developer.hashicorp.com/terraform/cl **Note:** This resource requires a private key when creating Azure DevOps Server OAuth clients. ```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 -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - OauthClient(self, "test", + tfe.oauth_client.OauthClient(self, "test", api_url="https://ado.example.com", http_url="https://ado.example.com", name="my-ado-oauth-client", @@ -77,18 +71,15 @@ When using BitBucket Server, you must use three required fields: `key`, `secret` ```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 -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - OauthClient(self, "test", + tfe.oauth_client.OauthClient(self, "test", api_url="https://bbs.example.com", http_url="https://bss.example.com", key="", @@ -130,4 +121,4 @@ Link. * `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 + \ 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 bdcc33f7b..f32912a93 100644 --- a/website/docs/cdktf/python/r/organization.html.markdown +++ b/website/docs/cdktf/python/r/organization.html.markdown @@ -16,18 +16,15 @@ Manages organizations. 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 -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - Organization(self, "test", + tfe.organization.Organization(self, "test", email="admin@company.com", name="my-org-name" ) @@ -64,4 +61,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/python/r/organization_membership.html.markdown b/website/docs/cdktf/python/r/organization_membership.html.markdown index 390a2e73c..1582dadb2 100644 --- a/website/docs/cdktf/python/r/organization_membership.html.markdown +++ b/website/docs/cdktf/python/r/organization_membership.html.markdown @@ -24,18 +24,15 @@ be updated manually. 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_membership import OrganizationMembership -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - OrganizationMembership(self, "test", + tfe.organization_membership.OrganizationMembership(self, "test", email="user@company.com", organization="my-org-name" ) @@ -69,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 + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/organization_module_sharing.html.markdown b/website/docs/cdktf/python/r/organization_module_sharing.html.markdown index 165fb1666..492a62139 100644 --- a/website/docs/cdktf/python/r/organization_module_sharing.html.markdown +++ b/website/docs/cdktf/python/r/organization_module_sharing.html.markdown @@ -19,18 +19,15 @@ use of an admin token and is for Terraform Enterprise only. 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_module_sharing import OrganizationModuleSharing -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - OrganizationModuleSharing(self, "test", + tfe.organization_module_sharing.OrganizationModuleSharing(self, "test", module_consumers=["my-org-name-2", "my-org-name-3"], organization="my-org-name" ) @@ -43,4 +40,4 @@ The following arguments are supported: * `organization` - (Optional) Name of the organization. If omitted, organization must be defined in the provider config. * `module_consumers` - (Required) Names of the organizations to consume the module registry. - \ No newline at end of file + \ 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 076f8a0b6..535677464 100644 --- a/website/docs/cdktf/python/r/organization_run_task.html.markdown +++ b/website/docs/cdktf/python/r/organization_run_task.html.markdown @@ -18,18 +18,15 @@ The tfe_organization_run_task resource creates, updates and destroys [Organizati 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_run_task import OrganizationRunTask -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - OrganizationRunTask(self, "example", + tfe.organization_run_task.OrganizationRunTask(self, "example", description="An example task", enabled=True, name="task-name", @@ -63,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 + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/organization_token.html.markdown b/website/docs/cdktf/python/r/organization_token.html.markdown index bed2c0235..66f833f7b 100644 --- a/website/docs/cdktf/python/r/organization_token.html.markdown +++ b/website/docs/cdktf/python/r/organization_token.html.markdown @@ -17,18 +17,15 @@ can be used to act as the organization service account. 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_token import OrganizationToken -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - OrganizationToken(self, "test", + tfe.organization_token.OrganizationToken(self, "test", organization="my-org-name" ) ``` @@ -49,28 +46,15 @@ never expire. When a token has an expiry: -```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.organization_token import OrganizationToken -from imports.time.rotating import Rotating -class MyConvertedCode(TerraformStack): - def __init__(self, scope, name): - super().__init__(scope, name) - # The following providers are missing schema information and might need manual adjustments to synthesize correctly: time. - # For a more precise conversion please use the --provider flag in convert. - example = Rotating(self, "example", - rotation_days=30 - ) - OrganizationToken(self, "test", - expired_at=Token.as_string(example.rotation_rfc3339), - organization=Token.as_string(org.name) - ) +```hcl +resource "time_rotating" "example" { + rotation_days = 30 +} + +resource "tfe_organization_token" "test" { + organization = data.tfe_organization.org.name + expired_at = time_rotating.example.rotation_rfc3339 +} ``` ## Attributes Reference @@ -87,4 +71,4 @@ For example: terraform import tfe_organization_token.test my-org-name ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/policy.html.markdown b/website/docs/cdktf/python/r/policy.html.markdown index 793b3429b..5da71d87c 100644 --- a/website/docs/cdktf/python/r/policy.html.markdown +++ b/website/docs/cdktf/python/r/policy.html.markdown @@ -21,18 +21,15 @@ enforced during runs. Basic usage for Sentinel: ```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.policy import Policy -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - Policy(self, "test", + tfe.policy.Policy(self, "test", description="This policy always passes", enforce_mode="hard-mandatory", kind="sentinel", @@ -45,18 +42,15 @@ class MyConvertedCode(TerraformStack): Basic usage for Open Policy Agent(OPA): ```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.policy import Policy -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - Policy(self, "test", + tfe.policy.Policy(self, "test", description="This policy always passes", enforce_mode="mandatory", kind="opa", @@ -97,4 +91,4 @@ import ID. For example: terraform import tfe_policy.test my-org-name/pol-wAs3zYmWAhYK7peR ``` - \ No newline at end of file + \ 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 afa0bedd6..421c6b526 100644 --- a/website/docs/cdktf/python/r/policy_set.html.markdown +++ b/website/docs/cdktf/python/r/policy_set.html.markdown @@ -21,85 +21,54 @@ 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", - description="A brand new policy set", - kind="sentinel", - name="my-policy-set", - organization="my-org-name", - policies_path="policies/my-policy-set", - 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" + 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", - 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)], - 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" + policy_ids = [tfe_sentinel_policy.test.id] + workspace_ids = [tfe_workspace.test.id] +} ``` Manually uploaded policy set, in lieu of VCS: -```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_slug import DataTfeSlug -from imports.tfe.policy_set import PolicySet -class MyConvertedCode(TerraformStack): - def __init__(self, scope, name): - super().__init__(scope, name) - test = DataTfeSlug(self, "test", - source_path="policies/my-policy-set" - ) - tfe_policy_set_test = PolicySet(self, "test_1", - description="A brand new policy set", - name="my-policy-set", - organization="my-org-name", - slug=Token.as_string_map(test), - workspace_ids=[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_policy_set_test.override_logical_id("test") +```hcl +data "tfe_slug" "test" { + // point to the local directory where the policies are located. + source_path = "policies/my-policy-set" +} + +resource "tfe_policy_set" "test" { + name = "my-policy-set" + description = "A brand new policy set" + organization = "my-org-name" + workspace_ids = [tfe_workspace.test.id] + + // reference the tfe_slug data source. + slug = data.tfe_slug.test +} ``` ## Argument Reference @@ -159,4 +128,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 + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/policy_set_parameter.html.markdown b/website/docs/cdktf/python/r/policy_set_parameter.html.markdown index 002101944..9758004e6 100644 --- a/website/docs/cdktf/python/r/policy_set_parameter.html.markdown +++ b/website/docs/cdktf/python/r/policy_set_parameter.html.markdown @@ -16,32 +16,28 @@ Creates, updates and destroys policy set parameters. 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 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.organization import Organization -from imports.tfe.policy_set import PolicySet -from imports.tfe.policy_set_parameter import PolicySetParameter -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" ) - tfe_policy_set_test = PolicySet(self, "test_1", + tfe_policy_set_test = tfe.policy_set.PolicySet(self, "test_1", name="my-policy-set-name", - organization=test.id + organization=cdktf.Token.as_string(tfe_organization_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_policy_set_test.override_logical_id("test") - tfe_policy_set_parameter_test = PolicySetParameter(self, "test_2", + tfe_policy_set_parameter_test = + tfe.policy_set_parameter.PolicySetParameter(self, "test_2", key="my_key_name", - policy_set_id=Token.as_string(tfe_policy_set_test.id), + policy_set_id=cdktf.Token.as_string(tfe_policy_set_test.id), value="my_value_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. @@ -73,4 +69,4 @@ terraform import tfe_policy_set_parameter.test polset-wAs3zYmWAhYK7peR/var-5rTwn ``` - \ No newline at end of file + \ 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 abdf640b8..0763e2626 100644 --- a/website/docs/cdktf/python/r/project.html.markdown +++ b/website/docs/cdktf/python/r/project.html.markdown @@ -16,25 +16,21 @@ Provides a project resource. 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.project import Project -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" ) - Project(self, "test", + tfe.project.Project(self, "test", name="projectname", - organization=test_organization.name + organization=cdktf.Token.as_string(tfe_organization_test_organization.name) ) ``` @@ -59,4 +55,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/python/r/project_policy_set.html.markdown b/website/docs/cdktf/python/r/project_policy_set.html.markdown index a2687c8f0..f3a5cd235 100644 --- a/website/docs/cdktf/python/r/project_policy_set.html.markdown +++ b/website/docs/cdktf/python/r/project_policy_set.html.markdown @@ -16,40 +16,34 @@ Adds and removes policy sets from a project 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 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.organization import Organization -from imports.tfe.policy_set import PolicySet -from imports.tfe.project import Project -from imports.tfe.project_policy_set import ProjectPolicySet -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" ) - tfe_policy_set_test = PolicySet(self, "test_1", + tfe_policy_set_test = tfe.policy_set.PolicySet(self, "test_1", description="Some description.", name="my-policy-set", - organization=test.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_policy_set_test.override_logical_id("test") - tfe_project_test = Project(self, "test_2", + tfe_project_test = tfe.project.Project(self, "test_2", name="my-project-name", - organization=test.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_project_policy_set_test = ProjectPolicySet(self, "test_3", - policy_set_id=Token.as_string(tfe_policy_set_test.id), - project_id=Token.as_string(tfe_project_test.id) + tfe_project_policy_set_test = tfe.project_policy_set.ProjectPolicySet(self, "test_3", + policy_set_id=cdktf.Token.as_string(tfe_policy_set_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_policy_set_test.override_logical_id("test") @@ -74,4 +68,4 @@ Project Policy Sets can be imported; use `// \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/project_variable_set.html.markdown b/website/docs/cdktf/python/r/project_variable_set.html.markdown index 066c7d5e0..da5561bc7 100644 --- a/website/docs/cdktf/python/r/project_variable_set.html.markdown +++ b/website/docs/cdktf/python/r/project_variable_set.html.markdown @@ -16,40 +16,35 @@ Adds and removes variable sets from a project 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 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.organization import Organization -from imports.tfe.project import Project -from imports.tfe.project_variable_set import ProjectVariableSet -from imports.tfe.variable_set import VariableSet -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" ) - tfe_project_test = Project(self, "test_1", + tfe_project_test = tfe.project.Project(self, "test_1", name="my-project-name", - organization=test.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_variable_set_test = VariableSet(self, "test_2", + tfe_variable_set_test = tfe.variable_set.VariableSet(self, "test_2", description="Some description.", name="Test Varset", - organization=test.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_variable_set_test.override_logical_id("test") - tfe_project_variable_set_test = ProjectVariableSet(self, "test_3", - project_id=Token.as_string(tfe_project_test.id), - variable_set_id=Token.as_string(tfe_variable_set_test.id) + tfe_project_variable_set_test = + tfe.project_variable_set.ProjectVariableSet(self, "test_3", + project_id=cdktf.Token.as_string(tfe_project_test.id), + variable_set_id=cdktf.Token.as_string(tfe_variable_set_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_variable_set_test.override_logical_id("test") @@ -74,4 +69,4 @@ Project Variable Sets can be imported; use `// \ 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 11c5bef3b..d73e2216d 100644 --- a/website/docs/cdktf/python/r/registry_module.html.markdown +++ b/website/docs/cdktf/python/r/registry_module.html.markdown @@ -16,35 +16,30 @@ Terraform Cloud's private module registry helps you share Terraform modules acro Basic usage with VCS: ```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", vcs_repo=RegistryModuleVcsRepo( 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) ) ) ``` @@ -52,31 +47,27 @@ class MyConvertedCode(TerraformStack): Create private registry module with GitHub App: ```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.data_tfe_github_app_installation import DataTfeGithubAppInstallation -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" ) - gha_installation = DataTfeGithubAppInstallation(self, "gha_installation", + data_tfe_github_app_installation_gha_installation = + tfe.data_tfe_github_app_installation.DataTfeGithubAppInstallation(self, "gha_installation", name="YOUR_GH_NAME" ) - RegistryModule(self, "petstore", - organization=test_organization.name, + tfe.registry_module.RegistryModule(self, "petstore", + organization=cdktf.Token.as_string(tfe_organization_test_organization.name), vcs_repo=RegistryModuleVcsRepo( display_identifier="GH_NAME/REPO_NAME", - github_app_installation_id=Token.as_string(gha_installation.id), + github_app_installation_id=cdktf.Token.as_string(data_tfe_github_app_installation_gha_installation.id), identifier="GH_NAME/REPO_NAME" ) ) @@ -85,26 +76,22 @@ class MyConvertedCode(TerraformStack): Create private registry module without VCS: ```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_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" ) - RegistryModule(self, "test-private-registry-module", + tfe.registry_module.RegistryModule(self, "test-private-registry-module", module_provider="my_provider", name="another_test_module", - organization=test_organization.name, + organization=cdktf.Token.as_string(tfe_organization_test_organization.name), registry_name="private" ) ``` @@ -112,27 +99,23 @@ class MyConvertedCode(TerraformStack): Create public registry module: ```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_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" ) - RegistryModule(self, "test-public-registry-module", + tfe.registry_module.RegistryModule(self, "test-public-registry-module", module_provider="aws", name="vpc", namespace="terraform-aws-modules", - organization=test_organization.name, + organization=cdktf.Token.as_string(tfe_organization_test_organization.name), registry_name="public" ) ``` @@ -140,33 +123,29 @@ class MyConvertedCode(TerraformStack): Create no-code provisioning registry module: ```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.no_code_module import NoCodeModule -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_no_code_provisioning_registry_module = RegistryModule(self, "test-no-code-provisioning-registry-module", + tfe_registry_module_test_no_code_provisioning_registry_module = + tfe.registry_module.RegistryModule(self, "test-no-code-provisioning-registry-module", module_provider="aws", name="vpc", namespace="terraform-aws-modules", - organization=test_organization.name, + organization=cdktf.Token.as_string(tfe_organization_test_organization.name), registry_name="public" ) - NoCodeModule(self, "foobar", - organization=test_organization.id, - registry_module=test_no_code_provisioning_registry_module.id + tfe.no_code_module.NoCodeModule(self, "foobar", + organization=cdktf.Token.as_string(tfe_organization_test_organization.id), + registry_module=cdktf.Token.as_string(tfe_registry_module_test_no_code_provisioning_registry_module.id) ) ``` @@ -218,4 +197,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/python/r/run_trigger.html.markdown b/website/docs/cdktf/python/r/run_trigger.html.markdown index e49570aed..f4dd3b56c 100644 --- a/website/docs/cdktf/python/r/run_trigger.html.markdown +++ b/website/docs/cdktf/python/r/run_trigger.html.markdown @@ -19,34 +19,29 @@ to up to 20 source workspaces. 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.run_trigger import RunTrigger -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 = Organization(self, "test-organization", + tfe_organization_test_organization = tfe.organization.Organization(self, "test-organization", email="admin@company.com", name="my-org-name" ) - test_sourceable = Workspace(self, "test-sourceable", + tfe_workspace_test_sourceable = tfe.workspace.Workspace(self, "test-sourceable", name="my-sourceable-workspace-name", - organization=test_organization.id + organization=cdktf.Token.as_string(tfe_organization_test_organization.id) ) - test_workspace = Workspace(self, "test-workspace", + tfe_workspace_test_workspace = tfe.workspace.Workspace(self, "test-workspace", name="my-workspace-name", - organization=test_organization.id + organization=cdktf.Token.as_string(tfe_organization_test_organization.id) ) - RunTrigger(self, "test", - sourceable_id=test_sourceable.id, - workspace_id=test_workspace.id + tfe.run_trigger.RunTrigger(self, "test", + sourceable_id=cdktf.Token.as_string(tfe_workspace_test_sourceable.id), + workspace_id=cdktf.Token.as_string(tfe_workspace_test_workspace.id) ) ``` @@ -70,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 + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/saml_settings.html.markdown b/website/docs/cdktf/python/r/saml_settings.html.markdown index e955b370a..0fa49386c 100644 --- a/website/docs/cdktf/python/r/saml_settings.html.markdown +++ b/website/docs/cdktf/python/r/saml_settings.html.markdown @@ -15,28 +15,17 @@ Use this resource to create, update and destroy SAML Settings. It applies only t Basic usage for SAML Settings: -```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`. -# See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.provider import TfeProvider -from imports.tfe.saml_settings import SamlSettings -class MyConvertedCode(TerraformStack): - def __init__(self, scope, name): - super().__init__(scope, name) - TfeProvider(self, "tfe", - hostname=hostname.string_value, - token=admin_token.string_value - ) - SamlSettings(self, "this", - idp_cert="foobarCertificate", - slo_endpoint_url="https://example.com/slo_endpoint_url", - sso_endpoint_url="https://example.com/sso_endpoint_url" - ) +```hcl +provider "tfe" { + hostname = var.hostname + token = var.admin_token +} + +resource "tfe_saml_settings" "this" { + idp_cert = "foobarCertificate" + slo_endpoint_url = "https://example.com/slo_endpoint_url" + sso_endpoint_url = "https://example.com/sso_endpoint_url" + } ``` ## Argument Reference @@ -75,4 +64,4 @@ SAML Settings can be imported. terraform import tfe_saml_settings.this saml ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/sentinel_policy.html.markdown b/website/docs/cdktf/python/r/sentinel_policy.html.markdown index c9f5d2db2..73d0ed16c 100644 --- a/website/docs/cdktf/python/r/sentinel_policy.html.markdown +++ b/website/docs/cdktf/python/r/sentinel_policy.html.markdown @@ -21,18 +21,15 @@ enforced during runs. 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_policy import SentinelPolicy -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - SentinelPolicy(self, "test", + tfe.sentinel_policy.SentinelPolicy(self, "test", description="This policy always passes", enforce_mode="hard-mandatory", name="my-policy-name", @@ -66,4 +63,4 @@ import ID. For example: terraform import tfe_sentinel_policy.test my-org-name/pol-wAs3zYmWAhYK7peR ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/ssh_key.html.markdown b/website/docs/cdktf/python/r/ssh_key.html.markdown index 5a43faf22..177974c7f 100644 --- a/website/docs/cdktf/python/r/ssh_key.html.markdown +++ b/website/docs/cdktf/python/r/ssh_key.html.markdown @@ -17,18 +17,15 @@ key. An organization can have multiple SSH keys available. 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.ssh_key import SshKey -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - SshKey(self, "test", + tfe.ssh_key.SshKey(self, "test", key="private-ssh-key", name="my-ssh-key-name", organization="my-org-name" @@ -52,4 +49,4 @@ The following arguments are supported: Because the Terraform Enterprise API does not return the private SSH key content, this resource cannot be imported. - \ 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 5232b4f29..bec6f6a88 100644 --- a/website/docs/cdktf/python/r/team.html.markdown +++ b/website/docs/cdktf/python/r/team.html.markdown @@ -16,18 +16,15 @@ Manages teams. 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.team import Team -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - Team(self, "test", + tfe.team.Team(self, "test", name="my-team-name", organization="my-org-name" ) @@ -36,18 +33,15 @@ class MyConvertedCode(TerraformStack): Organization Permission 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.team import Team -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - Team(self, "test", + tfe.team.Team(self, "test", name="my-team-name", organization="my-org-name", organization_access=TeamOrganizationAccess( @@ -97,4 +91,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/python/r/team_access.html.markdown b/website/docs/cdktf/python/r/team_access.html.markdown index 0cf68d501..ab50b1a2d 100644 --- a/website/docs/cdktf/python/r/team_access.html.markdown +++ b/website/docs/cdktf/python/r/team_access.html.markdown @@ -16,33 +16,28 @@ Associate a team to permissions on a workspace. 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 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.team import Team -from imports.tfe.team_access import TeamAccess -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 = Team(self, "test", + tfe_team_test = tfe.team.Team(self, "test", name="my-team-name", organization="my-org-name" ) - tfe_workspace_test = Workspace(self, "test_1", + tfe_workspace_test = tfe.workspace.Workspace(self, "test_1", name="my-workspace-name", organization="my-org-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_workspace_test.override_logical_id("test") - tfe_team_access_test = TeamAccess(self, "test_2", + tfe_team_access_test = tfe.team_access.TeamAccess(self, "test_2", access="read", - team_id=test.id, - workspace_id=Token.as_string(tfe_workspace_test.id) + team_id=cdktf.Token.as_string(tfe_team_test.id), + workspace_id=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_team_access_test.override_logical_id("test") @@ -82,4 +77,4 @@ example: terraform import tfe_team_access.test my-org-name/my-workspace-name/tws-8S5wnRbRpogw6apb ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/team_member.html.markdown b/website/docs/cdktf/python/r/team_member.html.markdown index cbb0466be..e146c6558 100644 --- a/website/docs/cdktf/python/r/team_member.html.markdown +++ b/website/docs/cdktf/python/r/team_member.html.markdown @@ -25,24 +25,20 @@ used once. All four resources cannot be used for the same team simultaneously. 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.team import Team -from imports.tfe.team_member import TeamMember -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - test = Team(self, "test", + tfe_team_test = tfe.team.Team(self, "test", name="my-team-name", organization="my-org-name" ) - tfe_team_member_test = TeamMember(self, "test_1", - team_id=test.id, + tfe_team_member_test = tfe.team_member.TeamMember(self, "test_1", + team_id=cdktf.Token.as_string(tfe_team_test.id), username="sander" ) # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. @@ -65,4 +61,4 @@ example: terraform import tfe_team_member.test team-47qC3LmA47piVan7/sander ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/team_members.html.markdown b/website/docs/cdktf/python/r/team_members.html.markdown index f04aedc6e..697cfe48b 100644 --- a/website/docs/cdktf/python/r/team_members.html.markdown +++ b/website/docs/cdktf/python/r/team_members.html.markdown @@ -25,24 +25,20 @@ used once. All four resources cannot be used for the same team simultaneously. 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.team import Team -from imports.tfe.team_members import TeamMembers -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - test = Team(self, "test", + tfe_team_test = tfe.team.Team(self, "test", name="my-team-name", organization="my-org-name" ) - tfe_team_members_test = TeamMembers(self, "test_1", - team_id=test.id, + tfe_team_members_test = tfe.team_members.TeamMembers(self, "test_1", + team_id=cdktf.Token.as_string(tfe_team_test.id), usernames=["admin", "sander"] ) # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. @@ -52,26 +48,22 @@ class MyConvertedCode(TerraformStack): With a set of usernames: ```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`. +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.team import Team -from imports.tfe.team_members import TeamMembers -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - all_usernames = Fn.toset(["user1", "user2"]) - test = Team(self, "test", + all_usernames = cdktf.Fn.toset(["user1", "user2"]) + tfe_team_test = tfe.team.Team(self, "test", name="my-team-name", organization="my-org-name" ) - tfe_team_members_test = TeamMembers(self, "test_1", - team_id=test.id, - usernames=Token.as_list("${[ for user in ${" + all_usernames + "} : user]}") + tfe_team_members_test = tfe.team_members.TeamMembers(self, "test_1", + team_id=cdktf.Token.as_string(tfe_team_test.id), + usernames=cdktf.Token.as_list("${[ for user in ${" + all_usernames + "} : user]}") ) # 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_members_test.override_logical_id("test") @@ -96,4 +88,4 @@ Team members can be imported; use `` as the import ID. For example: terraform import tfe_team_members.test team-47qC3LmA47piVan7 ``` - \ No newline at end of file + \ 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 b74af25bb..5353364f6 100644 --- a/website/docs/cdktf/python/r/team_organization_member.html.markdown +++ b/website/docs/cdktf/python/r/team_organization_member.html.markdown @@ -24,32 +24,29 @@ an instance of Terraform Enterprise at least as recent as v202004-1. 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 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.organization_membership import OrganizationMembership -from imports.tfe.team import Team -from imports.tfe.team_organization_member import TeamOrganizationMember -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - test = OrganizationMembership(self, "test", + tfe_organization_membership_test = + tfe.organization_membership.OrganizationMembership(self, "test", email="example@hashicorp.com", organization="my-org-name" ) - tfe_team_test = Team(self, "test_1", + tfe_team_test = tfe.team.Team(self, "test_1", name="my-team-name", organization="my-org-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_team_test.override_logical_id("test") - tfe_team_organization_member_test = TeamOrganizationMember(self, "test_2", - organization_membership_id=test.id, - team_id=Token.as_string(tfe_team_test.id) + tfe_team_organization_member_test = + tfe.team_organization_member.TeamOrganizationMember(self, "test_2", + organization_membership_id=cdktf.Token.as_string(tfe_organization_membership_test.id), + team_id=cdktf.Token.as_string(tfe_team_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_team_organization_member_test.override_logical_id("test") @@ -75,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 + \ 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 44a247b02..04ced9cca 100644 --- a/website/docs/cdktf/python/r/team_organization_members.html.markdown +++ b/website/docs/cdktf/python/r/team_organization_members.html.markdown @@ -24,36 +24,37 @@ an instance of Terraform Enterprise at least as recent as v202004-1. 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 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.organization_membership import OrganizationMembership -from imports.tfe.team import Team -from imports.tfe.team_organization_members import TeamOrganizationMembers -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - sample = OrganizationMembership(self, "sample", + tfe_organization_membership_sample = + tfe.organization_membership.OrganizationMembership(self, "sample", email="sample@hashicorp.com", organization="my-org-name" ) - test = OrganizationMembership(self, "test", + tfe_organization_membership_test = + tfe.organization_membership.OrganizationMembership(self, "test", email="example@hashicorp.com", organization="my-org-name" ) - tfe_team_test = Team(self, "test_2", + tfe_team_test = tfe.team.Team(self, "test_2", name="my-team-name", organization="my-org-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_team_test.override_logical_id("test") - tfe_team_organization_members_test = TeamOrganizationMembers(self, "test_3", - organization_membership_ids=[test.id, sample.id], - team_id=Token.as_string(tfe_team_test.id) + tfe_team_organization_members_test = + tfe.team_organization_members.TeamOrganizationMembers(self, "test_3", + organization_membership_ids=[ + cdktf.Token.as_string(tfe_organization_membership_test.id), + cdktf.Token.as_string(tfe_organization_membership_sample.id) + ], + team_id=cdktf.Token.as_string(tfe_team_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_team_organization_members_test.override_logical_id("test") @@ -62,38 +63,35 @@ class MyConvertedCode(TerraformStack): With a set of organization members: ```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, TerraformIterator, 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_membership import OrganizationMembership -from imports.tfe.team import Team -from imports.tfe.team_organization_members import TeamOrganizationMembers -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - all_users = Fn.toset(["user1@hashicorp.com", "user2@hashicorp.com"]) + all_users = cdktf.Fn.toset(["user1@hashicorp.com", "user2@hashicorp.com" + ]) # In most cases loops should be handled in the programming language context and # not inside of the Terraform context. If you are looping over something external, e.g. a variable or a file input # you should consider using a for loop. If you are looping over something only known to Terraform, e.g. a result of a data source # you need to keep this like it is. - all_membership_for_each_iterator = TerraformIterator.from_list( - Token.as_any(all_users)) - OrganizationMembership(self, "all_membership", - email=Token.as_string(all_membership_for_each_iterator.key), + tfe_organization_membership_all_membership_for_each_iterator = + cdktf.TerraformIterator.from_list(cdktf.Token.as_any(all_users)) + tfe.organization_membership.OrganizationMembership(self, "all_membership", + email=cdktf.Token.as_string(tfe_organization_membership_all_membership_for_each_iterator.key), organization="my-org-name", - for_each=all_membership_for_each_iterator + for_each=tfe_organization_membership_all_membership_for_each_iterator ) - test = Team(self, "test", + tfe_team_test = tfe.team.Team(self, "test", name="my-team-name", organization="my-org-name" ) - tfe_team_organization_members_test = TeamOrganizationMembers(self, "test_2", - organization_membership_ids=Token.as_list("${[ for member in ${" + all_users + "} : tfe_organization_membership.all_membership[member].id]}"), - team_id=test.id + tfe_team_organization_members_test = + tfe.team_organization_members.TeamOrganizationMembers(self, "test_2", + organization_membership_ids=cdktf.Token.as_list("${[ for member in ${" + all_users + "} : tfe_organization_membership.all_membership[member].id]}"), + team_id=cdktf.Token.as_string(tfe_team_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_team_organization_members_test.override_logical_id("test") @@ -115,4 +113,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/python/r/team_project_access.html.markdown b/website/docs/cdktf/python/r/team_project_access.html.markdown index ff15b44e0..c731f4db5 100644 --- a/website/docs/cdktf/python/r/team_project_access.html.markdown +++ b/website/docs/cdktf/python/r/team_project_access.html.markdown @@ -16,31 +16,27 @@ Associate a team to permissions on a project. 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.project import Project -from imports.tfe.team import Team -from imports.tfe.team_project_access import TeamProjectAccess -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - test = Project(self, "test", + tfe_project_test = tfe.project.Project(self, "test", name="myproject", organization="my-org-name" ) - admin = Team(self, "admin", + tfe_team_admin = tfe.team.Team(self, "admin", name="my-admin-team", organization="my-org-name" ) - tfe_team_project_access_admin = TeamProjectAccess(self, "admin_2", + tfe_team_project_access_admin = + tfe.team_project_access.TeamProjectAccess(self, "admin_2", access="admin", - project_id=test.id, - team_id=admin.id + 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") @@ -88,36 +84,31 @@ The following permissions apply to all workpsaces (and future workspaces) in the ## Example Usage with Custom Project Permissions ```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.project import Project -from imports.tfe.team import Team -from imports.tfe.team_project_access import TeamProjectAccess -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - test = Project(self, "test", + tfe_project_test = tfe.project.Project(self, "test", name="myproject", organization="my-org-name" ) - dev = Team(self, "dev", + tfe_team_dev = tfe.team.Team(self, "dev", name="my-dev-team", organization="my-org-name" ) - TeamProjectAccess(self, "custom", + tfe.team_project_access.TeamProjectAccess(self, "custom", access="custom", project_access=[TeamProjectAccessProjectAccess( settings="read", teams="none" ) ], - project_id=test.id, - team_id=dev.id, + 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, @@ -146,4 +137,4 @@ example: terraform import tfe_team_project_access.admin tprj-2pmtXpZa4YzVMTPi ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/team_token.html.markdown b/website/docs/cdktf/python/r/team_token.html.markdown index 7e1f2ec67..4c90cfbb8 100644 --- a/website/docs/cdktf/python/r/team_token.html.markdown +++ b/website/docs/cdktf/python/r/team_token.html.markdown @@ -16,24 +16,20 @@ Generates a new team token and overrides existing token if one exists. 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.team import Team -from imports.tfe.team_token import TeamToken -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - test = Team(self, "test", + tfe_team_test = tfe.team.Team(self, "test", name="my-team-name", organization="my-org-name" ) - tfe_team_token_test = TeamToken(self, "test_1", - team_id=test.id + tfe_team_token_test = tfe.team_token.TeamToken(self, "test_1", + team_id=cdktf.Token.as_string(tfe_team_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_team_token_test.override_logical_id("test") @@ -56,31 +52,27 @@ never expire. When a token has an expiry: ```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.team import Team -from imports.tfe.team_token import TeamToken -from imports.time.rotating import Rotating -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +import ...gen.providers.time as time +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) # The following providers are missing schema information and might need manual adjustments to synthesize correctly: time. # For a more precise conversion please use the --provider flag in convert. - test = Team(self, "test", + tfe_team_test = tfe.team.Team(self, "test", name="my-team-name", organization="my-org-name" ) - example = Rotating(self, "example", + time_rotating_example = time.rotating.Rotating(self, "example", rotation_days=30 ) - tfe_team_token_test = TeamToken(self, "test_2", - expired_at=Token.as_string(example.rotation_rfc3339), - team_id=test.id + tfe_team_token_test = tfe.team_token.TeamToken(self, "test_2", + expired_at=cdktf.Token.as_string(time_rotating_example.rotation_rfc3339), + team_id=cdktf.Token.as_string(tfe_team_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_team_token_test.override_logical_id("test") @@ -99,4 +91,4 @@ Team tokens can be imported; use `` as the import ID. For example: terraform import tfe_team_token.test team-47qC3LmA47piVan7 ``` - \ No newline at end of file + \ 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 4945a4a2d..5d19d8f3e 100644 --- a/website/docs/cdktf/python/r/terraform_version.html.markdown +++ b/website/docs/cdktf/python/r/terraform_version.html.markdown @@ -16,18 +16,15 @@ Manage Terraform versions available on Terraform Cloud/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.terraform_version import TerraformVersion -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - TerraformVersion(self, "test", + tfe.terraform_version.TerraformVersion(self, "test", sha="e75ac73deb69a6b3aa667cb0b8b731aee79e2904", url="https://tfe-host.com/path/to/terraform.zip", version="1.1.2-custom" @@ -65,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 Terraform Cloud 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/variable.html.markdown b/website/docs/cdktf/python/r/variable.html.markdown index 364a6b27d..a32fa5e33 100644 --- a/website/docs/cdktf/python/r/variable.html.markdown +++ b/website/docs/cdktf/python/r/variable.html.markdown @@ -16,35 +16,30 @@ Creates, updates and destroys variables. Basic usage for workspaces: ```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.organization import Organization -from imports.tfe.variable import Variable -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" ) - tfe_workspace_test = Workspace(self, "test_1", + tfe_workspace_test = tfe.workspace.Workspace(self, "test_1", name="my-workspace-name", - organization=test.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_workspace_test.override_logical_id("test") - tfe_variable_test = Variable(self, "test_2", + tfe_variable_test = tfe.variable.Variable(self, "test_2", category="terraform", description="a useful description", key="my_key_name", value="my_value_name", - workspace_id=Token.as_string(tfe_workspace_test.id) + workspace_id=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_variable_test.override_logical_id("test") @@ -53,44 +48,39 @@ class MyConvertedCode(TerraformStack): Basic usage for variable sets: ```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.organization import Organization -from imports.tfe.variable import Variable -from imports.tfe.variable_set import VariableSet -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" ) - tfe_variable_set_test = VariableSet(self, "test_1", + tfe_variable_set_test = tfe.variable_set.VariableSet(self, "test_1", description="Some description.", global=False, name="Test Varset", - organization=test.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_variable_set_test.override_logical_id("test") - Variable(self, "test-a", + tfe.variable.Variable(self, "test-a", category="terraform", description="a useful description", key="seperate_variable", value="my_value_name", - variable_set_id=Token.as_string(tfe_variable_set_test.id) + variable_set_id=cdktf.Token.as_string(tfe_variable_set_test.id) ) - Variable(self, "test-b", + tfe.variable.Variable(self, "test-b", category="env", description="an environment variable", key="another_variable", value="my_value_name", - variable_set_id=Token.as_string(tfe_variable_set_test.id) + variable_set_id=cdktf.Token.as_string(tfe_variable_set_test.id) ) ``` @@ -129,41 +119,33 @@ While the `value` field may be referenced in other resources, for safety it is a The `readable_value` attribute is not sensitive, and will not be redacted; instead, it will be null if the variable is sensitive. This allows other resources to reference it, while keeping their plan outputs readable. For example: -```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`. -# See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.variable import Variable -from imports.tfe.workspace import Workspace -class MyConvertedCode(TerraformStack): - def __init__(self, scope, name): - super().__init__(scope, name) - sensitive_var = Variable(self, "sensitive_var", - category="terraform", - key="sensitive_key", - sensitive=True, - value="sensitive_value", - workspace_id=workspace.id - ) - visible_var = Variable(self, "visible_var", - category="terraform", - key="visible_key", - sensitive=False, - value="visible_value", - workspace_id=workspace.id - ) - Workspace(self, "sensitive_workspace", - name="workspace-${" + sensitive_var.value + "}", - organization="organization name" - ) - Workspace(self, "visible_workspace", - name="workspace-${" + visible_var.readable_value + "}", - organization="organization name" - ) +``` +resource "tfe_variable" "sensitive_var" { + key = "sensitive_key" + value = "sensitive_value" // this will be redacted from plan outputs + category = "terraform" + workspace_id = tfe_workspace.workspace.id + sensitive = true +} + +resource "tfe_variable" "visible_var" { + key = "visible_key" + value = "visible_value" // this will be redacted from plan outputs + category = "terraform" + workspace_id = tfe_workspace.workspace.id + sensitive = false +} + +resource "tfe_workspace" "sensitive_workspace" { + name = "workspace-${tfe_variable.sensitive_var.value}" // this will be redacted from plan outputs + organization = "organization name" +} + +resource "tfe_workspace" "visible_workspace" { + name = "workspace-${tfe_variable.visible_var.readable_value}" // this will not be redacted from plan outputs + organization = "organization name" +} + ``` `readable_value` will be null if the variable is sensitive. `readable_value` may not be set explicitly in the resource configuration. @@ -189,4 +171,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/python/r/variable_set.html.markdown b/website/docs/cdktf/python/r/variable_set.html.markdown index e48e36c71..524373524 100644 --- a/website/docs/cdktf/python/r/variable_set.html.markdown +++ b/website/docs/cdktf/python/r/variable_set.html.markdown @@ -16,115 +16,142 @@ Creates, updates and destroys variable sets. 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 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.organization import Organization -from imports.tfe.project import Project -from imports.tfe.project_variable_set import ProjectVariableSet -from imports.tfe.variable import Variable -from imports.tfe.variable_set import VariableSet -from imports.tfe.workspace import Workspace -from imports.tfe.workspace_variable_set import WorkspaceVariableSet -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" ) - tfe_project_test = Project(self, "test_1", + tfe_project_test = tfe.project.Project(self, "test_1", name="projectname", - organization=test.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_variable_set_test = VariableSet(self, "test_2", + tfe_variable_set_test = tfe.variable_set.VariableSet(self, "test_2", description="Some description.", name="Test Varset", - organization=test.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_variable_set_test.override_logical_id("test") - tfe_workspace_test = Workspace(self, "test_3", + tfe_workspace_test = tfe.workspace.Workspace(self, "test_3", name="my-workspace-name", - organization=test.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_workspace_test.override_logical_id("test") - tfe_workspace_variable_set_test = WorkspaceVariableSet(self, "test_4", - variable_set_id=Token.as_string(tfe_variable_set_test.id), - workspace_id=Token.as_string(tfe_workspace_test.id) + tfe_workspace_variable_set_test = + tfe.workspace_variable_set.WorkspaceVariableSet(self, "test_4", + variable_set_id=cdktf.Token.as_string(tfe_variable_set_test.id), + workspace_id=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_workspace_variable_set_test.override_logical_id("test") - tfe_project_variable_set_test = ProjectVariableSet(self, "test_5", - project_id=Token.as_string(tfe_project_test.id), - variable_set_id=Token.as_string(tfe_variable_set_test.id) + tfe_project_variable_set_test = + tfe.project_variable_set.ProjectVariableSet(self, "test_5", + project_id=cdktf.Token.as_string(tfe_project_test.id), + variable_set_id=cdktf.Token.as_string(tfe_variable_set_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_variable_set_test.override_logical_id("test") - Variable(self, "test-a", + tfe.variable.Variable(self, "test-a", category="terraform", description="a useful description", key="seperate_variable", value="my_value_name", - variable_set_id=Token.as_string(tfe_variable_set_test.id) + variable_set_id=cdktf.Token.as_string(tfe_variable_set_test.id) ) - Variable(self, "test-b", + tfe.variable.Variable(self, "test-b", category="env", description="an environment variable", key="another_variable", value="my_value_name", - variable_set_id=Token.as_string(tfe_variable_set_test.id) + variable_set_id=cdktf.Token.as_string(tfe_variable_set_test.id) ) ``` Creating a global variable 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`. +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.variable import Variable -from imports.tfe.variable_set import VariableSet -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" ) - tfe_variable_set_test = VariableSet(self, "test_1", + tfe_variable_set_test = tfe.variable_set.VariableSet(self, "test_1", description="Variable set applied to all workspaces.", global=True, name="Global Varset", - organization=test.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_variable_set_test.override_logical_id("test") - Variable(self, "test-a", + tfe.variable.Variable(self, "test-a", category="terraform", description="a useful description", key="seperate_variable", value="my_value_name", - variable_set_id=Token.as_string(tfe_variable_set_test.id) + variable_set_id=cdktf.Token.as_string(tfe_variable_set_test.id) ) - Variable(self, "test-b", + tfe.variable.Variable(self, "test-b", category="env", description="an environment variable", key="another_variable", value="my_value_name", - variable_set_id=Token.as_string(tfe_variable_set_test.id) + variable_set_id=cdktf.Token.as_string(tfe_variable_set_test.id) + ) +``` + +Create a priority variable set: + +```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_variable_set_test = tfe.variable_set.VariableSet(self, "test_1", + description="Variable set applied to all workspaces.", + name="Global Varset", + organization=cdktf.Token.as_string(tfe_organization_test.name), + priority=True + ) + # 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_variable_set_test.override_logical_id("test") + tfe.variable.Variable(self, "test-a", + category="terraform", + description="a useful description", + key="seperate_variable", + value="my_value_name", + variable_set_id=cdktf.Token.as_string(tfe_variable_set_test.id) + ) + tfe.variable.Variable(self, "test-b", + category="env", + description="an environment variable", + key="another_variable", + value="my_value_name", + variable_set_id=cdktf.Token.as_string(tfe_variable_set_test.id) ) ``` @@ -134,7 +161,8 @@ The following arguments are supported: * `name` - (Required) Name of the variable set. * `description` - (Optional) Description of the variable set. -* `global` - (Optional) Whether or not the variable set applies to all workspaces in the organization. Defaults to `false`. +* `global` - (Optional) Whether the variable set applies to all workspaces in the organization. Defaults to `false`. +* `priority` - (Optional) Whether the variables in this set can be over-written by more specific scopes including values set on the command line. Defaults to `false`. * `organization` - (Optional) Name of the organization. If omitted, organization must be defined in the provider config. * `workspace_ids` - **Deprecated** (Optional) IDs of the workspaces that use the variable set. Must not be set if `global` is set. This argument is mutually exclusive with using the resource @@ -153,4 +181,4 @@ Variable sets can be imported; use `` as the import ID. For exa terraform import tfe_variable_set.test varset-5rTwnSaRPogw6apb ``` - \ No newline at end of file + \ 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 97f02223c..6fc069904 100644 --- a/website/docs/cdktf/python/r/workspace.html.markdown +++ b/website/docs/cdktf/python/r/workspace.html.markdown @@ -18,25 +18,21 @@ Provides a workspace resource. 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 -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" ) - Workspace(self, "test", + tfe.workspace.Workspace(self, "test", name="my-workspace-name", - organization=test_organization.name, + organization=cdktf.Token.as_string(tfe_organization_test_organization.name), tag_names=["test", "app"] ) ``` @@ -44,32 +40,27 @@ class MyConvertedCode(TerraformStack): 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 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.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 = Organization(self, "test-organization", + tfe_organization_test_organization = tfe.organization.Organization(self, "test-organization", email="admin@company.com", name="my-org-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) ) - Workspace(self, "test", - agent_pool_id=test_agent_pool.id, + 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=test_organization.name + organization=cdktf.Token.as_string(tfe_organization_test_organization.name) ) ``` @@ -84,6 +75,7 @@ The following arguments are supported: * `allow_destroy_plan` - (Optional) Whether destroy plans can be queued on the workspace. * `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`. * `description` - (Optional) A description for the workspace. * `execution_mode` - (Optional) Which [execution mode](https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings#execution-mode) to use. Using Terraform Cloud, valid values are `remote`, `local` or`agent`. @@ -183,4 +175,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 + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/workspace_policy_set.html.markdown b/website/docs/cdktf/python/r/workspace_policy_set.html.markdown index c628fedb3..733784218 100644 --- a/website/docs/cdktf/python/r/workspace_policy_set.html.markdown +++ b/website/docs/cdktf/python/r/workspace_policy_set.html.markdown @@ -18,40 +18,35 @@ Adds and removes policy sets from a workspace 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 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.organization import Organization -from imports.tfe.policy_set import PolicySet -from imports.tfe.workspace import Workspace -from imports.tfe.workspace_policy_set import WorkspacePolicySet -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" ) - tfe_policy_set_test = PolicySet(self, "test_1", + tfe_policy_set_test = tfe.policy_set.PolicySet(self, "test_1", description="Some description.", name="my-policy-set", - organization=test.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_policy_set_test.override_logical_id("test") - tfe_workspace_test = Workspace(self, "test_2", + tfe_workspace_test = tfe.workspace.Workspace(self, "test_2", name="my-workspace-name", - organization=test.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_workspace_test.override_logical_id("test") - tfe_workspace_policy_set_test = WorkspacePolicySet(self, "test_3", - policy_set_id=Token.as_string(tfe_policy_set_test.id), - workspace_id=Token.as_string(tfe_workspace_test.id) + tfe_workspace_policy_set_test = + tfe.workspace_policy_set.WorkspacePolicySet(self, "test_3", + policy_set_id=cdktf.Token.as_string(tfe_policy_set_test.id), + workspace_id=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_workspace_policy_set_test.override_logical_id("test") @@ -76,4 +71,4 @@ Workspace Policy Sets can be imported; use `// \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/workspace_policy_set_exclusion.html.markdown b/website/docs/cdktf/python/r/workspace_policy_set_exclusion.html.markdown index 14839cae4..5f052b546 100644 --- a/website/docs/cdktf/python/r/workspace_policy_set_exclusion.html.markdown +++ b/website/docs/cdktf/python/r/workspace_policy_set_exclusion.html.markdown @@ -18,40 +18,35 @@ Adds and removes policy sets from an excluded workspace 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 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.organization import Organization -from imports.tfe.policy_set import PolicySet -from imports.tfe.workspace import Workspace -from imports.tfe.workspace_policy_set_exclusion import WorkspacePolicySetExclusion -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" ) - tfe_policy_set_test = PolicySet(self, "test_1", + tfe_policy_set_test = tfe.policy_set.PolicySet(self, "test_1", description="Some description.", name="my-policy-set", - organization=test.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_policy_set_test.override_logical_id("test") - tfe_workspace_test = Workspace(self, "test_2", + tfe_workspace_test = tfe.workspace.Workspace(self, "test_2", name="my-workspace-name", - organization=test.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_workspace_test.override_logical_id("test") - tfe_workspace_policy_set_exclusion_test = WorkspacePolicySetExclusion(self, "test_3", - policy_set_id=Token.as_string(tfe_policy_set_test.id), - workspace_id=Token.as_string(tfe_workspace_test.id) + tfe_workspace_policy_set_exclusion_test = + tfe.workspace_policy_set_exclusion.WorkspacePolicySetExclusion(self, "test_3", + policy_set_id=cdktf.Token.as_string(tfe_policy_set_test.id), + workspace_id=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_workspace_policy_set_exclusion_test.override_logical_id("test") @@ -76,4 +71,4 @@ Excluded Workspace Policy Sets can be imported; use `/ \ No newline at end of file + \ 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 d32e5c6e7..e79741bc7 100644 --- a/website/docs/cdktf/python/r/workspace_run.html.markdown +++ b/website/docs/cdktf/python/r/workspace_run.html.markdown @@ -24,52 +24,46 @@ The `tfe_workspace_run` expects to own exactly one apply during a creation and/o Basic usage with multiple workspaces: ```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.workspace import Workspace -from imports.tfe.workspace_run import WorkspaceRun -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 = OauthClient(self, "test", + 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=test_organization, + organization=tfe_organization_test_organization, service_provider="github" ) - child = Workspace(self, "child", + tfe_workspace_child = tfe.workspace.Workspace(self, "child", name="child-ws", - organization=test_organization, + organization=tfe_organization_test_organization, queue_all_runs=False, vcs_repo=WorkspaceVcsRepo( branch="main", identifier="my-org-name/vcs-repository", - oauth_token_id=test.oauth_token_id + oauth_token_id=cdktf.Token.as_string(tfe_oauth_client_test.oauth_token_id) ) ) - parent = Workspace(self, "parent", + tfe_workspace_parent = tfe.workspace.Workspace(self, "parent", name="parent-ws", - organization=test_organization, + organization=tfe_organization_test_organization, queue_all_runs=False, vcs_repo=WorkspaceVcsRepo( branch="main", identifier="my-org-name/vcs-repository", - oauth_token_id=test.oauth_token_id + oauth_token_id=cdktf.Token.as_string(tfe_oauth_client_test.oauth_token_id) ) ) - ws_run_parent = WorkspaceRun(self, "ws_run_parent", + tfe_workspace_run_ws_run_parent = tfe.workspace_run.WorkspaceRun(self, "ws_run_parent", apply=WorkspaceRunApply( manual_confirm=False, retry_attempts=5, @@ -82,64 +76,58 @@ class MyConvertedCode(TerraformStack): retry_backoff_min=10, wait_for_run=True ), - workspace_id=parent.id + workspace_id=cdktf.Token.as_string(tfe_workspace_parent.id) ) - WorkspaceRun(self, "ws_run_child", + tfe.workspace_run.WorkspaceRun(self, "ws_run_child", apply=WorkspaceRunApply( manual_confirm=False, retry_attempts=5, retry_backoff_min=5 ), - depends_on=[ws_run_parent], + depends_on=[tfe_workspace_run_ws_run_parent], destroy=WorkspaceRunDestroy( manual_confirm=False, retry_attempts=3, retry_backoff_min=10, wait_for_run=True ), - workspace_id=child.id + workspace_id=cdktf.Token.as_string(tfe_workspace_child.id) ) ``` With manual confirmation: ```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.workspace import Workspace -from imports.tfe.workspace_run import WorkspaceRun -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 = OauthClient(self, "test", + 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=test_organization, + organization=tfe_organization_test_organization, service_provider="github" ) - parent = Workspace(self, "parent", + tfe_workspace_parent = tfe.workspace.Workspace(self, "parent", name="parent-ws", - organization=test_organization, + organization=tfe_organization_test_organization, queue_all_runs=False, vcs_repo=WorkspaceVcsRepo( branch="main", identifier="my-org-name/vcs-repository", - oauth_token_id=test.oauth_token_id + oauth_token_id=cdktf.Token.as_string(tfe_oauth_client_test.oauth_token_id) ) ) - WorkspaceRun(self, "ws_run_parent", + tfe.workspace_run.WorkspaceRun(self, "ws_run_parent", apply=WorkspaceRunApply( manual_confirm=True ), @@ -147,49 +135,43 @@ class MyConvertedCode(TerraformStack): manual_confirm=True, wait_for_run=True ), - workspace_id=parent.id + workspace_id=cdktf.Token.as_string(tfe_workspace_parent.id) ) ``` With no retries: ```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.workspace import Workspace -from imports.tfe.workspace_run import WorkspaceRun -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 = OauthClient(self, "test", + 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=test_organization, + organization=tfe_organization_test_organization, service_provider="github" ) - parent = Workspace(self, "parent", + tfe_workspace_parent = tfe.workspace.Workspace(self, "parent", name="parent-ws", - organization=test_organization, + organization=tfe_organization_test_organization, queue_all_runs=False, vcs_repo=WorkspaceVcsRepo( branch="main", identifier="my-org-name/vcs-repository", - oauth_token_id=test.oauth_token_id + oauth_token_id=cdktf.Token.as_string(tfe_oauth_client_test.oauth_token_id) ) ) - WorkspaceRun(self, "ws_run_parent", + tfe.workspace_run.WorkspaceRun(self, "ws_run_parent", apply=WorkspaceRunApply( manual_confirm=False, retry=False @@ -199,7 +181,7 @@ class MyConvertedCode(TerraformStack): retry=False, wait_for_run=True ), - workspace_id=parent.id + workspace_id=cdktf.Token.as_string(tfe_workspace_parent.id) ) ``` @@ -228,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 Terraform Cloud. - \ No newline at end of file + \ 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 9f1525ed7..450d01813 100644 --- a/website/docs/cdktf/python/r/workspace_run_task.html.markdown +++ b/website/docs/cdktf/python/r/workspace_run_task.html.markdown @@ -17,23 +17,12 @@ The tfe_workspace_run_task resource associates, updates and removes [Workspace R 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`. -# See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.workspace_run_task import WorkspaceRunTask -class MyConvertedCode(TerraformStack): - def __init__(self, scope, name): - super().__init__(scope, name) - WorkspaceRunTask(self, "example", - enforcement_level="advisory", - task_id=tfe_organization_run_task.example.id, - workspace_id=tfe_workspace.example.id - ) +```hcl +resource "tfe_workspace_run_task" "example" { + workspace_id = resource.tfe_workspace.example.id + task_id = resource.tfe_organization_run_task.example.id + enforcement_level = "advisory" +} ``` ## Argument Reference @@ -58,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/python/r/workspace_variable_set.html.markdown b/website/docs/cdktf/python/r/workspace_variable_set.html.markdown index 29f11de9f..de6cad570 100644 --- a/website/docs/cdktf/python/r/workspace_variable_set.html.markdown +++ b/website/docs/cdktf/python/r/workspace_variable_set.html.markdown @@ -18,40 +18,35 @@ Adds and removes variable sets from a workspace 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 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.organization import Organization -from imports.tfe.variable_set import VariableSet -from imports.tfe.workspace import Workspace -from imports.tfe.workspace_variable_set import WorkspaceVariableSet -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" ) - tfe_variable_set_test = VariableSet(self, "test_1", + tfe_variable_set_test = tfe.variable_set.VariableSet(self, "test_1", description="Some description.", name="Test Varset", - organization=test.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_variable_set_test.override_logical_id("test") - tfe_workspace_test = Workspace(self, "test_2", + tfe_workspace_test = tfe.workspace.Workspace(self, "test_2", name="my-workspace-name", - organization=test.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_workspace_test.override_logical_id("test") - tfe_workspace_variable_set_test = WorkspaceVariableSet(self, "test_3", - variable_set_id=Token.as_string(tfe_variable_set_test.id), - workspace_id=Token.as_string(tfe_workspace_test.id) + tfe_workspace_variable_set_test = + tfe.workspace_variable_set.WorkspaceVariableSet(self, "test_3", + variable_set_id=cdktf.Token.as_string(tfe_variable_set_test.id), + workspace_id=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_workspace_variable_set_test.override_logical_id("test") @@ -76,4 +71,4 @@ Workspace Variable Sets can be imported; use `// \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/agent_pool.html.markdown b/website/docs/cdktf/typescript/d/agent_pool.html.markdown index 44f318eca..ffbc8593d 100644 --- a/website/docs/cdktf/typescript/d/agent_pool.html.markdown +++ b/website/docs/cdktf/typescript/d/agent_pool.html.markdown @@ -14,18 +14,15 @@ Use this data source to get information about an agent pool. ## 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 { DataTfeAgentPool } from "./.gen/providers/tfe/data-tfe-agent-pool"; -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 DataTfeAgentPool(this, "test", { + new tfe.dataTfeAgentPool.DataTfeAgentPool(this, "test", { name: "my-agent-pool-name", organization: "my-org-name", }); @@ -48,4 +45,4 @@ In addition to all arguments above, the following attributes are exported: * `id` - The agent pool ID. * `organizationScoped` - Whether or not the agent pool can be used by all workspaces in the organization. - \ 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 304f6a929..54c0ea219 100644 --- a/website/docs/cdktf/typescript/d/github_installation.html.markdown +++ b/website/docs/cdktf/typescript/d/github_installation.html.markdown @@ -16,20 +16,21 @@ Use this data source to get information about the Github App Installation. ### Finding a Github App Installation by its installation ID ```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 { DataTfeGithubAppInstallation } from "./.gen/providers/tfe/data-tfe-github-app-installation"; -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 DataTfeGithubAppInstallation(this, "gha_installation", { - installationId: 12345, - }); + new tfe.dataTfeGithubAppInstallation.DataTfeGithubAppInstallation( + this, + "gha_installation", + { + installationId: 12345, + } + ); } } @@ -38,20 +39,21 @@ class MyConvertedCode extends TerraformStack { ### Finding a Github App Installation by its 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 { DataTfeGithubAppInstallation } from "./.gen/providers/tfe/data-tfe-github-app-installation"; -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 DataTfeGithubAppInstallation(this, "gha_installation", { - name: "installation_name", - }); + new tfe.dataTfeGithubAppInstallation.DataTfeGithubAppInstallation( + this, + "gha_installation", + { + name: "installation_name", + } + ); } } @@ -71,4 +73,4 @@ 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 + \ 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 a4c0927da..3aef65fe1 100644 --- a/website/docs/cdktf/typescript/d/ip_ranges.html.markdown +++ b/website/docs/cdktf/typescript/d/ip_ranges.html.markdown @@ -14,20 +14,21 @@ Use this data source to retrieve a list of Terraform Cloud's IP ranges. For more ## Example Usage ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformOutput, TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { DataTfeIpRanges } from "./.gen/providers/tfe/data-tfe-ip-ranges"; -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 addresses = new DataTfeIpRanges(this, "addresses", {}); - new TerraformOutput(this, "notifications_ips", { - value: addresses.notifications, + const dataTfeIpRangesAddresses = new tfe.dataTfeIpRanges.DataTfeIpRanges( + this, + "addresses", + {} + ); + new cdktf.TerraformOutput(this, "notifications_ips", { + value: dataTfeIpRangesAddresses.notifications, }); } } @@ -48,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/typescript/d/oauth_client.html.markdown b/website/docs/cdktf/typescript/d/oauth_client.html.markdown index e093c1f42..fd3cee123 100644 --- a/website/docs/cdktf/typescript/d/oauth_client.html.markdown +++ b/website/docs/cdktf/typescript/d/oauth_client.html.markdown @@ -16,18 +16,15 @@ Use this data source to get information about an OAuth client. ### Finding an OAuth client by its ID ```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 { DataTfeOauthClient } from "./.gen/providers/tfe/data-tfe-oauth-client"; -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 DataTfeOauthClient(this, "client", { + new tfe.dataTfeOauthClient.DataTfeOauthClient(this, "client", { oauthClientId: "oc-XXXXXXX", }); } @@ -38,18 +35,15 @@ class MyConvertedCode extends TerraformStack { ### Finding an OAuth client by its 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 { DataTfeOauthClient } from "./.gen/providers/tfe/data-tfe-oauth-client"; -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 DataTfeOauthClient(this, "client", { + new tfe.dataTfeOauthClient.DataTfeOauthClient(this, "client", { name: "my-oauth-client", organization: "my-org", }); @@ -61,18 +55,15 @@ class MyConvertedCode extends TerraformStack { ### Finding an OAuth client by its service 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 { DataTfeOauthClient } from "./.gen/providers/tfe/data-tfe-oauth-client"; -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 DataTfeOauthClient(this, "client", { + new tfe.dataTfeOauthClient.DataTfeOauthClient(this, "client", { organization: "my-org", serviceProvider: "github", }); @@ -111,4 +102,4 @@ In addition to all arguments above, the following attributes are exported: * `serviceProvider` - The API identifier of the OAuth service provider. * `serviceProviderDisplayName` - The display name of the OAuth service provider. - \ No newline at end of file + \ 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 80eeb599a..97f356774 100644 --- a/website/docs/cdktf/typescript/d/organization.html.markdown +++ b/website/docs/cdktf/typescript/d/organization.html.markdown @@ -14,18 +14,15 @@ Use this data source to get information about an organization. ## 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 { DataTfeOrganization } from "./.gen/providers/tfe/data-tfe-organization"; -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 DataTfeOrganization(this, "foo", { + new tfe.dataTfeOrganization.DataTfeOrganization(this, "foo", { name: "organization-name", }); } @@ -51,4 +48,4 @@ In addition to all arguments above, the following attributes are exported: * `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. * `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/typescript/d/organization_members.html.markdown b/website/docs/cdktf/typescript/d/organization_members.html.markdown index 95b1990cb..290c8836c 100644 --- a/website/docs/cdktf/typescript/d/organization_members.html.markdown +++ b/website/docs/cdktf/typescript/d/organization_members.html.markdown @@ -14,24 +14,20 @@ Use this data source to get information about members of an organization. ## 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 { DataTfeOrganizationMembers } from "./.gen/providers/tfe/data-tfe-organization-members"; -import { Organization } from "./.gen/providers/tfe/organization"; -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 bar = new Organization(this, "bar", { + const tfeOrganizationBar = new tfe.organization.Organization(this, "bar", { email: "user@hashicorp.com", name: "org-bar", }); - new DataTfeOrganizationMembers(this, "foo", { - organization: bar.name, + new tfe.dataTfeOrganizationMembers.DataTfeOrganizationMembers(this, "foo", { + organization: cdktf.Token.asString(tfeOrganizationBar.name), }); } } @@ -55,4 +51,4 @@ The `member` block contains: * `userId` - The ID of the user. * `organizationMembershipId` - The ID of the organization membership. - \ No newline at end of file + \ 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 f9f65f023..a5a620a28 100644 --- a/website/docs/cdktf/typescript/d/organization_membership.html.markdown +++ b/website/docs/cdktf/typescript/d/organization_membership.html.markdown @@ -22,21 +22,22 @@ be updated manually. ### Fetch by email ```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 { DataTfeOrganizationMembership } from "./.gen/providers/tfe/data-tfe-organization-membership"; -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 DataTfeOrganizationMembership(this, "test", { - email: "user@company.com", - organization: "my-org-name", - }); + new tfe.dataTfeOrganizationMembership.DataTfeOrganizationMembership( + this, + "test", + { + email: "user@company.com", + organization: "my-org-name", + } + ); } } @@ -45,21 +46,22 @@ class MyConvertedCode extends TerraformStack { ### Fetch by username ```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 { DataTfeOrganizationMembership } from "./.gen/providers/tfe/data-tfe-organization-membership"; -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 DataTfeOrganizationMembership(this, "test", { - organization: "my-org-name", - username: "my-username", - }); + new tfe.dataTfeOrganizationMembership.DataTfeOrganizationMembership( + this, + "test", + { + organization: "my-org-name", + username: "my-username", + } + ); } } @@ -68,21 +70,22 @@ class MyConvertedCode extends TerraformStack { ### Fetch by organization membership ID ```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 { DataTfeOrganizationMembership } from "./.gen/providers/tfe/data-tfe-organization-membership"; -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 DataTfeOrganizationMembership(this, "test", { - organization: "my-org-name", - organizationMembershipId: "ou-xxxxxxxxxxx", - }); + new tfe.dataTfeOrganizationMembership.DataTfeOrganizationMembership( + this, + "test", + { + organization: "my-org-name", + organizationMembershipId: "ou-xxxxxxxxxxx", + } + ); } } @@ -107,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 + \ 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 c1f65f0b8..1ee342ef1 100644 --- a/website/docs/cdktf/typescript/d/organization_run_task.html.markdown +++ b/website/docs/cdktf/typescript/d/organization_run_task.html.markdown @@ -16,21 +16,22 @@ Use this data source to get information about an [Organization Run tasks](https: ## 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 { DataTfeOrganizationRunTask } from "./.gen/providers/tfe/data-tfe-organization-run-task"; -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 DataTfeOrganizationRunTask(this, "example", { - name: "task-name", - organization: "my-org-name", - }); + new tfe.dataTfeOrganizationRunTask.DataTfeOrganizationRunTask( + this, + "example", + { + name: "task-name", + organization: "my-org-name", + } + ); } } @@ -53,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 + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/organization_tags.html.markdown b/website/docs/cdktf/typescript/d/organization_tags.html.markdown index 75763fa62..d608cc1e3 100644 --- a/website/docs/cdktf/typescript/d/organization_tags.html.markdown +++ b/website/docs/cdktf/typescript/d/organization_tags.html.markdown @@ -14,18 +14,15 @@ Use this data source to get information about the workspace tags for a given org ## 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 { DataTfeOrganizationTags } from "./.gen/providers/tfe/data-tfe-organization-tags"; -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 DataTfeOrganizationTags(this, "example", { + new tfe.dataTfeOrganizationTags.DataTfeOrganizationTags(this, "example", { organization: "my-org-name", }); } @@ -50,4 +47,4 @@ The `tag` block contains: * `name` - The name of the workspace tag * `id` - The ID of the workspace tag * `workspaceCount` - The number of workspaces the tag is associate with - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/organizations.html.markdown b/website/docs/cdktf/typescript/d/organizations.html.markdown index f612f9fcb..31989059d 100644 --- a/website/docs/cdktf/typescript/d/organizations.html.markdown +++ b/website/docs/cdktf/typescript/d/organizations.html.markdown @@ -14,18 +14,15 @@ Use this data source to get a list of Organizations and a map of their IDs. ## 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 { DataTfeOrganizations } from "./.gen/providers/tfe/data-tfe-organizations"; -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 DataTfeOrganizations(this, "foo", {}); + new tfe.dataTfeOrganizations.DataTfeOrganizations(this, "foo", {}); } } @@ -47,4 +44,4 @@ The following attributes are exported: * `names` - A list of names of every organization. * `ids` - A map of organization names and their IDs. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/outputs.html.markdown b/website/docs/cdktf/typescript/d/outputs.html.markdown index e1230ab01..9b23d1a90 100644 --- a/website/docs/cdktf/typescript/d/outputs.html.markdown +++ b/website/docs/cdktf/typescript/d/outputs.html.markdown @@ -21,29 +21,30 @@ Using the `tfeOutputs` data source, the outputs `foo` and `bar` can be used as s In the example below, assume we have outputs defined in a `myOrg/myWorkspace`: ```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 { Id } from "./.gen/providers/random/id"; -import { DataTfeOutputs } from "./.gen/providers/tfe/data-tfe-outputs"; -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 random from "./.gen/providers/random"; +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); /*The following providers are missing schema information and might need manual adjustments to synthesize correctly: random. For a more precise conversion please use the --provider flag in convert.*/ - const foo = new DataTfeOutputs(this, "foo", { - organization: "my-org", - workspace: "my-workspace", - }); - new Id(this, "vpc_id", { + const dataTfeOutputsFoo = new tfe.dataTfeOutputs.DataTfeOutputs( + this, + "foo", + { + organization: "my-org", + workspace: "my-workspace", + } + ); + new random.id.Id(this, "vpc_id", { byte_length: 8, keepers: [ { - bar: foo.values.bar, + bar: dataTfeOutputsFoo.values.bar, }, ], }); @@ -66,4 +67,4 @@ The following attributes are exported: * `values` - The current output values for the specified workspace. * `nonsensitiveValues` - The current non-sensitive output values for the specified workspace, this is a subset of all output values. - \ No newline at end of file + \ 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 4ed6c1d99..2a104a3c0 100644 --- a/website/docs/cdktf/typescript/d/policy_set.html.markdown +++ b/website/docs/cdktf/typescript/d/policy_set.html.markdown @@ -16,18 +16,15 @@ This data source is used to retrieve a policy set defined in a specified organiz For workspace policies: ```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 { DataTfePolicySet } from "./.gen/providers/tfe/data-tfe-policy-set"; -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 DataTfePolicySet(this, "test", { + new tfe.dataTfePolicySet.DataTfePolicySet(this, "test", { name: "my-policy-set-name", organization: "my-org-name", }); @@ -70,4 +67,4 @@ The `vcsRepo` block contains: * `oauthTokenId` - OAuth token ID of the configured VCS connection. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/project.html.markdown b/website/docs/cdktf/typescript/d/project.html.markdown index 875b65281..5f30b68c5 100644 --- a/website/docs/cdktf/typescript/d/project.html.markdown +++ b/website/docs/cdktf/typescript/d/project.html.markdown @@ -14,18 +14,15 @@ Use this data source to get information about a project. ## 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 { DataTfeProject } from "./.gen/providers/tfe/data-tfe-project"; -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 DataTfeProject(this, "foo", { + new tfe.dataTfeProject.DataTfeProject(this, "foo", { name: "my-project-name", organization: "my-org-name", }); @@ -47,4 +44,4 @@ In addition to all arguments above, the following attributes are exported: * `id` - The project ID. * `workspaceIds` - IDs of the workspaces that are associated with the project. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/saml_settings.html.markdown b/website/docs/cdktf/typescript/d/saml_settings.html.markdown index 4045d9037..eac1110a0 100644 --- a/website/docs/cdktf/typescript/d/saml_settings.html.markdown +++ b/website/docs/cdktf/typescript/d/saml_settings.html.markdown @@ -16,34 +16,21 @@ Use this data source to get information about SAML Settings. It applies only to 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 { DataTfeSamlSettings } from "./.gen/providers/tfe/data-tfe-saml-settings"; -import { TfeProvider } from "./.gen/providers/tfe/provider"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { - super(scope, name); - new TfeProvider(this, "tfe", { - hostname: hostname.stringValue, - token: token.stringValue, - }); - const admin = new TfeProvider(this, "tfe_1", { - alias: "admin", - hostname: hostname.stringValue, - token: adminToken.stringValue, - }); - new DataTfeSamlSettings(this, "foo", { - provider: admin, - }); - } +```hcl +provider "tfe" { + hostname = var.hostname + token = var.token } +provider "tfe" { + alias = "admin" + hostname = var.hostname + token = var.admin_token +} + +data "tfe_saml_settings" "foo" { + provider = tfe.admin +} ``` ## Argument Reference @@ -77,4 +64,4 @@ The following attributes are exported: * `signatureSigningMethod` - Signature Signing Method. * `signatureDigestMethod` - Signature Digest Method. - \ 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 8fe21a539..af7210b06 100644 --- a/website/docs/cdktf/typescript/d/slug.html.markdown +++ b/website/docs/cdktf/typescript/d/slug.html.markdown @@ -21,25 +21,21 @@ tar file containing configuration files (a Terraform "slug") when those files ch Tracking a local directory to upload the Sentinel configuration and 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 { DataTfeSlug } from "./.gen/providers/tfe/data-tfe-slug"; -import { PolicySet } from "./.gen/providers/tfe/policy-set"; -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 DataTfeSlug(this, "test", { + const dataTfeSlugTest = new tfe.dataTfeSlug.DataTfeSlug(this, "test", { sourcePath: "policies/my-policy-set", }); - const tfePolicySetTest = new PolicySet(this, "test_1", { + const tfePolicySetTest = new tfe.policySet.PolicySet(this, "test_1", { name: "my-policy-set", organization: "my-org-name", - slug: Token.asStringMap(test), + slug: cdktf.Token.asStringMap(dataTfeSlugTest), }); /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ tfePolicySetTest.overrideLogicalId("test"); @@ -54,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/typescript/d/ssh_key.html.markdown b/website/docs/cdktf/typescript/d/ssh_key.html.markdown index 3ba919e18..0d701abdd 100644 --- a/website/docs/cdktf/typescript/d/ssh_key.html.markdown +++ b/website/docs/cdktf/typescript/d/ssh_key.html.markdown @@ -14,18 +14,15 @@ Use this data source to get information about a SSH 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 { DataTfeSshKey } from "./.gen/providers/tfe/data-tfe-ssh-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 DataTfeSshKey(this, "test", { + new tfe.dataTfeSshKey.DataTfeSshKey(this, "test", { name: "my-ssh-key-name", organization: "my-org-name", }); @@ -47,4 +44,4 @@ In addition to all arguments above, the following attributes are exported: * `id` - The ID of the SSH key. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/team.html.markdown b/website/docs/cdktf/typescript/d/team.html.markdown index 97471ee15..51606205e 100644 --- a/website/docs/cdktf/typescript/d/team.html.markdown +++ b/website/docs/cdktf/typescript/d/team.html.markdown @@ -14,18 +14,15 @@ Use this data source to get information about a team. ## 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 { DataTfeTeam } from "./.gen/providers/tfe/data-tfe-team"; -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 DataTfeTeam(this, "test", { + new tfe.dataTfeTeam.DataTfeTeam(this, "test", { name: "my-team-name", organization: "my-org-name", }); @@ -48,4 +45,4 @@ In addition to all arguments above, the following attributes are exported: * `id` - The ID of the team. * `ssoTeamId` - (Optional) The [SSO Team ID](https://developer.hashicorp.com/terraform/cloud-docs/users-teams-organizations/single-sign-on#team-names-and-sso-team-ids) of the team, if it has been defined - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/team_access.html.markdown b/website/docs/cdktf/typescript/d/team_access.html.markdown index f09d31bf6..8cd9aea95 100644 --- a/website/docs/cdktf/typescript/d/team_access.html.markdown +++ b/website/docs/cdktf/typescript/d/team_access.html.markdown @@ -14,18 +14,15 @@ Use this data source to get information about team permissions for a workspace. ## 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 { DataTfeTeamAccess } from "./.gen/providers/tfe/data-tfe-team-access"; -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 DataTfeTeamAccess(this, "test", { + new tfe.dataTfeTeamAccess.DataTfeTeamAccess(this, "test", { teamId: "my-team-id", workspaceId: "my-workspace-id", }); @@ -58,4 +55,4 @@ The `permissions` block contains: * `workspaceLocking` - Whether permission is granted to manually lock the workspace or not. * `runTasks` - Boolean determining whether or not to grant the team permission to manage workspace run tasks. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/team_project_access.html.markdown b/website/docs/cdktf/typescript/d/team_project_access.html.markdown index 0288eca84..65ed3def9 100644 --- a/website/docs/cdktf/typescript/d/team_project_access.html.markdown +++ b/website/docs/cdktf/typescript/d/team_project_access.html.markdown @@ -14,18 +14,15 @@ Use this data source to get information about team permissions for a project. ## 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 { DataTfeTeamProjectAccess } from "./.gen/providers/tfe/data-tfe-team-project-access"; -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 DataTfeTeamProjectAccess(this, "test", { + new tfe.dataTfeTeamProjectAccess.DataTfeTeamProjectAccess(this, "test", { projectId: "my-project-id", teamId: "my-team-id", }); @@ -48,4 +45,4 @@ In addition to all arguments above, the following attributes are exported: * `id` The team project access ID. * `access` - The type of access granted to the team on the project. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/teams.html.markdown b/website/docs/cdktf/typescript/d/teams.html.markdown index e2de9c343..d19832163 100644 --- a/website/docs/cdktf/typescript/d/teams.html.markdown +++ b/website/docs/cdktf/typescript/d/teams.html.markdown @@ -14,18 +14,15 @@ Use this data source to get a list of Teams in an Organization and a map of thei ## 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 { DataTfeTeams } from "./.gen/providers/tfe/data-tfe-teams"; -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 DataTfeTeams(this, "foo", { + new tfe.dataTfeTeams.DataTfeTeams(this, "foo", { organization: "my-org-name", }); } @@ -45,4 +42,4 @@ In addition to all arguments above, the following attributes are exported: * `id` - Name of the organization. * `names` - A list of team names in an organization. * `ids` - A map of team names in an organization and their IDs. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/variable_set.html.markdown b/website/docs/cdktf/typescript/d/variable_set.html.markdown index e63ff625a..c5bab02a4 100644 --- a/website/docs/cdktf/typescript/d/variable_set.html.markdown +++ b/website/docs/cdktf/typescript/d/variable_set.html.markdown @@ -16,18 +16,15 @@ This data source is used to retrieve a named variable set For workspace variables: ```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 { DataTfeVariableSet } from "./.gen/providers/tfe/data-tfe-variable-set"; -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 DataTfeVariableSet(this, "test", { + new tfe.dataTfeVariableSet.DataTfeVariableSet(this, "test", { name: "my-variable-set-name", organization: "my-org-name", }); @@ -49,9 +46,10 @@ The following arguments are supported: * `organization` - Name of the organization. * `name` - Name of the variable set. * `description` - Description of the variable set. -* `global` - Whether or not the variable set applies to all workspaces in the organization. +* `global` - Whether the variable set applies to all workspaces in the organization. +* `priority` - Whether the variables in this set are able to be over-written. * `workspaceIds` - IDs of the workspaces that use the variable set. * `variableIds` - IDs of the variables attached to the variable set. * `projectIds` - IDs of the projects that use the variable set. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/variables.html.markdown b/website/docs/cdktf/typescript/d/variables.html.markdown index ec9627457..93b932f9d 100644 --- a/website/docs/cdktf/typescript/d/variables.html.markdown +++ b/website/docs/cdktf/typescript/d/variables.html.markdown @@ -16,25 +16,29 @@ This data source is used to retrieve all variables defined in a specified worksp For workspace variables: ```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 { DataTfeVariables } from "./.gen/providers/tfe/data-tfe-variables"; -import { DataTfeWorkspace } from "./.gen/providers/tfe/data-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 DataTfeWorkspace(this, "test", { - name: "my-workspace-name", - organization: "my-org-name", - }); - const dataTfeVariablesTest = new DataTfeVariables(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 dataTfeVariablesTest = new tfe.dataTfeVariables.DataTfeVariables( + 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.*/ dataTfeVariablesTest.overrideLogicalId("test"); } @@ -45,25 +49,26 @@ class MyConvertedCode extends TerraformStack { For variable set variables: ```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 { DataTfeVariableSet } from "./.gen/providers/tfe/data-tfe-variable-set"; -import { DataTfeVariables } from "./.gen/providers/tfe/data-tfe-variables"; -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 DataTfeVariableSet(this, "test", { - name: "my-variable-set-name", - organization: "my-org-name", - }); - const dataTfeVariablesTest = new DataTfeVariables(this, "test_1", { - variableSetId: Token.asString(test.id), - }); + const dataTfeVariableSetTest = + new tfe.dataTfeVariableSet.DataTfeVariableSet(this, "test", { + name: "my-variable-set-name", + organization: "my-org-name", + }); + const dataTfeVariablesTest = new tfe.dataTfeVariables.DataTfeVariables( + this, + "test_1", + { + variableSetId: cdktf.Token.asString(dataTfeVariableSetTest.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.*/ dataTfeVariablesTest.overrideLogicalId("test"); } @@ -93,4 +98,4 @@ The `variables, terraform and env` blocks contains: * `sensitive` - If the variable is marked as sensitive or not * `hcl` - If the variable is marked as HCL or not - \ No newline at end of file + \ 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 c68212b0e..b4332b458 100644 --- a/website/docs/cdktf/typescript/d/workspace.html.markdown +++ b/website/docs/cdktf/typescript/d/workspace.html.markdown @@ -16,18 +16,15 @@ Use this data source to get information about a workspace. ## 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 { DataTfeWorkspace } from "./.gen/providers/tfe/data-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); - new DataTfeWorkspace(this, "test", { + new tfe.dataTfeWorkspace.DataTfeWorkspace(this, "test", { name: "my-workspace-name", organization: "my-org-name", }); @@ -50,6 +47,7 @@ In addition to all arguments above, the following attributes are exported: * `id` - The workspace ID. * `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. * `assessmentsEnabled` - (Available only in Terraform Cloud) 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). @@ -90,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 + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/workspace_ids.html.markdown b/website/docs/cdktf/typescript/d/workspace_ids.html.markdown index 2b9cd5008..3f83d01b9 100644 --- a/website/docs/cdktf/typescript/d/workspace_ids.html.markdown +++ b/website/docs/cdktf/typescript/d/workspace_ids.html.markdown @@ -14,30 +14,27 @@ Use this data source to get a map of workspace IDs. ## 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 { DataTfeWorkspaceIds } from "./.gen/providers/tfe/data-tfe-workspace-ids"; -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 DataTfeWorkspaceIds(this, "all", { + new tfe.dataTfeWorkspaceIds.DataTfeWorkspaceIds(this, "all", { names: ["*"], organization: "my-org-name", }); - new DataTfeWorkspaceIds(this, "app-frontend", { + new tfe.dataTfeWorkspaceIds.DataTfeWorkspaceIds(this, "app-frontend", { names: ["app-frontend-prod", "app-frontend-dev1", "app-frontend-staging"], organization: "my-org-name", }); - new DataTfeWorkspaceIds(this, "prod-apps", { + new tfe.dataTfeWorkspaceIds.DataTfeWorkspaceIds(this, "prod-apps", { organization: "my-org-name", tagNames: ["prod", "app", "aws"], }); - new DataTfeWorkspaceIds(this, "prod-only", { + new tfe.dataTfeWorkspaceIds.DataTfeWorkspaceIds(this, "prod-only", { excludeTags: ["app"], organization: "my-org-name", tagNames: ["prod"], @@ -67,4 +64,4 @@ In addition to all arguments above, the following attributes are exported: * `fullNames` - A map of workspace names and their full names, which look like `/`. * `ids` - A map of workspace names and their opaque, immutable IDs, which look like `ws-`. - \ No newline at end of file + \ 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 96d78871e..7aa26820c 100644 --- a/website/docs/cdktf/typescript/d/workspace_run_task.html.markdown +++ b/website/docs/cdktf/typescript/d/workspace_run_task.html.markdown @@ -16,18 +16,15 @@ Use this data source to get information about a [Workspace Run tasks](https://de ## 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 { DataTfeWorkspaceRunTask } from "./.gen/providers/tfe/data-tfe-workspace-run-task"; -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 DataTfeWorkspaceRunTask(this, "foobar", { + new tfe.dataTfeWorkspaceRunTask.DataTfeWorkspaceRunTask(this, "foobar", { taskId: "task-def456", workspaceId: "ws-abc123", }); @@ -51,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/typescript/index.html.markdown b/website/docs/cdktf/typescript/index.html.markdown index 4a01c70f6..a6579445d 100644 --- a/website/docs/cdktf/typescript/index.html.markdown +++ b/website/docs/cdktf/typescript/index.html.markdown @@ -73,16 +73,14 @@ For production use, you should constrain the acceptable provider versions via configuration, to ensure that new versions with breaking changes will not be automatically installed by `terraform init` in the future: -```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"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { - super(scope, name); +```hcl +terraform { + required_providers { + tfe = { + version = "~> 0.50.0" + } } } - ``` As this provider is still at version zero, you should constrain the acceptable @@ -92,7 +90,7 @@ The above snippet using `requiredProviders` is for Terraform 0.13+; if you are u ```hcl provider "tfe" { - version = "~> 0.49.2" + version = "~> 0.50.0" ... } ``` @@ -101,34 +99,17 @@ For more information on provider installation and constraining provider versions ## 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 { Organization } from "./.gen/providers/tfe/organization"; -import { TfeProvider } from "./.gen/providers/tfe/provider"; -interface MyConfig { - email: any; - name: any; -} -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string, config: MyConfig) { - super(scope, name); - new TfeProvider(this, "tfe", { - hostname: hostname.stringValue, - token: token.stringValue, - }); - new Organization(this, "org", { - email: config.email, - name: config.name, - }); - } +```hcl +provider "tfe" { + hostname = var.hostname # Optional, defaults to Terraform Cloud `appTerraformIo` + token = var.token + version = "~> 0.50.0" } +# Create an organization +resource "tfe_organization" "org" { + # ... +} ``` ## Argument Reference @@ -136,7 +117,7 @@ class MyConvertedCode extends TerraformStack { The following arguments are supported: * `hostname` - (Optional) The Terraform Cloud/Enterprise hostname to connect to. - Defaults to `appTerraformIo`. Can be overridden by setting the + Defaults to `app.terraform.io`. Can be overridden by setting the `tfeHostname` environment variable. * `token` - (Optional) The token used to authenticate with Terraform Cloud/Enterprise. See [Authentication](#authentication) above for more information. @@ -148,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 + \ 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 a6ed9a465..93f71e023 100644 --- a/website/docs/cdktf/typescript/r/admin_organization_settings.markdown +++ b/website/docs/cdktf/typescript/r/admin_organization_settings.markdown @@ -17,48 +17,39 @@ incorporating an admin token in your provider config. 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 { AdminOrganizationSettings } from "./.gen/providers/tfe/admin-organization-settings"; -import { Organization } from "./.gen/providers/tfe/organization"; -import { TfeProvider } from "./.gen/providers/tfe/provider"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { - super(scope, name); - new TfeProvider(this, "tfe", { - hostname: hostname.stringValue, - token: token.stringValue, - }); - const admin = new TfeProvider(this, "tfe_1", { - alias: "admin", - hostname: hostname.stringValue, - token: adminToken.stringValue, - }); - const aModuleConsumer = new Organization(this, "a-module-consumer", { - email: "admin@company.com", - name: "my-other-org", - }); - const aModuleProducer = new Organization(this, "a-module-producer", { - email: "admin@company.com", - name: "my-org", - }); - new AdminOrganizationSettings(this, "test-settings", { - accessBetaTools: false, - globalModuleSharing: false, - moduleSharingConsumerOrganizations: [aModuleConsumer.name], - organization: aModuleProducer.name, - provider: "${tfe.admin}", - workspaceLimit: 15, - }); - } +```hcl + +provider "tfe" { + hostname = var.hostname + token = var.token +} + +provider "tfe" { + alias = "admin" + hostname = var.hostname + token = var.admin_token +} + +resource "tfe_organization" "a-module-producer" { + name = "my-org" + email = "admin@company.com" +} + +resource "tfe_organization" "a-module-consumer" { + name = "my-other-org" + email = "admin@company.com" } +resource "tfe_admin_organization_settings" "test-settings" { + provider = tfe.admin + organization = tfe_organization.a-module-producer.name + workspace_limit = 15 + access_beta_tools = false + global_module_sharing = false + module_sharing_consumer_organizations = [ + tfe_organization.a-module-consumer.name + ] +} ``` ## Argument Reference @@ -79,4 +70,4 @@ The following arguments are supported: This resource does not manage the creation of an organization and there is no need to import it. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/agent_pool.html.markdown b/website/docs/cdktf/typescript/r/agent_pool.html.markdown index 1b3d9b210..40f488f24 100644 --- a/website/docs/cdktf/typescript/r/agent_pool.html.markdown +++ b/website/docs/cdktf/typescript/r/agent_pool.html.markdown @@ -18,25 +18,25 @@ pools to run remote operations with isolated, private, or on-premises infrastruc 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"; -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", - }); - new AgentPool(this, "test-agent-pool", { + const tfeOrganizationTestOrganization = new tfe.organization.Organization( + this, + "test-organization", + { + email: "admin@company.com", + name: "my-org-name", + } + ); + new tfe.agentPool.AgentPool(this, "test-agent-pool", { name: "my-agent-pool-name", - organization: testOrganization.name, + organization: cdktf.Token.asString(tfeOrganizationTestOrganization.name), organizationScoped: true, }); } @@ -50,7 +50,7 @@ The following arguments are supported: * `name` - (Required) Name of the agent pool. * `organization` - (Optional) Name of the organization. If omitted, organization must be defined in the provider config. -* `organizationScoped` - (Optional) Whether or not the agent pool is scoped to all workspaces in the organization. Defaults to `true`. +* `organizationScoped` - (Optional) Whether or not the agent pool is scoped to all workspaces in the organization. Defaults to `true`. Should be `false` when limiting workspaces that can use the agent pool with the [tfe_agent_pool_allowed_workspaces](agent_pool_allowed_workspaces.html) resource. ## Attributes Reference @@ -70,4 +70,4 @@ terraform import tfe_agent_pool.test apool-rW0KoLSlnuNb5adB terraform import tfe_workspace.test my-org-name/my-agent-pool-name ``` - \ No newline at end of file + \ 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 035622708..ae669f287 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 @@ -20,37 +20,53 @@ for Business account. Basic 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 { 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"; -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", { - name: "my-workspace-name", - organization: Token.asString(tfeOrganizationTest.name), - }); - new AgentPool(this, "test-agent-pool", { - name: "my-agent-pool-name", - organization: testOrganization.name, - organizationScoped: true, - }); - new AgentPoolAllowedWorkspaces(this, "foobar", { - agentPoolId: Token.asString(tfeAgentPoolFoobar.id), - allowedWorkspaceIds: [test.id], - }); + 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), + ], + } + ); } } @@ -73,4 +89,4 @@ terraform import tfe_agent_pool_allowed_workspaces.foobar apool-rW0KoLSlnuNb5adB ``` - \ No newline at end of file + \ 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 530a19d6a..e37e6da4d 100644 --- a/website/docs/cdktf/typescript/r/agent_token.html.markdown +++ b/website/docs/cdktf/typescript/r/agent_token.html.markdown @@ -17,29 +17,32 @@ These tokens allow agents to communicate securely with Terraform Cloud. 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 { AgentToken } from "./.gen/providers/tfe/agent-token"; -import { Organization } from "./.gen/providers/tfe/organization"; -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 testAgentPool = new AgentPool(this, "test-agent-pool", { - name: "my-agent-pool-name", - organization: testOrganization.id, - }); - new AgentToken(this, "test-agent-token", { - agentPoolId: testAgentPool.id, + const tfeOrganizationTestOrganization = new tfe.organization.Organization( + this, + "test-organization", + { + email: "admin@company.com", + name: "my-org-name", + } + ); + const tfeAgentPoolTestAgentPool = new tfe.agentPool.AgentPool( + this, + "test-agent-pool", + { + name: "my-agent-pool-name", + organization: cdktf.Token.asString(tfeOrganizationTestOrganization.id), + } + ); + new tfe.agentToken.AgentToken(this, "test-agent-token", { + agentPoolId: cdktf.Token.asString(tfeAgentPoolTestAgentPool.id), description: "my-agent-token-name", }); } @@ -60,4 +63,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/typescript/r/no_code_module.html.markdown b/website/docs/cdktf/typescript/r/no_code_module.html.markdown index bd4c0def0..f740a6434 100644 --- a/website/docs/cdktf/typescript/r/no_code_module.html.markdown +++ b/website/docs/cdktf/typescript/r/no_code_module.html.markdown @@ -16,34 +16,41 @@ Creates, updates and destroys no-code module for registry modules. Basic 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 { NoCodeModule } from "./.gen/providers/tfe/no-code-module"; -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 foobar = new Organization(this, "foobar", { - email: "admin@company.com", - name: "my-org-name", - }); - const tfeRegistryModuleFoobar = new RegistryModule(this, "foobar_1", { - moduleProvider: "my_provider", - name: "test_module", - organization: foobar.id, - }); + const tfeOrganizationFoobar = new tfe.organization.Organization( + this, + "foobar", + { + email: "admin@company.com", + name: "my-org-name", + } + ); + const tfeRegistryModuleFoobar = new tfe.registryModule.RegistryModule( + this, + "foobar_1", + { + moduleProvider: "my_provider", + name: "test_module", + organization: cdktf.Token.asString(tfeOrganizationFoobar.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.*/ tfeRegistryModuleFoobar.overrideLogicalId("foobar"); - const tfeNoCodeModuleFoobar = new NoCodeModule(this, "foobar_2", { - organization: foobar.id, - registryModule: Token.asString(tfeRegistryModuleFoobar.id), - }); + const tfeNoCodeModuleFoobar = new tfe.noCodeModule.NoCodeModule( + this, + "foobar_2", + { + organization: cdktf.Token.asString(tfeOrganizationFoobar.id), + registryModule: cdktf.Token.asString(tfeRegistryModuleFoobar.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.*/ tfeNoCodeModuleFoobar.overrideLogicalId("foobar"); } @@ -54,46 +61,53 @@ class MyConvertedCode extends TerraformStack { Creating a no-code module with variable options: ```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 { NoCodeModule } from "./.gen/providers/tfe/no-code-module"; -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 foobar = new Organization(this, "foobar", { - email: "admin@company.com", - name: "my-org-name", - }); - const tfeRegistryModuleFoobar = new RegistryModule(this, "foobar_1", { - moduleProvider: "my_provider", - name: "test_module", - organization: foobar.id, - }); + const tfeOrganizationFoobar = new tfe.organization.Organization( + this, + "foobar", + { + email: "admin@company.com", + name: "my-org-name", + } + ); + const tfeRegistryModuleFoobar = new tfe.registryModule.RegistryModule( + this, + "foobar_1", + { + moduleProvider: "my_provider", + name: "test_module", + organization: cdktf.Token.asString(tfeOrganizationFoobar.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.*/ tfeRegistryModuleFoobar.overrideLogicalId("foobar"); - const tfeNoCodeModuleFoobar = new NoCodeModule(this, "foobar_2", { - organization: foobar.id, - registryModule: Token.asString(tfeRegistryModuleFoobar.id), - variableOptions: [ - { - name: "ami", - options: ["ami-0", "ami-1", "ami-2"], - type: "string", - }, - { - name: "region", - options: ["us-east-1", "us-east-2", "us-west-1"], - type: "string", - }, - ], - }); + const tfeNoCodeModuleFoobar = new tfe.noCodeModule.NoCodeModule( + this, + "foobar_2", + { + organization: cdktf.Token.asString(tfeOrganizationFoobar.id), + registryModule: cdktf.Token.asString(tfeRegistryModuleFoobar.id), + variableOptions: [ + { + name: "ami", + options: ["ami-0", "ami-1", "ami-2"], + type: "string", + }, + { + name: "region", + options: ["us-east-1", "us-east-2", "us-west-1"], + type: "string", + }, + ], + } + ); /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ tfeNoCodeModuleFoobar.overrideLogicalId("foobar"); } @@ -127,4 +141,4 @@ No-code modules can be imported; use `` as the import ID. For terraform import tfe_no_code_module.test nocode-qV9JnKRkmtMa4zcA ``` - \ No newline at end of file + \ 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 f772d9699..81ee6208b 100644 --- a/website/docs/cdktf/typescript/r/notification_configuration.html.markdown +++ b/website/docs/cdktf/typescript/r/notification_configuration.html.markdown @@ -19,41 +19,41 @@ Each workspace can have up to 20 notification configurations, and they apply to Basic 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 { NotificationConfiguration } from "./.gen/providers/tfe/notification-configuration"; -import { Organization } from "./.gen/providers/tfe/organization"; -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 tfeWorkspaceTest = new Workspace(this, "test_1", { - name: "my-workspace-name", - organization: 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.*/ - tfeWorkspaceTest.overrideLogicalId("test"); - const tfeNotificationConfigurationTest = new NotificationConfiguration( + const tfeOrganizationTest = new tfe.organization.Organization( this, - "test_2", + "test", { - destinationType: "generic", - enabled: true, - name: "my-test-notification-configuration", - triggers: ["run:created", "run:planning", "run:errored"], - url: "https://example.com", - workspaceId: Token.asString(tfeWorkspaceTest.id), + email: "admin@company.com", + name: "my-org-name", } ); + const tfeWorkspaceTest = new tfe.workspace.Workspace(this, "test_1", { + name: "my-workspace-name", + organization: cdktf.Token.asString(tfeOrganizationTest.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.*/ + tfeWorkspaceTest.overrideLogicalId("test"); + const tfeNotificationConfigurationTest = + new tfe.notificationConfiguration.NotificationConfiguration( + this, + "test_2", + { + destinationType: "generic", + enabled: true, + name: "my-test-notification-configuration", + triggers: ["run:created", "run:planning", "run:errored"], + url: "https://example.com", + workspaceId: 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.*/ tfeNotificationConfigurationTest.overrideLogicalId("test"); } @@ -64,52 +64,50 @@ class MyConvertedCode extends TerraformStack { With `destinationType` of `email`: ```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 { NotificationConfiguration } from "./.gen/providers/tfe/notification-configuration"; -import { Organization } from "./.gen/providers/tfe/organization"; -import { OrganizationMembership } from "./.gen/providers/tfe/organization-membership"; -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 tfeOrganizationMembershipTest = new OrganizationMembership( + const tfeOrganizationTest = new tfe.organization.Organization( this, - "test_1", + "test", { - email: "test.member@company.com", - organization: "my-org-name", + email: "admin@company.com", + name: "my-org-name", } ); + const tfeOrganizationMembershipTest = + new tfe.organizationMembership.OrganizationMembership(this, "test_1", { + email: "test.member@company.com", + organization: "my-org-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.*/ tfeOrganizationMembershipTest.overrideLogicalId("test"); - const tfeWorkspaceTest = new Workspace(this, "test_2", { + const tfeWorkspaceTest = new tfe.workspace.Workspace(this, "test_2", { name: "my-workspace-name", - organization: test.id, + organization: cdktf.Token.asString(tfeOrganizationTest.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.*/ tfeWorkspaceTest.overrideLogicalId("test"); - const tfeNotificationConfigurationTest = new NotificationConfiguration( - this, - "test_3", - { - destinationType: "email", - emailUserIds: [Token.asString(tfeOrganizationMembershipTest.userId)], - enabled: true, - name: "my-test-email-notification-configuration", - triggers: ["run:created", "run:planning", "run:errored"], - workspaceId: Token.asString(tfeWorkspaceTest.id), - } - ); + const tfeNotificationConfigurationTest = + new tfe.notificationConfiguration.NotificationConfiguration( + this, + "test_3", + { + destinationType: "email", + emailUserIds: [ + cdktf.Token.asString(tfeOrganizationMembershipTest.userId), + ], + enabled: true, + name: "my-test-email-notification-configuration", + triggers: ["run:created", "run:planning", "run:errored"], + workspaceId: 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.*/ tfeNotificationConfigurationTest.overrideLogicalId("test"); } @@ -120,57 +118,55 @@ class MyConvertedCode extends TerraformStack { (**TFE only**) With `destinationType` of `email`, using `emailAddresses` list and `emailUsers`: ```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 { NotificationConfiguration } from "./.gen/providers/tfe/notification-configuration"; -import { Organization } from "./.gen/providers/tfe/organization"; -import { OrganizationMembership } from "./.gen/providers/tfe/organization-membership"; -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 tfeOrganizationMembershipTest = new OrganizationMembership( + const tfeOrganizationTest = new tfe.organization.Organization( this, - "test_1", + "test", { - email: "test.member@company.com", - organization: "my-org-name", + email: "admin@company.com", + name: "my-org-name", } ); + const tfeOrganizationMembershipTest = + new tfe.organizationMembership.OrganizationMembership(this, "test_1", { + email: "test.member@company.com", + organization: "my-org-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.*/ tfeOrganizationMembershipTest.overrideLogicalId("test"); - const tfeWorkspaceTest = new Workspace(this, "test_2", { + const tfeWorkspaceTest = new tfe.workspace.Workspace(this, "test_2", { name: "my-workspace-name", - organization: test.id, + organization: cdktf.Token.asString(tfeOrganizationTest.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.*/ tfeWorkspaceTest.overrideLogicalId("test"); - const tfeNotificationConfigurationTest = new NotificationConfiguration( - this, - "test_3", - { - destinationType: "email", - emailAddresses: [ - "user1@company.com", - "user2@company.com", - "user3@company.com", - ], - emailUserIds: [Token.asString(tfeOrganizationMembershipTest.userId)], - enabled: true, - name: "my-test-email-notification-configuration", - triggers: ["run:created", "run:planning", "run:errored"], - workspaceId: Token.asString(tfeWorkspaceTest.id), - } - ); + const tfeNotificationConfigurationTest = + new tfe.notificationConfiguration.NotificationConfiguration( + this, + "test_3", + { + destinationType: "email", + emailAddresses: [ + "user1@company.com", + "user2@company.com", + "user3@company.com", + ], + emailUserIds: [ + cdktf.Token.asString(tfeOrganizationMembershipTest.userId), + ], + enabled: true, + name: "my-test-email-notification-configuration", + triggers: ["run:created", "run:planning", "run:errored"], + workspaceId: 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.*/ tfeNotificationConfigurationTest.overrideLogicalId("test"); } @@ -220,4 +216,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/typescript/r/oauth_client.html.markdown b/website/docs/cdktf/typescript/r/oauth_client.html.markdown index 5fe9abf31..da2e6cca5 100644 --- a/website/docs/cdktf/typescript/r/oauth_client.html.markdown +++ b/website/docs/cdktf/typescript/r/oauth_client.html.markdown @@ -19,18 +19,15 @@ provider. 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 { OauthClient } from "./.gen/providers/tfe/oauth-client"; -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 OauthClient(this, "test", { + new tfe.oauthClient.OauthClient(this, "test", { apiUrl: "https://api.github.com", httpUrl: "https://github.com", name: "my-github-oauth-client", @@ -50,18 +47,15 @@ See [documentation for TFC/E setup](https://developer.hashicorp.com/terraform/cl **Note:** This resource requires a private key when creating Azure DevOps Server OAuth clients. ```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"; -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 OauthClient(this, "test", { + new tfe.oauthClient.OauthClient(this, "test", { apiUrl: "https://ado.example.com", httpUrl: "https://ado.example.com", name: "my-ado-oauth-client", @@ -84,18 +78,15 @@ When using BitBucket Server, you must use three required fields: `key`, `secret` ```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"; -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 OauthClient(this, "test", { + new tfe.oauthClient.OauthClient(this, "test", { apiUrl: "https://bbs.example.com", httpUrl: "https://bss.example.com", key: "", @@ -142,4 +133,4 @@ Link. * `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 + \ 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 94f77e3c1..cbaab56b4 100644 --- a/website/docs/cdktf/typescript/r/organization.html.markdown +++ b/website/docs/cdktf/typescript/r/organization.html.markdown @@ -16,18 +16,15 @@ Manages organizations. 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"; -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 Organization(this, "test", { + new tfe.organization.Organization(this, "test", { email: "admin@company.com", name: "my-org-name", }); @@ -67,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/typescript/r/organization_membership.html.markdown b/website/docs/cdktf/typescript/r/organization_membership.html.markdown index af3a1efb7..1ba96fccd 100644 --- a/website/docs/cdktf/typescript/r/organization_membership.html.markdown +++ b/website/docs/cdktf/typescript/r/organization_membership.html.markdown @@ -24,18 +24,15 @@ be updated manually. 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 { OrganizationMembership } from "./.gen/providers/tfe/organization-membership"; -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 OrganizationMembership(this, "test", { + new tfe.organizationMembership.OrganizationMembership(this, "test", { email: "user@company.com", organization: "my-org-name", }); @@ -72,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/typescript/r/organization_module_sharing.html.markdown b/website/docs/cdktf/typescript/r/organization_module_sharing.html.markdown index 6b1954c0d..7a8d6f4bc 100644 --- a/website/docs/cdktf/typescript/r/organization_module_sharing.html.markdown +++ b/website/docs/cdktf/typescript/r/organization_module_sharing.html.markdown @@ -19,18 +19,15 @@ use of an admin token and is for Terraform Enterprise only. 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 { OrganizationModuleSharing } from "./.gen/providers/tfe/organization-module-sharing"; -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 OrganizationModuleSharing(this, "test", { + new tfe.organizationModuleSharing.OrganizationModuleSharing(this, "test", { moduleConsumers: ["my-org-name-2", "my-org-name-3"], organization: "my-org-name", }); @@ -46,4 +43,4 @@ The following arguments are supported: * `organization` - (Optional) Name of the organization. If omitted, organization must be defined in the provider config. * `moduleConsumers` - (Required) Names of the organizations to consume the module registry. - \ No newline at end of file + \ 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 c7b69cabc..af88749b5 100644 --- a/website/docs/cdktf/typescript/r/organization_run_task.html.markdown +++ b/website/docs/cdktf/typescript/r/organization_run_task.html.markdown @@ -18,18 +18,15 @@ The tfe_organization_run_task resource creates, updates and destroys [Organizati 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 { OrganizationRunTask } from "./.gen/providers/tfe/organization-run-task"; -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 OrganizationRunTask(this, "example", { + new tfe.organizationRunTask.OrganizationRunTask(this, "example", { description: "An example task", enabled: true, name: "task-name", @@ -66,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/typescript/r/organization_token.html.markdown b/website/docs/cdktf/typescript/r/organization_token.html.markdown index d37a973cf..13d4d4730 100644 --- a/website/docs/cdktf/typescript/r/organization_token.html.markdown +++ b/website/docs/cdktf/typescript/r/organization_token.html.markdown @@ -17,18 +17,15 @@ can be used to act as the organization service account. 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 { OrganizationToken } from "./.gen/providers/tfe/organization-token"; -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 OrganizationToken(this, "test", { + new tfe.organizationToken.OrganizationToken(this, "test", { organization: "my-org-name", }); } @@ -52,31 +49,15 @@ never expire. When a token has an expiry: -```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 { OrganizationToken } from "./.gen/providers/tfe/organization-token"; -import { Rotating } from "./.gen/providers/time/rotating"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { - super(scope, name); - /*The following providers are missing schema information and might need manual adjustments to synthesize correctly: time. - For a more precise conversion please use the --provider flag in convert.*/ - const example = new Rotating(this, "example", { - rotation_days: 30, - }); - new OrganizationToken(this, "test", { - expiredAt: Token.asString(example.rotationRfc3339), - organization: Token.asString(org.name), - }); - } +```hcl +resource "time_rotating" "example" { + rotation_days = 30 } +resource "tfe_organization_token" "test" { + organization = data.tfe_organization.org.name + expired_at = time_rotating.example.rotation_rfc3339 +} ``` ## Attributes Reference @@ -93,4 +74,4 @@ For example: terraform import tfe_organization_token.test my-org-name ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/policy.html.markdown b/website/docs/cdktf/typescript/r/policy.html.markdown index e5f2e8540..d99b59da7 100644 --- a/website/docs/cdktf/typescript/r/policy.html.markdown +++ b/website/docs/cdktf/typescript/r/policy.html.markdown @@ -21,18 +21,15 @@ enforced during runs. Basic usage for Sentinel: ```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 { Policy } from "./.gen/providers/tfe/policy"; -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 Policy(this, "test", { + new tfe.policy.Policy(this, "test", { description: "This policy always passes", enforceMode: "hard-mandatory", kind: "sentinel", @@ -48,18 +45,15 @@ class MyConvertedCode extends TerraformStack { Basic usage for Open Policy Agent(OPA): ```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 { Policy } from "./.gen/providers/tfe/policy"; -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 Policy(this, "test", { + new tfe.policy.Policy(this, "test", { description: "This policy always passes", enforceMode: "mandatory", kind: "opa", @@ -103,4 +97,4 @@ import ID. For example: terraform import tfe_policy.test my-org-name/pol-wAs3zYmWAhYK7peR ``` - \ No newline at end of file + \ 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 0d970bf07..8d382fa79 100644 --- a/website/docs/cdktf/typescript/r/policy_set.html.markdown +++ b/website/docs/cdktf/typescript/r/policy_set.html.markdown @@ -21,94 +21,54 @@ 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", { - description: "A brand new policy set", - kind: "sentinel", - name: "my-policy-set", - organization: "my-org-name", - policiesPath: "policies/my-policy-set", - 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" + 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", { - description: "A brand new policy set", - kind: "sentinel", - name: "my-policy-set", - organization: "my-org-name", - policyIds: [Token.asString(tfeSentinelPolicyTest.id)], - 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" + policy_ids = [tfe_sentinel_policy.test.id] + workspace_ids = [tfe_workspace.test.id] } - ``` Manually uploaded policy set, in lieu of VCS: -```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 { DataTfeSlug } from "./.gen/providers/tfe/data-tfe-slug"; -import { PolicySet } from "./.gen/providers/tfe/policy-set"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { - super(scope, name); - const test = new DataTfeSlug(this, "test", { - sourcePath: "policies/my-policy-set", - }); - const tfePolicySetTest = new PolicySet(this, "test_1", { - description: "A brand new policy set", - name: "my-policy-set", - organization: "my-org-name", - slug: Token.asStringMap(test), - workspaceIds: [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.*/ - tfePolicySetTest.overrideLogicalId("test"); - } +```hcl +data "tfe_slug" "test" { + // point to the local directory where the policies are located. + source_path = "policies/my-policy-set" } +resource "tfe_policy_set" "test" { + name = "my-policy-set" + description = "A brand new policy set" + organization = "my-org-name" + workspace_ids = [tfe_workspace.test.id] + + // reference the tfe_slug data source. + slug = data.tfe_slug.test +} ``` ## Argument Reference @@ -168,4 +128,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 + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/policy_set_parameter.html.markdown b/website/docs/cdktf/typescript/r/policy_set_parameter.html.markdown index c1cd54e3d..f7d672c9d 100644 --- a/website/docs/cdktf/typescript/r/policy_set_parameter.html.markdown +++ b/website/docs/cdktf/typescript/r/policy_set_parameter.html.markdown @@ -16,34 +16,34 @@ Creates, updates and destroys policy set parameters. Basic 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 { Organization } from "./.gen/providers/tfe/organization"; -import { PolicySet } from "./.gen/providers/tfe/policy-set"; -import { PolicySetParameter } from "./.gen/providers/tfe/policy-set-parameter"; -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 tfePolicySetTest = new PolicySet(this, "test_1", { + const tfeOrganizationTest = new tfe.organization.Organization( + this, + "test", + { + email: "admin@company.com", + name: "my-org-name", + } + ); + const tfePolicySetTest = new tfe.policySet.PolicySet(this, "test_1", { name: "my-policy-set-name", - organization: test.id, + organization: cdktf.Token.asString(tfeOrganizationTest.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.*/ tfePolicySetTest.overrideLogicalId("test"); - const tfePolicySetParameterTest = new PolicySetParameter(this, "test_2", { - key: "my_key_name", - policySetId: Token.asString(tfePolicySetTest.id), - value: "my_value_name", - }); + const tfePolicySetParameterTest = + new tfe.policySetParameter.PolicySetParameter(this, "test_2", { + key: "my_key_name", + policySetId: cdktf.Token.asString(tfePolicySetTest.id), + value: "my_value_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.*/ tfePolicySetParameterTest.overrideLogicalId("test"); } @@ -76,4 +76,4 @@ terraform import tfe_policy_set_parameter.test polset-wAs3zYmWAhYK7peR/var-5rTwn ``` - \ No newline at end of file + \ 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 eaee9c086..06087bc21 100644 --- a/website/docs/cdktf/typescript/r/project.html.markdown +++ b/website/docs/cdktf/typescript/r/project.html.markdown @@ -16,25 +16,25 @@ Provides a project resource. 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 { Project } from "./.gen/providers/tfe/project"; -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", - }); - new Project(this, "test", { + const tfeOrganizationTestOrganization = new tfe.organization.Organization( + this, + "test-organization", + { + email: "admin@company.com", + name: "my-org-name", + } + ); + new tfe.project.Project(this, "test", { name: "projectname", - organization: testOrganization.name, + organization: cdktf.Token.asString(tfeOrganizationTestOrganization.name), }); } } @@ -62,4 +62,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/typescript/r/project_policy_set.html.markdown b/website/docs/cdktf/typescript/r/project_policy_set.html.markdown index 90a574997..86709c22d 100644 --- a/website/docs/cdktf/typescript/r/project_policy_set.html.markdown +++ b/website/docs/cdktf/typescript/r/project_policy_set.html.markdown @@ -16,41 +16,43 @@ Adds and removes policy sets from a project Basic 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 { Organization } from "./.gen/providers/tfe/organization"; -import { PolicySet } from "./.gen/providers/tfe/policy-set"; -import { Project } from "./.gen/providers/tfe/project"; -import { ProjectPolicySet } from "./.gen/providers/tfe/project-policy-set"; -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 tfePolicySetTest = new PolicySet(this, "test_1", { + const tfeOrganizationTest = new tfe.organization.Organization( + this, + "test", + { + email: "admin@company.com", + name: "my-org-name", + } + ); + const tfePolicySetTest = new tfe.policySet.PolicySet(this, "test_1", { description: "Some description.", name: "my-policy-set", - organization: test.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.*/ tfePolicySetTest.overrideLogicalId("test"); - const tfeProjectTest = new Project(this, "test_2", { + const tfeProjectTest = new tfe.project.Project(this, "test_2", { name: "my-project-name", - organization: test.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 tfeProjectPolicySetTest = new ProjectPolicySet(this, "test_3", { - policySetId: Token.asString(tfePolicySetTest.id), - projectId: Token.asString(tfeProjectTest.id), - }); + const tfeProjectPolicySetTest = new tfe.projectPolicySet.ProjectPolicySet( + this, + "test_3", + { + policySetId: cdktf.Token.asString(tfePolicySetTest.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.*/ tfeProjectPolicySetTest.overrideLogicalId("test"); } @@ -77,4 +79,4 @@ Project Policy Sets can be imported; use `// \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/project_variable_set.html.markdown b/website/docs/cdktf/typescript/r/project_variable_set.html.markdown index a973a2f2d..62fa66b9d 100644 --- a/website/docs/cdktf/typescript/r/project_variable_set.html.markdown +++ b/website/docs/cdktf/typescript/r/project_variable_set.html.markdown @@ -16,41 +16,40 @@ Adds and removes variable sets from a project Basic 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 { Organization } from "./.gen/providers/tfe/organization"; -import { Project } from "./.gen/providers/tfe/project"; -import { ProjectVariableSet } from "./.gen/providers/tfe/project-variable-set"; -import { VariableSet } from "./.gen/providers/tfe/variable-set"; -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 tfeProjectTest = new Project(this, "test_1", { + 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: test.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 tfeVariableSetTest = new VariableSet(this, "test_2", { + const tfeVariableSetTest = new tfe.variableSet.VariableSet(this, "test_2", { description: "Some description.", name: "Test Varset", - organization: test.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.*/ tfeVariableSetTest.overrideLogicalId("test"); - const tfeProjectVariableSetTest = new ProjectVariableSet(this, "test_3", { - projectId: Token.asString(tfeProjectTest.id), - variableSetId: Token.asString(tfeVariableSetTest.id), - }); + const tfeProjectVariableSetTest = + new tfe.projectVariableSet.ProjectVariableSet(this, "test_3", { + projectId: cdktf.Token.asString(tfeProjectTest.id), + variableSetId: cdktf.Token.asString(tfeVariableSetTest.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.*/ tfeProjectVariableSetTest.overrideLogicalId("test"); } @@ -77,4 +76,4 @@ Project Variable Sets can be imported; use `// \ 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 d318812d2..4e29b136c 100644 --- a/website/docs/cdktf/typescript/r/registry_module.html.markdown +++ b/website/docs/cdktf/typescript/r/registry_module.html.markdown @@ -16,35 +16,42 @@ Terraform Cloud's private module registry helps you share Terraform modules acro Basic usage with VCS: ```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", { vcsRepo: { displayIdentifier: "my-org-name/terraform-provider-name", identifier: "my-org-name/terraform-provider-name", - oauthTokenId: testOauthClient.oauthTokenId, + oauthTokenId: cdktf.Token.asString( + tfeOauthClientTestOauthClient.oauthTokenId + ), }, }); } @@ -55,35 +62,37 @@ class MyConvertedCode extends TerraformStack { Create private registry module with GitHub App: ```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 { DataTfeGithubAppInstallation } from "./.gen/providers/tfe/data-tfe-github-app-installation"; -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 ghaInstallation = new DataTfeGithubAppInstallation( + const tfeOrganizationTestOrganization = new tfe.organization.Organization( this, - "gha_installation", + "test-organization", { - name: "YOUR_GH_NAME", + email: "admin@company.com", + name: "my-org-name", } ); - new RegistryModule(this, "petstore", { - organization: testOrganization.name, + const dataTfeGithubAppInstallationGhaInstallation = + new tfe.dataTfeGithubAppInstallation.DataTfeGithubAppInstallation( + this, + "gha_installation", + { + name: "YOUR_GH_NAME", + } + ); + new tfe.registryModule.RegistryModule(this, "petstore", { + organization: cdktf.Token.asString(tfeOrganizationTestOrganization.name), vcsRepo: { displayIdentifier: "GH_NAME/REPO_NAME", - githubAppInstallationId: Token.asString(ghaInstallation.id), + githubAppInstallationId: cdktf.Token.asString( + dataTfeGithubAppInstallationGhaInstallation.id + ), identifier: "GH_NAME/REPO_NAME", }, }); @@ -95,28 +104,34 @@ class MyConvertedCode extends TerraformStack { Create private registry module without VCS: ```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 { 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", - }); - new RegistryModule(this, "test-private-registry-module", { - moduleProvider: "my_provider", - name: "another_test_module", - organization: testOrganization.name, - registryName: "private", - }); + const tfeOrganizationTestOrganization = new tfe.organization.Organization( + this, + "test-organization", + { + email: "admin@company.com", + name: "my-org-name", + } + ); + new tfe.registryModule.RegistryModule( + this, + "test-private-registry-module", + { + moduleProvider: "my_provider", + name: "another_test_module", + organization: cdktf.Token.asString( + tfeOrganizationTestOrganization.name + ), + registryName: "private", + } + ); } } @@ -125,27 +140,27 @@ class MyConvertedCode extends TerraformStack { Create public registry module: ```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 { 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", - }); - new RegistryModule(this, "test-public-registry-module", { + const tfeOrganizationTestOrganization = new tfe.organization.Organization( + this, + "test-organization", + { + email: "admin@company.com", + name: "my-org-name", + } + ); + new tfe.registryModule.RegistryModule(this, "test-public-registry-module", { moduleProvider: "aws", name: "vpc", namespace: "terraform-aws-modules", - organization: testOrganization.name, + organization: cdktf.Token.asString(tfeOrganizationTestOrganization.name), registryName: "public", }); } @@ -156,37 +171,41 @@ class MyConvertedCode extends TerraformStack { Create no-code provisioning registry module: ```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 { NoCodeModule } from "./.gen/providers/tfe/no-code-module"; -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 testNoCodeProvisioningRegistryModule = new RegistryModule( + const tfeOrganizationTestOrganization = new tfe.organization.Organization( this, - "test-no-code-provisioning-registry-module", + "test-organization", { - moduleProvider: "aws", - name: "vpc", - namespace: "terraform-aws-modules", - organization: testOrganization.name, - registryName: "public", + email: "admin@company.com", + name: "my-org-name", } ); - new NoCodeModule(this, "foobar", { - organization: testOrganization.id, - registryModule: testNoCodeProvisioningRegistryModule.id, + const tfeRegistryModuleTestNoCodeProvisioningRegistryModule = + new tfe.registryModule.RegistryModule( + this, + "test-no-code-provisioning-registry-module", + { + moduleProvider: "aws", + name: "vpc", + namespace: "terraform-aws-modules", + organization: cdktf.Token.asString( + tfeOrganizationTestOrganization.name + ), + registryName: "public", + } + ); + new tfe.noCodeModule.NoCodeModule(this, "foobar", { + organization: cdktf.Token.asString(tfeOrganizationTestOrganization.id), + registryModule: cdktf.Token.asString( + tfeRegistryModuleTestNoCodeProvisioningRegistryModule.id + ), }); } } @@ -241,4 +260,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/typescript/r/run_trigger.html.markdown b/website/docs/cdktf/typescript/r/run_trigger.html.markdown index 89588e323..dcfe00943 100644 --- a/website/docs/cdktf/typescript/r/run_trigger.html.markdown +++ b/website/docs/cdktf/typescript/r/run_trigger.html.markdown @@ -19,34 +19,41 @@ to up to 20 source workspaces. 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 { RunTrigger } from "./.gen/providers/tfe/run-trigger"; -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 testOrganization = new Organization(this, "test-organization", { - email: "admin@company.com", - name: "my-org-name", - }); - const testSourceable = new Workspace(this, "test-sourceable", { - name: "my-sourceable-workspace-name", - organization: testOrganization.id, - }); - const testWorkspace = new Workspace(this, "test-workspace", { - name: "my-workspace-name", - organization: testOrganization.id, - }); - new RunTrigger(this, "test", { - sourceableId: testSourceable.id, - workspaceId: testWorkspace.id, + const tfeOrganizationTestOrganization = new tfe.organization.Organization( + this, + "test-organization", + { + email: "admin@company.com", + name: "my-org-name", + } + ); + const tfeWorkspaceTestSourceable = new tfe.workspace.Workspace( + this, + "test-sourceable", + { + name: "my-sourceable-workspace-name", + organization: cdktf.Token.asString(tfeOrganizationTestOrganization.id), + } + ); + const tfeWorkspaceTestWorkspace = new tfe.workspace.Workspace( + this, + "test-workspace", + { + name: "my-workspace-name", + organization: cdktf.Token.asString(tfeOrganizationTestOrganization.id), + } + ); + new tfe.runTrigger.RunTrigger(this, "test", { + sourceableId: cdktf.Token.asString(tfeWorkspaceTestSourceable.id), + workspaceId: cdktf.Token.asString(tfeWorkspaceTestWorkspace.id), }); } } @@ -73,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 + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/saml_settings.html.markdown b/website/docs/cdktf/typescript/r/saml_settings.html.markdown index d73db9393..430a810e7 100644 --- a/website/docs/cdktf/typescript/r/saml_settings.html.markdown +++ b/website/docs/cdktf/typescript/r/saml_settings.html.markdown @@ -15,31 +15,17 @@ Use this resource to create, update and destroy SAML Settings. It applies only t Basic usage for SAML Settings: -```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 { TfeProvider } from "./.gen/providers/tfe/provider"; -import { SamlSettings } from "./.gen/providers/tfe/saml-settings"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { - super(scope, name); - new TfeProvider(this, "tfe", { - hostname: hostname.stringValue, - token: adminToken.stringValue, - }); - new SamlSettings(this, "this", { - idpCert: "foobarCertificate", - sloEndpointUrl: "https://example.com/slo_endpoint_url", - ssoEndpointUrl: "https://example.com/sso_endpoint_url", - }); - } +```hcl +provider "tfe" { + hostname = var.hostname + token = var.admin_token } +resource "tfe_saml_settings" "this" { + idp_cert = "foobarCertificate" + slo_endpoint_url = "https://example.com/slo_endpoint_url" + sso_endpoint_url = "https://example.com/sso_endpoint_url" + } ``` ## Argument Reference @@ -78,4 +64,4 @@ SAML Settings can be imported. terraform import tfe_saml_settings.this saml ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/sentinel_policy.html.markdown b/website/docs/cdktf/typescript/r/sentinel_policy.html.markdown index 8b6cdfcf7..206276ff4 100644 --- a/website/docs/cdktf/typescript/r/sentinel_policy.html.markdown +++ b/website/docs/cdktf/typescript/r/sentinel_policy.html.markdown @@ -21,18 +21,15 @@ enforced during runs. 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 { SentinelPolicy } from "./.gen/providers/tfe/sentinel-policy"; -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 SentinelPolicy(this, "test", { + new tfe.sentinelPolicy.SentinelPolicy(this, "test", { description: "This policy always passes", enforceMode: "hard-mandatory", name: "my-policy-name", @@ -69,4 +66,4 @@ import ID. For example: terraform import tfe_sentinel_policy.test my-org-name/pol-wAs3zYmWAhYK7peR ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/ssh_key.html.markdown b/website/docs/cdktf/typescript/r/ssh_key.html.markdown index 8124e2b2f..90680d24c 100644 --- a/website/docs/cdktf/typescript/r/ssh_key.html.markdown +++ b/website/docs/cdktf/typescript/r/ssh_key.html.markdown @@ -17,18 +17,15 @@ key. An organization can have multiple SSH keys available. 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 { SshKey } from "./.gen/providers/tfe/ssh-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 SshKey(this, "test", { + new tfe.sshKey.SshKey(this, "test", { key: "private-ssh-key", name: "my-ssh-key-name", organization: "my-org-name", @@ -55,4 +52,4 @@ The following arguments are supported: Because the Terraform Enterprise API does not return the private SSH key content, this resource cannot be imported. - \ 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 f9fd2da7d..b793d408b 100644 --- a/website/docs/cdktf/typescript/r/team.html.markdown +++ b/website/docs/cdktf/typescript/r/team.html.markdown @@ -16,18 +16,15 @@ Manages teams. 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 { Team } from "./.gen/providers/tfe/team"; -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 Team(this, "test", { + new tfe.team.Team(this, "test", { name: "my-team-name", organization: "my-org-name", }); @@ -39,18 +36,15 @@ class MyConvertedCode extends TerraformStack { Organization Permission 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 { Team } from "./.gen/providers/tfe/team"; -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 Team(this, "test", { + new tfe.team.Team(this, "test", { name: "my-team-name", organization: "my-org-name", organizationAccess: { @@ -103,4 +97,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/typescript/r/team_access.html.markdown b/website/docs/cdktf/typescript/r/team_access.html.markdown index 97c4e80f1..8af746faa 100644 --- a/website/docs/cdktf/typescript/r/team_access.html.markdown +++ b/website/docs/cdktf/typescript/r/team_access.html.markdown @@ -16,33 +16,28 @@ Associate a team to permissions on a workspace. Basic 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 { Team } from "./.gen/providers/tfe/team"; -import { TeamAccess } from "./.gen/providers/tfe/team-access"; -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 Team(this, "test", { + const tfeTeamTest = new tfe.team.Team(this, "test", { name: "my-team-name", organization: "my-org-name", }); - const tfeWorkspaceTest = new Workspace(this, "test_1", { + const tfeWorkspaceTest = new tfe.workspace.Workspace(this, "test_1", { name: "my-workspace-name", organization: "my-org-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.*/ tfeWorkspaceTest.overrideLogicalId("test"); - const tfeTeamAccessTest = new TeamAccess(this, "test_2", { + const tfeTeamAccessTest = new tfe.teamAccess.TeamAccess(this, "test_2", { access: "read", - teamId: test.id, - workspaceId: Token.asString(tfeWorkspaceTest.id), + teamId: cdktf.Token.asString(tfeTeamTest.id), + workspaceId: 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.*/ tfeTeamAccessTest.overrideLogicalId("test"); @@ -85,4 +80,4 @@ example: terraform import tfe_team_access.test my-org-name/my-workspace-name/tws-8S5wnRbRpogw6apb ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/team_member.html.markdown b/website/docs/cdktf/typescript/r/team_member.html.markdown index 045b3bec9..eb7cf719c 100644 --- a/website/docs/cdktf/typescript/r/team_member.html.markdown +++ b/website/docs/cdktf/typescript/r/team_member.html.markdown @@ -25,24 +25,20 @@ used once. All four resources cannot be used for the same team simultaneously. 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 { Team } from "./.gen/providers/tfe/team"; -import { TeamMember } from "./.gen/providers/tfe/team-member"; -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 Team(this, "test", { + const tfeTeamTest = new tfe.team.Team(this, "test", { name: "my-team-name", organization: "my-org-name", }); - const tfeTeamMemberTest = new TeamMember(this, "test_1", { - teamId: test.id, + const tfeTeamMemberTest = new tfe.teamMember.TeamMember(this, "test_1", { + teamId: cdktf.Token.asString(tfeTeamTest.id), username: "sander", }); /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ @@ -68,4 +64,4 @@ example: terraform import tfe_team_member.test team-47qC3LmA47piVan7/sander ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/team_members.html.markdown b/website/docs/cdktf/typescript/r/team_members.html.markdown index c1940fcc2..5ca27b059 100644 --- a/website/docs/cdktf/typescript/r/team_members.html.markdown +++ b/website/docs/cdktf/typescript/r/team_members.html.markdown @@ -25,24 +25,20 @@ used once. All four resources cannot be used for the same team simultaneously. 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 { Team } from "./.gen/providers/tfe/team"; -import { TeamMembers } from "./.gen/providers/tfe/team-members"; -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 Team(this, "test", { + const tfeTeamTest = new tfe.team.Team(this, "test", { name: "my-team-name", organization: "my-org-name", }); - const tfeTeamMembersTest = new TeamMembers(this, "test_1", { - teamId: test.id, + const tfeTeamMembersTest = new tfe.teamMembers.TeamMembers(this, "test_1", { + teamId: cdktf.Token.asString(tfeTeamTest.id), usernames: ["admin", "sander"], }); /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ @@ -55,26 +51,22 @@ class MyConvertedCode extends TerraformStack { With a set of usernames: ```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 { Team } from "./.gen/providers/tfe/team"; -import { TeamMembers } from "./.gen/providers/tfe/team-members"; -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 allUsernames = Fn.toset(["user1", "user2"]); - const test = new Team(this, "test", { + const allUsernames = cdktf.Fn.toset(["user1", "user2"]); + const tfeTeamTest = new tfe.team.Team(this, "test", { name: "my-team-name", organization: "my-org-name", }); - const tfeTeamMembersTest = new TeamMembers(this, "test_1", { - teamId: test.id, - usernames: Token.asList( + const tfeTeamMembersTest = new tfe.teamMembers.TeamMembers(this, "test_1", { + teamId: cdktf.Token.asString(tfeTeamTest.id), + usernames: cdktf.Token.asList( "${[ for user in ${" + allUsernames + "} : user]}" ), }); @@ -104,4 +96,4 @@ Team members can be imported; use `` as the import ID. For example: terraform import tfe_team_members.test team-47qC3LmA47piVan7 ``` - \ No newline at end of file + \ 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 cb37b34f4..1eec91879 100644 --- a/website/docs/cdktf/typescript/r/team_organization_member.html.markdown +++ b/website/docs/cdktf/typescript/r/team_organization_member.html.markdown @@ -24,37 +24,32 @@ an instance of Terraform Enterprise at least as recent as v202004-1. Basic 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 { OrganizationMembership } from "./.gen/providers/tfe/organization-membership"; -import { Team } from "./.gen/providers/tfe/team"; -import { TeamOrganizationMember } from "./.gen/providers/tfe/team-organization-member"; -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 OrganizationMembership(this, "test", { - email: "example@hashicorp.com", - organization: "my-org-name", - }); - const tfeTeamTest = new Team(this, "test_1", { + const tfeOrganizationMembershipTest = + new tfe.organizationMembership.OrganizationMembership(this, "test", { + email: "example@hashicorp.com", + organization: "my-org-name", + }); + const tfeTeamTest = new tfe.team.Team(this, "test_1", { name: "my-team-name", organization: "my-org-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.*/ tfeTeamTest.overrideLogicalId("test"); - const tfeTeamOrganizationMemberTest = new TeamOrganizationMember( - this, - "test_2", - { - organizationMembershipId: test.id, - teamId: Token.asString(tfeTeamTest.id), - } - ); + const tfeTeamOrganizationMemberTest = + new tfe.teamOrganizationMember.TeamOrganizationMember(this, "test_2", { + organizationMembershipId: cdktf.Token.asString( + tfeOrganizationMembershipTest.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.*/ tfeTeamOrganizationMemberTest.overrideLogicalId("test"); } @@ -82,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 + \ 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 8480e22d9..ba1476eec 100644 --- a/website/docs/cdktf/typescript/r/team_organization_members.html.markdown +++ b/website/docs/cdktf/typescript/r/team_organization_members.html.markdown @@ -24,41 +24,38 @@ an instance of Terraform Enterprise at least as recent as v202004-1. Basic 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 { OrganizationMembership } from "./.gen/providers/tfe/organization-membership"; -import { Team } from "./.gen/providers/tfe/team"; -import { TeamOrganizationMembers } from "./.gen/providers/tfe/team-organization-members"; -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 sample = new OrganizationMembership(this, "sample", { - email: "sample@hashicorp.com", - organization: "my-org-name", - }); - const test = new OrganizationMembership(this, "test", { - email: "example@hashicorp.com", - organization: "my-org-name", - }); - const tfeTeamTest = new Team(this, "test_2", { + const tfeOrganizationMembershipSample = + new tfe.organizationMembership.OrganizationMembership(this, "sample", { + email: "sample@hashicorp.com", + organization: "my-org-name", + }); + const tfeOrganizationMembershipTest = + new tfe.organizationMembership.OrganizationMembership(this, "test", { + email: "example@hashicorp.com", + organization: "my-org-name", + }); + const tfeTeamTest = new tfe.team.Team(this, "test_2", { name: "my-team-name", organization: "my-org-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.*/ tfeTeamTest.overrideLogicalId("test"); - const tfeTeamOrganizationMembersTest = new TeamOrganizationMembers( - this, - "test_3", - { - organizationMembershipIds: [test.id, sample.id], - teamId: Token.asString(tfeTeamTest.id), - } - ); + const tfeTeamOrganizationMembersTest = + new tfe.teamOrganizationMembers.TeamOrganizationMembers(this, "test_3", { + organizationMembershipIds: [ + cdktf.Token.asString(tfeOrganizationMembershipTest.id), + cdktf.Token.asString(tfeOrganizationMembershipSample.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("test"); } @@ -69,48 +66,48 @@ class MyConvertedCode extends TerraformStack { With a set of organization members: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { Fn, Token, TerraformIterator, TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { OrganizationMembership } from "./.gen/providers/tfe/organization-membership"; -import { Team } from "./.gen/providers/tfe/team"; -import { TeamOrganizationMembers } from "./.gen/providers/tfe/team-organization-members"; -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 allUsers = Fn.toset(["user1@hashicorp.com", "user2@hashicorp.com"]); + const allUsers = cdktf.Fn.toset([ + "user1@hashicorp.com", + "user2@hashicorp.com", + ]); /*In most cases loops should be handled in the programming language context and not inside of the Terraform context. If you are looping over something external, e.g. a variable or a file input you should consider using a for loop. If you are looping over something only known to Terraform, e.g. a result of a data source you need to keep this like it is.*/ - const allMembershipForEachIterator = TerraformIterator.fromList( - Token.asAny(allUsers) + const tfeOrganizationMembershipAllMembershipForEachIterator = + cdktf.TerraformIterator.fromList(cdktf.Token.asAny(allUsers)); + new tfe.organizationMembership.OrganizationMembership( + this, + "all_membership", + { + email: cdktf.Token.asString( + tfeOrganizationMembershipAllMembershipForEachIterator.key + ), + organization: "my-org-name", + forEach: tfeOrganizationMembershipAllMembershipForEachIterator, + } ); - new OrganizationMembership(this, "all_membership", { - email: Token.asString(allMembershipForEachIterator.key), - organization: "my-org-name", - forEach: allMembershipForEachIterator, - }); - const test = new Team(this, "test", { + const tfeTeamTest = new tfe.team.Team(this, "test", { name: "my-team-name", organization: "my-org-name", }); - const tfeTeamOrganizationMembersTest = new TeamOrganizationMembers( - this, - "test_2", - { - organizationMembershipIds: Token.asList( + const tfeTeamOrganizationMembersTest = + new tfe.teamOrganizationMembers.TeamOrganizationMembers(this, "test_2", { + organizationMembershipIds: cdktf.Token.asList( "${[ for member in ${" + allUsers + "} : tfe_organization_membership.all_membership[member].id]}" ), - teamId: test.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("test"); } @@ -134,4 +131,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/typescript/r/team_project_access.html.markdown b/website/docs/cdktf/typescript/r/team_project_access.html.markdown index 4c9e1f8f8..db12e574d 100644 --- a/website/docs/cdktf/typescript/r/team_project_access.html.markdown +++ b/website/docs/cdktf/typescript/r/team_project_access.html.markdown @@ -16,32 +16,28 @@ Associate a team to permissions on a project. 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 { Project } from "./.gen/providers/tfe/project"; -import { Team } from "./.gen/providers/tfe/team"; -import { TeamProjectAccess } from "./.gen/providers/tfe/team-project-access"; -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 Project(this, "test", { + const tfeProjectTest = new tfe.project.Project(this, "test", { name: "myproject", organization: "my-org-name", }); - const admin = new Team(this, "admin", { + const tfeTeamAdmin = new tfe.team.Team(this, "admin", { name: "my-admin-team", organization: "my-org-name", }); - const tfeTeamProjectAccessAdmin = new TeamProjectAccess(this, "admin_2", { - access: "admin", - projectId: test.id, - teamId: admin.id, - }); + const tfeTeamProjectAccessAdmin = + new tfe.teamProjectAccess.TeamProjectAccess(this, "admin_2", { + access: "admin", + projectId: cdktf.Token.asString(tfeProjectTest.id), + teamId: cdktf.Token.asString(tfeTeamAdmin.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.*/ tfeTeamProjectAccessAdmin.overrideLogicalId("admin"); } @@ -91,28 +87,23 @@ The following permissions apply to all workpsaces (and future workspaces) in the ## Example Usage with Custom Project Permissions ```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 { Project } from "./.gen/providers/tfe/project"; -import { Team } from "./.gen/providers/tfe/team"; -import { TeamProjectAccess } from "./.gen/providers/tfe/team-project-access"; -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 Project(this, "test", { + const tfeProjectTest = new tfe.project.Project(this, "test", { name: "myproject", organization: "my-org-name", }); - const dev = new Team(this, "dev", { + const tfeTeamDev = new tfe.team.Team(this, "dev", { name: "my-dev-team", organization: "my-org-name", }); - new TeamProjectAccess(this, "custom", { + new tfe.teamProjectAccess.TeamProjectAccess(this, "custom", { access: "custom", projectAccess: [ { @@ -120,8 +111,8 @@ class MyConvertedCode extends TerraformStack { teams: "none", }, ], - projectId: test.id, - teamId: dev.id, + projectId: cdktf.Token.asString(tfeProjectTest.id), + teamId: cdktf.Token.asString(tfeTeamDev.id), workspaceAccess: [ { create: true, @@ -154,4 +145,4 @@ example: terraform import tfe_team_project_access.admin tprj-2pmtXpZa4YzVMTPi ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/team_token.html.markdown b/website/docs/cdktf/typescript/r/team_token.html.markdown index 1b0eeb542..f450192af 100644 --- a/website/docs/cdktf/typescript/r/team_token.html.markdown +++ b/website/docs/cdktf/typescript/r/team_token.html.markdown @@ -16,24 +16,20 @@ Generates a new team token and overrides existing token if one exists. 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 { Team } from "./.gen/providers/tfe/team"; -import { TeamToken } from "./.gen/providers/tfe/team-token"; -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 Team(this, "test", { + const tfeTeamTest = new tfe.team.Team(this, "test", { name: "my-team-name", organization: "my-org-name", }); - const tfeTeamTokenTest = new TeamToken(this, "test_1", { - teamId: test.id, + const tfeTeamTokenTest = new tfe.teamToken.TeamToken(this, "test_1", { + 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.*/ tfeTeamTokenTest.overrideLogicalId("test"); @@ -59,31 +55,27 @@ never expire. When a token has an expiry: ```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 { Team } from "./.gen/providers/tfe/team"; -import { TeamToken } from "./.gen/providers/tfe/team-token"; -import { Rotating } from "./.gen/providers/time/rotating"; -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"; +import * as time from "./.gen/providers/time"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); /*The following providers are missing schema information and might need manual adjustments to synthesize correctly: time. For a more precise conversion please use the --provider flag in convert.*/ - const test = new Team(this, "test", { + const tfeTeamTest = new tfe.team.Team(this, "test", { name: "my-team-name", organization: "my-org-name", }); - const example = new Rotating(this, "example", { + const timeRotatingExample = new time.rotating.Rotating(this, "example", { rotation_days: 30, }); - const tfeTeamTokenTest = new TeamToken(this, "test_2", { - expiredAt: Token.asString(example.rotationRfc3339), - teamId: test.id, + const tfeTeamTokenTest = new tfe.teamToken.TeamToken(this, "test_2", { + expiredAt: cdktf.Token.asString(timeRotatingExample.rotationRfc3339), + 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.*/ tfeTeamTokenTest.overrideLogicalId("test"); @@ -105,4 +97,4 @@ Team tokens can be imported; use `` as the import ID. For example: terraform import tfe_team_token.test team-47qC3LmA47piVan7 ``` - \ No newline at end of file + \ 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 18d301451..f122ae910 100644 --- a/website/docs/cdktf/typescript/r/terraform_version.html.markdown +++ b/website/docs/cdktf/typescript/r/terraform_version.html.markdown @@ -16,18 +16,15 @@ Manage Terraform versions available on Terraform Cloud/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 { TerraformVersion } from "./.gen/providers/tfe/terraform-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 TerraformVersion(this, "test", { + new tfe.terraformVersion.TerraformVersion(this, "test", { sha: "e75ac73deb69a6b3aa667cb0b8b731aee79e2904", url: "https://tfe-host.com/path/to/terraform.zip", version: "1.1.2-custom", @@ -68,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 Terraform Cloud 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/variable.html.markdown b/website/docs/cdktf/typescript/r/variable.html.markdown index 015d5d326..1d442d61a 100644 --- a/website/docs/cdktf/typescript/r/variable.html.markdown +++ b/website/docs/cdktf/typescript/r/variable.html.markdown @@ -16,35 +16,34 @@ Creates, updates and destroys variables. Basic usage for workspaces: ```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 { Organization } from "./.gen/providers/tfe/organization"; -import { Variable } from "./.gen/providers/tfe/variable"; -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 tfeWorkspaceTest = new Workspace(this, "test_1", { + const tfeOrganizationTest = new tfe.organization.Organization( + this, + "test", + { + email: "admin@company.com", + name: "my-org-name", + } + ); + const tfeWorkspaceTest = new tfe.workspace.Workspace(this, "test_1", { name: "my-workspace-name", - organization: test.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.*/ tfeWorkspaceTest.overrideLogicalId("test"); - const tfeVariableTest = new Variable(this, "test_2", { + const tfeVariableTest = new tfe.variable.Variable(this, "test_2", { category: "terraform", description: "a useful description", key: "my_key_name", value: "my_value_name", - workspaceId: Token.asString(tfeWorkspaceTest.id), + workspaceId: 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.*/ tfeVariableTest.overrideLogicalId("test"); @@ -56,44 +55,43 @@ class MyConvertedCode extends TerraformStack { Basic usage for variable sets: ```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 { Organization } from "./.gen/providers/tfe/organization"; -import { Variable } from "./.gen/providers/tfe/variable"; -import { VariableSet } from "./.gen/providers/tfe/variable-set"; -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 tfeVariableSetTest = new VariableSet(this, "test_1", { + const tfeOrganizationTest = new tfe.organization.Organization( + this, + "test", + { + email: "admin@company.com", + name: "my-org-name", + } + ); + const tfeVariableSetTest = new tfe.variableSet.VariableSet(this, "test_1", { description: "Some description.", global: false, name: "Test Varset", - organization: test.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.*/ tfeVariableSetTest.overrideLogicalId("test"); - new Variable(this, "test-a", { + new tfe.variable.Variable(this, "test-a", { category: "terraform", description: "a useful description", key: "seperate_variable", value: "my_value_name", - variableSetId: Token.asString(tfeVariableSetTest.id), + variableSetId: cdktf.Token.asString(tfeVariableSetTest.id), }); - new Variable(this, "test-b", { + new tfe.variable.Variable(this, "test-b", { category: "env", description: "an environment variable", key: "another_variable", value: "my_value_name", - variableSetId: Token.asString(tfeVariableSetTest.id), + variableSetId: cdktf.Token.asString(tfeVariableSetTest.id), }); } } @@ -135,42 +133,31 @@ While the `value` field may be referenced in other resources, for safety it is a The `readableValue` attribute is not sensitive, and will not be redacted; instead, it will be null if the variable is sensitive. This allows other resources to reference it, while keeping their plan outputs readable. For example: -```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 { Variable } from "./.gen/providers/tfe/variable"; -import { Workspace } from "./.gen/providers/tfe/workspace"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { - super(scope, name); - const sensitiveVar = new Variable(this, "sensitive_var", { - category: "terraform", - key: "sensitive_key", - sensitive: true, - value: "sensitive_value", - workspaceId: workspace.id, - }); - const visibleVar = new Variable(this, "visible_var", { - category: "terraform", - key: "visible_key", - sensitive: false, - value: "visible_value", - workspaceId: workspace.id, - }); - new Workspace(this, "sensitive_workspace", { - name: "workspace-${" + sensitiveVar.value + "}", - organization: "organization name", - }); - new Workspace(this, "visible_workspace", { - name: "workspace-${" + visibleVar.readableValue + "}", - organization: "organization name", - }); - } +``` +resource "tfe_variable" "sensitive_var" { + key = "sensitive_key" + value = "sensitive_value" // this will be redacted from plan outputs + category = "terraform" + workspace_id = tfe_workspace.workspace.id + sensitive = true +} + +resource "tfe_variable" "visible_var" { + key = "visible_key" + value = "visible_value" // this will be redacted from plan outputs + category = "terraform" + workspace_id = tfe_workspace.workspace.id + sensitive = false +} + +resource "tfe_workspace" "sensitive_workspace" { + name = "workspace-${tfe_variable.sensitive_var.value}" // this will be redacted from plan outputs + organization = "organization name" +} + +resource "tfe_workspace" "visible_workspace" { + name = "workspace-${tfe_variable.visible_var.readable_value}" // this will not be redacted from plan outputs + organization = "organization name" } ``` @@ -198,4 +185,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/typescript/r/variable_set.html.markdown b/website/docs/cdktf/typescript/r/variable_set.html.markdown index 106d723e6..ceb0d3f23 100644 --- a/website/docs/cdktf/typescript/r/variable_set.html.markdown +++ b/website/docs/cdktf/typescript/r/variable_set.html.markdown @@ -16,75 +16,68 @@ Creates, updates and destroys variable sets. Basic 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 { Organization } from "./.gen/providers/tfe/organization"; -import { Project } from "./.gen/providers/tfe/project"; -import { ProjectVariableSet } from "./.gen/providers/tfe/project-variable-set"; -import { Variable } from "./.gen/providers/tfe/variable"; -import { VariableSet } from "./.gen/providers/tfe/variable-set"; -import { Workspace } from "./.gen/providers/tfe/workspace"; -import { WorkspaceVariableSet } from "./.gen/providers/tfe/workspace-variable-set"; -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 tfeProjectTest = new Project(this, "test_1", { + 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: "projectname", - organization: test.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 tfeVariableSetTest = new VariableSet(this, "test_2", { + const tfeVariableSetTest = new tfe.variableSet.VariableSet(this, "test_2", { description: "Some description.", name: "Test Varset", - organization: test.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.*/ tfeVariableSetTest.overrideLogicalId("test"); - const tfeWorkspaceTest = new Workspace(this, "test_3", { + const tfeWorkspaceTest = new tfe.workspace.Workspace(this, "test_3", { name: "my-workspace-name", - organization: test.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.*/ tfeWorkspaceTest.overrideLogicalId("test"); - const tfeWorkspaceVariableSetTest = new WorkspaceVariableSet( - this, - "test_4", - { - variableSetId: Token.asString(tfeVariableSetTest.id), - workspaceId: Token.asString(tfeWorkspaceTest.id), - } - ); + const tfeWorkspaceVariableSetTest = + new tfe.workspaceVariableSet.WorkspaceVariableSet(this, "test_4", { + variableSetId: cdktf.Token.asString(tfeVariableSetTest.id), + workspaceId: 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.*/ tfeWorkspaceVariableSetTest.overrideLogicalId("test"); - const tfeProjectVariableSetTest = new ProjectVariableSet(this, "test_5", { - projectId: Token.asString(tfeProjectTest.id), - variableSetId: Token.asString(tfeVariableSetTest.id), - }); + const tfeProjectVariableSetTest = + new tfe.projectVariableSet.ProjectVariableSet(this, "test_5", { + projectId: cdktf.Token.asString(tfeProjectTest.id), + variableSetId: cdktf.Token.asString(tfeVariableSetTest.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.*/ tfeProjectVariableSetTest.overrideLogicalId("test"); - new Variable(this, "test-a", { + new tfe.variable.Variable(this, "test-a", { category: "terraform", description: "a useful description", key: "seperate_variable", value: "my_value_name", - variableSetId: Token.asString(tfeVariableSetTest.id), + variableSetId: cdktf.Token.asString(tfeVariableSetTest.id), }); - new Variable(this, "test-b", { + new tfe.variable.Variable(this, "test-b", { category: "env", description: "an environment variable", key: "another_variable", value: "my_value_name", - variableSetId: Token.asString(tfeVariableSetTest.id), + variableSetId: cdktf.Token.asString(tfeVariableSetTest.id), }); } } @@ -94,44 +87,89 @@ class MyConvertedCode extends TerraformStack { Creating a global variable 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 { Organization } from "./.gen/providers/tfe/organization"; -import { Variable } from "./.gen/providers/tfe/variable"; -import { VariableSet } from "./.gen/providers/tfe/variable-set"; -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 tfeVariableSetTest = new VariableSet(this, "test_1", { + const tfeOrganizationTest = new tfe.organization.Organization( + this, + "test", + { + email: "admin@company.com", + name: "my-org-name", + } + ); + const tfeVariableSetTest = new tfe.variableSet.VariableSet(this, "test_1", { description: "Variable set applied to all workspaces.", global: true, name: "Global Varset", - organization: test.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.*/ + tfeVariableSetTest.overrideLogicalId("test"); + new tfe.variable.Variable(this, "test-a", { + category: "terraform", + description: "a useful description", + key: "seperate_variable", + value: "my_value_name", + variableSetId: cdktf.Token.asString(tfeVariableSetTest.id), + }); + new tfe.variable.Variable(this, "test-b", { + category: "env", + description: "an environment variable", + key: "another_variable", + value: "my_value_name", + variableSetId: cdktf.Token.asString(tfeVariableSetTest.id), + }); + } +} + +``` + +Create a priority variable set: + +```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 tfeVariableSetTest = new tfe.variableSet.VariableSet(this, "test_1", { + description: "Variable set applied to all workspaces.", + name: "Global Varset", + organization: cdktf.Token.asString(tfeOrganizationTest.name), + priority: true, }); /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ tfeVariableSetTest.overrideLogicalId("test"); - new Variable(this, "test-a", { + new tfe.variable.Variable(this, "test-a", { category: "terraform", description: "a useful description", key: "seperate_variable", value: "my_value_name", - variableSetId: Token.asString(tfeVariableSetTest.id), + variableSetId: cdktf.Token.asString(tfeVariableSetTest.id), }); - new Variable(this, "test-b", { + new tfe.variable.Variable(this, "test-b", { category: "env", description: "an environment variable", key: "another_variable", value: "my_value_name", - variableSetId: Token.asString(tfeVariableSetTest.id), + variableSetId: cdktf.Token.asString(tfeVariableSetTest.id), }); } } @@ -144,7 +182,8 @@ The following arguments are supported: * `name` - (Required) Name of the variable set. * `description` - (Optional) Description of the variable set. -* `global` - (Optional) Whether or not the variable set applies to all workspaces in the organization. Defaults to `false`. +* `global` - (Optional) Whether the variable set applies to all workspaces in the organization. Defaults to `false`. +* `priority` - (Optional) Whether the variables in this set can be over-written by more specific scopes including values set on the command line. Defaults to `false`. * `organization` - (Optional) Name of the organization. If omitted, organization must be defined in the provider config. * `workspaceIds` - **Deprecated** (Optional) IDs of the workspaces that use the variable set. Must not be set if `global` is set. This argument is mutually exclusive with using the resource @@ -163,4 +202,4 @@ Variable sets can be imported; use `` as the import ID. For exa terraform import tfe_variable_set.test varset-5rTwnSaRPogw6apb ``` - \ No newline at end of file + \ 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 0e9cecb61..18a00183b 100644 --- a/website/docs/cdktf/typescript/r/workspace.html.markdown +++ b/website/docs/cdktf/typescript/r/workspace.html.markdown @@ -18,25 +18,25 @@ Provides a workspace resource. 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"; -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", - }); - new Workspace(this, "test", { + const tfeOrganizationTestOrganization = new tfe.organization.Organization( + this, + "test-organization", + { + email: "admin@company.com", + name: "my-org-name", + } + ); + new tfe.workspace.Workspace(this, "test", { name: "my-workspace-name", - organization: testOrganization.name, + organization: cdktf.Token.asString(tfeOrganizationTestOrganization.name), tagNames: ["test", "app"], }); } @@ -47,32 +47,37 @@ 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 { 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 { 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 testOrganization = new Organization(this, "test-organization", { - email: "admin@company.com", - name: "my-org-name", - }); - const testAgentPool = new AgentPool(this, "test-agent-pool", { - name: "my-agent-pool-name", - organization: testOrganization.name, - }); - new Workspace(this, "test", { - agentPoolId: testAgentPool.id, + const tfeOrganizationTestOrganization = new tfe.organization.Organization( + this, + "test-organization", + { + email: "admin@company.com", + 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: testOrganization.name, + organization: cdktf.Token.asString(tfeOrganizationTestOrganization.name), }); } } @@ -90,6 +95,7 @@ The following arguments are supported: * `allowDestroyPlan` - (Optional) Whether destroy plans can be queued on the workspace. * `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`. * `description` - (Optional) A description for the workspace. * `executionMode` - (Optional) Which [execution mode](https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings#execution-mode) to use. Using Terraform Cloud, valid values are `remote`, `local` or`agent`. @@ -189,4 +195,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 + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/workspace_policy_set.html.markdown b/website/docs/cdktf/typescript/r/workspace_policy_set.html.markdown index f1f0420c9..08afbc792 100644 --- a/website/docs/cdktf/typescript/r/workspace_policy_set.html.markdown +++ b/website/docs/cdktf/typescript/r/workspace_policy_set.html.markdown @@ -18,41 +18,40 @@ Adds and removes policy sets from a workspace Basic 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 { Organization } from "./.gen/providers/tfe/organization"; -import { PolicySet } from "./.gen/providers/tfe/policy-set"; -import { Workspace } from "./.gen/providers/tfe/workspace"; -import { WorkspacePolicySet } from "./.gen/providers/tfe/workspace-policy-set"; -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 tfePolicySetTest = new PolicySet(this, "test_1", { + const tfeOrganizationTest = new tfe.organization.Organization( + this, + "test", + { + email: "admin@company.com", + name: "my-org-name", + } + ); + const tfePolicySetTest = new tfe.policySet.PolicySet(this, "test_1", { description: "Some description.", name: "my-policy-set", - organization: test.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.*/ tfePolicySetTest.overrideLogicalId("test"); - const tfeWorkspaceTest = new Workspace(this, "test_2", { + const tfeWorkspaceTest = new tfe.workspace.Workspace(this, "test_2", { name: "my-workspace-name", - organization: test.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.*/ tfeWorkspaceTest.overrideLogicalId("test"); - const tfeWorkspacePolicySetTest = new WorkspacePolicySet(this, "test_3", { - policySetId: Token.asString(tfePolicySetTest.id), - workspaceId: Token.asString(tfeWorkspaceTest.id), - }); + const tfeWorkspacePolicySetTest = + new tfe.workspacePolicySet.WorkspacePolicySet(this, "test_3", { + policySetId: cdktf.Token.asString(tfePolicySetTest.id), + workspaceId: 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.*/ tfeWorkspacePolicySetTest.overrideLogicalId("test"); } @@ -79,4 +78,4 @@ Workspace Policy Sets can be imported; use `// \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/workspace_policy_set_exclusion.html.markdown b/website/docs/cdktf/typescript/r/workspace_policy_set_exclusion.html.markdown index 635fdf53c..2bca759b3 100644 --- a/website/docs/cdktf/typescript/r/workspace_policy_set_exclusion.html.markdown +++ b/website/docs/cdktf/typescript/r/workspace_policy_set_exclusion.html.markdown @@ -18,45 +18,44 @@ Adds and removes policy sets from an excluded workspace Basic 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 { Organization } from "./.gen/providers/tfe/organization"; -import { PolicySet } from "./.gen/providers/tfe/policy-set"; -import { Workspace } from "./.gen/providers/tfe/workspace"; -import { WorkspacePolicySetExclusion } from "./.gen/providers/tfe/workspace-policy-set-exclusion"; -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 tfePolicySetTest = new PolicySet(this, "test_1", { + const tfeOrganizationTest = new tfe.organization.Organization( + this, + "test", + { + email: "admin@company.com", + name: "my-org-name", + } + ); + const tfePolicySetTest = new tfe.policySet.PolicySet(this, "test_1", { description: "Some description.", name: "my-policy-set", - organization: test.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.*/ tfePolicySetTest.overrideLogicalId("test"); - const tfeWorkspaceTest = new Workspace(this, "test_2", { + const tfeWorkspaceTest = new tfe.workspace.Workspace(this, "test_2", { name: "my-workspace-name", - organization: test.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.*/ tfeWorkspaceTest.overrideLogicalId("test"); - const tfeWorkspacePolicySetExclusionTest = new WorkspacePolicySetExclusion( - this, - "test_3", - { - policySetId: Token.asString(tfePolicySetTest.id), - workspaceId: Token.asString(tfeWorkspaceTest.id), - } - ); + const tfeWorkspacePolicySetExclusionTest = + new tfe.workspacePolicySetExclusion.WorkspacePolicySetExclusion( + this, + "test_3", + { + policySetId: cdktf.Token.asString(tfePolicySetTest.id), + workspaceId: 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.*/ tfeWorkspacePolicySetExclusionTest.overrideLogicalId("test"); } @@ -83,4 +82,4 @@ Excluded Workspace Policy Sets can be imported; use `/ \ No newline at end of file + \ 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 466abe78e..f1875dbe2 100644 --- a/website/docs/cdktf/typescript/r/workspace_run.html.markdown +++ b/website/docs/cdktf/typescript/r/workspace_run.html.markdown @@ -24,80 +24,82 @@ The `tfeWorkspaceRun` expects to own exactly one apply during a creation and/or Basic usage with multiple workspaces: ```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 { Workspace } from "./.gen/providers/tfe/workspace"; -import { WorkspaceRun } from "./.gen/providers/tfe/workspace-run"; -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 OauthClient(this, "test", { + const tfeOrganizationTestOrganization = new tfe.organization.Organization( + this, + "test-organization", + { + email: "admin@company.com", + name: "my-org-name", + } + ); + const tfeOauthClientTest = new tfe.oauthClient.OauthClient(this, "test", { apiUrl: "https://api.github.com", httpUrl: "https://github.com", oauthToken: "oauth_token_id", - organization: testOrganization, + organization: tfeOrganizationTestOrganization, serviceProvider: "github", }); - const child = new Workspace(this, "child", { + const tfeWorkspaceChild = new tfe.workspace.Workspace(this, "child", { name: "child-ws", - organization: testOrganization, + organization: tfeOrganizationTestOrganization, queueAllRuns: false, vcsRepo: { branch: "main", identifier: "my-org-name/vcs-repository", - oauthTokenId: test.oauthTokenId, + oauthTokenId: cdktf.Token.asString(tfeOauthClientTest.oauthTokenId), }, }); - const parent = new Workspace(this, "parent", { + const tfeWorkspaceParent = new tfe.workspace.Workspace(this, "parent", { name: "parent-ws", - organization: testOrganization, + organization: tfeOrganizationTestOrganization, queueAllRuns: false, vcsRepo: { branch: "main", identifier: "my-org-name/vcs-repository", - oauthTokenId: test.oauthTokenId, - }, - }); - const wsRunParent = new WorkspaceRun(this, "ws_run_parent", { - apply: { - manualConfirm: false, - retryAttempts: 5, - retryBackoffMin: 5, - waitForRun: true, + oauthTokenId: cdktf.Token.asString(tfeOauthClientTest.oauthTokenId), }, - destroy: { - manualConfirm: false, - retryAttempts: 3, - retryBackoffMin: 10, - waitForRun: true, - }, - workspaceId: parent.id, }); - new WorkspaceRun(this, "ws_run_child", { + const tfeWorkspaceRunWsRunParent = new tfe.workspaceRun.WorkspaceRun( + this, + "ws_run_parent", + { + apply: { + manualConfirm: false, + retryAttempts: 5, + retryBackoffMin: 5, + waitForRun: true, + }, + destroy: { + manualConfirm: false, + retryAttempts: 3, + retryBackoffMin: 10, + waitForRun: true, + }, + workspaceId: cdktf.Token.asString(tfeWorkspaceParent.id), + } + ); + new tfe.workspaceRun.WorkspaceRun(this, "ws_run_child", { apply: { manualConfirm: false, retryAttempts: 5, retryBackoffMin: 5, }, - dependsOn: [wsRunParent], + dependsOn: [tfeWorkspaceRunWsRunParent], destroy: { manualConfirm: false, retryAttempts: 3, retryBackoffMin: 10, waitForRun: true, }, - workspaceId: child.id, + workspaceId: cdktf.Token.asString(tfeWorkspaceChild.id), }); } } @@ -107,42 +109,40 @@ class MyConvertedCode extends TerraformStack { With manual confirmation: ```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 { Workspace } from "./.gen/providers/tfe/workspace"; -import { WorkspaceRun } from "./.gen/providers/tfe/workspace-run"; -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 OauthClient(this, "test", { + const tfeOrganizationTestOrganization = new tfe.organization.Organization( + this, + "test-organization", + { + email: "admin@company.com", + name: "my-org-name", + } + ); + const tfeOauthClientTest = new tfe.oauthClient.OauthClient(this, "test", { apiUrl: "https://api.github.com", httpUrl: "https://github.com", oauthToken: "oauth_token_id", - organization: testOrganization, + organization: tfeOrganizationTestOrganization, serviceProvider: "github", }); - const parent = new Workspace(this, "parent", { + const tfeWorkspaceParent = new tfe.workspace.Workspace(this, "parent", { name: "parent-ws", - organization: testOrganization, + organization: tfeOrganizationTestOrganization, queueAllRuns: false, vcsRepo: { branch: "main", identifier: "my-org-name/vcs-repository", - oauthTokenId: test.oauthTokenId, + oauthTokenId: cdktf.Token.asString(tfeOauthClientTest.oauthTokenId), }, }); - new WorkspaceRun(this, "ws_run_parent", { + new tfe.workspaceRun.WorkspaceRun(this, "ws_run_parent", { apply: { manualConfirm: true, }, @@ -150,7 +150,7 @@ class MyConvertedCode extends TerraformStack { manualConfirm: true, waitForRun: true, }, - workspaceId: parent.id, + workspaceId: cdktf.Token.asString(tfeWorkspaceParent.id), }); } } @@ -160,42 +160,40 @@ class MyConvertedCode extends TerraformStack { With no retries: ```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 { Workspace } from "./.gen/providers/tfe/workspace"; -import { WorkspaceRun } from "./.gen/providers/tfe/workspace-run"; -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 OauthClient(this, "test", { + const tfeOrganizationTestOrganization = new tfe.organization.Organization( + this, + "test-organization", + { + email: "admin@company.com", + name: "my-org-name", + } + ); + const tfeOauthClientTest = new tfe.oauthClient.OauthClient(this, "test", { apiUrl: "https://api.github.com", httpUrl: "https://github.com", oauthToken: "oauth_token_id", - organization: testOrganization, + organization: tfeOrganizationTestOrganization, serviceProvider: "github", }); - const parent = new Workspace(this, "parent", { + const tfeWorkspaceParent = new tfe.workspace.Workspace(this, "parent", { name: "parent-ws", - organization: testOrganization, + organization: tfeOrganizationTestOrganization, queueAllRuns: false, vcsRepo: { branch: "main", identifier: "my-org-name/vcs-repository", - oauthTokenId: test.oauthTokenId, + oauthTokenId: cdktf.Token.asString(tfeOauthClientTest.oauthTokenId), }, }); - new WorkspaceRun(this, "ws_run_parent", { + new tfe.workspaceRun.WorkspaceRun(this, "ws_run_parent", { apply: { manualConfirm: false, retry: false, @@ -205,7 +203,7 @@ class MyConvertedCode extends TerraformStack { retry: false, waitForRun: true, }, - workspaceId: parent.id, + workspaceId: cdktf.Token.asString(tfeWorkspaceParent.id), }); } } @@ -237,4 +235,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 Terraform Cloud. - \ No newline at end of file + \ 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 4a9ed1f46..2af33a4b9 100644 --- a/website/docs/cdktf/typescript/r/workspace_run_task.html.markdown +++ b/website/docs/cdktf/typescript/r/workspace_run_task.html.markdown @@ -17,26 +17,12 @@ The tfe_workspace_run_task resource associates, updates and removes [Workspace R 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 { WorkspaceRunTask } from "./.gen/providers/tfe/workspace-run-task"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { - super(scope, name); - new WorkspaceRunTask(this, "example", { - enforcementLevel: "advisory", - taskId: tfeOrganizationRunTask.example.id, - workspaceId: tfeWorkspace.example.id, - }); - } +```hcl +resource "tfe_workspace_run_task" "example" { + workspace_id = resource.tfe_workspace.example.id + task_id = resource.tfe_organization_run_task.example.id + enforcement_level = "advisory" } - ``` ## Argument Reference @@ -61,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/typescript/r/workspace_variable_set.html.markdown b/website/docs/cdktf/typescript/r/workspace_variable_set.html.markdown index aa89dcd59..946d0f324 100644 --- a/website/docs/cdktf/typescript/r/workspace_variable_set.html.markdown +++ b/website/docs/cdktf/typescript/r/workspace_variable_set.html.markdown @@ -18,45 +18,40 @@ Adds and removes variable sets from a workspace Basic 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 { Organization } from "./.gen/providers/tfe/organization"; -import { VariableSet } from "./.gen/providers/tfe/variable-set"; -import { Workspace } from "./.gen/providers/tfe/workspace"; -import { WorkspaceVariableSet } from "./.gen/providers/tfe/workspace-variable-set"; -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 tfeVariableSetTest = new VariableSet(this, "test_1", { + const tfeOrganizationTest = new tfe.organization.Organization( + this, + "test", + { + email: "admin@company.com", + name: "my-org-name", + } + ); + const tfeVariableSetTest = new tfe.variableSet.VariableSet(this, "test_1", { description: "Some description.", name: "Test Varset", - organization: test.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.*/ tfeVariableSetTest.overrideLogicalId("test"); - const tfeWorkspaceTest = new Workspace(this, "test_2", { + const tfeWorkspaceTest = new tfe.workspace.Workspace(this, "test_2", { name: "my-workspace-name", - organization: test.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.*/ tfeWorkspaceTest.overrideLogicalId("test"); - const tfeWorkspaceVariableSetTest = new WorkspaceVariableSet( - this, - "test_3", - { - variableSetId: Token.asString(tfeVariableSetTest.id), - workspaceId: Token.asString(tfeWorkspaceTest.id), - } - ); + const tfeWorkspaceVariableSetTest = + new tfe.workspaceVariableSet.WorkspaceVariableSet(this, "test_3", { + variableSetId: cdktf.Token.asString(tfeVariableSetTest.id), + workspaceId: 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.*/ tfeWorkspaceVariableSetTest.overrideLogicalId("test"); } @@ -83,4 +78,4 @@ Workspace Variable Sets can be imported; use `// \ No newline at end of file + \ No newline at end of file