diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c387afd3..29b831d24 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,13 +1,20 @@ ## UNRELEASED -### Enhancements + +## v0.54.0 + +ENHANCEMENTS: +* Rebrand Terraform Cloud to HCP Terraform by @sebasslash [#1328](https://github.com/hashicorp/terraform-provider-tfe/pull/1328) * Adds `post_apply` to list of possible `stages` for Run Tasks by @carolinaborim [#1307](https://github.com/hashicorp/terraform-provider-tfe/pull/1307) -### Features +FEATURES: * `d/tfe_oauth_client`: Add `project_ids` attribute, by @Netra2104 [1148](https://github.com/hashicorp/terraform-provider-tfe/pull/1148) * `d/tfe_oauth_client`: Add `organization_scoped` attribute, by @Netra2104 [1148](https://github.com/hashicorp/terraform-provider-tfe/pull/1148) * **New Resource**: `r/tfe_project_oauth_client` attaches/detaches an existing `project` to an existing `oauth client`, by @Netra2104 [1144](https://github.com/hashicorp/terraform-provider-tfe/pull/1144) * **New Resource**: `r/tfe_test_variable` is a new resource for creating environment variables used by registry modules for terraform test, by @aaabdelgany [1285](https://github.com/hashicorp/terraform-provider-tfe/pull/1285) +BUG FIXES: +* `r/tfe_organization_default_settings`: Fix import resource address documentation by @Uk1288 [#1324](https://github.com/hashicorp/terraform-provider-tfe/pull/1324) + ## v0.53.0 ENHANCEMENTS: diff --git a/README.md b/README.md index 7c69a386c..de048ce59 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ Declare the provider in your configuration and `terraform init` will automatical terraform { required_providers { tfe = { - version = "~> 0.53.0" + version = "~> 0.54.0" } } } diff --git a/website/docs/cdktf/csharp/d/workspace.html.markdown b/website/docs/cdktf/csharp/d/workspace.html.markdown index 6cc97f431..3d1c9023a 100644 --- a/website/docs/cdktf/csharp/d/workspace.html.markdown +++ b/website/docs/cdktf/csharp/d/workspace.html.markdown @@ -48,7 +48,11 @@ In addition to all arguments above, the following attributes are exported: * `AllowDestroyPlan` - Indicates whether destroy plans can be queued on the workspace. * `AutoApply` - Indicates whether to automatically apply changes when a Terraform plan is successful. * `AutoApplyRunTrigger` - Whether the workspace will automatically apply changes for runs that were created by run triggers from another workspace. +<<<<<<< HEAD * `AssessmentsEnabled` - (Available only in HCP Terraform) Indicates whether health assessments such as drift detection are enabled for the workspace. +======= +* `AssessmentsEnabled` - (Available only in Terraform Cloud) Indicates whether health assessments such as drift detection are enabled for the workspace. +>>>>>>> adf61bce (cdktf: update documentation) * `FileTriggersEnabled` - Indicates whether runs are triggered based on the changed files in a VCS push (if `True`) or always triggered on every push (if `False`). * `GlobalRemoteState` - (Optional) Whether the workspace should allow all workspaces in the organization to access its state data during runs. If false, then only specifically approved workspaces can access its state (determined by the `RemoteStateConsumerIds` argument). * `RemoteStateConsumerIds` - (Optional) A set of workspace IDs that will be set as the remote state consumers for the given workspace. Cannot be used if `GlobalRemoteState` is set to `True`. @@ -88,4 +92,4 @@ The `VcsRepo` block contains: * `OauthTokenId` - OAuth token ID of the configured VCS connection. * `TagsRegex` - A regular expression used to trigger a Workspace run for matching Git tags. - \ No newline at end of file + diff --git a/website/docs/cdktf/csharp/index.html.markdown b/website/docs/cdktf/csharp/index.html.markdown index 0bfcf9188..d9f3e9b69 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.53.0" + version = "~> 0.54.0" } } } @@ -90,7 +90,7 @@ The above snippet using `RequiredProviders` is for Terraform 0.13+; if you are u ```hcl provider "tfe" { - version = "~> 0.53.0" + version = "~> 0.54.0" ... } ``` @@ -103,7 +103,7 @@ For more information on provider installation and constraining provider versions provider "tfe" { hostname = var.hostname # Optional, defaults to HCP Terraform `AppTerraformIo` token = var.token - version = "~> 0.53.0" + version = "~> 0.54.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 + 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 cdaa77bcc..89e616d85 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,36 +19,34 @@ for Business account. In this example, the agent pool and workspace are connected through other resources that manage the agent pool permissions as well as the workspace execution mode. Notice that the `TfeWorkspaceSettings` uses the agent pool reference found in `TfeAgentPoolAllowedWorkspaces` in order to create the permission to use the agent pool before assigning it. -```hcl -resource "tfe_organization" "test-organization" { - name = "my-org-name" - email = "admin@company.com" -} - -// Ensure workspace and agent pool are create first -resource "tfe_workspace" "test-workspace" { - name = "my-workspace-name" - organization = tfe_organization.test-organization.name -} - -resource "tfe_agent_pool" "test-agent-pool" { - name = "my-agent-pool-name" - organization = tfe_organization.test-organization.name - organization_scoped = false -} - -// Ensure permissions are assigned second -resource "tfe_agent_pool_allowed_workspaces" "allowed" { - agent_pool_id = tfe_agent_pool.test-agent-pool.id - allowed_workspace_ids = [for key, value in tfe_workspace.test.*.id : value] -} - -// Lastly, ensure the workspace agent execution is assigned last by -// referencing allowed_workspaces -resource "tfe_workspace_settings" "test-workspace-settings" { - workspace_id = tfe_workspace.test-workspace.id - execution_mode = "agent" - agent_pool_id = tfe_agent_pool_allowed_workspaces.allowed.id +```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) } + }); + } } ``` @@ -68,4 +66,5 @@ A resource can be imported; use `` as the import ID. For example: terraform import tfe_agent_pool_allowed_workspaces.foobar apool-rW0KoLSlnuNb5adB ``` - \ No newline at end of file + + diff --git a/website/docs/cdktf/csharp/r/workspace.html.markdown b/website/docs/cdktf/csharp/r/workspace.html.markdown index 0ab6aab2f..87f303c48 100644 --- a/website/docs/cdktf/csharp/r/workspace.html.markdown +++ b/website/docs/cdktf/csharp/r/workspace.html.markdown @@ -187,4 +187,4 @@ terraform import tfe_workspace.test ws-CH5in3chf8RJjrVd terraform import tfe_workspace.test my-org-name/my-wkspace-name ``` - \ No newline at end of file + diff --git a/website/docs/cdktf/go/d/workspace.html.markdown b/website/docs/cdktf/go/d/workspace.html.markdown index 0468d5103..aafa7b257 100644 --- a/website/docs/cdktf/go/d/workspace.html.markdown +++ b/website/docs/cdktf/go/d/workspace.html.markdown @@ -91,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 + diff --git a/website/docs/cdktf/go/index.html.markdown b/website/docs/cdktf/go/index.html.markdown index 0bfcf9188..d9f3e9b69 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.53.0" + version = "~> 0.54.0" } } } @@ -90,7 +90,7 @@ The above snippet using `RequiredProviders` is for Terraform 0.13+; if you are u ```hcl provider "tfe" { - version = "~> 0.53.0" + version = "~> 0.54.0" ... } ``` @@ -103,7 +103,7 @@ For more information on provider installation and constraining provider versions provider "tfe" { hostname = var.hostname # Optional, defaults to HCP Terraform `AppTerraformIo` token = var.token - version = "~> 0.53.0" + version = "~> 0.54.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 + 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 cdaa77bcc..3eb86ba12 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,36 +19,42 @@ for Business account. In this example, the agent pool and workspace are connected through other resources that manage the agent pool permissions as well as the workspace execution mode. Notice that the `TfeWorkspaceSettings` uses the agent pool reference found in `TfeAgentPoolAllowedWorkspaces` in order to create the permission to use the agent pool before assigning it. -```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 } -// Ensure workspace and agent pool are create first -resource "tfe_workspace" "test-workspace" { - name = "my-workspace-name" - organization = tfe_organization.test-organization.name -} - -resource "tfe_agent_pool" "test-agent-pool" { - name = "my-agent-pool-name" - organization = tfe_organization.test-organization.name - organization_scoped = false -} - -// Ensure permissions are assigned second -resource "tfe_agent_pool_allowed_workspaces" "allowed" { - agent_pool_id = tfe_agent_pool.test-agent-pool.id - allowed_workspace_ids = [for key, value in tfe_workspace.test.*.id : value] -} - -// Lastly, ensure the workspace agent execution is assigned last by -// referencing allowed_workspaces -resource "tfe_workspace_settings" "test-workspace-settings" { - workspace_id = tfe_workspace.test-workspace.id - execution_mode = "agent" - agent_pool_id = tfe_agent_pool_allowed_workspaces.allowed.id +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 } ``` @@ -68,4 +74,5 @@ A resource can be imported; use `` as the import ID. For example: terraform import tfe_agent_pool_allowed_workspaces.foobar apool-rW0KoLSlnuNb5adB ``` - \ No newline at end of file + + diff --git a/website/docs/cdktf/go/r/workspace.html.markdown b/website/docs/cdktf/go/r/workspace.html.markdown index 764ac546b..c7511d8ab 100644 --- a/website/docs/cdktf/go/r/workspace.html.markdown +++ b/website/docs/cdktf/go/r/workspace.html.markdown @@ -199,4 +199,4 @@ terraform import tfe_workspace.test ws-CH5in3chf8RJjrVd terraform import tfe_workspace.test my-org-name/my-wkspace-name ``` - \ No newline at end of file + diff --git a/website/docs/cdktf/java/d/workspace.html.markdown b/website/docs/cdktf/java/d/workspace.html.markdown index 6c35a05c2..6e5340ca3 100644 --- a/website/docs/cdktf/java/d/workspace.html.markdown +++ b/website/docs/cdktf/java/d/workspace.html.markdown @@ -87,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 + diff --git a/website/docs/cdktf/java/index.html.markdown b/website/docs/cdktf/java/index.html.markdown index bfcf361ab..5f6c5117d 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.53.0" + version = "~> 0.54.0" } } } @@ -90,7 +90,7 @@ The above snippet using `requiredProviders` is for Terraform 0.13+; if you are u ```hcl provider "tfe" { - version = "~> 0.53.0" + version = "~> 0.54.0" ... } ``` @@ -103,7 +103,7 @@ For more information on provider installation and constraining provider versions provider "tfe" { hostname = var.hostname # Optional, defaults to HCP Terraform `appTerraformIo` token = var.token - version = "~> 0.53.0" + version = "~> 0.54.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 + 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 622ca4ab5..66bacc0fa 100644 --- a/website/docs/cdktf/java/r/agent_pool_allowed_workspaces.html.markdown +++ b/website/docs/cdktf/java/r/agent_pool_allowed_workspaces.html.markdown @@ -19,36 +19,36 @@ for Business account. In this example, the agent pool and workspace are connected through other resources that manage the agent pool permissions as well as the workspace execution mode. Notice that the `tfeWorkspaceSettings` uses the agent pool reference found in `tfeAgentPoolAllowedWorkspaces` in order to create the permission to use the agent pool before assigning it. -```hcl -resource "tfe_organization" "test-organization" { - name = "my-org-name" - email = "admin@company.com" -} - -// Ensure workspace and agent pool are create first -resource "tfe_workspace" "test-workspace" { - name = "my-workspace-name" - organization = tfe_organization.test-organization.name -} - -resource "tfe_agent_pool" "test-agent-pool" { - name = "my-agent-pool-name" - organization = tfe_organization.test-organization.name - organization_scoped = false -} - -// Ensure permissions are assigned second -resource "tfe_agent_pool_allowed_workspaces" "allowed" { - agent_pool_id = tfe_agent_pool.test-agent-pool.id - allowed_workspace_ids = [for key, value in tfe_workspace.test.*.id : value] -} - -// Lastly, ensure the workspace agent execution is assigned last by -// referencing allowed_workspaces -resource "tfe_workspace_settings" "test-workspace-settings" { - workspace_id = tfe_workspace.test-workspace.id - execution_mode = "agent" - agent_pool_id = tfe_agent_pool_allowed_workspaces.allowed.id +```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()))) + ); + } } ``` @@ -68,4 +68,5 @@ A resource can be imported; use `` as the import ID. For example: terraform import tfe_agent_pool_allowed_workspaces.foobar apool-rW0KoLSlnuNb5adB ``` - \ No newline at end of file + + diff --git a/website/docs/cdktf/java/r/workspace.html.markdown b/website/docs/cdktf/java/r/workspace.html.markdown index 731b3184f..0ca2f132a 100644 --- a/website/docs/cdktf/java/r/workspace.html.markdown +++ b/website/docs/cdktf/java/r/workspace.html.markdown @@ -188,4 +188,4 @@ terraform import tfe_workspace.test ws-CH5in3chf8RJjrVd terraform import tfe_workspace.test my-org-name/my-wkspace-name ``` - \ No newline at end of file + diff --git a/website/docs/cdktf/python/d/agent_pool.html.markdown b/website/docs/cdktf/python/d/agent_pool.html.markdown index df964f4cc..9445061a1 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 + diff --git a/website/docs/cdktf/python/d/github_installation.html.markdown b/website/docs/cdktf/python/d/github_installation.html.markdown index 2d5ab9fd9..407d3b977 100644 --- a/website/docs/cdktf/python/d/github_installation.html.markdown +++ b/website/docs/cdktf/python/d/github_installation.html.markdown @@ -16,38 +16,32 @@ 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", - installation_id=12345678 + tfe.data_tfe_github_app_installation.DataTfeGithubAppInstallation(self, "gha_installation", + installation_id=12345 ) ``` ### 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", - name="github_username_or_organization" + tfe.data_tfe_github_app_installation.DataTfeGithubAppInstallation(self, "gha_installation", + name="installation_name" ) ``` @@ -65,5 +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 + diff --git a/website/docs/cdktf/python/d/ip_ranges.html.markdown b/website/docs/cdktf/python/d/ip_ranges.html.markdown index 8815924b6..fd2a980e7 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 HCP Terraform's IP ranges. For more i ## 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 + diff --git a/website/docs/cdktf/python/d/oauth_client.html.markdown b/website/docs/cdktf/python/d/oauth_client.html.markdown index 79b1e70ef..e58955357 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 + diff --git a/website/docs/cdktf/python/d/organization.html.markdown b/website/docs/cdktf/python/d/organization.html.markdown index 07b6e2775..41bc85607 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,5 +45,4 @@ In addition to all arguments above, the following attributes are exported: * `send_passing_statuses_for_untriggered_speculative_plans` - Whether or not to send VCS status updates for untriggered speculative plans. This can be useful if large numbers of untriggered workspaces are exhausting request limits for connected version control service providers like GitHub. Defaults to true. In Terraform Enterprise, this setting has no effect and cannot be changed but is also available in Site Administration. * `aggregated_commit_status_enabled` - Whether or not to enable Aggregated Status Checks. This can be useful for monorepo repositories with multiple workspaces receiving status checks for events such as a pull request. * `default_project_id` - ID of the organization's default project. All workspaces created without specifying a project ID are created in this project. - - \ No newline at end of file + diff --git a/website/docs/cdktf/python/d/organization_members.html.markdown b/website/docs/cdktf/python/d/organization_members.html.markdown index d27f10272..701afbe7f 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 + diff --git a/website/docs/cdktf/python/d/organization_membership.html.markdown b/website/docs/cdktf/python/d/organization_membership.html.markdown index 7e5cfd59f..8f9932c99 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 + 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 fe30dd820..0bfc0dc1e 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 + diff --git a/website/docs/cdktf/python/d/organization_tags.html.markdown b/website/docs/cdktf/python/d/organization_tags.html.markdown index 35e8ecf05..d1eebf753 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 + diff --git a/website/docs/cdktf/python/d/organizations.html.markdown b/website/docs/cdktf/python/d/organizations.html.markdown index 40acebd22..23d6acab4 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 + diff --git a/website/docs/cdktf/python/d/outputs.html.markdown b/website/docs/cdktf/python/d/outputs.html.markdown index 81fff84bc..e0724371d 100644 --- a/website/docs/cdktf/python/d/outputs.html.markdown +++ b/website/docs/cdktf/python/d/outputs.html.markdown @@ -21,26 +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) - foo = DataTfeOutputs(self, "foo", + # 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. + 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 + keepers=[{ + "bar": data_tfe_outputs_foo.values.bar } ) ``` @@ -59,4 +58,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 + diff --git a/website/docs/cdktf/python/d/policy_set.html.markdown b/website/docs/cdktf/python/d/policy_set.html.markdown index f07549b13..7792c0828 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" ) @@ -69,4 +66,4 @@ The `vcs_repo` block contains: * `oauth_token_id` - OAuth token ID of the configured VCS connection. - \ No newline at end of file + diff --git a/website/docs/cdktf/python/d/project.html.markdown b/website/docs/cdktf/python/d/project.html.markdown index 7d521d696..d45e87f6e 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 + diff --git a/website/docs/cdktf/python/d/saml_settings.html.markdown b/website/docs/cdktf/python/d/saml_settings.html.markdown index f103ca385..878fb1f95 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 + diff --git a/website/docs/cdktf/python/d/slug.html.markdown b/website/docs/cdktf/python/d/slug.html.markdown index 3cde8b5ec..7335bc887 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 + diff --git a/website/docs/cdktf/python/d/ssh_key.html.markdown b/website/docs/cdktf/python/d/ssh_key.html.markdown index d5d2e6bba..c0e3cf6b3 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 + diff --git a/website/docs/cdktf/python/d/team.html.markdown b/website/docs/cdktf/python/d/team.html.markdown index 620317566..5d3b5c0c9 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 + diff --git a/website/docs/cdktf/python/d/team_access.html.markdown b/website/docs/cdktf/python/d/team_access.html.markdown index d0e17f1f6..6298539a8 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 + 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 b6e18fa24..79d8e2dde 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 + diff --git a/website/docs/cdktf/python/d/teams.html.markdown b/website/docs/cdktf/python/d/teams.html.markdown index 6580fd5fb..2a1affca4 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 + diff --git a/website/docs/cdktf/python/d/variable_set.html.markdown b/website/docs/cdktf/python/d/variable_set.html.markdown index 27fae8882..175cc05d2 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" ) @@ -52,4 +49,4 @@ The following arguments are supported: * `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 + diff --git a/website/docs/cdktf/python/d/variables.html.markdown b/website/docs/cdktf/python/d/variables.html.markdown index cd3625403..a3e5ef957 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 + diff --git a/website/docs/cdktf/python/d/workspace.html.markdown b/website/docs/cdktf/python/d/workspace.html.markdown index 3286a7bed..64a5d731d 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" ) @@ -88,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 + diff --git a/website/docs/cdktf/python/d/workspace_ids.html.markdown b/website/docs/cdktf/python/d/workspace_ids.html.markdown index ca8b5f27a..574df030f 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 + 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 8a0452d2a..5ca5e8c3b 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 + diff --git a/website/docs/cdktf/python/index.html.markdown b/website/docs/cdktf/python/index.html.markdown index 88f5382fa..4fb4ecf50 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.54.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.53.0" + version = "~> 0.54.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.54.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 + diff --git a/website/docs/cdktf/python/r/admin_organization_settings.markdown b/website/docs/cdktf/python/r/admin_organization_settings.markdown index 43e9e3b4e..6701ab676 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 @@ -72,4 +66,8 @@ The following arguments are supported: * `sso_enabled` - True if SSO is enabled in this organization - \ No newline at end of file +## Import + +This resource does not manage the creation of an organization and there is no need to import it. + + diff --git a/website/docs/cdktf/python/r/agent_pool.html.markdown b/website/docs/cdktf/python/r/agent_pool.html.markdown index f0997789c..6cddfb917 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 ) ``` @@ -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 + 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 eb8ae5940..f7ce8f7b8 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,43 +20,32 @@ for Business account. In this example, the agent pool and workspace are connected through other resources that manage the agent pool permissions as well as the workspace execution mode. Notice that the `tfe_workspace_settings` uses the agent pool reference found in `tfe_agent_pool_allowed_workspaces` in order to create the permission to use the agent pool before assigning it. ```python -# 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.agent_pool import AgentPool -from imports.tfe.agent_pool_allowed_workspaces import AgentPoolAllowedWorkspaces -from imports.tfe.organization import Organization -from imports.tfe.workspace import Workspace -from imports.tfe.workspace_settings import WorkspaceSettings -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - test_organization = Organization(self, "test-organization", + tfe_organization_test_organization = tfe.organization.Organization(self, "test-organization", email="admin@company.com", name="my-org-name" ) - test_workspace = Workspace(self, "test-workspace", + tfe_workspace_test_workspace = tfe.workspace.Workspace(self, "test-workspace", name="my-workspace-name", - organization=test_organization.name + organization=cdktf.Token.as_string(tfe_organization_test_organization.name) ) - test_agent_pool = AgentPool(self, "test-agent-pool", + tfe_agent_pool_test_agent_pool = tfe.agent_pool.AgentPool(self, "test-agent-pool", name="my-agent-pool-name", - organization=test_organization.name, + organization=cdktf.Token.as_string(tfe_organization_test_organization.name), organization_scoped=False ) - allowed = AgentPoolAllowedWorkspaces(self, "allowed", - agent_pool_id=test_agent_pool.id, - allowed_workspace_ids=Token.as_list("${[ for key, value in ${" + - Fn.lookup_nested(test, ["*", "id"]) + "} : value]}") - ) - WorkspaceSettings(self, "test-workspace-settings", - agent_pool_id=allowed.id, - execution_mode="agent", - workspace_id=test_workspace.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) + ] ) ``` @@ -76,4 +65,5 @@ A resource can be imported; use `` as the import ID. For example: terraform import tfe_agent_pool_allowed_workspaces.foobar apool-rW0KoLSlnuNb5adB ``` - \ No newline at end of file + + diff --git a/website/docs/cdktf/python/r/agent_token.html.markdown b/website/docs/cdktf/python/r/agent_token.html.markdown index d2176cbb4..a0a13b601 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 HCP Terraform. 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 + 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 a35a6503c..b908eb697 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 + diff --git a/website/docs/cdktf/python/r/notification_configuration.html.markdown b/website/docs/cdktf/python/r/notification_configuration.html.markdown index dbd5276f3..0c1438778 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 + diff --git a/website/docs/cdktf/python/r/oauth_client.html.markdown b/website/docs/cdktf/python/r/oauth_client.html.markdown index f856bc68c..ab52fe122 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 HCP Terraform and Terraform Enterprise setup](https://dev **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 + diff --git a/website/docs/cdktf/python/r/organization.html.markdown b/website/docs/cdktf/python/r/organization.html.markdown index 4b6dee594..30461b99d 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" ) @@ -65,4 +62,4 @@ example: terraform import tfe_organization.test my-org-name ``` - \ No newline at end of file + diff --git a/website/docs/cdktf/python/r/organization_membership.html.markdown b/website/docs/cdktf/python/r/organization_membership.html.markdown index 9170eb8d7..504dc7ab2 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 + 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 5e606ea7c..8d269f286 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 + 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 343f6b044..49ab61168 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 + diff --git a/website/docs/cdktf/python/r/organization_token.html.markdown b/website/docs/cdktf/python/r/organization_token.html.markdown index 02e9544c7..1bd7da35f 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 + diff --git a/website/docs/cdktf/python/r/policy.html.markdown b/website/docs/cdktf/python/r/policy.html.markdown index 3e794c4d2..e1f5ca083 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 + diff --git a/website/docs/cdktf/python/r/policy_set.html.markdown b/website/docs/cdktf/python/r/policy_set.html.markdown index 83e93767f..f006acbee 100644 --- a/website/docs/cdktf/python/r/policy_set.html.markdown +++ b/website/docs/cdktf/python/r/policy_set.html.markdown @@ -79,31 +79,21 @@ class MyConvertedCode(TerraformStack): 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 @@ -166,4 +156,4 @@ Policy sets can be imported; use `` as the import ID. For example terraform import tfe_policy_set.test polset-wAs3zYmWAhYK7peR ``` - \ No newline at end of file + diff --git a/website/docs/cdktf/python/r/policy_set_parameter.html.markdown b/website/docs/cdktf/python/r/policy_set_parameter.html.markdown index 5904442c7..9e0042e62 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 + diff --git a/website/docs/cdktf/python/r/project.html.markdown b/website/docs/cdktf/python/r/project.html.markdown index 106e20258..478467ba7 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 + 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 85ad3e390..ffa50629b 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 + 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 648c90db8..7c2a2b2e3 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 + diff --git a/website/docs/cdktf/python/r/registry_module.html.markdown b/website/docs/cdktf/python/r/registry_module.html.markdown index 709544552..6cb8cdf67 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 @@ HCP Terraform's private module registry helps you share Terraform modules across 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) ) ) ``` @@ -93,31 +88,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" ) ) @@ -126,26 +117,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" ) ``` @@ -153,27 +140,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" ) ``` @@ -181,33 +164,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) ) ``` @@ -265,4 +244,4 @@ terraform import tfe_registry_module.test my-org-name/public/namespace/name/prov terraform import tfe_registry_module.test my-org-name/name/provider/mod-qV9JnKRkmtMa4zcA ``` - \ No newline at end of file + diff --git a/website/docs/cdktf/python/r/run_trigger.html.markdown b/website/docs/cdktf/python/r/run_trigger.html.markdown index df20da152..1d0ac8fb9 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 + diff --git a/website/docs/cdktf/python/r/saml_settings.html.markdown b/website/docs/cdktf/python/r/saml_settings.html.markdown index 3842ee3c9..a808ff0a2 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 + diff --git a/website/docs/cdktf/python/r/sentinel_policy.html.markdown b/website/docs/cdktf/python/r/sentinel_policy.html.markdown index 39b7518af..f831b680d 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 + diff --git a/website/docs/cdktf/python/r/ssh_key.html.markdown b/website/docs/cdktf/python/r/ssh_key.html.markdown index 777ce33f4..7bc098f47 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 + diff --git a/website/docs/cdktf/python/r/team.html.markdown b/website/docs/cdktf/python/r/team.html.markdown index 8986aeff9..98dbf8cbf 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 + diff --git a/website/docs/cdktf/python/r/team_access.html.markdown b/website/docs/cdktf/python/r/team_access.html.markdown index a52e519f8..d4f34b779 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 + diff --git a/website/docs/cdktf/python/r/team_member.html.markdown b/website/docs/cdktf/python/r/team_member.html.markdown index e0e91ab64..1b26ef82e 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 + diff --git a/website/docs/cdktf/python/r/team_members.html.markdown b/website/docs/cdktf/python/r/team_members.html.markdown index 405b4b098..c0d351920 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 + 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 30df802ba..7628e87ec 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 + 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 e24bd8262..3c8682bab 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 + 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 6a9a2b5c2..06919c267 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 workspaces (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 + diff --git a/website/docs/cdktf/python/r/team_token.html.markdown b/website/docs/cdktf/python/r/team_token.html.markdown index d3a7c2688..1458fc79d 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 + diff --git a/website/docs/cdktf/python/r/terraform_version.html.markdown b/website/docs/cdktf/python/r/terraform_version.html.markdown index 741305dbf..1dfbb2b45 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 HCP Terraform and Terraform Enterprise. Basic Usage: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.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 HCP Terraform UI. The ID is in the format `tool-` - \ 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 bacb23e52..7d5f39b8c 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 + diff --git a/website/docs/cdktf/python/r/variable_set.html.markdown b/website/docs/cdktf/python/r/variable_set.html.markdown index f5e16a6bd..4d192574a 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) ) ``` @@ -198,4 +225,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 + diff --git a/website/docs/cdktf/python/r/workspace.html.markdown b/website/docs/cdktf/python/r/workspace.html.markdown index 7eff9ff55..1be5e8685 100644 --- a/website/docs/cdktf/python/r/workspace.html.markdown +++ b/website/docs/cdktf/python/r/workspace.html.markdown @@ -20,25 +20,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"] ) ``` @@ -46,39 +42,35 @@ class MyConvertedCode(TerraformStack): Usage with vcs_repo: ```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. +<<<<<<< HEAD # from imports.tfe.oauth_client import OauthClient from imports.tfe.organization import Organization from imports.tfe.workspace import Workspace class MyConvertedCode(TerraformStack): +======= +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): +>>>>>>> adf61bce (cdktf: update documentation) def __init__(self, scope, name): super().__init__(scope, name) - 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", - api_url="https://api.github.com", - http_url="https://github.com", - oauth_token="oauth_token_id", - organization=test_organization, - service_provider="github" + tfe_agent_pool_test_agent_pool = tfe.agent_pool.AgentPool(self, "test-agent-pool", + name="my-agent-pool-name", + organization=cdktf.Token.as_string(tfe_organization_test_organization.name) ) - Workspace(self, "parent", - name="parent-ws", - 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 - ) + tfe.workspace.Workspace(self, "test", + agent_pool_id=cdktf.Token.as_string(tfe_agent_pool_test_agent_pool.id), + execution_mode="agent", + name="my-workspace-name", + organization=cdktf.Token.as_string(tfe_organization_test_organization.name) ) ``` @@ -191,4 +183,4 @@ terraform import tfe_workspace.test ws-CH5in3chf8RJjrVd terraform import tfe_workspace.test my-org-name/my-wkspace-name ``` - \ No newline at end of file + diff --git a/website/docs/cdktf/python/r/workspace_policy_set.html.markdown b/website/docs/cdktf/python/r/workspace_policy_set.html.markdown index bbf800503..e95a5f9df 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 + 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 ab821e937..1446181d3 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 + diff --git a/website/docs/cdktf/python/r/workspace_run.html.markdown b/website/docs/cdktf/python/r/workspace_run.html.markdown index 84e2790a6..5550f2faa 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 HCP Terraform. - \ No newline at end of file + diff --git a/website/docs/cdktf/python/r/workspace_run_task.html.markdown b/website/docs/cdktf/python/r/workspace_run_task.html.markdown index 9a8c536d6..4057850fb 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 + 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 0d3f249f3..6a52e923d 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 + diff --git a/website/docs/cdktf/typescript/d/agent_pool.html.markdown b/website/docs/cdktf/typescript/d/agent_pool.html.markdown index 679a0d95e..b903b551d 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 + diff --git a/website/docs/cdktf/typescript/d/github_installation.html.markdown b/website/docs/cdktf/typescript/d/github_installation.html.markdown index de4de22b5..729f3c70c 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: 12345678, - }); + 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: "github_username_or_organization", - }); + new tfe.dataTfeGithubAppInstallation.DataTfeGithubAppInstallation( + this, + "gha_installation", + { + name: "installation_name", + } + ); } } @@ -71,5 +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 + diff --git a/website/docs/cdktf/typescript/d/ip_ranges.html.markdown b/website/docs/cdktf/typescript/d/ip_ranges.html.markdown index 619c8b782..0b3f9604a 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 HCP Terraform's IP ranges. For more i ## 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 + diff --git a/website/docs/cdktf/typescript/d/oauth_client.html.markdown b/website/docs/cdktf/typescript/d/oauth_client.html.markdown index 30064e5c7..42e586f55 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 + diff --git a/website/docs/cdktf/typescript/d/organization.html.markdown b/website/docs/cdktf/typescript/d/organization.html.markdown index c8c2e5f36..81ca0afca 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,5 +48,4 @@ In addition to all arguments above, the following attributes are exported: * `sendPassingStatusesForUntriggeredSpeculativePlans` - Whether or not to send VCS status updates for untriggered speculative plans. This can be useful if large numbers of untriggered workspaces are exhausting request limits for connected version control service providers like GitHub. Defaults to true. In Terraform Enterprise, this setting has no effect and cannot be changed but is also available in Site Administration. * `aggregatedCommitStatusEnabled` - Whether or not to enable Aggregated Status Checks. This can be useful for monorepo repositories with multiple workspaces receiving status checks for events such as a pull request. * `defaultProjectId` - ID of the organization's default project. All workspaces created without specifying a project ID are created in this project. - - \ No newline at end of file + diff --git a/website/docs/cdktf/typescript/d/organization_members.html.markdown b/website/docs/cdktf/typescript/d/organization_members.html.markdown index bc6075dcf..5d288c1d0 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 + diff --git a/website/docs/cdktf/typescript/d/organization_membership.html.markdown b/website/docs/cdktf/typescript/d/organization_membership.html.markdown index 17657f337..67c15a000 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 + 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 ced7a4194..3d2ce438b 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 + diff --git a/website/docs/cdktf/typescript/d/organization_tags.html.markdown b/website/docs/cdktf/typescript/d/organization_tags.html.markdown index fa7618293..6c7ae2283 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", }); } @@ -49,5 +46,5 @@ 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 +* `workspaceCount` - The number of workspaces the tag is associate with + diff --git a/website/docs/cdktf/typescript/d/organizations.html.markdown b/website/docs/cdktf/typescript/d/organizations.html.markdown index 82fbe35c5..e2d2c7c5a 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 + diff --git a/website/docs/cdktf/typescript/d/outputs.html.markdown b/website/docs/cdktf/typescript/d/outputs.html.markdown index 2586d6d5f..74f004534 100644 --- a/website/docs/cdktf/typescript/d/outputs.html.markdown +++ b/website/docs/cdktf/typescript/d/outputs.html.markdown @@ -21,27 +21,32 @@ 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`: ```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); - const foo = new DataTfeOutputs(this, "foo", { - organization: "my-org", - workspace: "my-workspace", - }); - new Id(this, "vpc_id", { - byteLength: 8, - keepers: { - bar: foo.values.bar, - }, + /*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 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: dataTfeOutputsFoo.values.bar, + }, + ], }); } } @@ -62,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 + diff --git a/website/docs/cdktf/typescript/d/policy_set.html.markdown b/website/docs/cdktf/typescript/d/policy_set.html.markdown index 519edc03a..1a242fe1b 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", }); @@ -72,4 +69,4 @@ The `vcsRepo` block contains: * `oauthTokenId` - OAuth token ID of the configured VCS connection. - \ No newline at end of file + diff --git a/website/docs/cdktf/typescript/d/project.html.markdown b/website/docs/cdktf/typescript/d/project.html.markdown index a6059773f..5dc7b21c0 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 + diff --git a/website/docs/cdktf/typescript/d/saml_settings.html.markdown b/website/docs/cdktf/typescript/d/saml_settings.html.markdown index 0f2535cb1..d3ee757b0 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 + diff --git a/website/docs/cdktf/typescript/d/slug.html.markdown b/website/docs/cdktf/typescript/d/slug.html.markdown index 3e121741d..7146f5fc4 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 + diff --git a/website/docs/cdktf/typescript/d/ssh_key.html.markdown b/website/docs/cdktf/typescript/d/ssh_key.html.markdown index 0a783fac4..c8167b534 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 + diff --git a/website/docs/cdktf/typescript/d/team.html.markdown b/website/docs/cdktf/typescript/d/team.html.markdown index 95b80260f..fe9dad43f 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 + diff --git a/website/docs/cdktf/typescript/d/team_access.html.markdown b/website/docs/cdktf/typescript/d/team_access.html.markdown index e74140956..a5afb95d0 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 + 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 b53b01c7b..d250165a4 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 + diff --git a/website/docs/cdktf/typescript/d/teams.html.markdown b/website/docs/cdktf/typescript/d/teams.html.markdown index a882c09e3..e71e2fc1e 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 + diff --git a/website/docs/cdktf/typescript/d/variable_set.html.markdown b/website/docs/cdktf/typescript/d/variable_set.html.markdown index 3ff81d38e..9753bc586 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", }); @@ -55,4 +52,4 @@ The following arguments are supported: * `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 + diff --git a/website/docs/cdktf/typescript/d/variables.html.markdown b/website/docs/cdktf/typescript/d/variables.html.markdown index 09ecfabe9..f4f5aee20 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 + diff --git a/website/docs/cdktf/typescript/d/workspace.html.markdown b/website/docs/cdktf/typescript/d/workspace.html.markdown index d78b4727a..280e4a2d8 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", }); @@ -91,4 +88,4 @@ The `vcsRepo` block contains: * `oauthTokenId` - OAuth token ID of the configured VCS connection. * `tagsRegex` - A regular expression used to trigger a Workspace run for matching Git tags. - \ No newline at end of file + diff --git a/website/docs/cdktf/typescript/d/workspace_ids.html.markdown b/website/docs/cdktf/typescript/d/workspace_ids.html.markdown index 31628da96..6db1fb692 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 + 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 5ccb6689f..69c36eda8 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 + diff --git a/website/docs/cdktf/typescript/index.html.markdown b/website/docs/cdktf/typescript/index.html.markdown index e1c75f06d..427420b16 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 `required_providers` is for Terraform 0.13+; if you are ```hcl provider "tfe" { - version = "~> 0.53.0" + version = "~> 0.54.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.54.0" } +# Create an organization +resource "tfe_organization" "org" { + # ... +} ``` ## Argument Reference @@ -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 `TFE_ORGANIZATION` environment variable. - \ No newline at end of file + diff --git a/website/docs/cdktf/typescript/r/admin_organization_settings.markdown b/website/docs/cdktf/typescript/r/admin_organization_settings.markdown index fbbaca18a..1f0bdf6a7 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 @@ -75,4 +66,8 @@ The following arguments are supported: * `ssoEnabled` - True if SSO is enabled in this organization - \ No newline at end of file +## Import + +This resource does not manage the creation of an organization and there is no need to import it. + + diff --git a/website/docs/cdktf/typescript/r/agent_pool.html.markdown b/website/docs/cdktf/typescript/r/agent_pool.html.markdown index 1e9d0c0f2..6b05943a6 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, }); } @@ -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 + 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 76bb59161..d9a33d1d3 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,47 +20,53 @@ for Business account. In this example, the agent pool and workspace are connected through other resources that manage the agent pool permissions as well as the workspace execution mode. Notice that the `tfe_workspace_settings` uses the agent pool reference found in `tfe_agent_pool_allowed_workspaces` in order to create the permission to use the agent pool before assigning it. ```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 { AgentPool } from "./.gen/providers/tfe/agent-pool"; -import { AgentPoolAllowedWorkspaces } from "./.gen/providers/tfe/agent-pool-allowed-workspaces"; -import { Organization } from "./.gen/providers/tfe/organization"; -import { Workspace } from "./.gen/providers/tfe/workspace"; -import { WorkspaceSettings } from "./.gen/providers/tfe/workspace-settings"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - const testOrganization = new Organization(this, "test-organization", { - email: "admin@company.com", - name: "my-org-name", - }); - const testWorkspace = new Workspace(this, "test-workspace", { - name: "my-workspace-name", - organization: testOrganization.name, - }); - const testAgentPool = new AgentPool(this, "test-agent-pool", { - name: "my-agent-pool-name", - organization: testOrganization.name, - organizationScoped: false, - }); - const allowed = new AgentPoolAllowedWorkspaces(this, "allowed", { - agentPoolId: testAgentPool.id, - allowedWorkspaceIds: Token.asList( - "${[ for key, value in ${" + - Fn.lookupNested(test, ["*", "id"]) + - "} : value]}" - ), - }); - new WorkspaceSettings(this, "test-workspace-settings", { - agentPoolId: allowed.id, - executionMode: "agent", - workspaceId: testWorkspace.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), + ], + } + ); } } @@ -82,4 +88,5 @@ A resource can be imported; use `` as the import ID. For example: terraform import tfe_agent_pool_allowed_workspaces.foobar apool-rW0KoLSlnuNb5adB ``` - \ No newline at end of file + + diff --git a/website/docs/cdktf/typescript/r/agent_token.html.markdown b/website/docs/cdktf/typescript/r/agent_token.html.markdown index f36186414..10ad0157b 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 HCP Terraform. 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 + 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 0e9040064..06cdac0ba 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 + diff --git a/website/docs/cdktf/typescript/r/notification_configuration.html.markdown b/website/docs/cdktf/typescript/r/notification_configuration.html.markdown index 8b8518e06..6513e8520 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 `email_users`: ```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 + diff --git a/website/docs/cdktf/typescript/r/oauth_client.html.markdown b/website/docs/cdktf/typescript/r/oauth_client.html.markdown index d02868f1f..c0e61cb7e 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 HCP Terraform and Terraform Enterprise setup](https://dev **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 + diff --git a/website/docs/cdktf/typescript/r/organization.html.markdown b/website/docs/cdktf/typescript/r/organization.html.markdown index 05b4e55e4..dac894796 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", }); @@ -72,4 +69,4 @@ example: terraform import tfe_organization.test my-org-name ``` - \ No newline at end of file + diff --git a/website/docs/cdktf/typescript/r/organization_membership.html.markdown b/website/docs/cdktf/typescript/r/organization_membership.html.markdown index 7874e4048..ba4af10f8 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 + 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 23972ab15..971493fed 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 + 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 462ace970..ca4ff3bab 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 + diff --git a/website/docs/cdktf/typescript/r/organization_token.html.markdown b/website/docs/cdktf/typescript/r/organization_token.html.markdown index 273e96979..2b6aaf5ba 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 + diff --git a/website/docs/cdktf/typescript/r/policy.html.markdown b/website/docs/cdktf/typescript/r/policy.html.markdown index e9edf7291..d03bf3d48 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 + diff --git a/website/docs/cdktf/typescript/r/policy_set.html.markdown b/website/docs/cdktf/typescript/r/policy_set.html.markdown index 6c3c74812..74aa0b73b 100644 --- a/website/docs/cdktf/typescript/r/policy_set.html.markdown +++ b/website/docs/cdktf/typescript/r/policy_set.html.markdown @@ -51,7 +51,6 @@ class MyConvertedCode extends TerraformStack { }); } } - ``` Using manually-specified policies: @@ -80,39 +79,25 @@ class MyConvertedCode extends TerraformStack { }); } } - ``` 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 @@ -175,4 +160,4 @@ Policy sets can be imported; use `` as the import ID. For example terraform import tfe_policy_set.test polset-wAs3zYmWAhYK7peR ``` - \ No newline at end of file + diff --git a/website/docs/cdktf/typescript/r/policy_set_parameter.html.markdown b/website/docs/cdktf/typescript/r/policy_set_parameter.html.markdown index 9acedef19..ec27fa502 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 + diff --git a/website/docs/cdktf/typescript/r/project.html.markdown b/website/docs/cdktf/typescript/r/project.html.markdown index 98f69dc50..3ec3cb87d 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 + 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 87d6f764d..ee9336a31 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 + 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 cdb622020..5122c9aaa 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 + diff --git a/website/docs/cdktf/typescript/r/registry_module.html.markdown b/website/docs/cdktf/typescript/r/registry_module.html.markdown index b29f30999..2a7e59ed4 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 @@ HCP Terraform's private module registry helps you share Terraform modules across 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 + ), }, }); } @@ -100,35 +107,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", }, }); @@ -140,28 +149,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", + } + ); } } @@ -170,27 +185,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", }); } @@ -201,37 +216,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 + ), }); } } @@ -292,4 +311,4 @@ terraform import tfe_registry_module.test my-org-name/public/namespace/name/prov terraform import tfe_registry_module.test my-org-name/name/provider/mod-qV9JnKRkmtMa4zcA ``` - \ No newline at end of file + diff --git a/website/docs/cdktf/typescript/r/run_trigger.html.markdown b/website/docs/cdktf/typescript/r/run_trigger.html.markdown index e8bc59ed1..1c6bc9701 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 + diff --git a/website/docs/cdktf/typescript/r/saml_settings.html.markdown b/website/docs/cdktf/typescript/r/saml_settings.html.markdown index 78e016f2f..37a16f856 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 + diff --git a/website/docs/cdktf/typescript/r/sentinel_policy.html.markdown b/website/docs/cdktf/typescript/r/sentinel_policy.html.markdown index 0c1b07cf4..95e04fea9 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 + diff --git a/website/docs/cdktf/typescript/r/ssh_key.html.markdown b/website/docs/cdktf/typescript/r/ssh_key.html.markdown index 5005e86a3..2184fb63e 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 + diff --git a/website/docs/cdktf/typescript/r/team.html.markdown b/website/docs/cdktf/typescript/r/team.html.markdown index 723937553..2726bf8a9 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 + diff --git a/website/docs/cdktf/typescript/r/team_access.html.markdown b/website/docs/cdktf/typescript/r/team_access.html.markdown index 79dcd1795..fb13753fd 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 + diff --git a/website/docs/cdktf/typescript/r/team_member.html.markdown b/website/docs/cdktf/typescript/r/team_member.html.markdown index d04d60adb..45971f676 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 + diff --git a/website/docs/cdktf/typescript/r/team_members.html.markdown b/website/docs/cdktf/typescript/r/team_members.html.markdown index 385531b7e..f1c2fa8b8 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 + 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 f264c9f96..c7e1877b3 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 + 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 425e367ba..12151468f 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,8 @@ as the import ID. For example: terraform import tfe_team_organization_members.test team-47qC3LmA47piVan7 ``` - \ No newline at end of file +<<<<<<< HEAD + +======= + +>>>>>>> adf61bce (cdktf: update documentation) 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 f85ec64cc..b221ebff0 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 workspaces (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 + diff --git a/website/docs/cdktf/typescript/r/team_token.html.markdown b/website/docs/cdktf/typescript/r/team_token.html.markdown index 702ea826e..fe120f2cb 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 + diff --git a/website/docs/cdktf/typescript/r/terraform_version.html.markdown b/website/docs/cdktf/typescript/r/terraform_version.html.markdown index 7dfc5508d..7ac1306ee 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 HCP Terraform and Terraform Enterprise. Basic Usage: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { 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 HCP Terraform UI. The ID is in the format `tool-` - \ 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 46e787a4f..7a2783483 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 + diff --git a/website/docs/cdktf/typescript/r/variable_set.html.markdown b/website/docs/cdktf/typescript/r/variable_set.html.markdown index f4e66379a..79b9e8037 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 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), + }); + } +} + +``` + +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 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), }); } } @@ -211,4 +249,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 + diff --git a/website/docs/cdktf/typescript/r/workspace.html.markdown b/website/docs/cdktf/typescript/r/workspace.html.markdown index 4630dc0ce..dd11c8fb7 100644 --- a/website/docs/cdktf/typescript/r/workspace.html.markdown +++ b/website/docs/cdktf/typescript/r/workspace.html.markdown @@ -20,25 +20,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"], }); } @@ -49,39 +49,37 @@ class MyConvertedCode extends TerraformStack { Usage with vcs_repo: ```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"; -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", { - apiUrl: "https://api.github.com", - httpUrl: "https://github.com", - oauthToken: "oauth_token_id", - organization: testOrganization, - serviceProvider: "github", - }); - new Workspace(this, "parent", { - name: "parent-ws", - organization: testOrganization, - queueAllRuns: false, - vcsRepo: { - branch: "main", - identifier: "my-org-name/vcs-repository", - oauthTokenId: test.oauthTokenId, - }, + 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: cdktf.Token.asString(tfeOrganizationTestOrganization.name), }); } } @@ -197,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 + 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 eb29e7b08..de0fbd2d8 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 + 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 e76d7a91a..67c51eaac 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 + diff --git a/website/docs/cdktf/typescript/r/workspace_run.html.markdown b/website/docs/cdktf/typescript/r/workspace_run.html.markdown index fabcce29e..5d7f547bb 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 `tfe_workspace_run` expects to own exactly one apply during a creation and/o 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 HCP Terraform. - \ No newline at end of file + diff --git a/website/docs/cdktf/typescript/r/workspace_run_task.html.markdown b/website/docs/cdktf/typescript/r/workspace_run_task.html.markdown index f4c7001e4..459eaab6e 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 + 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 89747f9cf..3ddea3720 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 + diff --git a/website/docs/index.html.markdown b/website/docs/index.html.markdown index 90fc05815..4b6933127 100644 --- a/website/docs/index.html.markdown +++ b/website/docs/index.html.markdown @@ -75,7 +75,7 @@ automatically installed by `terraform init` in the future: terraform { required_providers { tfe = { - version = "~> 0.53.0" + version = "~> 0.54.0" } } }