From 8492c8b14f86ee1dc3ed49d86b3ebfea24f96d4b Mon Sep 17 00:00:00 2001 From: team-tf-cdk Date: Mon, 16 Oct 2023 00:14:53 +0000 Subject: [PATCH 1/7] cdktf: update d/ssh_key.html.markdown,d/slug.html.markdown,d/saml_settings.html.markdown,d/project.html.markdown,d/policy_set.html.markdown,d/outputs.html.markdown,d/organizations.html.markdown,d/organization_tags.html.markdown,d/organization_run_task.html.markdown,d/organization_membership.html.markdown --- .../d/organization_membership.html.markdown | 47 ++++++---- .../d/organization_run_task.html.markdown | 17 ++-- .../python/d/organization_tags.html.markdown | 17 ++-- .../python/d/organizations.html.markdown | 17 ++-- .../docs/cdktf/python/d/outputs.html.markdown | 23 ++--- .../cdktf/python/d/policy_set.html.markdown | 17 ++-- .../docs/cdktf/python/d/project.html.markdown | 17 ++-- .../python/d/saml_settings.html.markdown | 42 +++++---- .../docs/cdktf/python/d/slug.html.markdown | 22 +++-- .../docs/cdktf/python/d/ssh_key.html.markdown | 17 ++-- .../d/organization_membership.html.markdown | 89 +++++++++---------- .../d/organization_run_task.html.markdown | 31 ++++--- .../d/organization_tags.html.markdown | 21 +++-- .../typescript/d/organizations.html.markdown | 21 +++-- .../cdktf/typescript/d/outputs.html.markdown | 37 ++++---- .../typescript/d/policy_set.html.markdown | 21 +++-- .../cdktf/typescript/d/project.html.markdown | 21 +++-- .../typescript/d/saml_settings.html.markdown | 41 ++++++--- .../cdktf/typescript/d/slug.html.markdown | 26 +++--- .../cdktf/typescript/d/ssh_key.html.markdown | 21 +++-- 20 files changed, 318 insertions(+), 247 deletions(-) diff --git a/website/docs/cdktf/python/d/organization_membership.html.markdown b/website/docs/cdktf/python/d/organization_membership.html.markdown index cc1def6d2..ffff8bf2a 100644 --- a/website/docs/cdktf/python/d/organization_membership.html.markdown +++ b/website/docs/cdktf/python/d/organization_membership.html.markdown @@ -22,15 +22,18 @@ be updated manually. ### Fetch by email ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.data_tfe_organization_membership import DataTfeOrganizationMembership +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - tfe.data_tfe_organization_membership.DataTfeOrganizationMembership(self, "test", + DataTfeOrganizationMembership(self, "test", email="user@company.com", organization="my-org-name" ) @@ -39,15 +42,18 @@ class MyConvertedCode(cdktf.TerraformStack): ### Fetch by username ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.data_tfe_organization_membership import DataTfeOrganizationMembership +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - tfe.data_tfe_organization_membership.DataTfeOrganizationMembership(self, "test", + DataTfeOrganizationMembership(self, "test", organization="my-org-name", username="my-username" ) @@ -56,15 +62,18 @@ class MyConvertedCode(cdktf.TerraformStack): ### Fetch by organization membership ID ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.data_tfe_organization_membership import DataTfeOrganizationMembership +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - tfe.data_tfe_organization_membership.DataTfeOrganizationMembership(self, "test", + DataTfeOrganizationMembership(self, "test", organization="my-org-name", organization_membership_id="ou-xxxxxxxxxxx" ) @@ -89,4 +98,4 @@ In addition to all arguments above, the following attributes are exported: * `user_id` - The ID of the user associated with the organization membership. * `username` - The username of the user associated with the organization membership. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/organization_run_task.html.markdown b/website/docs/cdktf/python/d/organization_run_task.html.markdown index 8429aa128..c7ed30ddb 100644 --- a/website/docs/cdktf/python/d/organization_run_task.html.markdown +++ b/website/docs/cdktf/python/d/organization_run_task.html.markdown @@ -16,15 +16,18 @@ Use this data source to get information about an [Organization Run tasks](https: ## Example Usage ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.data_tfe_organization_run_task import DataTfeOrganizationRunTask +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - tfe.data_tfe_organization_run_task.DataTfeOrganizationRunTask(self, "example", + DataTfeOrganizationRunTask(self, "example", name="task-name", organization="my-org-name" ) @@ -47,4 +50,4 @@ In addition to all arguments above, the following attributes are exported: * `id` - The ID of the task. * `url` - URL to send a task payload. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/organization_tags.html.markdown b/website/docs/cdktf/python/d/organization_tags.html.markdown index 4fffc37f9..6f11a23fa 100644 --- a/website/docs/cdktf/python/d/organization_tags.html.markdown +++ b/website/docs/cdktf/python/d/organization_tags.html.markdown @@ -14,15 +14,18 @@ Use this data source to get information about the workspace tags for a given org ## Example Usage ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.data_tfe_organization_tags import DataTfeOrganizationTags +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - tfe.data_tfe_organization_tags.DataTfeOrganizationTags(self, "example", + DataTfeOrganizationTags(self, "example", organization="my-org-name" ) ``` @@ -44,4 +47,4 @@ The `tag` block contains: * `name` - The name of the workspace tag * `id` - The ID of the workspace tag * `workspace_count` - The number of workspaces the tag is associate with - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/organizations.html.markdown b/website/docs/cdktf/python/d/organizations.html.markdown index 292e9c76f..b3cf933e5 100644 --- a/website/docs/cdktf/python/d/organizations.html.markdown +++ b/website/docs/cdktf/python/d/organizations.html.markdown @@ -14,15 +14,18 @@ Use this data source to get a list of Organizations and a map of their IDs. ## Example Usage ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.data_tfe_organizations import DataTfeOrganizations +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - tfe.data_tfe_organizations.DataTfeOrganizations(self, "foo") + DataTfeOrganizations(self, "foo") ``` ## Argument Reference @@ -41,4 +44,4 @@ The following attributes are exported: * `names` - A list of names of every organization. * `ids` - A map of organization names and their IDs. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/outputs.html.markdown b/website/docs/cdktf/python/d/outputs.html.markdown index 8f6ed2dc5..2e4e48760 100644 --- a/website/docs/cdktf/python/d/outputs.html.markdown +++ b/website/docs/cdktf/python/d/outputs.html.markdown @@ -21,25 +21,28 @@ 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 -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.random as random -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.random.id import Id +from imports.tfe.data_tfe_outputs import DataTfeOutputs +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: random. # For a more precise conversion please use the --provider flag in convert. - data_tfe_outputs_foo = tfe.data_tfe_outputs.DataTfeOutputs(self, "foo", + foo = DataTfeOutputs(self, "foo", organization="my-org", workspace="my-workspace" ) - random.id.Id(self, "vpc_id", + Id(self, "vpc_id", byte_length=8, keepers=[{ - "bar": data_tfe_outputs_foo.values.bar + "bar": foo.values.bar } ] ) @@ -59,4 +62,4 @@ The following attributes are exported: * `values` - The current output values for the specified workspace. * `nonsensitive_values` - The current non-sensitive output values for the specified workspace, this is a subset of all output values. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/policy_set.html.markdown b/website/docs/cdktf/python/d/policy_set.html.markdown index 9b8aca2a9..1650cb017 100644 --- a/website/docs/cdktf/python/d/policy_set.html.markdown +++ b/website/docs/cdktf/python/d/policy_set.html.markdown @@ -16,15 +16,18 @@ This data source is used to retrieve a policy set defined in a specified organiz For workspace policies: ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.data_tfe_policy_set import DataTfePolicySet +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - tfe.data_tfe_policy_set.DataTfePolicySet(self, "test", + DataTfePolicySet(self, "test", name="my-policy-set-name", organization="my-org-name" ) @@ -64,4 +67,4 @@ The `vcs_repo` block contains: * `oauth_token_id` - OAuth token ID of the configured VCS connection. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/project.html.markdown b/website/docs/cdktf/python/d/project.html.markdown index 4a596f35f..f40145ff2 100644 --- a/website/docs/cdktf/python/d/project.html.markdown +++ b/website/docs/cdktf/python/d/project.html.markdown @@ -14,15 +14,18 @@ Use this data source to get information about a project. ## Example Usage ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.data_tfe_project import DataTfeProject +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - tfe.data_tfe_project.DataTfeProject(self, "foo", + DataTfeProject(self, "foo", name="my-project-name", organization="my-org-name" ) @@ -41,4 +44,4 @@ In addition to all arguments above, the following attributes are exported: * `id` - The project ID. * `workspace_ids` - IDs of the workspaces that are associated with the project. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/saml_settings.html.markdown b/website/docs/cdktf/python/d/saml_settings.html.markdown index 338f92bfc..376cdd483 100644 --- a/website/docs/cdktf/python/d/saml_settings.html.markdown +++ b/website/docs/cdktf/python/d/saml_settings.html.markdown @@ -16,21 +16,31 @@ Use this data source to get information about SAML Settings. It applies only to Basic usage: -```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 -} +```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 + ) ``` ## Argument Reference @@ -64,4 +74,4 @@ The following attributes are exported: * `signature_signing_method` - Signature Signing Method. * `signature_digest_method` - Signature Digest Method. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/slug.html.markdown b/website/docs/cdktf/python/d/slug.html.markdown index 6537c5f55..89ee070e4 100644 --- a/website/docs/cdktf/python/d/slug.html.markdown +++ b/website/docs/cdktf/python/d/slug.html.markdown @@ -21,21 +21,25 @@ tar file containing configuration files (a Terraform "slug") when those files ch Tracking a local directory to upload the Sentinel configuration and policies: ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +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) - data_tfe_slug_test = tfe.data_tfe_slug.DataTfeSlug(self, "test", + test = DataTfeSlug(self, "test", source_path="policies/my-policy-set" ) - tfe_policy_set_test = tfe.policy_set.PolicySet(self, "test_1", + tfe_policy_set_test = PolicySet(self, "test_1", name="my-policy-set", organization="my-org-name", - slug=cdktf.Token.as_string_map(data_tfe_slug_test) + slug=Token.as_string_map(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") @@ -47,4 +51,4 @@ The following arguments are supported: * `source_path` - (Required) The path to the directory where the files are located. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/ssh_key.html.markdown b/website/docs/cdktf/python/d/ssh_key.html.markdown index e95a873b6..17ae4aad2 100644 --- a/website/docs/cdktf/python/d/ssh_key.html.markdown +++ b/website/docs/cdktf/python/d/ssh_key.html.markdown @@ -14,15 +14,18 @@ Use this data source to get information about a SSH key. ## Example Usage ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.data_tfe_ssh_key import DataTfeSshKey +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - tfe.data_tfe_ssh_key.DataTfeSshKey(self, "test", + DataTfeSshKey(self, "test", name="my-ssh-key-name", organization="my-org-name" ) @@ -41,4 +44,4 @@ In addition to all arguments above, the following attributes are exported: * `id` - The ID of the SSH key. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/organization_membership.html.markdown b/website/docs/cdktf/typescript/d/organization_membership.html.markdown index a5a620a28..f9f65f023 100644 --- a/website/docs/cdktf/typescript/d/organization_membership.html.markdown +++ b/website/docs/cdktf/typescript/d/organization_membership.html.markdown @@ -22,22 +22,21 @@ be updated manually. ### Fetch by email ```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) { +// 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) { super(scope, name); - new tfe.dataTfeOrganizationMembership.DataTfeOrganizationMembership( - this, - "test", - { - email: "user@company.com", - organization: "my-org-name", - } - ); + new DataTfeOrganizationMembership(this, "test", { + email: "user@company.com", + organization: "my-org-name", + }); } } @@ -46,22 +45,21 @@ class MyConvertedCode extends cdktf.TerraformStack { ### Fetch by username ```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) { +// 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) { super(scope, name); - new tfe.dataTfeOrganizationMembership.DataTfeOrganizationMembership( - this, - "test", - { - organization: "my-org-name", - username: "my-username", - } - ); + new DataTfeOrganizationMembership(this, "test", { + organization: "my-org-name", + username: "my-username", + }); } } @@ -70,22 +68,21 @@ class MyConvertedCode extends cdktf.TerraformStack { ### Fetch by organization membership ID ```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) { +// 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) { super(scope, name); - new tfe.dataTfeOrganizationMembership.DataTfeOrganizationMembership( - this, - "test", - { - organization: "my-org-name", - organizationMembershipId: "ou-xxxxxxxxxxx", - } - ); + new DataTfeOrganizationMembership(this, "test", { + organization: "my-org-name", + organizationMembershipId: "ou-xxxxxxxxxxx", + }); } } @@ -110,4 +107,4 @@ In addition to all arguments above, the following attributes are exported: * `userId` - The ID of the user associated with the organization membership. * `username` - The username of the user associated with the organization membership. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/organization_run_task.html.markdown b/website/docs/cdktf/typescript/d/organization_run_task.html.markdown index 1ee342ef1..c1f65f0b8 100644 --- a/website/docs/cdktf/typescript/d/organization_run_task.html.markdown +++ b/website/docs/cdktf/typescript/d/organization_run_task.html.markdown @@ -16,22 +16,21 @@ Use this data source to get information about an [Organization Run tasks](https: ## Example Usage ```typescript -import * as constructs from "constructs"; -import * as cdktf from "cdktf"; -/*Provider bindings are generated by running cdktf get. -See https://cdk.tf/provider-generation for more details.*/ -import * as tfe from "./.gen/providers/tfe"; -class MyConvertedCode extends cdktf.TerraformStack { - constructor(scope: constructs.Construct, name: string) { +// 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) { super(scope, name); - new tfe.dataTfeOrganizationRunTask.DataTfeOrganizationRunTask( - this, - "example", - { - name: "task-name", - organization: "my-org-name", - } - ); + new DataTfeOrganizationRunTask(this, "example", { + name: "task-name", + organization: "my-org-name", + }); } } @@ -54,4 +53,4 @@ In addition to all arguments above, the following attributes are exported: * `id` - The ID of the task. * `url` - URL to send a task payload. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/organization_tags.html.markdown b/website/docs/cdktf/typescript/d/organization_tags.html.markdown index d608cc1e3..75763fa62 100644 --- a/website/docs/cdktf/typescript/d/organization_tags.html.markdown +++ b/website/docs/cdktf/typescript/d/organization_tags.html.markdown @@ -14,15 +14,18 @@ Use this data source to get information about the workspace tags for a given org ## Example Usage ```typescript -import * as constructs from "constructs"; -import * as cdktf from "cdktf"; -/*Provider bindings are generated by running cdktf get. -See https://cdk.tf/provider-generation for more details.*/ -import * as tfe from "./.gen/providers/tfe"; -class MyConvertedCode extends cdktf.TerraformStack { - constructor(scope: constructs.Construct, name: string) { +// 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) { super(scope, name); - new tfe.dataTfeOrganizationTags.DataTfeOrganizationTags(this, "example", { + new DataTfeOrganizationTags(this, "example", { organization: "my-org-name", }); } @@ -47,4 +50,4 @@ The `tag` block contains: * `name` - The name of the workspace tag * `id` - The ID of the workspace tag * `workspaceCount` - The number of workspaces the tag is associate with - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/organizations.html.markdown b/website/docs/cdktf/typescript/d/organizations.html.markdown index 31989059d..f612f9fcb 100644 --- a/website/docs/cdktf/typescript/d/organizations.html.markdown +++ b/website/docs/cdktf/typescript/d/organizations.html.markdown @@ -14,15 +14,18 @@ Use this data source to get a list of Organizations and a map of their IDs. ## Example Usage ```typescript -import * as constructs from "constructs"; -import * as cdktf from "cdktf"; -/*Provider bindings are generated by running cdktf get. -See https://cdk.tf/provider-generation for more details.*/ -import * as tfe from "./.gen/providers/tfe"; -class MyConvertedCode extends cdktf.TerraformStack { - constructor(scope: constructs.Construct, name: string) { +// 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) { super(scope, name); - new tfe.dataTfeOrganizations.DataTfeOrganizations(this, "foo", {}); + new DataTfeOrganizations(this, "foo", {}); } } @@ -44,4 +47,4 @@ The following attributes are exported: * `names` - A list of names of every organization. * `ids` - A map of organization names and their IDs. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/outputs.html.markdown b/website/docs/cdktf/typescript/d/outputs.html.markdown index 9b23d1a90..e1230ab01 100644 --- a/website/docs/cdktf/typescript/d/outputs.html.markdown +++ b/website/docs/cdktf/typescript/d/outputs.html.markdown @@ -21,30 +21,29 @@ Using the `tfeOutputs` data source, the outputs `foo` and `bar` can be used as s In the example below, assume we have outputs defined in a `myOrg/myWorkspace`: ```typescript -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) { +// 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) { super(scope, name); /*The following providers are missing schema information and might need manual adjustments to synthesize correctly: random. For a more precise conversion please use the --provider flag in convert.*/ - const dataTfeOutputsFoo = new tfe.dataTfeOutputs.DataTfeOutputs( - this, - "foo", - { - organization: "my-org", - workspace: "my-workspace", - } - ); - new random.id.Id(this, "vpc_id", { + const foo = new DataTfeOutputs(this, "foo", { + organization: "my-org", + workspace: "my-workspace", + }); + new Id(this, "vpc_id", { byte_length: 8, keepers: [ { - bar: dataTfeOutputsFoo.values.bar, + bar: foo.values.bar, }, ], }); @@ -67,4 +66,4 @@ The following attributes are exported: * `values` - The current output values for the specified workspace. * `nonsensitiveValues` - The current non-sensitive output values for the specified workspace, this is a subset of all output values. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/policy_set.html.markdown b/website/docs/cdktf/typescript/d/policy_set.html.markdown index 2a104a3c0..4ed6c1d99 100644 --- a/website/docs/cdktf/typescript/d/policy_set.html.markdown +++ b/website/docs/cdktf/typescript/d/policy_set.html.markdown @@ -16,15 +16,18 @@ This data source is used to retrieve a policy set defined in a specified organiz For workspace policies: ```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) { +// 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) { super(scope, name); - new tfe.dataTfePolicySet.DataTfePolicySet(this, "test", { + new DataTfePolicySet(this, "test", { name: "my-policy-set-name", organization: "my-org-name", }); @@ -67,4 +70,4 @@ The `vcsRepo` block contains: * `oauthTokenId` - OAuth token ID of the configured VCS connection. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/project.html.markdown b/website/docs/cdktf/typescript/d/project.html.markdown index 5f30b68c5..875b65281 100644 --- a/website/docs/cdktf/typescript/d/project.html.markdown +++ b/website/docs/cdktf/typescript/d/project.html.markdown @@ -14,15 +14,18 @@ Use this data source to get information about a project. ## Example Usage ```typescript -import * as constructs from "constructs"; -import * as cdktf from "cdktf"; -/*Provider bindings are generated by running cdktf get. -See https://cdk.tf/provider-generation for more details.*/ -import * as tfe from "./.gen/providers/tfe"; -class MyConvertedCode extends cdktf.TerraformStack { - constructor(scope: constructs.Construct, name: string) { +// 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) { super(scope, name); - new tfe.dataTfeProject.DataTfeProject(this, "foo", { + new DataTfeProject(this, "foo", { name: "my-project-name", organization: "my-org-name", }); @@ -44,4 +47,4 @@ In addition to all arguments above, the following attributes are exported: * `id` - The project ID. * `workspaceIds` - IDs of the workspaces that are associated with the project. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/saml_settings.html.markdown b/website/docs/cdktf/typescript/d/saml_settings.html.markdown index eac1110a0..4045d9037 100644 --- a/website/docs/cdktf/typescript/d/saml_settings.html.markdown +++ b/website/docs/cdktf/typescript/d/saml_settings.html.markdown @@ -16,21 +16,34 @@ Use this data source to get information about SAML Settings. It applies only to Basic usage: -```hcl -provider "tfe" { - hostname = var.hostname - token = var.token +```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, + }); + } } -provider "tfe" { - alias = "admin" - hostname = var.hostname - token = var.admin_token -} - -data "tfe_saml_settings" "foo" { - provider = tfe.admin -} ``` ## Argument Reference @@ -64,4 +77,4 @@ The following attributes are exported: * `signatureSigningMethod` - Signature Signing Method. * `signatureDigestMethod` - Signature Digest Method. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/slug.html.markdown b/website/docs/cdktf/typescript/d/slug.html.markdown index af7210b06..8fe21a539 100644 --- a/website/docs/cdktf/typescript/d/slug.html.markdown +++ b/website/docs/cdktf/typescript/d/slug.html.markdown @@ -21,21 +21,25 @@ tar file containing configuration files (a Terraform "slug") when those files ch Tracking a local directory to upload the Sentinel configuration and policies: ```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) { +// 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 dataTfeSlugTest = new tfe.dataTfeSlug.DataTfeSlug(this, "test", { + const test = new DataTfeSlug(this, "test", { sourcePath: "policies/my-policy-set", }); - const tfePolicySetTest = new tfe.policySet.PolicySet(this, "test_1", { + const tfePolicySetTest = new PolicySet(this, "test_1", { name: "my-policy-set", organization: "my-org-name", - slug: cdktf.Token.asStringMap(dataTfeSlugTest), + slug: Token.asStringMap(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.*/ tfePolicySetTest.overrideLogicalId("test"); @@ -50,4 +54,4 @@ The following arguments are supported: * `sourcePath` - (Required) The path to the directory where the files are located. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/ssh_key.html.markdown b/website/docs/cdktf/typescript/d/ssh_key.html.markdown index 0d701abdd..3ba919e18 100644 --- a/website/docs/cdktf/typescript/d/ssh_key.html.markdown +++ b/website/docs/cdktf/typescript/d/ssh_key.html.markdown @@ -14,15 +14,18 @@ Use this data source to get information about a SSH key. ## Example Usage ```typescript -import * as constructs from "constructs"; -import * as cdktf from "cdktf"; -/*Provider bindings are generated by running cdktf get. -See https://cdk.tf/provider-generation for more details.*/ -import * as tfe from "./.gen/providers/tfe"; -class MyConvertedCode extends cdktf.TerraformStack { - constructor(scope: constructs.Construct, name: string) { +// 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) { super(scope, name); - new tfe.dataTfeSshKey.DataTfeSshKey(this, "test", { + new DataTfeSshKey(this, "test", { name: "my-ssh-key-name", organization: "my-org-name", }); @@ -44,4 +47,4 @@ In addition to all arguments above, the following attributes are exported: * `id` - The ID of the SSH key. - \ No newline at end of file + \ No newline at end of file From b99a2be8f7825dbf0850df8abbe0aa9d57c2403a Mon Sep 17 00:00:00 2001 From: team-tf-cdk Date: Mon, 16 Oct 2023 00:15:13 +0000 Subject: [PATCH 2/7] cdktf: update r/team_token.html.markdown,r/team_project_access.html.markdown,r/team_organization_members.html.markdown,r/team_organization_member.html.markdown,r/team_members.html.markdown,r/team_member.html.markdown,r/team_access.html.markdown,r/team.html.markdown,r/ssh_key.html.markdown,r/sentinel_policy.html.markdown --- .../python/r/sentinel_policy.html.markdown | 17 +-- .../docs/cdktf/python/r/ssh_key.html.markdown | 17 +-- .../docs/cdktf/python/r/team.html.markdown | 32 +++-- .../cdktf/python/r/team_access.html.markdown | 27 ++-- .../cdktf/python/r/team_member.html.markdown | 22 ++-- .../cdktf/python/r/team_members.html.markdown | 46 ++++--- .../r/team_organization_member.html.markdown | 29 +++-- .../r/team_organization_members.html.markdown | 72 +++++------ .../r/team_project_access.html.markdown | 53 ++++---- .../cdktf/python/r/team_token.html.markdown | 48 +++++--- .../r/sentinel_policy.html.markdown | 21 ++-- .../cdktf/typescript/r/ssh_key.html.markdown | 21 ++-- .../cdktf/typescript/r/team.html.markdown | 40 +++--- .../typescript/r/team_access.html.markdown | 31 +++-- .../typescript/r/team_member.html.markdown | 26 ++-- .../typescript/r/team_members.html.markdown | 54 ++++---- .../r/team_organization_member.html.markdown | 47 +++---- .../r/team_organization_members.html.markdown | 115 +++++++++--------- .../r/team_project_access.html.markdown | 65 +++++----- .../typescript/r/team_token.html.markdown | 56 +++++---- 20 files changed, 472 insertions(+), 367 deletions(-) diff --git a/website/docs/cdktf/python/r/sentinel_policy.html.markdown b/website/docs/cdktf/python/r/sentinel_policy.html.markdown index 73d0ed16c..c9f5d2db2 100644 --- a/website/docs/cdktf/python/r/sentinel_policy.html.markdown +++ b/website/docs/cdktf/python/r/sentinel_policy.html.markdown @@ -21,15 +21,18 @@ enforced during runs. Basic usage: ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.sentinel_policy import SentinelPolicy +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - tfe.sentinel_policy.SentinelPolicy(self, "test", + SentinelPolicy(self, "test", description="This policy always passes", enforce_mode="hard-mandatory", name="my-policy-name", @@ -63,4 +66,4 @@ import ID. For example: terraform import tfe_sentinel_policy.test my-org-name/pol-wAs3zYmWAhYK7peR ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/ssh_key.html.markdown b/website/docs/cdktf/python/r/ssh_key.html.markdown index 177974c7f..5a43faf22 100644 --- a/website/docs/cdktf/python/r/ssh_key.html.markdown +++ b/website/docs/cdktf/python/r/ssh_key.html.markdown @@ -17,15 +17,18 @@ key. An organization can have multiple SSH keys available. Basic usage: ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.ssh_key import SshKey +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - tfe.ssh_key.SshKey(self, "test", + SshKey(self, "test", key="private-ssh-key", name="my-ssh-key-name", organization="my-org-name" @@ -49,4 +52,4 @@ The following arguments are supported: Because the Terraform Enterprise API does not return the private SSH key content, this resource cannot be imported. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/team.html.markdown b/website/docs/cdktf/python/r/team.html.markdown index bec6f6a88..5232b4f29 100644 --- a/website/docs/cdktf/python/r/team.html.markdown +++ b/website/docs/cdktf/python/r/team.html.markdown @@ -16,15 +16,18 @@ Manages teams. Basic usage: ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.team import Team +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - tfe.team.Team(self, "test", + Team(self, "test", name="my-team-name", organization="my-org-name" ) @@ -33,15 +36,18 @@ class MyConvertedCode(cdktf.TerraformStack): Organization Permission usage: ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.team import Team +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - tfe.team.Team(self, "test", + Team(self, "test", name="my-team-name", organization="my-org-name", organization_access=TeamOrganizationAccess( @@ -91,4 +97,4 @@ or terraform import tfe_team.test my-org-name/my-team-name ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/team_access.html.markdown b/website/docs/cdktf/python/r/team_access.html.markdown index ab50b1a2d..0cf68d501 100644 --- a/website/docs/cdktf/python/r/team_access.html.markdown +++ b/website/docs/cdktf/python/r/team_access.html.markdown @@ -16,28 +16,33 @@ Associate a team to permissions on a workspace. Basic usage: ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.team import Team +from imports.tfe.team_access import TeamAccess +from imports.tfe.workspace import Workspace +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - tfe_team_test = tfe.team.Team(self, "test", + test = Team(self, "test", name="my-team-name", organization="my-org-name" ) - tfe_workspace_test = tfe.workspace.Workspace(self, "test_1", + tfe_workspace_test = 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 = tfe.team_access.TeamAccess(self, "test_2", + tfe_team_access_test = TeamAccess(self, "test_2", access="read", - team_id=cdktf.Token.as_string(tfe_team_test.id), - workspace_id=cdktf.Token.as_string(tfe_workspace_test.id) + team_id=test.id, + workspace_id=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") @@ -77,4 +82,4 @@ example: terraform import tfe_team_access.test my-org-name/my-workspace-name/tws-8S5wnRbRpogw6apb ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/team_member.html.markdown b/website/docs/cdktf/python/r/team_member.html.markdown index e146c6558..cbb0466be 100644 --- a/website/docs/cdktf/python/r/team_member.html.markdown +++ b/website/docs/cdktf/python/r/team_member.html.markdown @@ -25,20 +25,24 @@ used once. All four resources cannot be used for the same team simultaneously. Basic usage: ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.team import Team +from imports.tfe.team_member import TeamMember +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - tfe_team_test = tfe.team.Team(self, "test", + test = Team(self, "test", name="my-team-name", organization="my-org-name" ) - tfe_team_member_test = tfe.team_member.TeamMember(self, "test_1", - team_id=cdktf.Token.as_string(tfe_team_test.id), + tfe_team_member_test = TeamMember(self, "test_1", + team_id=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. @@ -61,4 +65,4 @@ example: terraform import tfe_team_member.test team-47qC3LmA47piVan7/sander ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/team_members.html.markdown b/website/docs/cdktf/python/r/team_members.html.markdown index 697cfe48b..f04aedc6e 100644 --- a/website/docs/cdktf/python/r/team_members.html.markdown +++ b/website/docs/cdktf/python/r/team_members.html.markdown @@ -25,20 +25,24 @@ used once. All four resources cannot be used for the same team simultaneously. Basic usage: ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.team import Team +from imports.tfe.team_members import TeamMembers +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - tfe_team_test = tfe.team.Team(self, "test", + test = Team(self, "test", name="my-team-name", organization="my-org-name" ) - tfe_team_members_test = tfe.team_members.TeamMembers(self, "test_1", - team_id=cdktf.Token.as_string(tfe_team_test.id), + tfe_team_members_test = TeamMembers(self, "test_1", + team_id=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. @@ -48,22 +52,26 @@ class MyConvertedCode(cdktf.TerraformStack): With a set of usernames: ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug +from constructs import Construct +from cdktf import Fn, Token, TerraformStack +# +# Provider bindings are generated by running `cdktf get`. # See https://cdk.tf/provider-generation for more details. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.team import Team +from imports.tfe.team_members import TeamMembers +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - all_usernames = cdktf.Fn.toset(["user1", "user2"]) - tfe_team_test = tfe.team.Team(self, "test", + all_usernames = Fn.toset(["user1", "user2"]) + test = Team(self, "test", name="my-team-name", organization="my-org-name" ) - 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]}") + tfe_team_members_test = TeamMembers(self, "test_1", + team_id=test.id, + usernames=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") @@ -88,4 +96,4 @@ Team members can be imported; use `` as the import ID. For example: terraform import tfe_team_members.test team-47qC3LmA47piVan7 ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/team_organization_member.html.markdown b/website/docs/cdktf/python/r/team_organization_member.html.markdown index 5353364f6..b74af25bb 100644 --- a/website/docs/cdktf/python/r/team_organization_member.html.markdown +++ b/website/docs/cdktf/python/r/team_organization_member.html.markdown @@ -24,29 +24,32 @@ an instance of Terraform Enterprise at least as recent as v202004-1. Basic usage: ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.organization_membership import OrganizationMembership +from imports.tfe.team import Team +from imports.tfe.team_organization_member import TeamOrganizationMember +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - tfe_organization_membership_test = - tfe.organization_membership.OrganizationMembership(self, "test", + test = OrganizationMembership(self, "test", email="example@hashicorp.com", organization="my-org-name" ) - tfe_team_test = tfe.team.Team(self, "test_1", + tfe_team_test = 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 = - 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) + tfe_team_organization_member_test = TeamOrganizationMember(self, "test_2", + organization_membership_id=test.id, + team_id=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") @@ -72,4 +75,4 @@ or terraform import tfe_team_organization_member.test my-org-name/user@company.com/my-team-name ``` ~> **NOTE:** The `//` import ID format cannot be used if there are `/` characters in the user's email. These users must be imported with the `/` format instead - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/team_organization_members.html.markdown b/website/docs/cdktf/python/r/team_organization_members.html.markdown index 04ced9cca..44a247b02 100644 --- a/website/docs/cdktf/python/r/team_organization_members.html.markdown +++ b/website/docs/cdktf/python/r/team_organization_members.html.markdown @@ -24,37 +24,36 @@ an instance of Terraform Enterprise at least as recent as v202004-1. Basic usage: ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.organization_membership import OrganizationMembership +from imports.tfe.team import Team +from imports.tfe.team_organization_members import TeamOrganizationMembers +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - tfe_organization_membership_sample = - tfe.organization_membership.OrganizationMembership(self, "sample", + sample = OrganizationMembership(self, "sample", email="sample@hashicorp.com", organization="my-org-name" ) - tfe_organization_membership_test = - tfe.organization_membership.OrganizationMembership(self, "test", + test = OrganizationMembership(self, "test", email="example@hashicorp.com", organization="my-org-name" ) - tfe_team_test = tfe.team.Team(self, "test_2", + tfe_team_test = 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 = - 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) + 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) ) # 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") @@ -63,35 +62,38 @@ class MyConvertedCode(cdktf.TerraformStack): With a set of organization members: ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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`. # See https://cdk.tf/provider-generation for more details. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.organization_membership import OrganizationMembership +from imports.tfe.team import Team +from imports.tfe.team_organization_members import TeamOrganizationMembers +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - all_users = cdktf.Fn.toset(["user1@hashicorp.com", "user2@hashicorp.com" - ]) + all_users = 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. - 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), + 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), organization="my-org-name", - for_each=tfe_organization_membership_all_membership_for_each_iterator + for_each=all_membership_for_each_iterator ) - tfe_team_test = tfe.team.Team(self, "test", + test = Team(self, "test", name="my-team-name", organization="my-org-name" ) - 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) + 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 ) # 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") @@ -113,4 +115,4 @@ as the import ID. For example: terraform import tfe_team_organization_members.test team-47qC3LmA47piVan7 ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/team_project_access.html.markdown b/website/docs/cdktf/python/r/team_project_access.html.markdown index c731f4db5..ff15b44e0 100644 --- a/website/docs/cdktf/python/r/team_project_access.html.markdown +++ b/website/docs/cdktf/python/r/team_project_access.html.markdown @@ -16,27 +16,31 @@ Associate a team to permissions on a project. Basic usage: ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.project import Project +from imports.tfe.team import Team +from imports.tfe.team_project_access import TeamProjectAccess +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - tfe_project_test = tfe.project.Project(self, "test", + test = Project(self, "test", name="myproject", organization="my-org-name" ) - tfe_team_admin = tfe.team.Team(self, "admin", + admin = Team(self, "admin", name="my-admin-team", organization="my-org-name" ) - tfe_team_project_access_admin = - tfe.team_project_access.TeamProjectAccess(self, "admin_2", + tfe_team_project_access_admin = TeamProjectAccess(self, "admin_2", access="admin", - project_id=cdktf.Token.as_string(tfe_project_test.id), - team_id=cdktf.Token.as_string(tfe_team_admin.id) + project_id=test.id, + team_id=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") @@ -84,31 +88,36 @@ The following permissions apply to all workpsaces (and future workspaces) in the ## Example Usage with Custom Project Permissions ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.project import Project +from imports.tfe.team import Team +from imports.tfe.team_project_access import TeamProjectAccess +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - tfe_project_test = tfe.project.Project(self, "test", + test = Project(self, "test", name="myproject", organization="my-org-name" ) - tfe_team_dev = tfe.team.Team(self, "dev", + dev = Team(self, "dev", name="my-dev-team", organization="my-org-name" ) - tfe.team_project_access.TeamProjectAccess(self, "custom", + TeamProjectAccess(self, "custom", access="custom", project_access=[TeamProjectAccessProjectAccess( settings="read", teams="none" ) ], - project_id=cdktf.Token.as_string(tfe_project_test.id), - team_id=cdktf.Token.as_string(tfe_team_dev.id), + project_id=test.id, + team_id=dev.id, workspace_access=[TeamProjectAccessWorkspaceAccess( create=True, delete=False, @@ -137,4 +146,4 @@ example: terraform import tfe_team_project_access.admin tprj-2pmtXpZa4YzVMTPi ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/team_token.html.markdown b/website/docs/cdktf/python/r/team_token.html.markdown index 4c90cfbb8..7e1f2ec67 100644 --- a/website/docs/cdktf/python/r/team_token.html.markdown +++ b/website/docs/cdktf/python/r/team_token.html.markdown @@ -16,20 +16,24 @@ Generates a new team token and overrides existing token if one exists. Basic usage: ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.team import Team +from imports.tfe.team_token import TeamToken +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - tfe_team_test = tfe.team.Team(self, "test", + test = Team(self, "test", name="my-team-name", organization="my-org-name" ) - tfe_team_token_test = tfe.team_token.TeamToken(self, "test_1", - team_id=cdktf.Token.as_string(tfe_team_test.id) + tfe_team_token_test = TeamToken(self, "test_1", + team_id=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") @@ -52,27 +56,31 @@ never expire. When a token has an expiry: ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -import ...gen.providers.time as time -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.team import Team +from imports.tfe.team_token import TeamToken +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. - tfe_team_test = tfe.team.Team(self, "test", + test = Team(self, "test", name="my-team-name", organization="my-org-name" ) - time_rotating_example = time.rotating.Rotating(self, "example", + example = Rotating(self, "example", rotation_days=30 ) - 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) + tfe_team_token_test = TeamToken(self, "test_2", + expired_at=Token.as_string(example.rotation_rfc3339), + team_id=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") @@ -91,4 +99,4 @@ Team tokens can be imported; use `` as the import ID. For example: terraform import tfe_team_token.test team-47qC3LmA47piVan7 ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/sentinel_policy.html.markdown b/website/docs/cdktf/typescript/r/sentinel_policy.html.markdown index 206276ff4..8b6cdfcf7 100644 --- a/website/docs/cdktf/typescript/r/sentinel_policy.html.markdown +++ b/website/docs/cdktf/typescript/r/sentinel_policy.html.markdown @@ -21,15 +21,18 @@ enforced during runs. Basic usage: ```typescript -import * as constructs from "constructs"; -import * as cdktf from "cdktf"; -/*Provider bindings are generated by running cdktf get. -See https://cdk.tf/provider-generation for more details.*/ -import * as tfe from "./.gen/providers/tfe"; -class MyConvertedCode extends cdktf.TerraformStack { - constructor(scope: constructs.Construct, name: string) { +// 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) { super(scope, name); - new tfe.sentinelPolicy.SentinelPolicy(this, "test", { + new SentinelPolicy(this, "test", { description: "This policy always passes", enforceMode: "hard-mandatory", name: "my-policy-name", @@ -66,4 +69,4 @@ import ID. For example: terraform import tfe_sentinel_policy.test my-org-name/pol-wAs3zYmWAhYK7peR ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/ssh_key.html.markdown b/website/docs/cdktf/typescript/r/ssh_key.html.markdown index 90680d24c..8124e2b2f 100644 --- a/website/docs/cdktf/typescript/r/ssh_key.html.markdown +++ b/website/docs/cdktf/typescript/r/ssh_key.html.markdown @@ -17,15 +17,18 @@ key. An organization can have multiple SSH keys available. Basic usage: ```typescript -import * as constructs from "constructs"; -import * as cdktf from "cdktf"; -/*Provider bindings are generated by running cdktf get. -See https://cdk.tf/provider-generation for more details.*/ -import * as tfe from "./.gen/providers/tfe"; -class MyConvertedCode extends cdktf.TerraformStack { - constructor(scope: constructs.Construct, name: string) { +// 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) { super(scope, name); - new tfe.sshKey.SshKey(this, "test", { + new SshKey(this, "test", { key: "private-ssh-key", name: "my-ssh-key-name", organization: "my-org-name", @@ -52,4 +55,4 @@ The following arguments are supported: Because the Terraform Enterprise API does not return the private SSH key content, this resource cannot be imported. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/team.html.markdown b/website/docs/cdktf/typescript/r/team.html.markdown index b793d408b..f9fd2da7d 100644 --- a/website/docs/cdktf/typescript/r/team.html.markdown +++ b/website/docs/cdktf/typescript/r/team.html.markdown @@ -16,15 +16,18 @@ Manages teams. Basic usage: ```typescript -import * as constructs from "constructs"; -import * as cdktf from "cdktf"; -/*Provider bindings are generated by running cdktf get. -See https://cdk.tf/provider-generation for more details.*/ -import * as tfe from "./.gen/providers/tfe"; -class MyConvertedCode extends cdktf.TerraformStack { - constructor(scope: constructs.Construct, name: string) { +// 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) { super(scope, name); - new tfe.team.Team(this, "test", { + new Team(this, "test", { name: "my-team-name", organization: "my-org-name", }); @@ -36,15 +39,18 @@ class MyConvertedCode extends cdktf.TerraformStack { Organization Permission usage: ```typescript -import * as constructs from "constructs"; -import * as cdktf from "cdktf"; -/*Provider bindings are generated by running cdktf get. -See https://cdk.tf/provider-generation for more details.*/ -import * as tfe from "./.gen/providers/tfe"; -class MyConvertedCode extends cdktf.TerraformStack { - constructor(scope: constructs.Construct, name: string) { +// 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) { super(scope, name); - new tfe.team.Team(this, "test", { + new Team(this, "test", { name: "my-team-name", organization: "my-org-name", organizationAccess: { @@ -97,4 +103,4 @@ or terraform import tfe_team.test my-org-name/my-team-name ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/team_access.html.markdown b/website/docs/cdktf/typescript/r/team_access.html.markdown index 8af746faa..97c4e80f1 100644 --- a/website/docs/cdktf/typescript/r/team_access.html.markdown +++ b/website/docs/cdktf/typescript/r/team_access.html.markdown @@ -16,28 +16,33 @@ Associate a team to permissions on a workspace. Basic usage: ```typescript -import * as constructs from "constructs"; -import * as cdktf from "cdktf"; -/*Provider bindings are generated by running cdktf get. -See https://cdk.tf/provider-generation for more details.*/ -import * as tfe from "./.gen/providers/tfe"; -class MyConvertedCode extends cdktf.TerraformStack { - constructor(scope: constructs.Construct, name: string) { +// 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) { super(scope, name); - const tfeTeamTest = new tfe.team.Team(this, "test", { + const test = new Team(this, "test", { name: "my-team-name", organization: "my-org-name", }); - const tfeWorkspaceTest = new tfe.workspace.Workspace(this, "test_1", { + const tfeWorkspaceTest = new 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 tfe.teamAccess.TeamAccess(this, "test_2", { + const tfeTeamAccessTest = new TeamAccess(this, "test_2", { access: "read", - teamId: cdktf.Token.asString(tfeTeamTest.id), - workspaceId: cdktf.Token.asString(tfeWorkspaceTest.id), + teamId: test.id, + workspaceId: 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"); @@ -80,4 +85,4 @@ example: terraform import tfe_team_access.test my-org-name/my-workspace-name/tws-8S5wnRbRpogw6apb ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/team_member.html.markdown b/website/docs/cdktf/typescript/r/team_member.html.markdown index eb7cf719c..045b3bec9 100644 --- a/website/docs/cdktf/typescript/r/team_member.html.markdown +++ b/website/docs/cdktf/typescript/r/team_member.html.markdown @@ -25,20 +25,24 @@ used once. All four resources cannot be used for the same team simultaneously. Basic usage: ```typescript -import * as constructs from "constructs"; -import * as cdktf from "cdktf"; -/*Provider bindings are generated by running cdktf get. -See https://cdk.tf/provider-generation for more details.*/ -import * as tfe from "./.gen/providers/tfe"; -class MyConvertedCode extends cdktf.TerraformStack { - constructor(scope: constructs.Construct, name: string) { +// 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) { super(scope, name); - const tfeTeamTest = new tfe.team.Team(this, "test", { + const test = new Team(this, "test", { name: "my-team-name", organization: "my-org-name", }); - const tfeTeamMemberTest = new tfe.teamMember.TeamMember(this, "test_1", { - teamId: cdktf.Token.asString(tfeTeamTest.id), + const tfeTeamMemberTest = new TeamMember(this, "test_1", { + teamId: 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.*/ @@ -64,4 +68,4 @@ example: terraform import tfe_team_member.test team-47qC3LmA47piVan7/sander ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/team_members.html.markdown b/website/docs/cdktf/typescript/r/team_members.html.markdown index 5ca27b059..c1940fcc2 100644 --- a/website/docs/cdktf/typescript/r/team_members.html.markdown +++ b/website/docs/cdktf/typescript/r/team_members.html.markdown @@ -25,20 +25,24 @@ used once. All four resources cannot be used for the same team simultaneously. Basic usage: ```typescript -import * as constructs from "constructs"; -import * as cdktf from "cdktf"; -/*Provider bindings are generated by running cdktf get. -See https://cdk.tf/provider-generation for more details.*/ -import * as tfe from "./.gen/providers/tfe"; -class MyConvertedCode extends cdktf.TerraformStack { - constructor(scope: constructs.Construct, name: string) { +// 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) { super(scope, name); - const tfeTeamTest = new tfe.team.Team(this, "test", { + const test = new Team(this, "test", { name: "my-team-name", organization: "my-org-name", }); - const tfeTeamMembersTest = new tfe.teamMembers.TeamMembers(this, "test_1", { - teamId: cdktf.Token.asString(tfeTeamTest.id), + const tfeTeamMembersTest = new TeamMembers(this, "test_1", { + teamId: 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.*/ @@ -51,22 +55,26 @@ class MyConvertedCode extends cdktf.TerraformStack { With a set of usernames: ```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) { +// 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) { super(scope, name); - const allUsernames = cdktf.Fn.toset(["user1", "user2"]); - const tfeTeamTest = new tfe.team.Team(this, "test", { + const allUsernames = Fn.toset(["user1", "user2"]); + const test = new Team(this, "test", { name: "my-team-name", organization: "my-org-name", }); - const tfeTeamMembersTest = new tfe.teamMembers.TeamMembers(this, "test_1", { - teamId: cdktf.Token.asString(tfeTeamTest.id), - usernames: cdktf.Token.asList( + const tfeTeamMembersTest = new TeamMembers(this, "test_1", { + teamId: test.id, + usernames: Token.asList( "${[ for user in ${" + allUsernames + "} : user]}" ), }); @@ -96,4 +104,4 @@ Team members can be imported; use `` as the import ID. For example: terraform import tfe_team_members.test team-47qC3LmA47piVan7 ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/team_organization_member.html.markdown b/website/docs/cdktf/typescript/r/team_organization_member.html.markdown index 1eec91879..cb37b34f4 100644 --- a/website/docs/cdktf/typescript/r/team_organization_member.html.markdown +++ b/website/docs/cdktf/typescript/r/team_organization_member.html.markdown @@ -24,32 +24,37 @@ an instance of Terraform Enterprise at least as recent as v202004-1. Basic usage: ```typescript -import * as constructs from "constructs"; -import * as cdktf from "cdktf"; -/*Provider bindings are generated by running cdktf get. -See https://cdk.tf/provider-generation for more details.*/ -import * as tfe from "./.gen/providers/tfe"; -class MyConvertedCode extends cdktf.TerraformStack { - constructor(scope: constructs.Construct, name: string) { +// 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) { super(scope, 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_1", { + const test = new OrganizationMembership(this, "test", { + email: "example@hashicorp.com", + organization: "my-org-name", + }); + const tfeTeamTest = new 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 tfe.teamOrganizationMember.TeamOrganizationMember(this, "test_2", { - organizationMembershipId: cdktf.Token.asString( - tfeOrganizationMembershipTest.id - ), - teamId: cdktf.Token.asString(tfeTeamTest.id), - }); + const tfeTeamOrganizationMemberTest = new TeamOrganizationMember( + this, + "test_2", + { + organizationMembershipId: test.id, + teamId: 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"); } @@ -77,4 +82,4 @@ or terraform import tfe_team_organization_member.test my-org-name/user@company.com/my-team-name ``` ~> **NOTE:** The `//` import ID format cannot be used if there are `/` characters in the user's email. These users must be imported with the `/` format instead - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/team_organization_members.html.markdown b/website/docs/cdktf/typescript/r/team_organization_members.html.markdown index ba1476eec..8480e22d9 100644 --- a/website/docs/cdktf/typescript/r/team_organization_members.html.markdown +++ b/website/docs/cdktf/typescript/r/team_organization_members.html.markdown @@ -24,38 +24,41 @@ an instance of Terraform Enterprise at least as recent as v202004-1. Basic usage: ```typescript -import * as constructs from "constructs"; -import * as cdktf from "cdktf"; -/*Provider bindings are generated by running cdktf get. -See https://cdk.tf/provider-generation for more details.*/ -import * as tfe from "./.gen/providers/tfe"; -class MyConvertedCode extends cdktf.TerraformStack { - constructor(scope: constructs.Construct, name: string) { +// 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) { super(scope, name); - 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", { + 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", { 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 tfe.teamOrganizationMembers.TeamOrganizationMembers(this, "test_3", { - organizationMembershipIds: [ - cdktf.Token.asString(tfeOrganizationMembershipTest.id), - cdktf.Token.asString(tfeOrganizationMembershipSample.id), - ], - teamId: cdktf.Token.asString(tfeTeamTest.id), - }); + const tfeTeamOrganizationMembersTest = new TeamOrganizationMembers( + this, + "test_3", + { + organizationMembershipIds: [test.id, sample.id], + teamId: 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"); } @@ -66,48 +69,48 @@ class MyConvertedCode extends cdktf.TerraformStack { With a set of organization members: ```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) { +// 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) { super(scope, name); - const allUsers = cdktf.Fn.toset([ - "user1@hashicorp.com", - "user2@hashicorp.com", - ]); + const allUsers = 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 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, - } + const allMembershipForEachIterator = TerraformIterator.fromList( + Token.asAny(allUsers) ); - const tfeTeamTest = new tfe.team.Team(this, "test", { + new OrganizationMembership(this, "all_membership", { + email: Token.asString(allMembershipForEachIterator.key), + organization: "my-org-name", + forEach: allMembershipForEachIterator, + }); + const test = new Team(this, "test", { name: "my-team-name", organization: "my-org-name", }); - const tfeTeamOrganizationMembersTest = - new tfe.teamOrganizationMembers.TeamOrganizationMembers(this, "test_2", { - organizationMembershipIds: cdktf.Token.asList( + const tfeTeamOrganizationMembersTest = new TeamOrganizationMembers( + this, + "test_2", + { + organizationMembershipIds: Token.asList( "${[ for member in ${" + allUsers + "} : tfe_organization_membership.all_membership[member].id]}" ), - teamId: cdktf.Token.asString(tfeTeamTest.id), - }); + teamId: 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.*/ tfeTeamOrganizationMembersTest.overrideLogicalId("test"); } @@ -131,4 +134,4 @@ as the import ID. For example: terraform import tfe_team_organization_members.test team-47qC3LmA47piVan7 ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/team_project_access.html.markdown b/website/docs/cdktf/typescript/r/team_project_access.html.markdown index db12e574d..4c9e1f8f8 100644 --- a/website/docs/cdktf/typescript/r/team_project_access.html.markdown +++ b/website/docs/cdktf/typescript/r/team_project_access.html.markdown @@ -16,28 +16,32 @@ Associate a team to permissions on a project. Basic usage: ```typescript -import * as constructs from "constructs"; -import * as cdktf from "cdktf"; -/*Provider bindings are generated by running cdktf get. -See https://cdk.tf/provider-generation for more details.*/ -import * as tfe from "./.gen/providers/tfe"; -class MyConvertedCode extends cdktf.TerraformStack { - constructor(scope: constructs.Construct, name: string) { +// 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) { super(scope, name); - const tfeProjectTest = new tfe.project.Project(this, "test", { + const test = new Project(this, "test", { name: "myproject", organization: "my-org-name", }); - const tfeTeamAdmin = new tfe.team.Team(this, "admin", { + const admin = new Team(this, "admin", { name: "my-admin-team", organization: "my-org-name", }); - const tfeTeamProjectAccessAdmin = - new tfe.teamProjectAccess.TeamProjectAccess(this, "admin_2", { - access: "admin", - projectId: cdktf.Token.asString(tfeProjectTest.id), - teamId: cdktf.Token.asString(tfeTeamAdmin.id), - }); + const tfeTeamProjectAccessAdmin = new TeamProjectAccess(this, "admin_2", { + access: "admin", + projectId: test.id, + teamId: 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.*/ tfeTeamProjectAccessAdmin.overrideLogicalId("admin"); } @@ -87,23 +91,28 @@ The following permissions apply to all workpsaces (and future workspaces) in the ## Example Usage with Custom Project Permissions ```typescript -import * as constructs from "constructs"; -import * as cdktf from "cdktf"; -/*Provider bindings are generated by running cdktf get. -See https://cdk.tf/provider-generation for more details.*/ -import * as tfe from "./.gen/providers/tfe"; -class MyConvertedCode extends cdktf.TerraformStack { - constructor(scope: constructs.Construct, name: string) { +// 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) { super(scope, name); - const tfeProjectTest = new tfe.project.Project(this, "test", { + const test = new Project(this, "test", { name: "myproject", organization: "my-org-name", }); - const tfeTeamDev = new tfe.team.Team(this, "dev", { + const dev = new Team(this, "dev", { name: "my-dev-team", organization: "my-org-name", }); - new tfe.teamProjectAccess.TeamProjectAccess(this, "custom", { + new TeamProjectAccess(this, "custom", { access: "custom", projectAccess: [ { @@ -111,8 +120,8 @@ class MyConvertedCode extends cdktf.TerraformStack { teams: "none", }, ], - projectId: cdktf.Token.asString(tfeProjectTest.id), - teamId: cdktf.Token.asString(tfeTeamDev.id), + projectId: test.id, + teamId: dev.id, workspaceAccess: [ { create: true, @@ -145,4 +154,4 @@ example: terraform import tfe_team_project_access.admin tprj-2pmtXpZa4YzVMTPi ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/team_token.html.markdown b/website/docs/cdktf/typescript/r/team_token.html.markdown index f450192af..1b0eeb542 100644 --- a/website/docs/cdktf/typescript/r/team_token.html.markdown +++ b/website/docs/cdktf/typescript/r/team_token.html.markdown @@ -16,20 +16,24 @@ Generates a new team token and overrides existing token if one exists. Basic usage: ```typescript -import * as constructs from "constructs"; -import * as cdktf from "cdktf"; -/*Provider bindings are generated by running cdktf get. -See https://cdk.tf/provider-generation for more details.*/ -import * as tfe from "./.gen/providers/tfe"; -class MyConvertedCode extends cdktf.TerraformStack { - constructor(scope: constructs.Construct, name: string) { +// 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) { super(scope, name); - const tfeTeamTest = new tfe.team.Team(this, "test", { + const test = new Team(this, "test", { name: "my-team-name", organization: "my-org-name", }); - const tfeTeamTokenTest = new tfe.teamToken.TeamToken(this, "test_1", { - teamId: cdktf.Token.asString(tfeTeamTest.id), + const tfeTeamTokenTest = new TeamToken(this, "test_1", { + teamId: 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.*/ tfeTeamTokenTest.overrideLogicalId("test"); @@ -55,27 +59,31 @@ never expire. When a token has an expiry: ```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"; -import * as time from "./.gen/providers/time"; -class MyConvertedCode extends cdktf.TerraformStack { - constructor(scope: constructs.Construct, name: string) { +// 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) { 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 tfeTeamTest = new tfe.team.Team(this, "test", { + const test = new Team(this, "test", { name: "my-team-name", organization: "my-org-name", }); - const timeRotatingExample = new time.rotating.Rotating(this, "example", { + const example = new Rotating(this, "example", { rotation_days: 30, }); - const tfeTeamTokenTest = new tfe.teamToken.TeamToken(this, "test_2", { - expiredAt: cdktf.Token.asString(timeRotatingExample.rotationRfc3339), - teamId: cdktf.Token.asString(tfeTeamTest.id), + const tfeTeamTokenTest = new TeamToken(this, "test_2", { + expiredAt: Token.asString(example.rotationRfc3339), + teamId: 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.*/ tfeTeamTokenTest.overrideLogicalId("test"); @@ -97,4 +105,4 @@ Team tokens can be imported; use `` as the import ID. For example: terraform import tfe_team_token.test team-47qC3LmA47piVan7 ``` - \ No newline at end of file + \ No newline at end of file From 9c697b4a3107c8a1092687986d632fd56c5c7327 Mon Sep 17 00:00:00 2001 From: team-tf-cdk Date: Mon, 16 Oct 2023 00:15:15 +0000 Subject: [PATCH 3/7] cdktf: update r/admin_organization_settings.markdown,d/workspace_run_task.html.markdown,d/workspace_ids.html.markdown,d/workspace.html.markdown,d/variables.html.markdown,d/variable_set.html.markdown,d/teams.html.markdown,d/team_project_access.html.markdown,d/team_access.html.markdown,d/team.html.markdown --- .../docs/cdktf/python/d/team.html.markdown | 17 ++-- .../cdktf/python/d/team_access.html.markdown | 17 ++-- .../d/team_project_access.html.markdown | 17 ++-- .../docs/cdktf/python/d/teams.html.markdown | 17 ++-- .../cdktf/python/d/variable_set.html.markdown | 17 ++-- .../cdktf/python/d/variables.html.markdown | 43 +++++----- .../cdktf/python/d/workspace.html.markdown | 17 ++-- .../python/d/workspace_ids.html.markdown | 23 +++--- .../python/d/workspace_run_task.html.markdown | 17 ++-- .../r/admin_organization_settings.markdown | 74 +++++++++-------- .../cdktf/typescript/d/team.html.markdown | 21 ++--- .../typescript/d/team_access.html.markdown | 21 ++--- .../d/team_project_access.html.markdown | 21 ++--- .../cdktf/typescript/d/teams.html.markdown | 21 ++--- .../typescript/d/variable_set.html.markdown | 21 ++--- .../typescript/d/variables.html.markdown | 79 +++++++++---------- .../typescript/d/workspace.html.markdown | 21 ++--- .../typescript/d/workspace_ids.html.markdown | 27 ++++--- .../d/workspace_run_task.html.markdown | 21 ++--- .../r/admin_organization_settings.markdown | 73 +++++++++-------- 20 files changed, 325 insertions(+), 260 deletions(-) diff --git a/website/docs/cdktf/python/d/team.html.markdown b/website/docs/cdktf/python/d/team.html.markdown index 3e4f2c5e4..8dcf44b9b 100644 --- a/website/docs/cdktf/python/d/team.html.markdown +++ b/website/docs/cdktf/python/d/team.html.markdown @@ -14,15 +14,18 @@ Use this data source to get information about a team. ## Example Usage ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.data_tfe_team import DataTfeTeam +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - tfe.data_tfe_team.DataTfeTeam(self, "test", + DataTfeTeam(self, "test", name="my-team-name", organization="my-org-name" ) @@ -42,4 +45,4 @@ In addition to all arguments above, the following attributes are exported: * `id` - The ID of the team. * `sso_team_id` - (Optional) The [SSO Team ID](https://developer.hashicorp.com/terraform/cloud-docs/users-teams-organizations/single-sign-on#team-names-and-sso-team-ids) of the team, if it has been defined - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/team_access.html.markdown b/website/docs/cdktf/python/d/team_access.html.markdown index 9755cf929..6ce1b674f 100644 --- a/website/docs/cdktf/python/d/team_access.html.markdown +++ b/website/docs/cdktf/python/d/team_access.html.markdown @@ -14,15 +14,18 @@ Use this data source to get information about team permissions for a workspace. ## Example Usage ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.data_tfe_team_access import DataTfeTeamAccess +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - tfe.data_tfe_team_access.DataTfeTeamAccess(self, "test", + DataTfeTeamAccess(self, "test", team_id="my-team-id", workspace_id="my-workspace-id" ) @@ -52,4 +55,4 @@ The `permissions` block contains: * `workspace_locking` - Whether permission is granted to manually lock the workspace or not. * `run_tasks` - Boolean determining whether or not to grant the team permission to manage workspace run tasks. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/team_project_access.html.markdown b/website/docs/cdktf/python/d/team_project_access.html.markdown index 503c9eb11..0d0da5115 100644 --- a/website/docs/cdktf/python/d/team_project_access.html.markdown +++ b/website/docs/cdktf/python/d/team_project_access.html.markdown @@ -14,15 +14,18 @@ Use this data source to get information about team permissions for a project. ## Example Usage ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.data_tfe_team_project_access import DataTfeTeamProjectAccess +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - tfe.data_tfe_team_project_access.DataTfeTeamProjectAccess(self, "test", + DataTfeTeamProjectAccess(self, "test", project_id="my-project-id", team_id="my-team-id" ) @@ -42,4 +45,4 @@ In addition to all arguments above, the following attributes are exported: * `id` The team project access ID. * `access` - The type of access granted to the team on the project. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/teams.html.markdown b/website/docs/cdktf/python/d/teams.html.markdown index d812caa3c..4c55522ec 100644 --- a/website/docs/cdktf/python/d/teams.html.markdown +++ b/website/docs/cdktf/python/d/teams.html.markdown @@ -14,15 +14,18 @@ Use this data source to get a list of Teams in an Organization and a map of thei ## Example Usage ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.data_tfe_teams import DataTfeTeams +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - tfe.data_tfe_teams.DataTfeTeams(self, "foo", + DataTfeTeams(self, "foo", organization="my-org-name" ) ``` @@ -39,4 +42,4 @@ In addition to all arguments above, the following attributes are exported: * `id` - Name of the organization. * `names` - A list of team names in an organization. * `ids` - A map of team names in an organization and their IDs. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/variable_set.html.markdown b/website/docs/cdktf/python/d/variable_set.html.markdown index 93b0a22c8..4922935a4 100644 --- a/website/docs/cdktf/python/d/variable_set.html.markdown +++ b/website/docs/cdktf/python/d/variable_set.html.markdown @@ -16,15 +16,18 @@ This data source is used to retrieve a named variable set For workspace variables: ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.data_tfe_variable_set import DataTfeVariableSet +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - tfe.data_tfe_variable_set.DataTfeVariableSet(self, "test", + DataTfeVariableSet(self, "test", name="my-variable-set-name", organization="my-org-name" ) @@ -48,4 +51,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 + \ 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 86ecde0ac..77353b5c0 100644 --- a/website/docs/cdktf/python/d/variables.html.markdown +++ b/website/docs/cdktf/python/d/variables.html.markdown @@ -16,20 +16,24 @@ This data source is used to retrieve all variables defined in a specified worksp For workspace variables: ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.data_tfe_variables import DataTfeVariables +from imports.tfe.data_tfe_workspace import DataTfeWorkspace +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - data_tfe_workspace_test = tfe.data_tfe_workspace.DataTfeWorkspace(self, "test", + test = DataTfeWorkspace(self, "test", name="my-workspace-name", organization="my-org-name" ) - data_tfe_variables_test = tfe.data_tfe_variables.DataTfeVariables(self, "test_1", - workspace_id=cdktf.Token.as_string(data_tfe_workspace_test.id) + data_tfe_variables_test = DataTfeVariables(self, "test_1", + workspace_id=Token.as_string(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") @@ -38,21 +42,24 @@ class MyConvertedCode(cdktf.TerraformStack): For variable set variables: ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.data_tfe_variable_set import DataTfeVariableSet +from imports.tfe.data_tfe_variables import DataTfeVariables +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - data_tfe_variable_set_test = - tfe.data_tfe_variable_set.DataTfeVariableSet(self, "test", + test = DataTfeVariableSet(self, "test", name="my-variable-set-name", organization="my-org-name" ) - 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) + data_tfe_variables_test = DataTfeVariables(self, "test_1", + variable_set_id=Token.as_string(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") @@ -80,4 +87,4 @@ The `variables, terraform and env` blocks contains: * `sensitive` - If the variable is marked as sensitive or not * `hcl` - If the variable is marked as HCL or not - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/workspace.html.markdown b/website/docs/cdktf/python/d/workspace.html.markdown index 62fd9e8da..875803789 100644 --- a/website/docs/cdktf/python/d/workspace.html.markdown +++ b/website/docs/cdktf/python/d/workspace.html.markdown @@ -16,15 +16,18 @@ Use this data source to get information about a workspace. ## Example Usage ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.data_tfe_workspace import DataTfeWorkspace +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - tfe.data_tfe_workspace.DataTfeWorkspace(self, "test", + DataTfeWorkspace(self, "test", name="my-workspace-name", organization="my-org-name" ) @@ -84,4 +87,4 @@ The `vcs_repo` block contains: * `oauth_token_id` - OAuth token ID of the configured VCS connection. * `tags_regex` - A regular expression used to trigger a Workspace run for matching Git tags. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/workspace_ids.html.markdown b/website/docs/cdktf/python/d/workspace_ids.html.markdown index 31ac562e9..58a1fb01e 100644 --- a/website/docs/cdktf/python/d/workspace_ids.html.markdown +++ b/website/docs/cdktf/python/d/workspace_ids.html.markdown @@ -14,27 +14,30 @@ Use this data source to get a map of workspace IDs. ## Example Usage ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.data_tfe_workspace_ids import DataTfeWorkspaceIds +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - tfe.data_tfe_workspace_ids.DataTfeWorkspaceIds(self, "all", + DataTfeWorkspaceIds(self, "all", names=["*"], organization="my-org-name" ) - tfe.data_tfe_workspace_ids.DataTfeWorkspaceIds(self, "app-frontend", + DataTfeWorkspaceIds(self, "app-frontend", names=["app-frontend-prod", "app-frontend-dev1", "app-frontend-staging"], organization="my-org-name" ) - tfe.data_tfe_workspace_ids.DataTfeWorkspaceIds(self, "prod-apps", + DataTfeWorkspaceIds(self, "prod-apps", organization="my-org-name", tag_names=["prod", "app", "aws"] ) - tfe.data_tfe_workspace_ids.DataTfeWorkspaceIds(self, "prod-only", + DataTfeWorkspaceIds(self, "prod-only", exclude_tags=["app"], organization="my-org-name", tag_names=["prod"] @@ -61,4 +64,4 @@ In addition to all arguments above, the following attributes are exported: * `full_names` - A map of workspace names and their full names, which look like `/`. * `ids` - A map of workspace names and their opaque, immutable IDs, which look like `ws-`. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/workspace_run_task.html.markdown b/website/docs/cdktf/python/d/workspace_run_task.html.markdown index a278338f7..1cb0789a7 100644 --- a/website/docs/cdktf/python/d/workspace_run_task.html.markdown +++ b/website/docs/cdktf/python/d/workspace_run_task.html.markdown @@ -16,15 +16,18 @@ Use this data source to get information about a [Workspace Run tasks](https://de ## Example Usage ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.data_tfe_workspace_run_task import DataTfeWorkspaceRunTask +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - tfe.data_tfe_workspace_run_task.DataTfeWorkspaceRunTask(self, "foobar", + DataTfeWorkspaceRunTask(self, "foobar", task_id="task-def456", workspace_id="ws-abc123" ) @@ -45,4 +48,4 @@ In addition to all arguments above, the following attributes are exported: * `id` - The ID of the Workspace Run task. * `stage` - Which stage the task will run in. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/admin_organization_settings.markdown b/website/docs/cdktf/python/r/admin_organization_settings.markdown index 09c1f631e..a73146090 100644 --- a/website/docs/cdktf/python/r/admin_organization_settings.markdown +++ b/website/docs/cdktf/python/r/admin_organization_settings.markdown @@ -17,39 +17,45 @@ incorporating an admin token in your provider config. Basic usage: -```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 - ] -} +```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 + ) ``` ## Argument Reference @@ -70,4 +76,4 @@ The following arguments are supported: This resource does not manage the creation of an organization and there is no need to import it. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/team.html.markdown b/website/docs/cdktf/typescript/d/team.html.markdown index 51606205e..97471ee15 100644 --- a/website/docs/cdktf/typescript/d/team.html.markdown +++ b/website/docs/cdktf/typescript/d/team.html.markdown @@ -14,15 +14,18 @@ Use this data source to get information about a team. ## Example Usage ```typescript -import * as constructs from "constructs"; -import * as cdktf from "cdktf"; -/*Provider bindings are generated by running cdktf get. -See https://cdk.tf/provider-generation for more details.*/ -import * as tfe from "./.gen/providers/tfe"; -class MyConvertedCode extends cdktf.TerraformStack { - constructor(scope: constructs.Construct, name: string) { +// 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) { super(scope, name); - new tfe.dataTfeTeam.DataTfeTeam(this, "test", { + new DataTfeTeam(this, "test", { name: "my-team-name", organization: "my-org-name", }); @@ -45,4 +48,4 @@ In addition to all arguments above, the following attributes are exported: * `id` - The ID of the team. * `ssoTeamId` - (Optional) The [SSO Team ID](https://developer.hashicorp.com/terraform/cloud-docs/users-teams-organizations/single-sign-on#team-names-and-sso-team-ids) of the team, if it has been defined - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/team_access.html.markdown b/website/docs/cdktf/typescript/d/team_access.html.markdown index 8cd9aea95..f09d31bf6 100644 --- a/website/docs/cdktf/typescript/d/team_access.html.markdown +++ b/website/docs/cdktf/typescript/d/team_access.html.markdown @@ -14,15 +14,18 @@ Use this data source to get information about team permissions for a workspace. ## Example Usage ```typescript -import * as constructs from "constructs"; -import * as cdktf from "cdktf"; -/*Provider bindings are generated by running cdktf get. -See https://cdk.tf/provider-generation for more details.*/ -import * as tfe from "./.gen/providers/tfe"; -class MyConvertedCode extends cdktf.TerraformStack { - constructor(scope: constructs.Construct, name: string) { +// 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) { super(scope, name); - new tfe.dataTfeTeamAccess.DataTfeTeamAccess(this, "test", { + new DataTfeTeamAccess(this, "test", { teamId: "my-team-id", workspaceId: "my-workspace-id", }); @@ -55,4 +58,4 @@ The `permissions` block contains: * `workspaceLocking` - Whether permission is granted to manually lock the workspace or not. * `runTasks` - Boolean determining whether or not to grant the team permission to manage workspace run tasks. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/team_project_access.html.markdown b/website/docs/cdktf/typescript/d/team_project_access.html.markdown index 65ed3def9..0288eca84 100644 --- a/website/docs/cdktf/typescript/d/team_project_access.html.markdown +++ b/website/docs/cdktf/typescript/d/team_project_access.html.markdown @@ -14,15 +14,18 @@ Use this data source to get information about team permissions for a project. ## Example Usage ```typescript -import * as constructs from "constructs"; -import * as cdktf from "cdktf"; -/*Provider bindings are generated by running cdktf get. -See https://cdk.tf/provider-generation for more details.*/ -import * as tfe from "./.gen/providers/tfe"; -class MyConvertedCode extends cdktf.TerraformStack { - constructor(scope: constructs.Construct, name: string) { +// 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) { super(scope, name); - new tfe.dataTfeTeamProjectAccess.DataTfeTeamProjectAccess(this, "test", { + new DataTfeTeamProjectAccess(this, "test", { projectId: "my-project-id", teamId: "my-team-id", }); @@ -45,4 +48,4 @@ In addition to all arguments above, the following attributes are exported: * `id` The team project access ID. * `access` - The type of access granted to the team on the project. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/teams.html.markdown b/website/docs/cdktf/typescript/d/teams.html.markdown index d19832163..e2de9c343 100644 --- a/website/docs/cdktf/typescript/d/teams.html.markdown +++ b/website/docs/cdktf/typescript/d/teams.html.markdown @@ -14,15 +14,18 @@ Use this data source to get a list of Teams in an Organization and a map of thei ## Example Usage ```typescript -import * as constructs from "constructs"; -import * as cdktf from "cdktf"; -/*Provider bindings are generated by running cdktf get. -See https://cdk.tf/provider-generation for more details.*/ -import * as tfe from "./.gen/providers/tfe"; -class MyConvertedCode extends cdktf.TerraformStack { - constructor(scope: constructs.Construct, name: string) { +// 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) { super(scope, name); - new tfe.dataTfeTeams.DataTfeTeams(this, "foo", { + new DataTfeTeams(this, "foo", { organization: "my-org-name", }); } @@ -42,4 +45,4 @@ In addition to all arguments above, the following attributes are exported: * `id` - Name of the organization. * `names` - A list of team names in an organization. * `ids` - A map of team names in an organization and their IDs. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/variable_set.html.markdown b/website/docs/cdktf/typescript/d/variable_set.html.markdown index ae9a70417..e63ff625a 100644 --- a/website/docs/cdktf/typescript/d/variable_set.html.markdown +++ b/website/docs/cdktf/typescript/d/variable_set.html.markdown @@ -16,15 +16,18 @@ This data source is used to retrieve a named variable set For workspace variables: ```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) { +// 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) { super(scope, name); - new tfe.dataTfeVariableSet.DataTfeVariableSet(this, "test", { + new DataTfeVariableSet(this, "test", { name: "my-variable-set-name", organization: "my-org-name", }); @@ -51,4 +54,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 + \ 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 93b932f9d..ec9627457 100644 --- a/website/docs/cdktf/typescript/d/variables.html.markdown +++ b/website/docs/cdktf/typescript/d/variables.html.markdown @@ -16,29 +16,25 @@ This data source is used to retrieve all variables defined in a specified worksp For workspace variables: ```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) { +// 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) { super(scope, name); - 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), - } - ); + 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), + }); /*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"); } @@ -49,26 +45,25 @@ class MyConvertedCode extends cdktf.TerraformStack { For variable set variables: ```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) { +// 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) { super(scope, name); - 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), - } - ); + 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), + }); /*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"); } @@ -98,4 +93,4 @@ The `variables, terraform and env` blocks contains: * `sensitive` - If the variable is marked as sensitive or not * `hcl` - If the variable is marked as HCL or not - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/workspace.html.markdown b/website/docs/cdktf/typescript/d/workspace.html.markdown index 26054c3ab..c68212b0e 100644 --- a/website/docs/cdktf/typescript/d/workspace.html.markdown +++ b/website/docs/cdktf/typescript/d/workspace.html.markdown @@ -16,15 +16,18 @@ Use this data source to get information about a workspace. ## Example Usage ```typescript -import * as constructs from "constructs"; -import * as cdktf from "cdktf"; -/*Provider bindings are generated by running cdktf get. -See https://cdk.tf/provider-generation for more details.*/ -import * as tfe from "./.gen/providers/tfe"; -class MyConvertedCode extends cdktf.TerraformStack { - constructor(scope: constructs.Construct, name: string) { +// 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) { super(scope, name); - new tfe.dataTfeWorkspace.DataTfeWorkspace(this, "test", { + new DataTfeWorkspace(this, "test", { name: "my-workspace-name", organization: "my-org-name", }); @@ -87,4 +90,4 @@ The `vcsRepo` block contains: * `oauthTokenId` - OAuth token ID of the configured VCS connection. * `tagsRegex` - A regular expression used to trigger a Workspace run for matching Git tags. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/workspace_ids.html.markdown b/website/docs/cdktf/typescript/d/workspace_ids.html.markdown index 3f83d01b9..2b9cd5008 100644 --- a/website/docs/cdktf/typescript/d/workspace_ids.html.markdown +++ b/website/docs/cdktf/typescript/d/workspace_ids.html.markdown @@ -14,27 +14,30 @@ Use this data source to get a map of workspace IDs. ## Example Usage ```typescript -import * as constructs from "constructs"; -import * as cdktf from "cdktf"; -/*Provider bindings are generated by running cdktf get. -See https://cdk.tf/provider-generation for more details.*/ -import * as tfe from "./.gen/providers/tfe"; -class MyConvertedCode extends cdktf.TerraformStack { - constructor(scope: constructs.Construct, name: string) { +// 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) { super(scope, name); - new tfe.dataTfeWorkspaceIds.DataTfeWorkspaceIds(this, "all", { + new DataTfeWorkspaceIds(this, "all", { names: ["*"], organization: "my-org-name", }); - new tfe.dataTfeWorkspaceIds.DataTfeWorkspaceIds(this, "app-frontend", { + new DataTfeWorkspaceIds(this, "app-frontend", { names: ["app-frontend-prod", "app-frontend-dev1", "app-frontend-staging"], organization: "my-org-name", }); - new tfe.dataTfeWorkspaceIds.DataTfeWorkspaceIds(this, "prod-apps", { + new DataTfeWorkspaceIds(this, "prod-apps", { organization: "my-org-name", tagNames: ["prod", "app", "aws"], }); - new tfe.dataTfeWorkspaceIds.DataTfeWorkspaceIds(this, "prod-only", { + new DataTfeWorkspaceIds(this, "prod-only", { excludeTags: ["app"], organization: "my-org-name", tagNames: ["prod"], @@ -64,4 +67,4 @@ In addition to all arguments above, the following attributes are exported: * `fullNames` - A map of workspace names and their full names, which look like `/`. * `ids` - A map of workspace names and their opaque, immutable IDs, which look like `ws-`. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/workspace_run_task.html.markdown b/website/docs/cdktf/typescript/d/workspace_run_task.html.markdown index 7aa26820c..96d78871e 100644 --- a/website/docs/cdktf/typescript/d/workspace_run_task.html.markdown +++ b/website/docs/cdktf/typescript/d/workspace_run_task.html.markdown @@ -16,15 +16,18 @@ Use this data source to get information about a [Workspace Run tasks](https://de ## Example Usage ```typescript -import * as constructs from "constructs"; -import * as cdktf from "cdktf"; -/*Provider bindings are generated by running cdktf get. -See https://cdk.tf/provider-generation for more details.*/ -import * as tfe from "./.gen/providers/tfe"; -class MyConvertedCode extends cdktf.TerraformStack { - constructor(scope: constructs.Construct, name: string) { +// 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) { super(scope, name); - new tfe.dataTfeWorkspaceRunTask.DataTfeWorkspaceRunTask(this, "foobar", { + new DataTfeWorkspaceRunTask(this, "foobar", { taskId: "task-def456", workspaceId: "ws-abc123", }); @@ -48,4 +51,4 @@ In addition to all arguments above, the following attributes are exported: * `id` - The ID of the Workspace Run task. * `stage` - Which stage the task will run in. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/admin_organization_settings.markdown b/website/docs/cdktf/typescript/r/admin_organization_settings.markdown index 93f71e023..a6ed9a465 100644 --- a/website/docs/cdktf/typescript/r/admin_organization_settings.markdown +++ b/website/docs/cdktf/typescript/r/admin_organization_settings.markdown @@ -17,39 +17,48 @@ incorporating an admin token in your provider config. Basic usage: -```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" +```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, + }); + } } -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 @@ -70,4 +79,4 @@ The following arguments are supported: This resource does not manage the creation of an organization and there is no need to import it. - \ No newline at end of file + \ No newline at end of file From 4327a3b3fb1c517af57fed4bd496169ae3d46640 Mon Sep 17 00:00:00 2001 From: team-tf-cdk Date: Mon, 16 Oct 2023 00:15:17 +0000 Subject: [PATCH 4/7] cdktf: update d/organization_members.html.markdown,d/organization.html.markdown,d/oauth_client.html.markdown,d/ip_ranges.html.markdown,d/github_installation.html.markdown,d/agent_pool.html.markdown --- .../cdktf/python/d/agent_pool.html.markdown | 17 +++--- .../d/github_installation.html.markdown | 32 ++++++---- .../cdktf/python/d/ip_ranges.html.markdown | 21 ++++--- .../cdktf/python/d/oauth_client.html.markdown | 47 +++++++++------ .../cdktf/python/d/organization.html.markdown | 17 +++--- .../d/organization_members.html.markdown | 22 ++++--- .../typescript/d/agent_pool.html.markdown | 21 ++++--- .../d/github_installation.html.markdown | 56 +++++++++--------- .../typescript/d/ip_ranges.html.markdown | 29 +++++---- .../typescript/d/oauth_client.html.markdown | 59 +++++++++++-------- .../typescript/d/organization.html.markdown | 21 ++++--- .../d/organization_members.html.markdown | 26 ++++---- 12 files changed, 206 insertions(+), 162 deletions(-) diff --git a/website/docs/cdktf/python/d/agent_pool.html.markdown b/website/docs/cdktf/python/d/agent_pool.html.markdown index 7293e009c..5ef505403 100644 --- a/website/docs/cdktf/python/d/agent_pool.html.markdown +++ b/website/docs/cdktf/python/d/agent_pool.html.markdown @@ -14,15 +14,18 @@ Use this data source to get information about an agent pool. ## Example Usage ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.data_tfe_agent_pool import DataTfeAgentPool +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - tfe.data_tfe_agent_pool.DataTfeAgentPool(self, "test", + DataTfeAgentPool(self, "test", name="my-agent-pool-name", organization="my-org-name" ) @@ -42,4 +45,4 @@ In addition to all arguments above, the following attributes are exported: * `id` - The agent pool ID. * `organization_scoped` - Whether or not the agent pool can be used by all workspaces in the organization. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/github_installation.html.markdown b/website/docs/cdktf/python/d/github_installation.html.markdown index 8a6457b5a..4307e1f6a 100644 --- a/website/docs/cdktf/python/d/github_installation.html.markdown +++ b/website/docs/cdktf/python/d/github_installation.html.markdown @@ -16,15 +16,18 @@ Use this data source to get information about the Github App Installation. ### Finding a Github App Installation by its installation ID ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.data_tfe_github_app_installation import DataTfeGithubAppInstallation +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - tfe.data_tfe_github_app_installation.DataTfeGithubAppInstallation(self, "gha_installation", + DataTfeGithubAppInstallation(self, "gha_installation", installation_id=12345 ) ``` @@ -32,15 +35,18 @@ class MyConvertedCode(cdktf.TerraformStack): ### Finding a Github App Installation by its name ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.data_tfe_github_app_installation import DataTfeGithubAppInstallation +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - tfe.data_tfe_github_app_installation.DataTfeGithubAppInstallation(self, "gha_installation", + DataTfeGithubAppInstallation(self, "gha_installation", name="installation_name" ) ``` @@ -59,4 +65,4 @@ Must be one of: `installation_id` or `name`. In addition to all arguments above, the following attributes are exported: * `id` - The internal ID of the Github Installation. This is different from the `installation_id`. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/ip_ranges.html.markdown b/website/docs/cdktf/python/d/ip_ranges.html.markdown index d51c305d5..e4846574b 100644 --- a/website/docs/cdktf/python/d/ip_ranges.html.markdown +++ b/website/docs/cdktf/python/d/ip_ranges.html.markdown @@ -14,17 +14,20 @@ Use this data source to retrieve a list of Terraform Cloud's IP ranges. For more ## Example Usage ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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`. # See https://cdk.tf/provider-generation for more details. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.data_tfe_ip_ranges import DataTfeIpRanges +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - 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 + addresses = DataTfeIpRanges(self, "addresses") + TerraformOutput(self, "notifications_ips", + value=addresses.notifications ) ``` @@ -42,4 +45,4 @@ The following attributes are exported: * `vcs` - The list of IP ranges in CIDR notation used for connecting to VCS providers. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/oauth_client.html.markdown b/website/docs/cdktf/python/d/oauth_client.html.markdown index 4aec1ba13..d597ecc3c 100644 --- a/website/docs/cdktf/python/d/oauth_client.html.markdown +++ b/website/docs/cdktf/python/d/oauth_client.html.markdown @@ -16,15 +16,18 @@ Use this data source to get information about an OAuth client. ### Finding an OAuth client by its ID ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.data_tfe_oauth_client import DataTfeOauthClient +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - tfe.data_tfe_oauth_client.DataTfeOauthClient(self, "client", + DataTfeOauthClient(self, "client", oauth_client_id="oc-XXXXXXX" ) ``` @@ -32,15 +35,18 @@ class MyConvertedCode(cdktf.TerraformStack): ### Finding an OAuth client by its name ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.data_tfe_oauth_client import DataTfeOauthClient +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - tfe.data_tfe_oauth_client.DataTfeOauthClient(self, "client", + DataTfeOauthClient(self, "client", name="my-oauth-client", organization="my-org" ) @@ -49,15 +55,18 @@ class MyConvertedCode(cdktf.TerraformStack): ### Finding an OAuth client by its service provider ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.data_tfe_oauth_client import DataTfeOauthClient +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - tfe.data_tfe_oauth_client.DataTfeOauthClient(self, "client", + DataTfeOauthClient(self, "client", organization="my-org", service_provider="github" ) @@ -93,4 +102,4 @@ In addition to all arguments above, the following attributes are exported: * `service_provider` - The API identifier of the OAuth service provider. * `service_provider_display_name` - The display name of the OAuth service provider. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/organization.html.markdown b/website/docs/cdktf/python/d/organization.html.markdown index 5045a6657..138cd2228 100644 --- a/website/docs/cdktf/python/d/organization.html.markdown +++ b/website/docs/cdktf/python/d/organization.html.markdown @@ -14,15 +14,18 @@ Use this data source to get information about an organization. ## Example Usage ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.data_tfe_organization import DataTfeOrganization +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - tfe.data_tfe_organization.DataTfeOrganization(self, "foo", + DataTfeOrganization(self, "foo", name="organization-name" ) ``` @@ -45,4 +48,4 @@ In addition to all arguments above, the following attributes are exported: * `owners_team_saml_role_id` - The name of the "owners" team. * `send_passing_statuses_for_untriggered_speculative_plans` - Whether or not to send VCS status updates for untriggered speculative plans. This can be useful if large numbers of untriggered workspaces are exhausting request limits for connected version control service providers like GitHub. Defaults to true. In Terraform Enterprise, this setting has no effect and cannot be changed but is also available in Site Administration. * `default_project_id` - ID of the organization's default project. All workspaces created without specifying a project ID are created in this project. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/organization_members.html.markdown b/website/docs/cdktf/python/d/organization_members.html.markdown index 73670ef47..ccd7dcf24 100644 --- a/website/docs/cdktf/python/d/organization_members.html.markdown +++ b/website/docs/cdktf/python/d/organization_members.html.markdown @@ -14,20 +14,24 @@ Use this data source to get information about members of an organization. ## Example Usage ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.data_tfe_organization_members import DataTfeOrganizationMembers +from imports.tfe.organization import Organization +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - tfe_organization_bar = tfe.organization.Organization(self, "bar", + bar = Organization(self, "bar", email="user@hashicorp.com", name="org-bar" ) - tfe.data_tfe_organization_members.DataTfeOrganizationMembers(self, "foo", - organization=cdktf.Token.as_string(tfe_organization_bar.name) + DataTfeOrganizationMembers(self, "foo", + organization=bar.name ) ``` @@ -48,4 +52,4 @@ The `member` block contains: * `user_id` - The ID of the user. * `organization_membership_id` - The ID of the organization membership. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/agent_pool.html.markdown b/website/docs/cdktf/typescript/d/agent_pool.html.markdown index ffbc8593d..44f318eca 100644 --- a/website/docs/cdktf/typescript/d/agent_pool.html.markdown +++ b/website/docs/cdktf/typescript/d/agent_pool.html.markdown @@ -14,15 +14,18 @@ Use this data source to get information about an agent pool. ## Example Usage ```typescript -import * as constructs from "constructs"; -import * as cdktf from "cdktf"; -/*Provider bindings are generated by running cdktf get. -See https://cdk.tf/provider-generation for more details.*/ -import * as tfe from "./.gen/providers/tfe"; -class MyConvertedCode extends cdktf.TerraformStack { - constructor(scope: constructs.Construct, name: string) { +// 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) { super(scope, name); - new tfe.dataTfeAgentPool.DataTfeAgentPool(this, "test", { + new DataTfeAgentPool(this, "test", { name: "my-agent-pool-name", organization: "my-org-name", }); @@ -45,4 +48,4 @@ In addition to all arguments above, the following attributes are exported: * `id` - The agent pool ID. * `organizationScoped` - Whether or not the agent pool can be used by all workspaces in the organization. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/github_installation.html.markdown b/website/docs/cdktf/typescript/d/github_installation.html.markdown index 54c0ea219..304f6a929 100644 --- a/website/docs/cdktf/typescript/d/github_installation.html.markdown +++ b/website/docs/cdktf/typescript/d/github_installation.html.markdown @@ -16,21 +16,20 @@ Use this data source to get information about the Github App Installation. ### Finding a Github App Installation by its installation ID ```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) { +// 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) { super(scope, name); - new tfe.dataTfeGithubAppInstallation.DataTfeGithubAppInstallation( - this, - "gha_installation", - { - installationId: 12345, - } - ); + new DataTfeGithubAppInstallation(this, "gha_installation", { + installationId: 12345, + }); } } @@ -39,21 +38,20 @@ class MyConvertedCode extends cdktf.TerraformStack { ### Finding a Github App Installation by its name ```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) { +// 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) { super(scope, name); - new tfe.dataTfeGithubAppInstallation.DataTfeGithubAppInstallation( - this, - "gha_installation", - { - name: "installation_name", - } - ); + new DataTfeGithubAppInstallation(this, "gha_installation", { + name: "installation_name", + }); } } @@ -73,4 +71,4 @@ Must be one of: `installationId` or `name`. In addition to all arguments above, the following attributes are exported: * `id` - The internal ID of the Github Installation. This is different from the `installationId`. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/ip_ranges.html.markdown b/website/docs/cdktf/typescript/d/ip_ranges.html.markdown index 3aef65fe1..a4c0927da 100644 --- a/website/docs/cdktf/typescript/d/ip_ranges.html.markdown +++ b/website/docs/cdktf/typescript/d/ip_ranges.html.markdown @@ -14,21 +14,20 @@ Use this data source to retrieve a list of Terraform Cloud's IP ranges. For more ## Example Usage ```typescript -import * as constructs from "constructs"; -import * as cdktf from "cdktf"; -/*Provider bindings are generated by running cdktf get. -See https://cdk.tf/provider-generation for more details.*/ -import * as tfe from "./.gen/providers/tfe"; -class MyConvertedCode extends cdktf.TerraformStack { - constructor(scope: constructs.Construct, name: string) { +// 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) { super(scope, name); - const dataTfeIpRangesAddresses = new tfe.dataTfeIpRanges.DataTfeIpRanges( - this, - "addresses", - {} - ); - new cdktf.TerraformOutput(this, "notifications_ips", { - value: dataTfeIpRangesAddresses.notifications, + const addresses = new DataTfeIpRanges(this, "addresses", {}); + new TerraformOutput(this, "notifications_ips", { + value: addresses.notifications, }); } } @@ -49,4 +48,4 @@ The following attributes are exported: * `vcs` - The list of IP ranges in CIDR notation used for connecting to VCS providers. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/oauth_client.html.markdown b/website/docs/cdktf/typescript/d/oauth_client.html.markdown index fd3cee123..e093c1f42 100644 --- a/website/docs/cdktf/typescript/d/oauth_client.html.markdown +++ b/website/docs/cdktf/typescript/d/oauth_client.html.markdown @@ -16,15 +16,18 @@ Use this data source to get information about an OAuth client. ### Finding an OAuth client by its ID ```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) { +// 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) { super(scope, name); - new tfe.dataTfeOauthClient.DataTfeOauthClient(this, "client", { + new DataTfeOauthClient(this, "client", { oauthClientId: "oc-XXXXXXX", }); } @@ -35,15 +38,18 @@ class MyConvertedCode extends cdktf.TerraformStack { ### Finding an OAuth client by its name ```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) { +// 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) { super(scope, name); - new tfe.dataTfeOauthClient.DataTfeOauthClient(this, "client", { + new DataTfeOauthClient(this, "client", { name: "my-oauth-client", organization: "my-org", }); @@ -55,15 +61,18 @@ class MyConvertedCode extends cdktf.TerraformStack { ### Finding an OAuth client by its service provider ```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) { +// 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) { super(scope, name); - new tfe.dataTfeOauthClient.DataTfeOauthClient(this, "client", { + new DataTfeOauthClient(this, "client", { organization: "my-org", serviceProvider: "github", }); @@ -102,4 +111,4 @@ In addition to all arguments above, the following attributes are exported: * `serviceProvider` - The API identifier of the OAuth service provider. * `serviceProviderDisplayName` - The display name of the OAuth service provider. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/organization.html.markdown b/website/docs/cdktf/typescript/d/organization.html.markdown index 97f356774..80eeb599a 100644 --- a/website/docs/cdktf/typescript/d/organization.html.markdown +++ b/website/docs/cdktf/typescript/d/organization.html.markdown @@ -14,15 +14,18 @@ Use this data source to get information about an organization. ## Example Usage ```typescript -import * as constructs from "constructs"; -import * as cdktf from "cdktf"; -/*Provider bindings are generated by running cdktf get. -See https://cdk.tf/provider-generation for more details.*/ -import * as tfe from "./.gen/providers/tfe"; -class MyConvertedCode extends cdktf.TerraformStack { - constructor(scope: constructs.Construct, name: string) { +// 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) { super(scope, name); - new tfe.dataTfeOrganization.DataTfeOrganization(this, "foo", { + new DataTfeOrganization(this, "foo", { name: "organization-name", }); } @@ -48,4 +51,4 @@ In addition to all arguments above, the following attributes are exported: * `ownersTeamSamlRoleId` - The name of the "owners" team. * `sendPassingStatusesForUntriggeredSpeculativePlans` - Whether or not to send VCS status updates for untriggered speculative plans. This can be useful if large numbers of untriggered workspaces are exhausting request limits for connected version control service providers like GitHub. Defaults to true. In Terraform Enterprise, this setting has no effect and cannot be changed but is also available in Site Administration. * `defaultProjectId` - ID of the organization's default project. All workspaces created without specifying a project ID are created in this project. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/organization_members.html.markdown b/website/docs/cdktf/typescript/d/organization_members.html.markdown index 290c8836c..95b1990cb 100644 --- a/website/docs/cdktf/typescript/d/organization_members.html.markdown +++ b/website/docs/cdktf/typescript/d/organization_members.html.markdown @@ -14,20 +14,24 @@ Use this data source to get information about members of an organization. ## Example Usage ```typescript -import * as constructs from "constructs"; -import * as cdktf from "cdktf"; -/*Provider bindings are generated by running cdktf get. -See https://cdk.tf/provider-generation for more details.*/ -import * as tfe from "./.gen/providers/tfe"; -class MyConvertedCode extends cdktf.TerraformStack { - constructor(scope: constructs.Construct, name: string) { +// 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) { super(scope, name); - const tfeOrganizationBar = new tfe.organization.Organization(this, "bar", { + const bar = new Organization(this, "bar", { email: "user@hashicorp.com", name: "org-bar", }); - new tfe.dataTfeOrganizationMembers.DataTfeOrganizationMembers(this, "foo", { - organization: cdktf.Token.asString(tfeOrganizationBar.name), + new DataTfeOrganizationMembers(this, "foo", { + organization: bar.name, }); } } @@ -51,4 +55,4 @@ The `member` block contains: * `userId` - The ID of the user. * `organizationMembershipId` - The ID of the organization membership. - \ No newline at end of file + \ No newline at end of file From 043e6b6be84289e9f1c54bc9a31a3c91907a9f16 Mon Sep 17 00:00:00 2001 From: team-tf-cdk Date: Mon, 16 Oct 2023 00:15:26 +0000 Subject: [PATCH 5/7] cdktf: update index.html.markdown,r/workspace_variable_set.html.markdown,r/workspace_run_task.html.markdown,r/workspace_run.html.markdown,r/workspace_policy_set_exclusion.html.markdown,r/workspace_policy_set.html.markdown,r/workspace.html.markdown,r/variable_set.html.markdown,r/variable.html.markdown,r/terraform_version.html.markdown --- website/docs/cdktf/python/index.html.markdown | 49 +++-- .../python/r/terraform_version.html.markdown | 17 +- .../cdktf/python/r/variable.html.markdown | 118 +++++++----- .../cdktf/python/r/variable_set.html.markdown | 86 +++++---- .../cdktf/python/r/workspace.html.markdown | 49 +++-- .../r/workspace_policy_set.html.markdown | 35 ++-- ...rkspace_policy_set_exclusion.html.markdown | 35 ++-- .../python/r/workspace_run.html.markdown | 110 ++++++----- .../python/r/workspace_run_task.html.markdown | 25 ++- .../r/workspace_variable_set.html.markdown | 35 ++-- .../docs/cdktf/typescript/index.html.markdown | 53 +++-- .../r/terraform_version.html.markdown | 21 +- .../cdktf/typescript/r/variable.html.markdown | 145 +++++++------- .../typescript/r/variable_set.html.markdown | 122 ++++++------ .../typescript/r/workspace.html.markdown | 87 ++++----- .../r/workspace_policy_set.html.markdown | 51 ++--- ...rkspace_policy_set_exclusion.html.markdown | 59 +++--- .../typescript/r/workspace_run.html.markdown | 182 +++++++++--------- .../r/workspace_run_task.html.markdown | 26 ++- .../r/workspace_variable_set.html.markdown | 55 +++--- 20 files changed, 758 insertions(+), 602 deletions(-) diff --git a/website/docs/cdktf/python/index.html.markdown b/website/docs/cdktf/python/index.html.markdown index 352a8263c..488a1e9d5 100644 --- a/website/docs/cdktf/python/index.html.markdown +++ b/website/docs/cdktf/python/index.html.markdown @@ -73,14 +73,13 @@ 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: -```hcl -terraform { - required_providers { - tfe = { - version = "~> 0.49.2" - } - } -} +```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) ``` As this provider is still at version zero, you should constrain the acceptable @@ -99,17 +98,27 @@ For more information on provider installation and constraining provider versions ## Example Usage -```hcl -provider "tfe" { - hostname = var.hostname # Optional, defaults to Terraform Cloud `app.terraform.io` - token = var.token - version = "~> 0.49.2" -} - -# Create an organization -resource "tfe_organization" "org" { - # ... -} +```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 + ) ``` ## Argument Reference @@ -129,4 +138,4 @@ The following arguments are supported: arguments. Ensure that the organization already exists prior to using this argument. This can also be specified using the `TFE_ORGANIZATION` environment variable. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/terraform_version.html.markdown b/website/docs/cdktf/python/r/terraform_version.html.markdown index 5d19d8f3e..4945a4a2d 100644 --- a/website/docs/cdktf/python/r/terraform_version.html.markdown +++ b/website/docs/cdktf/python/r/terraform_version.html.markdown @@ -16,15 +16,18 @@ Manage Terraform versions available on Terraform Cloud/Enterprise. Basic Usage: ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.terraform_version import TerraformVersion +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - tfe.terraform_version.TerraformVersion(self, "test", + TerraformVersion(self, "test", sha="e75ac73deb69a6b3aa667cb0b8b731aee79e2904", url="https://tfe-host.com/path/to/terraform.zip", version="1.1.2-custom" @@ -62,4 +65,4 @@ terraform import tfe_terraform_version.test 1.1.2 -> **Note:** You can fetch a Terraform version ID from the URL of an existing version in the Terraform Cloud UI. The ID is in the format `tool-` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/variable.html.markdown b/website/docs/cdktf/python/r/variable.html.markdown index a32fa5e33..364a6b27d 100644 --- a/website/docs/cdktf/python/r/variable.html.markdown +++ b/website/docs/cdktf/python/r/variable.html.markdown @@ -16,30 +16,35 @@ Creates, updates and destroys variables. Basic usage for workspaces: ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.organization import Organization +from imports.tfe.variable import Variable +from imports.tfe.workspace import Workspace +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - tfe_organization_test = tfe.organization.Organization(self, "test", + test = Organization(self, "test", email="admin@company.com", name="my-org-name" ) - tfe_workspace_test = tfe.workspace.Workspace(self, "test_1", + tfe_workspace_test = Workspace(self, "test_1", name="my-workspace-name", - organization=cdktf.Token.as_string(tfe_organization_test.name) + 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 = tfe.variable.Variable(self, "test_2", + tfe_variable_test = Variable(self, "test_2", category="terraform", description="a useful description", key="my_key_name", value="my_value_name", - workspace_id=cdktf.Token.as_string(tfe_workspace_test.id) + workspace_id=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") @@ -48,39 +53,44 @@ class MyConvertedCode(cdktf.TerraformStack): Basic usage for variable sets: ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.organization import Organization +from imports.tfe.variable import Variable +from imports.tfe.variable_set import VariableSet +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - tfe_organization_test = tfe.organization.Organization(self, "test", + test = Organization(self, "test", email="admin@company.com", name="my-org-name" ) - tfe_variable_set_test = tfe.variable_set.VariableSet(self, "test_1", + tfe_variable_set_test = VariableSet(self, "test_1", description="Some description.", global=False, name="Test Varset", - organization=cdktf.Token.as_string(tfe_organization_test.name) + 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.variable.Variable(self, "test-a", + 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) + variable_set_id=Token.as_string(tfe_variable_set_test.id) ) - tfe.variable.Variable(self, "test-b", + 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) + variable_set_id=Token.as_string(tfe_variable_set_test.id) ) ``` @@ -119,33 +129,41 @@ 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: -``` -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" -} - +```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" + ) ``` `readable_value` will be null if the variable is sensitive. `readable_value` may not be set explicitly in the resource configuration. @@ -171,4 +189,4 @@ example: terraform import tfe_variable.test my-org-name/varset-47qC3LmA47piVan7/var-5rTwnSaRPogw6apb ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/variable_set.html.markdown b/website/docs/cdktf/python/r/variable_set.html.markdown index 40dfc740b..e48e36c71 100644 --- a/website/docs/cdktf/python/r/variable_set.html.markdown +++ b/website/docs/cdktf/python/r/variable_set.html.markdown @@ -16,103 +16,115 @@ Creates, updates and destroys variable sets. Basic usage: ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +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): def __init__(self, scope, name): super().__init__(scope, name) - tfe_organization_test = tfe.organization.Organization(self, "test", + test = Organization(self, "test", email="admin@company.com", name="my-org-name" ) - tfe_project_test = tfe.project.Project(self, "test_1", + tfe_project_test = Project(self, "test_1", name="projectname", - organization=cdktf.Token.as_string(tfe_organization_test.name) + 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 = tfe.variable_set.VariableSet(self, "test_2", + tfe_variable_set_test = VariableSet(self, "test_2", description="Some description.", name="Test Varset", - organization=cdktf.Token.as_string(tfe_organization_test.name) + 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 = tfe.workspace.Workspace(self, "test_3", + tfe_workspace_test = Workspace(self, "test_3", name="my-workspace-name", - organization=cdktf.Token.as_string(tfe_organization_test.name) + 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 = - 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) + 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) ) # 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 = - 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) + 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) ) # 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") - tfe.variable.Variable(self, "test-a", + 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) + variable_set_id=Token.as_string(tfe_variable_set_test.id) ) - tfe.variable.Variable(self, "test-b", + 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) + variable_set_id=Token.as_string(tfe_variable_set_test.id) ) ``` Creating a global variable set: ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.organization import Organization +from imports.tfe.variable import Variable +from imports.tfe.variable_set import VariableSet +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - tfe_organization_test = tfe.organization.Organization(self, "test", + test = Organization(self, "test", email="admin@company.com", name="my-org-name" ) - tfe_variable_set_test = tfe.variable_set.VariableSet(self, "test_1", + tfe_variable_set_test = VariableSet(self, "test_1", description="Variable set applied to all workspaces.", global=True, name="Global Varset", - organization=cdktf.Token.as_string(tfe_organization_test.name) + 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.variable.Variable(self, "test-a", + 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) + variable_set_id=Token.as_string(tfe_variable_set_test.id) ) - tfe.variable.Variable(self, "test-b", + 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) + variable_set_id=Token.as_string(tfe_variable_set_test.id) ) ``` @@ -141,4 +153,4 @@ Variable sets can be imported; use `` as the import ID. For exa terraform import tfe_variable_set.test varset-5rTwnSaRPogw6apb ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/workspace.html.markdown b/website/docs/cdktf/python/r/workspace.html.markdown index d056c9ddd..97f02223c 100644 --- a/website/docs/cdktf/python/r/workspace.html.markdown +++ b/website/docs/cdktf/python/r/workspace.html.markdown @@ -18,21 +18,25 @@ Provides a workspace resource. Basic usage: ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.organization import Organization +from imports.tfe.workspace import Workspace +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - tfe_organization_test_organization = tfe.organization.Organization(self, "test-organization", + test_organization = Organization(self, "test-organization", email="admin@company.com", name="my-org-name" ) - tfe.workspace.Workspace(self, "test", + Workspace(self, "test", name="my-workspace-name", - organization=cdktf.Token.as_string(tfe_organization_test_organization.name), + organization=test_organization.name, tag_names=["test", "app"] ) ``` @@ -40,27 +44,32 @@ class MyConvertedCode(cdktf.TerraformStack): With `execution_mode` of `agent`: ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.agent_pool import AgentPool +from imports.tfe.organization import Organization +from imports.tfe.workspace import Workspace +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - tfe_organization_test_organization = tfe.organization.Organization(self, "test-organization", + test_organization = Organization(self, "test-organization", email="admin@company.com", name="my-org-name" ) - tfe_agent_pool_test_agent_pool = tfe.agent_pool.AgentPool(self, "test-agent-pool", + test_agent_pool = AgentPool(self, "test-agent-pool", name="my-agent-pool-name", - organization=cdktf.Token.as_string(tfe_organization_test_organization.name) + organization=test_organization.name ) - tfe.workspace.Workspace(self, "test", - agent_pool_id=cdktf.Token.as_string(tfe_agent_pool_test_agent_pool.id), + Workspace(self, "test", + agent_pool_id=test_agent_pool.id, execution_mode="agent", name="my-workspace-name", - organization=cdktf.Token.as_string(tfe_organization_test_organization.name) + organization=test_organization.name ) ``` @@ -174,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 + \ 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 733784218..c628fedb3 100644 --- a/website/docs/cdktf/python/r/workspace_policy_set.html.markdown +++ b/website/docs/cdktf/python/r/workspace_policy_set.html.markdown @@ -18,35 +18,40 @@ Adds and removes policy sets from a workspace Basic usage: ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +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): def __init__(self, scope, name): super().__init__(scope, name) - tfe_organization_test = tfe.organization.Organization(self, "test", + test = Organization(self, "test", email="admin@company.com", name="my-org-name" ) - tfe_policy_set_test = tfe.policy_set.PolicySet(self, "test_1", + tfe_policy_set_test = PolicySet(self, "test_1", description="Some description.", name="my-policy-set", - organization=cdktf.Token.as_string(tfe_organization_test.name) + 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 = tfe.workspace.Workspace(self, "test_2", + tfe_workspace_test = Workspace(self, "test_2", name="my-workspace-name", - organization=cdktf.Token.as_string(tfe_organization_test.name) + 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 = - 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) + 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) ) # 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") @@ -71,4 +76,4 @@ Workspace Policy Sets can be imported; use `// \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/workspace_policy_set_exclusion.html.markdown b/website/docs/cdktf/python/r/workspace_policy_set_exclusion.html.markdown index 5f052b546..14839cae4 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,35 +18,40 @@ Adds and removes policy sets from an excluded workspace Basic usage: ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +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): def __init__(self, scope, name): super().__init__(scope, name) - tfe_organization_test = tfe.organization.Organization(self, "test", + test = Organization(self, "test", email="admin@company.com", name="my-org-name" ) - tfe_policy_set_test = tfe.policy_set.PolicySet(self, "test_1", + tfe_policy_set_test = PolicySet(self, "test_1", description="Some description.", name="my-policy-set", - organization=cdktf.Token.as_string(tfe_organization_test.name) + 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 = tfe.workspace.Workspace(self, "test_2", + tfe_workspace_test = Workspace(self, "test_2", name="my-workspace-name", - organization=cdktf.Token.as_string(tfe_organization_test.name) + 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 = - 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) + 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) ) # 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") @@ -71,4 +76,4 @@ Excluded Workspace Policy Sets can be imported; use `/ \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/workspace_run.html.markdown b/website/docs/cdktf/python/r/workspace_run.html.markdown index e79741bc7..d32e5c6e7 100644 --- a/website/docs/cdktf/python/r/workspace_run.html.markdown +++ b/website/docs/cdktf/python/r/workspace_run.html.markdown @@ -24,46 +24,52 @@ The `tfe_workspace_run` expects to own exactly one apply during a creation and/o Basic usage with multiple workspaces: ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +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): def __init__(self, scope, name): super().__init__(scope, name) - tfe_organization_test_organization = tfe.organization.Organization(self, "test-organization", + test_organization = Organization(self, "test-organization", email="admin@company.com", name="my-org-name" ) - tfe_oauth_client_test = tfe.oauth_client.OauthClient(self, "test", + test = OauthClient(self, "test", api_url="https://api.github.com", http_url="https://github.com", oauth_token="oauth_token_id", - organization=tfe_organization_test_organization, + organization=test_organization, service_provider="github" ) - tfe_workspace_child = tfe.workspace.Workspace(self, "child", + child = Workspace(self, "child", name="child-ws", - organization=tfe_organization_test_organization, + organization=test_organization, queue_all_runs=False, vcs_repo=WorkspaceVcsRepo( branch="main", identifier="my-org-name/vcs-repository", - oauth_token_id=cdktf.Token.as_string(tfe_oauth_client_test.oauth_token_id) + oauth_token_id=test.oauth_token_id ) ) - tfe_workspace_parent = tfe.workspace.Workspace(self, "parent", + parent = Workspace(self, "parent", name="parent-ws", - organization=tfe_organization_test_organization, + organization=test_organization, queue_all_runs=False, vcs_repo=WorkspaceVcsRepo( branch="main", identifier="my-org-name/vcs-repository", - oauth_token_id=cdktf.Token.as_string(tfe_oauth_client_test.oauth_token_id) + oauth_token_id=test.oauth_token_id ) ) - tfe_workspace_run_ws_run_parent = tfe.workspace_run.WorkspaceRun(self, "ws_run_parent", + ws_run_parent = WorkspaceRun(self, "ws_run_parent", apply=WorkspaceRunApply( manual_confirm=False, retry_attempts=5, @@ -76,58 +82,64 @@ class MyConvertedCode(cdktf.TerraformStack): retry_backoff_min=10, wait_for_run=True ), - workspace_id=cdktf.Token.as_string(tfe_workspace_parent.id) + workspace_id=parent.id ) - tfe.workspace_run.WorkspaceRun(self, "ws_run_child", + WorkspaceRun(self, "ws_run_child", apply=WorkspaceRunApply( manual_confirm=False, retry_attempts=5, retry_backoff_min=5 ), - depends_on=[tfe_workspace_run_ws_run_parent], + depends_on=[ws_run_parent], destroy=WorkspaceRunDestroy( manual_confirm=False, retry_attempts=3, retry_backoff_min=10, wait_for_run=True ), - workspace_id=cdktf.Token.as_string(tfe_workspace_child.id) + workspace_id=child.id ) ``` With manual confirmation: ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +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): def __init__(self, scope, name): super().__init__(scope, name) - tfe_organization_test_organization = tfe.organization.Organization(self, "test-organization", + test_organization = Organization(self, "test-organization", email="admin@company.com", name="my-org-name" ) - tfe_oauth_client_test = tfe.oauth_client.OauthClient(self, "test", + test = OauthClient(self, "test", api_url="https://api.github.com", http_url="https://github.com", oauth_token="oauth_token_id", - organization=tfe_organization_test_organization, + organization=test_organization, service_provider="github" ) - tfe_workspace_parent = tfe.workspace.Workspace(self, "parent", + parent = Workspace(self, "parent", name="parent-ws", - organization=tfe_organization_test_organization, + organization=test_organization, queue_all_runs=False, vcs_repo=WorkspaceVcsRepo( branch="main", identifier="my-org-name/vcs-repository", - oauth_token_id=cdktf.Token.as_string(tfe_oauth_client_test.oauth_token_id) + oauth_token_id=test.oauth_token_id ) ) - tfe.workspace_run.WorkspaceRun(self, "ws_run_parent", + WorkspaceRun(self, "ws_run_parent", apply=WorkspaceRunApply( manual_confirm=True ), @@ -135,43 +147,49 @@ class MyConvertedCode(cdktf.TerraformStack): manual_confirm=True, wait_for_run=True ), - workspace_id=cdktf.Token.as_string(tfe_workspace_parent.id) + workspace_id=parent.id ) ``` With no retries: ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +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): def __init__(self, scope, name): super().__init__(scope, name) - tfe_organization_test_organization = tfe.organization.Organization(self, "test-organization", + test_organization = Organization(self, "test-organization", email="admin@company.com", name="my-org-name" ) - tfe_oauth_client_test = tfe.oauth_client.OauthClient(self, "test", + test = OauthClient(self, "test", api_url="https://api.github.com", http_url="https://github.com", oauth_token="oauth_token_id", - organization=tfe_organization_test_organization, + organization=test_organization, service_provider="github" ) - tfe_workspace_parent = tfe.workspace.Workspace(self, "parent", + parent = Workspace(self, "parent", name="parent-ws", - organization=tfe_organization_test_organization, + organization=test_organization, queue_all_runs=False, vcs_repo=WorkspaceVcsRepo( branch="main", identifier="my-org-name/vcs-repository", - oauth_token_id=cdktf.Token.as_string(tfe_oauth_client_test.oauth_token_id) + oauth_token_id=test.oauth_token_id ) ) - tfe.workspace_run.WorkspaceRun(self, "ws_run_parent", + WorkspaceRun(self, "ws_run_parent", apply=WorkspaceRunApply( manual_confirm=False, retry=False @@ -181,7 +199,7 @@ class MyConvertedCode(cdktf.TerraformStack): retry=False, wait_for_run=True ), - workspace_id=cdktf.Token.as_string(tfe_workspace_parent.id) + workspace_id=parent.id ) ``` @@ -210,4 +228,4 @@ Both `apply` and `destroy` block supports: In addition to all arguments above, the following attributes are exported: * `id` - The ID of the run created by this resource. Note, if the resource was created without an `apply{}` configuration block, then this ID will not refer to a real run in Terraform Cloud. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/workspace_run_task.html.markdown b/website/docs/cdktf/python/r/workspace_run_task.html.markdown index 450d01813..9f1525ed7 100644 --- a/website/docs/cdktf/python/r/workspace_run_task.html.markdown +++ b/website/docs/cdktf/python/r/workspace_run_task.html.markdown @@ -17,12 +17,23 @@ The tfe_workspace_run_task resource associates, updates and removes [Workspace R Basic usage: -```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" -} +```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 + ) ``` ## Argument Reference @@ -47,4 +58,4 @@ import ID. For example: terraform import tfe_workspace_run_task.test my-org-name/workspace/task-name ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/workspace_variable_set.html.markdown b/website/docs/cdktf/python/r/workspace_variable_set.html.markdown index de6cad570..29f11de9f 100644 --- a/website/docs/cdktf/python/r/workspace_variable_set.html.markdown +++ b/website/docs/cdktf/python/r/workspace_variable_set.html.markdown @@ -18,35 +18,40 @@ Adds and removes variable sets from a workspace Basic usage: ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +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): def __init__(self, scope, name): super().__init__(scope, name) - tfe_organization_test = tfe.organization.Organization(self, "test", + test = Organization(self, "test", email="admin@company.com", name="my-org-name" ) - tfe_variable_set_test = tfe.variable_set.VariableSet(self, "test_1", + tfe_variable_set_test = VariableSet(self, "test_1", description="Some description.", name="Test Varset", - organization=cdktf.Token.as_string(tfe_organization_test.name) + 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 = tfe.workspace.Workspace(self, "test_2", + tfe_workspace_test = Workspace(self, "test_2", name="my-workspace-name", - organization=cdktf.Token.as_string(tfe_organization_test.name) + 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 = - 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) + 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) ) # 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") @@ -71,4 +76,4 @@ Workspace Variable Sets can be imported; use `// \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/index.html.markdown b/website/docs/cdktf/typescript/index.html.markdown index 0af537aa4..4a01c70f6 100644 --- a/website/docs/cdktf/typescript/index.html.markdown +++ b/website/docs/cdktf/typescript/index.html.markdown @@ -73,14 +73,16 @@ 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: -```hcl -terraform { - required_providers { - tfe = { - version = "~> 0.49.2" - } +```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); } } + ``` As this provider is still at version zero, you should constrain the acceptable @@ -99,17 +101,34 @@ For more information on provider installation and constraining provider versions ## Example Usage -```hcl -provider "tfe" { - hostname = var.hostname # Optional, defaults to Terraform Cloud `appTerraformIo` - token = var.token - version = "~> 0.49.2" +```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; } - -# Create an organization -resource "tfe_organization" "org" { - # ... +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, + }); + } } + ``` ## Argument Reference @@ -117,7 +136,7 @@ resource "tfe_organization" "org" { The following arguments are supported: * `hostname` - (Optional) The Terraform Cloud/Enterprise hostname to connect to. - Defaults to `app.terraform.io`. Can be overridden by setting the + Defaults to `appTerraformIo`. Can be overridden by setting the `tfeHostname` environment variable. * `token` - (Optional) The token used to authenticate with Terraform Cloud/Enterprise. See [Authentication](#authentication) above for more information. @@ -129,4 +148,4 @@ The following arguments are supported: arguments. Ensure that the organization already exists prior to using this argument. This can also be specified using the `tfeOrganization` environment variable. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/terraform_version.html.markdown b/website/docs/cdktf/typescript/r/terraform_version.html.markdown index f122ae910..18d301451 100644 --- a/website/docs/cdktf/typescript/r/terraform_version.html.markdown +++ b/website/docs/cdktf/typescript/r/terraform_version.html.markdown @@ -16,15 +16,18 @@ Manage Terraform versions available on Terraform Cloud/Enterprise. Basic Usage: ```typescript -import * as constructs from "constructs"; -import * as cdktf from "cdktf"; -/*Provider bindings are generated by running cdktf get. -See https://cdk.tf/provider-generation for more details.*/ -import * as tfe from "./.gen/providers/tfe"; -class MyConvertedCode extends cdktf.TerraformStack { - constructor(scope: constructs.Construct, name: string) { +// 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) { super(scope, name); - new tfe.terraformVersion.TerraformVersion(this, "test", { + new TerraformVersion(this, "test", { sha: "e75ac73deb69a6b3aa667cb0b8b731aee79e2904", url: "https://tfe-host.com/path/to/terraform.zip", version: "1.1.2-custom", @@ -65,4 +68,4 @@ terraform import tfe_terraform_version.test 1.1.2 -> **Note:** You can fetch a Terraform version ID from the URL of an existing version in the Terraform Cloud UI. The ID is in the format `tool-` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/variable.html.markdown b/website/docs/cdktf/typescript/r/variable.html.markdown index 1d442d61a..015d5d326 100644 --- a/website/docs/cdktf/typescript/r/variable.html.markdown +++ b/website/docs/cdktf/typescript/r/variable.html.markdown @@ -16,34 +16,35 @@ Creates, updates and destroys variables. Basic usage for workspaces: ```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) { +// 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) { super(scope, name); - 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", { + 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: cdktf.Token.asString(tfeOrganizationTest.name), + 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.*/ tfeWorkspaceTest.overrideLogicalId("test"); - const tfeVariableTest = new tfe.variable.Variable(this, "test_2", { + const tfeVariableTest = new Variable(this, "test_2", { category: "terraform", description: "a useful description", key: "my_key_name", value: "my_value_name", - workspaceId: cdktf.Token.asString(tfeWorkspaceTest.id), + workspaceId: 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"); @@ -55,43 +56,44 @@ class MyConvertedCode extends cdktf.TerraformStack { Basic usage for variable sets: ```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) { +// 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) { 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", { + const test = new Organization(this, "test", { + email: "admin@company.com", + name: "my-org-name", + }); + const tfeVariableSetTest = new VariableSet(this, "test_1", { description: "Some description.", global: false, name: "Test Varset", - organization: cdktf.Token.asString(tfeOrganizationTest.name), + 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.*/ tfeVariableSetTest.overrideLogicalId("test"); - new tfe.variable.Variable(this, "test-a", { + new Variable(this, "test-a", { category: "terraform", description: "a useful description", key: "seperate_variable", value: "my_value_name", - variableSetId: cdktf.Token.asString(tfeVariableSetTest.id), + variableSetId: Token.asString(tfeVariableSetTest.id), }); - new tfe.variable.Variable(this, "test-b", { + new Variable(this, "test-b", { category: "env", description: "an environment variable", key: "another_variable", value: "my_value_name", - variableSetId: cdktf.Token.asString(tfeVariableSetTest.id), + variableSetId: Token.asString(tfeVariableSetTest.id), }); } } @@ -133,31 +135,42 @@ 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: -``` -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" +```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", + }); + } } ``` @@ -185,4 +198,4 @@ example: terraform import tfe_variable.test my-org-name/varset-47qC3LmA47piVan7/var-5rTwnSaRPogw6apb ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/variable_set.html.markdown b/website/docs/cdktf/typescript/r/variable_set.html.markdown index fdb8480e8..106d723e6 100644 --- a/website/docs/cdktf/typescript/r/variable_set.html.markdown +++ b/website/docs/cdktf/typescript/r/variable_set.html.markdown @@ -16,68 +16,75 @@ Creates, updates and destroys variable sets. Basic usage: ```typescript -import * as constructs from "constructs"; -import * as cdktf from "cdktf"; -/*Provider bindings are generated by running cdktf get. -See https://cdk.tf/provider-generation for more details.*/ -import * as tfe from "./.gen/providers/tfe"; -class MyConvertedCode extends cdktf.TerraformStack { - constructor(scope: constructs.Construct, name: string) { +// 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) { super(scope, name); - const tfeOrganizationTest = new tfe.organization.Organization( - this, - "test", - { - email: "admin@company.com", - name: "my-org-name", - } - ); - const tfeProjectTest = new tfe.project.Project(this, "test_1", { + const test = new Organization(this, "test", { + email: "admin@company.com", + name: "my-org-name", + }); + const tfeProjectTest = new Project(this, "test_1", { name: "projectname", - organization: cdktf.Token.asString(tfeOrganizationTest.name), + 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.*/ tfeProjectTest.overrideLogicalId("test"); - const tfeVariableSetTest = new tfe.variableSet.VariableSet(this, "test_2", { + const tfeVariableSetTest = new VariableSet(this, "test_2", { description: "Some description.", name: "Test Varset", - organization: cdktf.Token.asString(tfeOrganizationTest.name), + 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.*/ tfeVariableSetTest.overrideLogicalId("test"); - const tfeWorkspaceTest = new tfe.workspace.Workspace(this, "test_3", { + const tfeWorkspaceTest = new Workspace(this, "test_3", { name: "my-workspace-name", - organization: cdktf.Token.asString(tfeOrganizationTest.name), + 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.*/ tfeWorkspaceTest.overrideLogicalId("test"); - const tfeWorkspaceVariableSetTest = - new tfe.workspaceVariableSet.WorkspaceVariableSet(this, "test_4", { - variableSetId: cdktf.Token.asString(tfeVariableSetTest.id), - workspaceId: cdktf.Token.asString(tfeWorkspaceTest.id), - }); + const tfeWorkspaceVariableSetTest = new WorkspaceVariableSet( + this, + "test_4", + { + variableSetId: Token.asString(tfeVariableSetTest.id), + workspaceId: 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 tfe.projectVariableSet.ProjectVariableSet(this, "test_5", { - projectId: cdktf.Token.asString(tfeProjectTest.id), - variableSetId: cdktf.Token.asString(tfeVariableSetTest.id), - }); + const tfeProjectVariableSetTest = new ProjectVariableSet(this, "test_5", { + projectId: Token.asString(tfeProjectTest.id), + variableSetId: 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 tfe.variable.Variable(this, "test-a", { + new Variable(this, "test-a", { category: "terraform", description: "a useful description", key: "seperate_variable", value: "my_value_name", - variableSetId: cdktf.Token.asString(tfeVariableSetTest.id), + variableSetId: Token.asString(tfeVariableSetTest.id), }); - new tfe.variable.Variable(this, "test-b", { + new Variable(this, "test-b", { category: "env", description: "an environment variable", key: "another_variable", value: "my_value_name", - variableSetId: cdktf.Token.asString(tfeVariableSetTest.id), + variableSetId: Token.asString(tfeVariableSetTest.id), }); } } @@ -87,43 +94,44 @@ class MyConvertedCode extends cdktf.TerraformStack { Creating a global 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) { +// 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) { 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", { + const test = new Organization(this, "test", { + email: "admin@company.com", + name: "my-org-name", + }); + const tfeVariableSetTest = new VariableSet(this, "test_1", { description: "Variable set applied to all workspaces.", global: true, name: "Global Varset", - organization: cdktf.Token.asString(tfeOrganizationTest.name), + 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.*/ tfeVariableSetTest.overrideLogicalId("test"); - new tfe.variable.Variable(this, "test-a", { + new Variable(this, "test-a", { category: "terraform", description: "a useful description", key: "seperate_variable", value: "my_value_name", - variableSetId: cdktf.Token.asString(tfeVariableSetTest.id), + variableSetId: Token.asString(tfeVariableSetTest.id), }); - new tfe.variable.Variable(this, "test-b", { + new Variable(this, "test-b", { category: "env", description: "an environment variable", key: "another_variable", value: "my_value_name", - variableSetId: cdktf.Token.asString(tfeVariableSetTest.id), + variableSetId: Token.asString(tfeVariableSetTest.id), }); } } @@ -155,4 +163,4 @@ Variable sets can be imported; use `` as the import ID. For exa terraform import tfe_variable_set.test varset-5rTwnSaRPogw6apb ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/workspace.html.markdown b/website/docs/cdktf/typescript/r/workspace.html.markdown index 17da01aec..0e9cecb61 100644 --- a/website/docs/cdktf/typescript/r/workspace.html.markdown +++ b/website/docs/cdktf/typescript/r/workspace.html.markdown @@ -18,25 +18,25 @@ Provides a workspace resource. Basic usage: ```typescript -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) { +// 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) { super(scope, name); - const tfeOrganizationTestOrganization = new tfe.organization.Organization( - this, - "test-organization", - { - email: "admin@company.com", - name: "my-org-name", - } - ); - new tfe.workspace.Workspace(this, "test", { + const testOrganization = new Organization(this, "test-organization", { + email: "admin@company.com", + name: "my-org-name", + }); + new Workspace(this, "test", { name: "my-workspace-name", - organization: cdktf.Token.asString(tfeOrganizationTestOrganization.name), + organization: testOrganization.name, tagNames: ["test", "app"], }); } @@ -47,37 +47,32 @@ class MyConvertedCode extends cdktf.TerraformStack { With `executionMode` of `agent`: ```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) { +// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug +import { Construct } from "constructs"; +import { TerraformStack } from "cdktf"; +/* + * Provider bindings are generated by running `cdktf get`. + * See https://cdk.tf/provider-generation for more details. + */ +import { AgentPool } from "./.gen/providers/tfe/agent-pool"; +import { Organization } from "./.gen/providers/tfe/organization"; +import { Workspace } from "./.gen/providers/tfe/workspace"; +class MyConvertedCode extends TerraformStack { + constructor(scope: Construct, name: string) { super(scope, name); - 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), + const testOrganization = new Organization(this, "test-organization", { + email: "admin@company.com", + name: "my-org-name", + }); + const testAgentPool = new AgentPool(this, "test-agent-pool", { + name: "my-agent-pool-name", + organization: testOrganization.name, + }); + new Workspace(this, "test", { + agentPoolId: testAgentPool.id, executionMode: "agent", name: "my-workspace-name", - organization: cdktf.Token.asString(tfeOrganizationTestOrganization.name), + organization: testOrganization.name, }); } } @@ -194,4 +189,4 @@ terraform import tfe_workspace.test ws-CH5in3chf8RJjrVd terraform import tfe_workspace.test my-org-name/my-wkspace-name ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/workspace_policy_set.html.markdown b/website/docs/cdktf/typescript/r/workspace_policy_set.html.markdown index 08afbc792..f1f0420c9 100644 --- a/website/docs/cdktf/typescript/r/workspace_policy_set.html.markdown +++ b/website/docs/cdktf/typescript/r/workspace_policy_set.html.markdown @@ -18,40 +18,41 @@ Adds and removes policy sets from a workspace Basic usage: ```typescript -import * as constructs from "constructs"; -import * as cdktf from "cdktf"; -/*Provider bindings are generated by running cdktf get. -See https://cdk.tf/provider-generation for more details.*/ -import * as tfe from "./.gen/providers/tfe"; -class MyConvertedCode extends cdktf.TerraformStack { - constructor(scope: constructs.Construct, name: string) { +// 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) { super(scope, name); - 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", { + const test = new Organization(this, "test", { + email: "admin@company.com", + name: "my-org-name", + }); + const tfePolicySetTest = new PolicySet(this, "test_1", { description: "Some description.", name: "my-policy-set", - organization: cdktf.Token.asString(tfeOrganizationTest.name), + 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.*/ tfePolicySetTest.overrideLogicalId("test"); - const tfeWorkspaceTest = new tfe.workspace.Workspace(this, "test_2", { + const tfeWorkspaceTest = new Workspace(this, "test_2", { name: "my-workspace-name", - organization: cdktf.Token.asString(tfeOrganizationTest.name), + 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.*/ tfeWorkspaceTest.overrideLogicalId("test"); - const tfeWorkspacePolicySetTest = - new tfe.workspacePolicySet.WorkspacePolicySet(this, "test_3", { - policySetId: cdktf.Token.asString(tfePolicySetTest.id), - workspaceId: cdktf.Token.asString(tfeWorkspaceTest.id), - }); + const tfeWorkspacePolicySetTest = new WorkspacePolicySet(this, "test_3", { + policySetId: Token.asString(tfePolicySetTest.id), + workspaceId: 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"); } @@ -78,4 +79,4 @@ Workspace Policy Sets can be imported; use `// \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/workspace_policy_set_exclusion.html.markdown b/website/docs/cdktf/typescript/r/workspace_policy_set_exclusion.html.markdown index 2bca759b3..635fdf53c 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,44 +18,45 @@ Adds and removes policy sets from an excluded workspace Basic usage: ```typescript -import * as constructs from "constructs"; -import * as cdktf from "cdktf"; -/*Provider bindings are generated by running cdktf get. -See https://cdk.tf/provider-generation for more details.*/ -import * as tfe from "./.gen/providers/tfe"; -class MyConvertedCode extends cdktf.TerraformStack { - constructor(scope: constructs.Construct, name: string) { +// 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) { super(scope, name); - 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", { + const test = new Organization(this, "test", { + email: "admin@company.com", + name: "my-org-name", + }); + const tfePolicySetTest = new PolicySet(this, "test_1", { description: "Some description.", name: "my-policy-set", - organization: cdktf.Token.asString(tfeOrganizationTest.name), + 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.*/ tfePolicySetTest.overrideLogicalId("test"); - const tfeWorkspaceTest = new tfe.workspace.Workspace(this, "test_2", { + const tfeWorkspaceTest = new Workspace(this, "test_2", { name: "my-workspace-name", - organization: cdktf.Token.asString(tfeOrganizationTest.name), + 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.*/ tfeWorkspaceTest.overrideLogicalId("test"); - const tfeWorkspacePolicySetExclusionTest = - new tfe.workspacePolicySetExclusion.WorkspacePolicySetExclusion( - this, - "test_3", - { - policySetId: cdktf.Token.asString(tfePolicySetTest.id), - workspaceId: cdktf.Token.asString(tfeWorkspaceTest.id), - } - ); + const tfeWorkspacePolicySetExclusionTest = new WorkspacePolicySetExclusion( + this, + "test_3", + { + policySetId: Token.asString(tfePolicySetTest.id), + workspaceId: 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"); } @@ -82,4 +83,4 @@ Excluded Workspace Policy Sets can be imported; use `/ \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/workspace_run.html.markdown b/website/docs/cdktf/typescript/r/workspace_run.html.markdown index f1875dbe2..466abe78e 100644 --- a/website/docs/cdktf/typescript/r/workspace_run.html.markdown +++ b/website/docs/cdktf/typescript/r/workspace_run.html.markdown @@ -24,82 +24,80 @@ The `tfeWorkspaceRun` expects to own exactly one apply during a creation and/or Basic usage with multiple workspaces: ```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) { +// 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) { super(scope, name); - 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", { + 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: tfeOrganizationTestOrganization, + organization: testOrganization, serviceProvider: "github", }); - const tfeWorkspaceChild = new tfe.workspace.Workspace(this, "child", { + const child = new Workspace(this, "child", { name: "child-ws", - organization: tfeOrganizationTestOrganization, + organization: testOrganization, queueAllRuns: false, vcsRepo: { branch: "main", identifier: "my-org-name/vcs-repository", - oauthTokenId: cdktf.Token.asString(tfeOauthClientTest.oauthTokenId), + oauthTokenId: test.oauthTokenId, }, }); - const tfeWorkspaceParent = new tfe.workspace.Workspace(this, "parent", { + const parent = new Workspace(this, "parent", { name: "parent-ws", - organization: tfeOrganizationTestOrganization, + organization: testOrganization, queueAllRuns: false, vcsRepo: { branch: "main", identifier: "my-org-name/vcs-repository", - oauthTokenId: cdktf.Token.asString(tfeOauthClientTest.oauthTokenId), + oauthTokenId: test.oauthTokenId, + }, + }); + const wsRunParent = new WorkspaceRun(this, "ws_run_parent", { + apply: { + manualConfirm: false, + retryAttempts: 5, + retryBackoffMin: 5, + waitForRun: true, }, + destroy: { + manualConfirm: false, + retryAttempts: 3, + retryBackoffMin: 10, + waitForRun: true, + }, + workspaceId: parent.id, }); - 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", { + new WorkspaceRun(this, "ws_run_child", { apply: { manualConfirm: false, retryAttempts: 5, retryBackoffMin: 5, }, - dependsOn: [tfeWorkspaceRunWsRunParent], + dependsOn: [wsRunParent], destroy: { manualConfirm: false, retryAttempts: 3, retryBackoffMin: 10, waitForRun: true, }, - workspaceId: cdktf.Token.asString(tfeWorkspaceChild.id), + workspaceId: child.id, }); } } @@ -109,40 +107,42 @@ class MyConvertedCode extends cdktf.TerraformStack { With manual confirmation: ```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) { +// 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) { super(scope, name); - 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", { + 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: tfeOrganizationTestOrganization, + organization: testOrganization, serviceProvider: "github", }); - const tfeWorkspaceParent = new tfe.workspace.Workspace(this, "parent", { + const parent = new Workspace(this, "parent", { name: "parent-ws", - organization: tfeOrganizationTestOrganization, + organization: testOrganization, queueAllRuns: false, vcsRepo: { branch: "main", identifier: "my-org-name/vcs-repository", - oauthTokenId: cdktf.Token.asString(tfeOauthClientTest.oauthTokenId), + oauthTokenId: test.oauthTokenId, }, }); - new tfe.workspaceRun.WorkspaceRun(this, "ws_run_parent", { + new WorkspaceRun(this, "ws_run_parent", { apply: { manualConfirm: true, }, @@ -150,7 +150,7 @@ class MyConvertedCode extends cdktf.TerraformStack { manualConfirm: true, waitForRun: true, }, - workspaceId: cdktf.Token.asString(tfeWorkspaceParent.id), + workspaceId: parent.id, }); } } @@ -160,40 +160,42 @@ class MyConvertedCode extends cdktf.TerraformStack { With no retries: ```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) { +// 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) { super(scope, name); - 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", { + 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: tfeOrganizationTestOrganization, + organization: testOrganization, serviceProvider: "github", }); - const tfeWorkspaceParent = new tfe.workspace.Workspace(this, "parent", { + const parent = new Workspace(this, "parent", { name: "parent-ws", - organization: tfeOrganizationTestOrganization, + organization: testOrganization, queueAllRuns: false, vcsRepo: { branch: "main", identifier: "my-org-name/vcs-repository", - oauthTokenId: cdktf.Token.asString(tfeOauthClientTest.oauthTokenId), + oauthTokenId: test.oauthTokenId, }, }); - new tfe.workspaceRun.WorkspaceRun(this, "ws_run_parent", { + new WorkspaceRun(this, "ws_run_parent", { apply: { manualConfirm: false, retry: false, @@ -203,7 +205,7 @@ class MyConvertedCode extends cdktf.TerraformStack { retry: false, waitForRun: true, }, - workspaceId: cdktf.Token.asString(tfeWorkspaceParent.id), + workspaceId: parent.id, }); } } @@ -235,4 +237,4 @@ Both `apply` and `destroy` block supports: In addition to all arguments above, the following attributes are exported: * `id` - The ID of the run created by this resource. Note, if the resource was created without an `apply{}` configuration block, then this ID will not refer to a real run in Terraform Cloud. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/workspace_run_task.html.markdown b/website/docs/cdktf/typescript/r/workspace_run_task.html.markdown index 2af33a4b9..4a9ed1f46 100644 --- a/website/docs/cdktf/typescript/r/workspace_run_task.html.markdown +++ b/website/docs/cdktf/typescript/r/workspace_run_task.html.markdown @@ -17,12 +17,26 @@ The tfe_workspace_run_task resource associates, updates and removes [Workspace R Basic usage: -```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" +```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, + }); + } } + ``` ## Argument Reference @@ -47,4 +61,4 @@ import ID. For example: terraform import tfe_workspace_run_task.test my-org-name/workspace/task-name ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/workspace_variable_set.html.markdown b/website/docs/cdktf/typescript/r/workspace_variable_set.html.markdown index 946d0f324..aa89dcd59 100644 --- a/website/docs/cdktf/typescript/r/workspace_variable_set.html.markdown +++ b/website/docs/cdktf/typescript/r/workspace_variable_set.html.markdown @@ -18,40 +18,45 @@ Adds and removes variable sets from a workspace Basic usage: ```typescript -import * as constructs from "constructs"; -import * as cdktf from "cdktf"; -/*Provider bindings are generated by running cdktf get. -See https://cdk.tf/provider-generation for more details.*/ -import * as tfe from "./.gen/providers/tfe"; -class MyConvertedCode extends cdktf.TerraformStack { - constructor(scope: constructs.Construct, name: string) { +// 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) { 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", { + const test = new Organization(this, "test", { + email: "admin@company.com", + name: "my-org-name", + }); + const tfeVariableSetTest = new VariableSet(this, "test_1", { description: "Some description.", name: "Test Varset", - organization: cdktf.Token.asString(tfeOrganizationTest.name), + 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.*/ tfeVariableSetTest.overrideLogicalId("test"); - const tfeWorkspaceTest = new tfe.workspace.Workspace(this, "test_2", { + const tfeWorkspaceTest = new Workspace(this, "test_2", { name: "my-workspace-name", - organization: cdktf.Token.asString(tfeOrganizationTest.name), + 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.*/ tfeWorkspaceTest.overrideLogicalId("test"); - const tfeWorkspaceVariableSetTest = - new tfe.workspaceVariableSet.WorkspaceVariableSet(this, "test_3", { - variableSetId: cdktf.Token.asString(tfeVariableSetTest.id), - workspaceId: cdktf.Token.asString(tfeWorkspaceTest.id), - }); + const tfeWorkspaceVariableSetTest = new WorkspaceVariableSet( + this, + "test_3", + { + variableSetId: Token.asString(tfeVariableSetTest.id), + workspaceId: 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"); } @@ -78,4 +83,4 @@ Workspace Variable Sets can be imported; use `// \ No newline at end of file + \ No newline at end of file From 21d9fc60be25cd0d51253427a25d74a2aefde5fa Mon Sep 17 00:00:00 2001 From: team-tf-cdk Date: Mon, 16 Oct 2023 00:15:35 +0000 Subject: [PATCH 6/7] cdktf: update r/saml_settings.html.markdown,r/run_trigger.html.markdown,r/registry_module.html.markdown,r/project_variable_set.html.markdown,r/project_policy_set.html.markdown,r/project.html.markdown,r/policy_set_parameter.html.markdown,r/policy_set.html.markdown,r/policy.html.markdown,r/organization_token.html.markdown --- .../python/r/organization_token.html.markdown | 48 ++-- .../docs/cdktf/python/r/policy.html.markdown | 32 ++- .../cdktf/python/r/policy_set.html.markdown | 113 +++++--- .../r/policy_set_parameter.html.markdown | 28 +- .../docs/cdktf/python/r/project.html.markdown | 22 +- .../python/r/project_policy_set.html.markdown | 34 ++- .../r/project_variable_set.html.markdown | 35 +-- .../python/r/registry_module.html.markdown | 121 +++++---- .../cdktf/python/r/run_trigger.html.markdown | 33 ++- .../python/r/saml_settings.html.markdown | 35 ++- .../r/organization_token.html.markdown | 51 ++-- .../cdktf/typescript/r/policy.html.markdown | 40 +-- .../typescript/r/policy_set.html.markdown | 112 +++++--- .../r/policy_set_parameter.html.markdown | 48 ++-- .../cdktf/typescript/r/project.html.markdown | 36 +-- .../r/project_policy_set.html.markdown | 54 ++-- .../r/project_variable_set.html.markdown | 51 ++-- .../r/registry_module.html.markdown | 243 ++++++++---------- .../typescript/r/run_trigger.html.markdown | 63 ++--- .../typescript/r/saml_settings.html.markdown | 34 ++- 20 files changed, 697 insertions(+), 536 deletions(-) diff --git a/website/docs/cdktf/python/r/organization_token.html.markdown b/website/docs/cdktf/python/r/organization_token.html.markdown index 66f833f7b..bed2c0235 100644 --- a/website/docs/cdktf/python/r/organization_token.html.markdown +++ b/website/docs/cdktf/python/r/organization_token.html.markdown @@ -17,15 +17,18 @@ can be used to act as the organization service account. Basic usage: ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.organization_token import OrganizationToken +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - tfe.organization_token.OrganizationToken(self, "test", + OrganizationToken(self, "test", organization="my-org-name" ) ``` @@ -46,15 +49,28 @@ never expire. When a token has an expiry: -```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 -} +```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) + ) ``` ## Attributes Reference @@ -71,4 +87,4 @@ For example: terraform import tfe_organization_token.test my-org-name ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/policy.html.markdown b/website/docs/cdktf/python/r/policy.html.markdown index 5da71d87c..793b3429b 100644 --- a/website/docs/cdktf/python/r/policy.html.markdown +++ b/website/docs/cdktf/python/r/policy.html.markdown @@ -21,15 +21,18 @@ enforced during runs. Basic usage for Sentinel: ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.policy import Policy +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - tfe.policy.Policy(self, "test", + Policy(self, "test", description="This policy always passes", enforce_mode="hard-mandatory", kind="sentinel", @@ -42,15 +45,18 @@ class MyConvertedCode(cdktf.TerraformStack): Basic usage for Open Policy Agent(OPA): ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.policy import Policy +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - tfe.policy.Policy(self, "test", + Policy(self, "test", description="This policy always passes", enforce_mode="mandatory", kind="opa", @@ -91,4 +97,4 @@ import ID. For example: terraform import tfe_policy.test my-org-name/pol-wAs3zYmWAhYK7peR ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/policy_set.html.markdown b/website/docs/cdktf/python/r/policy_set.html.markdown index 421c6b526..afa0bedd6 100644 --- a/website/docs/cdktf/python/r/policy_set.html.markdown +++ b/website/docs/cdktf/python/r/policy_set.html.markdown @@ -21,54 +21,85 @@ for workspaces that the policy set is attached to. Basic usage (VCS-based policy set): -```hcl -resource "tfe_policy_set" "test" { - name = "my-policy-set" - description = "A brand new policy set" - organization = "my-org-name" - kind = "sentinel" - policies_path = "policies/my-policy-set" - workspace_ids = [tfe_workspace.test.id] - - vcs_repo { - identifier = "my-org-name/my-policy-set-repository" - branch = "main" - ingress_submodules = false - oauth_token_id = tfe_oauth_client.test.oauth_token_id - } -} +```python +# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug +from constructs import Construct +from cdktf import Token, TerraformStack +# +# Provider bindings are generated by running `cdktf get`. +# See https://cdk.tf/provider-generation for more details. +# +from imports.tfe.policy_set import PolicySet +class MyConvertedCode(TerraformStack): + def __init__(self, scope, name): + super().__init__(scope, name) + PolicySet(self, "test", + description="A brand new policy set", + kind="sentinel", + name="my-policy-set", + organization="my-org-name", + policies_path="policies/my-policy-set", + vcs_repo=PolicySetVcsRepo( + branch="main", + identifier="my-org-name/my-policy-set-repository", + ingress_submodules=False, + oauth_token_id=Token.as_string(tfe_oauth_client_test.oauth_token_id) + ), + workspace_ids=[Token.as_string(tfe_workspace_test.id)] + ) ``` Using manually-specified policies: -```hcl -resource "tfe_policy_set" "test" { - name = "my-policy-set" - description = "A brand new policy set" - organization = "my-org-name" - kind = "sentinel" - policy_ids = [tfe_sentinel_policy.test.id] - workspace_ids = [tfe_workspace.test.id] -} +```python +# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug +from constructs import Construct +from cdktf import Token, TerraformStack +# +# Provider bindings are generated by running `cdktf get`. +# See https://cdk.tf/provider-generation for more details. +# +from imports.tfe.policy_set import PolicySet +class MyConvertedCode(TerraformStack): + def __init__(self, scope, name): + super().__init__(scope, name) + PolicySet(self, "test", + description="A brand new policy set", + kind="sentinel", + name="my-policy-set", + organization="my-org-name", + policy_ids=[Token.as_string(tfe_sentinel_policy_test.id)], + workspace_ids=[Token.as_string(tfe_workspace_test.id)] + ) ``` Manually uploaded policy set, in lieu of VCS: -```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 -} +```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") ``` ## Argument Reference @@ -128,4 +159,4 @@ Policy sets can be imported; use `` as the import ID. For example terraform import tfe_policy_set.test polset-wAs3zYmWAhYK7peR ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/policy_set_parameter.html.markdown b/website/docs/cdktf/python/r/policy_set_parameter.html.markdown index 9758004e6..002101944 100644 --- a/website/docs/cdktf/python/r/policy_set_parameter.html.markdown +++ b/website/docs/cdktf/python/r/policy_set_parameter.html.markdown @@ -16,28 +16,32 @@ Creates, updates and destroys policy set parameters. Basic usage: ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.organization import Organization +from imports.tfe.policy_set import PolicySet +from imports.tfe.policy_set_parameter import PolicySetParameter +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - tfe_organization_test = tfe.organization.Organization(self, "test", + test = Organization(self, "test", email="admin@company.com", name="my-org-name" ) - tfe_policy_set_test = tfe.policy_set.PolicySet(self, "test_1", + tfe_policy_set_test = PolicySet(self, "test_1", name="my-policy-set-name", - organization=cdktf.Token.as_string(tfe_organization_test.id) + 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 = - tfe.policy_set_parameter.PolicySetParameter(self, "test_2", + tfe_policy_set_parameter_test = PolicySetParameter(self, "test_2", key="my_key_name", - policy_set_id=cdktf.Token.as_string(tfe_policy_set_test.id), + policy_set_id=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. @@ -69,4 +73,4 @@ terraform import tfe_policy_set_parameter.test polset-wAs3zYmWAhYK7peR/var-5rTwn ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/project.html.markdown b/website/docs/cdktf/python/r/project.html.markdown index 0763e2626..abdf640b8 100644 --- a/website/docs/cdktf/python/r/project.html.markdown +++ b/website/docs/cdktf/python/r/project.html.markdown @@ -16,21 +16,25 @@ Provides a project resource. Basic usage: ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.organization import Organization +from imports.tfe.project import Project +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - tfe_organization_test_organization = tfe.organization.Organization(self, "test-organization", + test_organization = Organization(self, "test-organization", email="admin@company.com", name="my-org-name" ) - tfe.project.Project(self, "test", + Project(self, "test", name="projectname", - organization=cdktf.Token.as_string(tfe_organization_test_organization.name) + organization=test_organization.name ) ``` @@ -55,4 +59,4 @@ Projects can be imported; use `` as the import ID. For example: terraform import tfe_project.test prj-niVoeESBXT8ZREhr ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/project_policy_set.html.markdown b/website/docs/cdktf/python/r/project_policy_set.html.markdown index f3a5cd235..a2687c8f0 100644 --- a/website/docs/cdktf/python/r/project_policy_set.html.markdown +++ b/website/docs/cdktf/python/r/project_policy_set.html.markdown @@ -16,34 +16,40 @@ Adds and removes policy sets from a project Basic usage: ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +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): def __init__(self, scope, name): super().__init__(scope, name) - tfe_organization_test = tfe.organization.Organization(self, "test", + test = Organization(self, "test", email="admin@company.com", name="my-org-name" ) - tfe_policy_set_test = tfe.policy_set.PolicySet(self, "test_1", + tfe_policy_set_test = PolicySet(self, "test_1", description="Some description.", name="my-policy-set", - organization=cdktf.Token.as_string(tfe_organization_test.name) + 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 = tfe.project.Project(self, "test_2", + tfe_project_test = Project(self, "test_2", name="my-project-name", - organization=cdktf.Token.as_string(tfe_organization_test.name) + 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 = 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) + 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) ) # 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") @@ -68,4 +74,4 @@ Project Policy Sets can be imported; use `// \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/project_variable_set.html.markdown b/website/docs/cdktf/python/r/project_variable_set.html.markdown index da5561bc7..066c7d5e0 100644 --- a/website/docs/cdktf/python/r/project_variable_set.html.markdown +++ b/website/docs/cdktf/python/r/project_variable_set.html.markdown @@ -16,35 +16,40 @@ Adds and removes variable sets from a project Basic usage: ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +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): def __init__(self, scope, name): super().__init__(scope, name) - tfe_organization_test = tfe.organization.Organization(self, "test", + test = Organization(self, "test", email="admin@company.com", name="my-org-name" ) - tfe_project_test = tfe.project.Project(self, "test_1", + tfe_project_test = Project(self, "test_1", name="my-project-name", - organization=cdktf.Token.as_string(tfe_organization_test.name) + 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 = tfe.variable_set.VariableSet(self, "test_2", + tfe_variable_set_test = VariableSet(self, "test_2", description="Some description.", name="Test Varset", - organization=cdktf.Token.as_string(tfe_organization_test.name) + 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 = - 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) + 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) ) # 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") @@ -69,4 +74,4 @@ Project Variable Sets can be imported; use `// \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/registry_module.html.markdown b/website/docs/cdktf/python/r/registry_module.html.markdown index d73e2216d..11c5bef3b 100644 --- a/website/docs/cdktf/python/r/registry_module.html.markdown +++ b/website/docs/cdktf/python/r/registry_module.html.markdown @@ -16,30 +16,35 @@ Terraform Cloud's private module registry helps you share Terraform modules acro Basic usage with VCS: ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.oauth_client import OauthClient +from imports.tfe.organization import Organization +from imports.tfe.registry_module import RegistryModule +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - tfe_organization_test_organization = tfe.organization.Organization(self, "test-organization", + test_organization = Organization(self, "test-organization", email="admin@company.com", name="my-org-name" ) - tfe_oauth_client_test_oauth_client = tfe.oauth_client.OauthClient(self, "test-oauth-client", + test_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=cdktf.Token.as_string(tfe_organization_test_organization.name), + organization=test_organization.name, service_provider="github" ) - tfe.registry_module.RegistryModule(self, "test-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=cdktf.Token.as_string(tfe_oauth_client_test_oauth_client.oauth_token_id) + oauth_token_id=test_oauth_client.oauth_token_id ) ) ``` @@ -47,27 +52,31 @@ class MyConvertedCode(cdktf.TerraformStack): Create private registry module with GitHub App: ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +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): def __init__(self, scope, name): super().__init__(scope, name) - tfe_organization_test_organization = tfe.organization.Organization(self, "test-organization", + test_organization = Organization(self, "test-organization", email="admin@company.com", name="my-org-name" ) - data_tfe_github_app_installation_gha_installation = - tfe.data_tfe_github_app_installation.DataTfeGithubAppInstallation(self, "gha_installation", + gha_installation = DataTfeGithubAppInstallation(self, "gha_installation", name="YOUR_GH_NAME" ) - tfe.registry_module.RegistryModule(self, "petstore", - organization=cdktf.Token.as_string(tfe_organization_test_organization.name), + RegistryModule(self, "petstore", + organization=test_organization.name, vcs_repo=RegistryModuleVcsRepo( display_identifier="GH_NAME/REPO_NAME", - github_app_installation_id=cdktf.Token.as_string(data_tfe_github_app_installation_gha_installation.id), + github_app_installation_id=Token.as_string(gha_installation.id), identifier="GH_NAME/REPO_NAME" ) ) @@ -76,22 +85,26 @@ class MyConvertedCode(cdktf.TerraformStack): Create private registry module without VCS: ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.organization import Organization +from imports.tfe.registry_module import RegistryModule +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - tfe_organization_test_organization = tfe.organization.Organization(self, "test-organization", + test_organization = Organization(self, "test-organization", email="admin@company.com", name="my-org-name" ) - tfe.registry_module.RegistryModule(self, "test-private-registry-module", + RegistryModule(self, "test-private-registry-module", module_provider="my_provider", name="another_test_module", - organization=cdktf.Token.as_string(tfe_organization_test_organization.name), + organization=test_organization.name, registry_name="private" ) ``` @@ -99,23 +112,27 @@ class MyConvertedCode(cdktf.TerraformStack): Create public registry module: ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.organization import Organization +from imports.tfe.registry_module import RegistryModule +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - tfe_organization_test_organization = tfe.organization.Organization(self, "test-organization", + test_organization = Organization(self, "test-organization", email="admin@company.com", name="my-org-name" ) - tfe.registry_module.RegistryModule(self, "test-public-registry-module", + RegistryModule(self, "test-public-registry-module", module_provider="aws", name="vpc", namespace="terraform-aws-modules", - organization=cdktf.Token.as_string(tfe_organization_test_organization.name), + organization=test_organization.name, registry_name="public" ) ``` @@ -123,29 +140,33 @@ class MyConvertedCode(cdktf.TerraformStack): Create no-code provisioning registry module: ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.no_code_module import NoCodeModule +from imports.tfe.organization import Organization +from imports.tfe.registry_module import RegistryModule +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - tfe_organization_test_organization = tfe.organization.Organization(self, "test-organization", + test_organization = Organization(self, "test-organization", email="admin@company.com", name="my-org-name" ) - tfe_registry_module_test_no_code_provisioning_registry_module = - tfe.registry_module.RegistryModule(self, "test-no-code-provisioning-registry-module", + test_no_code_provisioning_registry_module = RegistryModule(self, "test-no-code-provisioning-registry-module", module_provider="aws", name="vpc", namespace="terraform-aws-modules", - organization=cdktf.Token.as_string(tfe_organization_test_organization.name), + organization=test_organization.name, registry_name="public" ) - 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) + NoCodeModule(self, "foobar", + organization=test_organization.id, + registry_module=test_no_code_provisioning_registry_module.id ) ``` @@ -197,4 +218,4 @@ terraform import tfe_registry_module.test my-org-name/public/namespace/name/prov terraform import tfe_registry_module.test my-org-name/name/provider/mod-qV9JnKRkmtMa4zcA ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/run_trigger.html.markdown b/website/docs/cdktf/python/r/run_trigger.html.markdown index f4dd3b56c..e49570aed 100644 --- a/website/docs/cdktf/python/r/run_trigger.html.markdown +++ b/website/docs/cdktf/python/r/run_trigger.html.markdown @@ -19,29 +19,34 @@ to up to 20 source workspaces. Basic usage: ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.organization import Organization +from imports.tfe.run_trigger import RunTrigger +from imports.tfe.workspace import Workspace +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - tfe_organization_test_organization = tfe.organization.Organization(self, "test-organization", + test_organization = Organization(self, "test-organization", email="admin@company.com", name="my-org-name" ) - tfe_workspace_test_sourceable = tfe.workspace.Workspace(self, "test-sourceable", + test_sourceable = Workspace(self, "test-sourceable", name="my-sourceable-workspace-name", - organization=cdktf.Token.as_string(tfe_organization_test_organization.id) + organization=test_organization.id ) - tfe_workspace_test_workspace = tfe.workspace.Workspace(self, "test-workspace", + test_workspace = Workspace(self, "test-workspace", name="my-workspace-name", - organization=cdktf.Token.as_string(tfe_organization_test_organization.id) + organization=test_organization.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) + RunTrigger(self, "test", + sourceable_id=test_sourceable.id, + workspace_id=test_workspace.id ) ``` @@ -65,4 +70,4 @@ Run triggers can be imported; use `` as the import ID. For examp terraform import tfe_run_trigger.test rt-qV9JnKRkmtMa4zcA ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/saml_settings.html.markdown b/website/docs/cdktf/python/r/saml_settings.html.markdown index 0fa49386c..e955b370a 100644 --- a/website/docs/cdktf/python/r/saml_settings.html.markdown +++ b/website/docs/cdktf/python/r/saml_settings.html.markdown @@ -15,17 +15,28 @@ Use this resource to create, update and destroy SAML Settings. It applies only t Basic usage for SAML Settings: -```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" - } +```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" + ) ``` ## Argument Reference @@ -64,4 +75,4 @@ SAML Settings can be imported. terraform import tfe_saml_settings.this saml ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/organization_token.html.markdown b/website/docs/cdktf/typescript/r/organization_token.html.markdown index 13d4d4730..d37a973cf 100644 --- a/website/docs/cdktf/typescript/r/organization_token.html.markdown +++ b/website/docs/cdktf/typescript/r/organization_token.html.markdown @@ -17,15 +17,18 @@ can be used to act as the organization service account. Basic usage: ```typescript -import * as constructs from "constructs"; -import * as cdktf from "cdktf"; -/*Provider bindings are generated by running cdktf get. -See https://cdk.tf/provider-generation for more details.*/ -import * as tfe from "./.gen/providers/tfe"; -class MyConvertedCode extends cdktf.TerraformStack { - constructor(scope: constructs.Construct, name: string) { +// 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) { super(scope, name); - new tfe.organizationToken.OrganizationToken(this, "test", { + new OrganizationToken(this, "test", { organization: "my-org-name", }); } @@ -49,15 +52,31 @@ never expire. When a token has an expiry: -```hcl -resource "time_rotating" "example" { - rotation_days = 30 +```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), + }); + } } -resource "tfe_organization_token" "test" { - organization = data.tfe_organization.org.name - expired_at = time_rotating.example.rotation_rfc3339 -} ``` ## Attributes Reference @@ -74,4 +93,4 @@ For example: terraform import tfe_organization_token.test my-org-name ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/policy.html.markdown b/website/docs/cdktf/typescript/r/policy.html.markdown index d99b59da7..e5f2e8540 100644 --- a/website/docs/cdktf/typescript/r/policy.html.markdown +++ b/website/docs/cdktf/typescript/r/policy.html.markdown @@ -21,15 +21,18 @@ enforced during runs. Basic usage for Sentinel: ```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) { +// 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) { super(scope, name); - new tfe.policy.Policy(this, "test", { + new Policy(this, "test", { description: "This policy always passes", enforceMode: "hard-mandatory", kind: "sentinel", @@ -45,15 +48,18 @@ class MyConvertedCode extends cdktf.TerraformStack { Basic usage for Open Policy Agent(OPA): ```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) { +// 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) { super(scope, name); - new tfe.policy.Policy(this, "test", { + new Policy(this, "test", { description: "This policy always passes", enforceMode: "mandatory", kind: "opa", @@ -97,4 +103,4 @@ import ID. For example: terraform import tfe_policy.test my-org-name/pol-wAs3zYmWAhYK7peR ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/policy_set.html.markdown b/website/docs/cdktf/typescript/r/policy_set.html.markdown index 8d382fa79..0d970bf07 100644 --- a/website/docs/cdktf/typescript/r/policy_set.html.markdown +++ b/website/docs/cdktf/typescript/r/policy_set.html.markdown @@ -21,54 +21,94 @@ for workspaces that the policy set is attached to. Basic usage (VCS-based policy set): -```hcl -resource "tfe_policy_set" "test" { - name = "my-policy-set" - description = "A brand new policy set" - organization = "my-org-name" - kind = "sentinel" - policies_path = "policies/my-policy-set" - workspace_ids = [tfe_workspace.test.id] - - vcs_repo { - identifier = "my-org-name/my-policy-set-repository" - branch = "main" - ingress_submodules = false - oauth_token_id = tfe_oauth_client.test.oauth_token_id +```typescript +// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug +import { Construct } from "constructs"; +import { Token, TerraformStack } from "cdktf"; +/* + * Provider bindings are generated by running `cdktf get`. + * See https://cdk.tf/provider-generation for more details. + */ +import { PolicySet } from "./.gen/providers/tfe/policy-set"; +class MyConvertedCode extends TerraformStack { + constructor(scope: Construct, name: string) { + super(scope, name); + new PolicySet(this, "test", { + description: "A brand new policy set", + kind: "sentinel", + name: "my-policy-set", + organization: "my-org-name", + policiesPath: "policies/my-policy-set", + vcsRepo: { + branch: "main", + identifier: "my-org-name/my-policy-set-repository", + ingressSubmodules: false, + oauthTokenId: Token.asString(tfeOauthClientTest.oauthTokenId), + }, + workspaceIds: [Token.asString(tfeWorkspaceTest.id)], + }); } } + ``` Using manually-specified policies: -```hcl -resource "tfe_policy_set" "test" { - name = "my-policy-set" - description = "A brand new policy set" - organization = "my-org-name" - kind = "sentinel" - policy_ids = [tfe_sentinel_policy.test.id] - workspace_ids = [tfe_workspace.test.id] +```typescript +// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug +import { Construct } from "constructs"; +import { Token, TerraformStack } from "cdktf"; +/* + * Provider bindings are generated by running `cdktf get`. + * See https://cdk.tf/provider-generation for more details. + */ +import { PolicySet } from "./.gen/providers/tfe/policy-set"; +class MyConvertedCode extends TerraformStack { + constructor(scope: Construct, name: string) { + super(scope, name); + new PolicySet(this, "test", { + description: "A brand new policy set", + kind: "sentinel", + name: "my-policy-set", + organization: "my-org-name", + policyIds: [Token.asString(tfeSentinelPolicyTest.id)], + workspaceIds: [Token.asString(tfeWorkspaceTest.id)], + }); + } } + ``` Manually uploaded policy set, in lieu of VCS: -```hcl -data "tfe_slug" "test" { - // point to the local directory where the policies are located. - source_path = "policies/my-policy-set" +```typescript +// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug +import { Construct } from "constructs"; +import { Token, TerraformStack } from "cdktf"; +/* + * Provider bindings are generated by running `cdktf get`. + * See https://cdk.tf/provider-generation for more details. + */ +import { 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"); + } } -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 @@ -128,4 +168,4 @@ Policy sets can be imported; use `` as the import ID. For example terraform import tfe_policy_set.test polset-wAs3zYmWAhYK7peR ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/policy_set_parameter.html.markdown b/website/docs/cdktf/typescript/r/policy_set_parameter.html.markdown index f7d672c9d..c1cd54e3d 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 -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) { +// 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) { super(scope, name); - 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", { + const test = new Organization(this, "test", { + email: "admin@company.com", + name: "my-org-name", + }); + const tfePolicySetTest = new PolicySet(this, "test_1", { name: "my-policy-set-name", - organization: cdktf.Token.asString(tfeOrganizationTest.id), + 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.*/ tfePolicySetTest.overrideLogicalId("test"); - const tfePolicySetParameterTest = - new tfe.policySetParameter.PolicySetParameter(this, "test_2", { - key: "my_key_name", - policySetId: cdktf.Token.asString(tfePolicySetTest.id), - value: "my_value_name", - }); + const tfePolicySetParameterTest = new PolicySetParameter(this, "test_2", { + key: "my_key_name", + policySetId: Token.asString(tfePolicySetTest.id), + value: "my_value_name", + }); /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ tfePolicySetParameterTest.overrideLogicalId("test"); } @@ -76,4 +76,4 @@ terraform import tfe_policy_set_parameter.test polset-wAs3zYmWAhYK7peR/var-5rTwn ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/project.html.markdown b/website/docs/cdktf/typescript/r/project.html.markdown index 06087bc21..eaee9c086 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 -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) { +// 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) { super(scope, name); - const tfeOrganizationTestOrganization = new tfe.organization.Organization( - this, - "test-organization", - { - email: "admin@company.com", - name: "my-org-name", - } - ); - new tfe.project.Project(this, "test", { + const testOrganization = new Organization(this, "test-organization", { + email: "admin@company.com", + name: "my-org-name", + }); + new Project(this, "test", { name: "projectname", - organization: cdktf.Token.asString(tfeOrganizationTestOrganization.name), + organization: testOrganization.name, }); } } @@ -62,4 +62,4 @@ Projects can be imported; use `` as the import ID. For example: terraform import tfe_project.test prj-niVoeESBXT8ZREhr ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/project_policy_set.html.markdown b/website/docs/cdktf/typescript/r/project_policy_set.html.markdown index 86709c22d..90a574997 100644 --- a/website/docs/cdktf/typescript/r/project_policy_set.html.markdown +++ b/website/docs/cdktf/typescript/r/project_policy_set.html.markdown @@ -16,43 +16,41 @@ Adds and removes policy sets from a project Basic usage: ```typescript -import * as constructs from "constructs"; -import * as cdktf from "cdktf"; -/*Provider bindings are generated by running cdktf get. -See https://cdk.tf/provider-generation for more details.*/ -import * as tfe from "./.gen/providers/tfe"; -class MyConvertedCode extends cdktf.TerraformStack { - constructor(scope: constructs.Construct, name: string) { +// 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) { super(scope, name); - 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", { + const test = new Organization(this, "test", { + email: "admin@company.com", + name: "my-org-name", + }); + const tfePolicySetTest = new PolicySet(this, "test_1", { description: "Some description.", name: "my-policy-set", - organization: cdktf.Token.asString(tfeOrganizationTest.name), + 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.*/ tfePolicySetTest.overrideLogicalId("test"); - const tfeProjectTest = new tfe.project.Project(this, "test_2", { + const tfeProjectTest = new Project(this, "test_2", { name: "my-project-name", - organization: cdktf.Token.asString(tfeOrganizationTest.name), + 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.*/ tfeProjectTest.overrideLogicalId("test"); - const tfeProjectPolicySetTest = new tfe.projectPolicySet.ProjectPolicySet( - this, - "test_3", - { - policySetId: cdktf.Token.asString(tfePolicySetTest.id), - projectId: cdktf.Token.asString(tfeProjectTest.id), - } - ); + const tfeProjectPolicySetTest = new ProjectPolicySet(this, "test_3", { + policySetId: Token.asString(tfePolicySetTest.id), + projectId: Token.asString(tfeProjectTest.id), + }); /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ tfeProjectPolicySetTest.overrideLogicalId("test"); } @@ -79,4 +77,4 @@ Project Policy Sets can be imported; use `// \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/project_variable_set.html.markdown b/website/docs/cdktf/typescript/r/project_variable_set.html.markdown index 62fa66b9d..a973a2f2d 100644 --- a/website/docs/cdktf/typescript/r/project_variable_set.html.markdown +++ b/website/docs/cdktf/typescript/r/project_variable_set.html.markdown @@ -16,40 +16,41 @@ Adds and removes variable sets from a project Basic usage: ```typescript -import * as constructs from "constructs"; -import * as cdktf from "cdktf"; -/*Provider bindings are generated by running cdktf get. -See https://cdk.tf/provider-generation for more details.*/ -import * as tfe from "./.gen/providers/tfe"; -class MyConvertedCode extends cdktf.TerraformStack { - constructor(scope: constructs.Construct, name: string) { +// 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) { super(scope, name); - const tfeOrganizationTest = new tfe.organization.Organization( - this, - "test", - { - email: "admin@company.com", - name: "my-org-name", - } - ); - const tfeProjectTest = new tfe.project.Project(this, "test_1", { + const test = new Organization(this, "test", { + email: "admin@company.com", + name: "my-org-name", + }); + const tfeProjectTest = new Project(this, "test_1", { name: "my-project-name", - organization: cdktf.Token.asString(tfeOrganizationTest.name), + 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.*/ tfeProjectTest.overrideLogicalId("test"); - const tfeVariableSetTest = new tfe.variableSet.VariableSet(this, "test_2", { + const tfeVariableSetTest = new VariableSet(this, "test_2", { description: "Some description.", name: "Test Varset", - organization: cdktf.Token.asString(tfeOrganizationTest.name), + 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.*/ tfeVariableSetTest.overrideLogicalId("test"); - const tfeProjectVariableSetTest = - new tfe.projectVariableSet.ProjectVariableSet(this, "test_3", { - projectId: cdktf.Token.asString(tfeProjectTest.id), - variableSetId: cdktf.Token.asString(tfeVariableSetTest.id), - }); + const tfeProjectVariableSetTest = new ProjectVariableSet(this, "test_3", { + projectId: Token.asString(tfeProjectTest.id), + variableSetId: 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"); } @@ -76,4 +77,4 @@ Project Variable Sets can be imported; use `// \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/registry_module.html.markdown b/website/docs/cdktf/typescript/r/registry_module.html.markdown index 4e29b136c..d318812d2 100644 --- a/website/docs/cdktf/typescript/r/registry_module.html.markdown +++ b/website/docs/cdktf/typescript/r/registry_module.html.markdown @@ -16,42 +16,35 @@ Terraform Cloud's private module registry helps you share Terraform modules acro Basic usage with VCS: ```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) { +// 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) { super(scope, name); - 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", { + 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", { vcsRepo: { displayIdentifier: "my-org-name/terraform-provider-name", identifier: "my-org-name/terraform-provider-name", - oauthTokenId: cdktf.Token.asString( - tfeOauthClientTestOauthClient.oauthTokenId - ), + oauthTokenId: testOauthClient.oauthTokenId, }, }); } @@ -62,37 +55,35 @@ class MyConvertedCode extends cdktf.TerraformStack { Create private registry module with GitHub App: ```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) { +// 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) { super(scope, name); - const tfeOrganizationTestOrganization = new tfe.organization.Organization( + const testOrganization = new Organization(this, "test-organization", { + email: "admin@company.com", + name: "my-org-name", + }); + const ghaInstallation = new DataTfeGithubAppInstallation( this, - "test-organization", + "gha_installation", { - email: "admin@company.com", - name: "my-org-name", + name: "YOUR_GH_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), + new RegistryModule(this, "petstore", { + organization: testOrganization.name, vcsRepo: { displayIdentifier: "GH_NAME/REPO_NAME", - githubAppInstallationId: cdktf.Token.asString( - dataTfeGithubAppInstallationGhaInstallation.id - ), + githubAppInstallationId: Token.asString(ghaInstallation.id), identifier: "GH_NAME/REPO_NAME", }, }); @@ -104,34 +95,28 @@ class MyConvertedCode extends cdktf.TerraformStack { Create private registry module without VCS: ```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) { +// 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) { super(scope, name); - 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", - } - ); + 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", + }); } } @@ -140,27 +125,27 @@ class MyConvertedCode extends cdktf.TerraformStack { Create public registry module: ```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) { +// 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) { super(scope, name); - 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", { + const testOrganization = new Organization(this, "test-organization", { + email: "admin@company.com", + name: "my-org-name", + }); + new RegistryModule(this, "test-public-registry-module", { moduleProvider: "aws", name: "vpc", namespace: "terraform-aws-modules", - organization: cdktf.Token.asString(tfeOrganizationTestOrganization.name), + organization: testOrganization.name, registryName: "public", }); } @@ -171,41 +156,37 @@ class MyConvertedCode extends cdktf.TerraformStack { Create no-code provisioning registry module: ```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) { +// 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) { super(scope, name); - const tfeOrganizationTestOrganization = new tfe.organization.Organization( + const testOrganization = new Organization(this, "test-organization", { + email: "admin@company.com", + name: "my-org-name", + }); + const testNoCodeProvisioningRegistryModule = new RegistryModule( this, - "test-organization", + "test-no-code-provisioning-registry-module", { - email: "admin@company.com", - name: "my-org-name", + moduleProvider: "aws", + name: "vpc", + namespace: "terraform-aws-modules", + organization: testOrganization.name, + registryName: "public", } ); - 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 - ), + new NoCodeModule(this, "foobar", { + organization: testOrganization.id, + registryModule: testNoCodeProvisioningRegistryModule.id, }); } } @@ -260,4 +241,4 @@ terraform import tfe_registry_module.test my-org-name/public/namespace/name/prov terraform import tfe_registry_module.test my-org-name/name/provider/mod-qV9JnKRkmtMa4zcA ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/run_trigger.html.markdown b/website/docs/cdktf/typescript/r/run_trigger.html.markdown index dcfe00943..89588e323 100644 --- a/website/docs/cdktf/typescript/r/run_trigger.html.markdown +++ b/website/docs/cdktf/typescript/r/run_trigger.html.markdown @@ -19,41 +19,34 @@ to up to 20 source workspaces. Basic usage: ```typescript -import * as constructs from "constructs"; -import * as cdktf from "cdktf"; -/*Provider bindings are generated by running cdktf get. -See https://cdk.tf/provider-generation for more details.*/ -import * as tfe from "./.gen/providers/tfe"; -class MyConvertedCode extends cdktf.TerraformStack { - constructor(scope: constructs.Construct, name: string) { +// 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) { super(scope, name); - 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), + 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, }); } } @@ -80,4 +73,4 @@ Run triggers can be imported; use `` as the import ID. For examp terraform import tfe_run_trigger.test rt-qV9JnKRkmtMa4zcA ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/saml_settings.html.markdown b/website/docs/cdktf/typescript/r/saml_settings.html.markdown index 430a810e7..d73db9393 100644 --- a/website/docs/cdktf/typescript/r/saml_settings.html.markdown +++ b/website/docs/cdktf/typescript/r/saml_settings.html.markdown @@ -15,17 +15,31 @@ Use this resource to create, update and destroy SAML Settings. It applies only t Basic usage for SAML Settings: -```hcl -provider "tfe" { - hostname = var.hostname - token = var.admin_token +```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", + }); + } } -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 @@ -64,4 +78,4 @@ SAML Settings can be imported. terraform import tfe_saml_settings.this saml ``` - \ No newline at end of file + \ No newline at end of file From 1788df1948e74bd97f8b0ed64acfa3dbe92c0335 Mon Sep 17 00:00:00 2001 From: team-tf-cdk Date: Mon, 16 Oct 2023 00:16:09 +0000 Subject: [PATCH 7/7] cdktf: update r/organization_run_task.html.markdown,r/organization_module_sharing.html.markdown,r/organization_membership.html.markdown,r/organization.html.markdown,r/oauth_client.html.markdown,r/notification_configuration.html.markdown,r/no_code_module.html.markdown,r/agent_token.html.markdown,r/agent_pool_allowed_workspaces.html.markdown,r/agent_pool.html.markdown --- .../cdktf/python/r/agent_pool.html.markdown | 22 +- ...gent_pool_allowed_workspaces.html.markdown | 57 +++-- .../cdktf/python/r/agent_token.html.markdown | 27 ++- .../python/r/no_code_module.html.markdown | 56 +++-- .../notification_configuration.html.markdown | 96 ++++---- .../cdktf/python/r/oauth_client.html.markdown | 47 ++-- .../cdktf/python/r/organization.html.markdown | 17 +- .../r/organization_membership.html.markdown | 17 +- .../organization_module_sharing.html.markdown | 17 +- .../r/organization_run_task.html.markdown | 17 +- .../typescript/r/agent_pool.html.markdown | 36 +-- ...gent_pool_allowed_workspaces.html.markdown | 56 +++-- .../typescript/r/agent_token.html.markdown | 49 ++--- .../typescript/r/no_code_module.html.markdown | 140 ++++++------ .../notification_configuration.html.markdown | 208 +++++++++--------- .../typescript/r/oauth_client.html.markdown | 59 ++--- .../typescript/r/organization.html.markdown | 21 +- .../r/organization_membership.html.markdown | 21 +- .../organization_module_sharing.html.markdown | 21 +- .../r/organization_run_task.html.markdown | 21 +- 20 files changed, 543 insertions(+), 462 deletions(-) diff --git a/website/docs/cdktf/python/r/agent_pool.html.markdown b/website/docs/cdktf/python/r/agent_pool.html.markdown index ced066093..f7947edeb 100644 --- a/website/docs/cdktf/python/r/agent_pool.html.markdown +++ b/website/docs/cdktf/python/r/agent_pool.html.markdown @@ -18,21 +18,25 @@ pools to run remote operations with isolated, private, or on-premises infrastruc Basic usage: ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.agent_pool import AgentPool +from imports.tfe.organization import Organization +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - tfe_organization_test_organization = tfe.organization.Organization(self, "test-organization", + test_organization = Organization(self, "test-organization", email="admin@company.com", name="my-org-name" ) - tfe.agent_pool.AgentPool(self, "test-agent-pool", + AgentPool(self, "test-agent-pool", name="my-agent-pool-name", - organization=cdktf.Token.as_string(tfe_organization_test_organization.name), + organization=test_organization.name, organization_scoped=True ) ``` @@ -63,4 +67,4 @@ terraform import tfe_agent_pool.test apool-rW0KoLSlnuNb5adB terraform import tfe_workspace.test my-org-name/my-agent-pool-name ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/agent_pool_allowed_workspaces.html.markdown b/website/docs/cdktf/python/r/agent_pool_allowed_workspaces.html.markdown index 938bc6991..9e24ffa93 100644 --- a/website/docs/cdktf/python/r/agent_pool_allowed_workspaces.html.markdown +++ b/website/docs/cdktf/python/r/agent_pool_allowed_workspaces.html.markdown @@ -19,34 +19,45 @@ for Business account. Basic usage: -```hcl -resource "tfe_organization" "test-organization" { - name = "my-org-name" - email = "admin@company.com" -} - -resource "tfe_workspace" "test" { - name = "my-workspace-name" - organization = tfe_organization.test.name -} - -resource "tfe_agent_pool" "test-agent-pool" { - name = "my-agent-pool-name" - organization = tfe_organization.test-organization.name - organization_scoped = true -} - -resource "tfe_agent_pool_allowed_workspaces" "foobar" { - agent_pool_id = tfe_agent_pool.foobar.id - allowed_workspace_ids = [tfe_workspace.test.id] -} +```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.agent_pool import AgentPool +from imports.tfe.agent_pool_allowed_workspaces import AgentPoolAllowedWorkspaces +from imports.tfe.organization import Organization +from imports.tfe.workspace import Workspace +class MyConvertedCode(TerraformStack): + def __init__(self, scope, name): + super().__init__(scope, name) + test_organization = Organization(self, "test-organization", + email="admin@company.com", + name="my-org-name" + ) + test = Workspace(self, "test", + name="my-workspace-name", + organization=Token.as_string(tfe_organization_test.name) + ) + AgentPool(self, "test-agent-pool", + name="my-agent-pool-name", + organization=test_organization.name, + organization_scoped=True + ) + AgentPoolAllowedWorkspaces(self, "foobar", + agent_pool_id=Token.as_string(tfe_agent_pool_foobar.id), + allowed_workspace_ids=[test.id] + ) ``` ## Argument Reference The following arguments are supported: -* `agent_pool_id` - (Required) ID of the team. +* `agent_pool_id` - (Required) The ID of the agent pool. * `allowed_workspace_ids` - (Required) IDs of workspaces to be added as allowed workspaces on the agent pool. @@ -59,4 +70,4 @@ terraform import tfe_agent_pool_allowed_workspaces.foobar apool-rW0KoLSlnuNb5adB ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/agent_token.html.markdown b/website/docs/cdktf/python/r/agent_token.html.markdown index 7cc7972c4..357e859cc 100644 --- a/website/docs/cdktf/python/r/agent_token.html.markdown +++ b/website/docs/cdktf/python/r/agent_token.html.markdown @@ -17,24 +17,29 @@ These tokens allow agents to communicate securely with Terraform Cloud. Basic usage: ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.agent_pool import AgentPool +from imports.tfe.agent_token import AgentToken +from imports.tfe.organization import Organization +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - tfe_organization_test_organization = tfe.organization.Organization(self, "test-organization", + test_organization = Organization(self, "test-organization", email="admin@company.com", name="my-org-name" ) - tfe_agent_pool_test_agent_pool = tfe.agent_pool.AgentPool(self, "test-agent-pool", + test_agent_pool = AgentPool(self, "test-agent-pool", name="my-agent-pool-name", - organization=cdktf.Token.as_string(tfe_organization_test_organization.id) + organization=test_organization.id ) - tfe.agent_token.AgentToken(self, "test-agent-token", - agent_pool_id=cdktf.Token.as_string(tfe_agent_pool_test_agent_pool.id), + AgentToken(self, "test-agent-token", + agent_pool_id=test_agent_pool.id, description="my-agent-token-name" ) ``` @@ -52,4 +57,4 @@ The following arguments are supported: * `description` - The description of agent token. * `token` - The generated token. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/no_code_module.html.markdown b/website/docs/cdktf/python/r/no_code_module.html.markdown index 797abcd7c..678ab8cd0 100644 --- a/website/docs/cdktf/python/r/no_code_module.html.markdown +++ b/website/docs/cdktf/python/r/no_code_module.html.markdown @@ -16,28 +16,33 @@ Creates, updates and destroys no-code module for registry modules. Basic usage: ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.no_code_module import NoCodeModule +from imports.tfe.organization import Organization +from imports.tfe.registry_module import RegistryModule +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - tfe_organization_foobar = tfe.organization.Organization(self, "foobar", + foobar = Organization(self, "foobar", email="admin@company.com", name="my-org-name" ) - tfe_registry_module_foobar = tfe.registry_module.RegistryModule(self, "foobar_1", + tfe_registry_module_foobar = RegistryModule(self, "foobar_1", module_provider="my_provider", name="test_module", - organization=cdktf.Token.as_string(tfe_organization_foobar.id) + 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 = 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) + tfe_no_code_module_foobar = NoCodeModule(self, "foobar_2", + organization=foobar.id, + registry_module=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") @@ -46,28 +51,33 @@ class MyConvertedCode(cdktf.TerraformStack): Creating a no-code module with variable options: ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.no_code_module import NoCodeModule +from imports.tfe.organization import Organization +from imports.tfe.registry_module import RegistryModule +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - tfe_organization_foobar = tfe.organization.Organization(self, "foobar", + foobar = Organization(self, "foobar", email="admin@company.com", name="my-org-name" ) - tfe_registry_module_foobar = tfe.registry_module.RegistryModule(self, "foobar_1", + tfe_registry_module_foobar = RegistryModule(self, "foobar_1", module_provider="my_provider", name="test_module", - organization=cdktf.Token.as_string(tfe_organization_foobar.id) + 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 = 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), + tfe_no_code_module_foobar = NoCodeModule(self, "foobar_2", + organization=foobar.id, + registry_module=Token.as_string(tfe_registry_module_foobar.id), variable_options=[NoCodeModuleVariableOptions( name="ami", options=["ami-0", "ami-1", "ami-2"], @@ -109,4 +119,4 @@ No-code modules can be imported; use `` as the import ID. For terraform import tfe_no_code_module.test nocode-qV9JnKRkmtMa4zcA ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/notification_configuration.html.markdown b/website/docs/cdktf/python/r/notification_configuration.html.markdown index d84e282c3..39c9d68ef 100644 --- a/website/docs/cdktf/python/r/notification_configuration.html.markdown +++ b/website/docs/cdktf/python/r/notification_configuration.html.markdown @@ -19,32 +19,36 @@ Each workspace can have up to 20 notification configurations, and they apply to Basic usage: ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.notification_configuration import NotificationConfiguration +from imports.tfe.organization import Organization +from imports.tfe.workspace import Workspace +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - tfe_organization_test = tfe.organization.Organization(self, "test", + test = Organization(self, "test", email="admin@company.com", name="my-org-name" ) - tfe_workspace_test = tfe.workspace.Workspace(self, "test_1", + tfe_workspace_test = Workspace(self, "test_1", name="my-workspace-name", - organization=cdktf.Token.as_string(tfe_organization_test.id) + 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 = - tfe.notification_configuration.NotificationConfiguration(self, "test_2", + tfe_notification_configuration_test = 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=cdktf.Token.as_string(tfe_workspace_test.id) + workspace_id=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") @@ -53,41 +57,43 @@ class MyConvertedCode(cdktf.TerraformStack): With `destination_type` of `email`: ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +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): def __init__(self, scope, name): super().__init__(scope, name) - tfe_organization_test = tfe.organization.Organization(self, "test", + test = Organization(self, "test", email="admin@company.com", name="my-org-name" ) - tfe_organization_membership_test = - tfe.organization_membership.OrganizationMembership(self, "test_1", + tfe_organization_membership_test = 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 = tfe.workspace.Workspace(self, "test_2", + tfe_workspace_test = Workspace(self, "test_2", name="my-workspace-name", - organization=cdktf.Token.as_string(tfe_organization_test.id) + 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 = - tfe.notification_configuration.NotificationConfiguration(self, "test_3", + tfe_notification_configuration_test = NotificationConfiguration(self, "test_3", destination_type="email", - email_user_ids=[ - cdktf.Token.as_string(tfe_organization_membership_test.user_id) - ], + email_user_ids=[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=cdktf.Token.as_string(tfe_workspace_test.id) + workspace_id=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") @@ -96,43 +102,45 @@ class MyConvertedCode(cdktf.TerraformStack): (**TFE only**) With `destination_type` of `email`, using `email_addresses` list and `email_users`: ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +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): def __init__(self, scope, name): super().__init__(scope, name) - tfe_organization_test = tfe.organization.Organization(self, "test", + test = Organization(self, "test", email="admin@company.com", name="my-org-name" ) - tfe_organization_membership_test = - tfe.organization_membership.OrganizationMembership(self, "test_1", + tfe_organization_membership_test = 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 = tfe.workspace.Workspace(self, "test_2", + tfe_workspace_test = Workspace(self, "test_2", name="my-workspace-name", - organization=cdktf.Token.as_string(tfe_organization_test.id) + 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 = - tfe.notification_configuration.NotificationConfiguration(self, "test_3", + tfe_notification_configuration_test = NotificationConfiguration(self, "test_3", destination_type="email", email_addresses=["user1@company.com", "user2@company.com", "user3@company.com" ], - email_user_ids=[ - cdktf.Token.as_string(tfe_organization_membership_test.user_id) - ], + email_user_ids=[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=cdktf.Token.as_string(tfe_workspace_test.id) + workspace_id=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") @@ -180,4 +188,4 @@ Notification configurations can be imported; use ` \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/oauth_client.html.markdown b/website/docs/cdktf/python/r/oauth_client.html.markdown index f739902ae..7b06126a3 100644 --- a/website/docs/cdktf/python/r/oauth_client.html.markdown +++ b/website/docs/cdktf/python/r/oauth_client.html.markdown @@ -19,15 +19,18 @@ provider. Basic usage: ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.oauth_client import OauthClient +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - tfe.oauth_client.OauthClient(self, "test", + OauthClient(self, "test", api_url="https://api.github.com", http_url="https://github.com", name="my-github-oauth-client", @@ -44,15 +47,18 @@ See [documentation for TFC/E setup](https://developer.hashicorp.com/terraform/cl **Note:** This resource requires a private key when creating Azure DevOps Server OAuth clients. ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.oauth_client import OauthClient +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - tfe.oauth_client.OauthClient(self, "test", + OauthClient(self, "test", api_url="https://ado.example.com", http_url="https://ado.example.com", name="my-ado-oauth-client", @@ -71,15 +77,18 @@ When using BitBucket Server, you must use three required fields: `key`, `secret` ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.oauth_client import OauthClient +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - tfe.oauth_client.OauthClient(self, "test", + OauthClient(self, "test", api_url="https://bbs.example.com", http_url="https://bss.example.com", key="", @@ -121,4 +130,4 @@ Link. * `id` - The ID of the OAuth client. * `oauth_token_id` - The ID of the OAuth token associated with the OAuth client. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/organization.html.markdown b/website/docs/cdktf/python/r/organization.html.markdown index f32912a93..bdcc33f7b 100644 --- a/website/docs/cdktf/python/r/organization.html.markdown +++ b/website/docs/cdktf/python/r/organization.html.markdown @@ -16,15 +16,18 @@ Manages organizations. Basic usage: ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.organization import Organization +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - tfe.organization.Organization(self, "test", + Organization(self, "test", email="admin@company.com", name="my-org-name" ) @@ -61,4 +64,4 @@ example: terraform import tfe_organization.test my-org-name ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/organization_membership.html.markdown b/website/docs/cdktf/python/r/organization_membership.html.markdown index 1582dadb2..390a2e73c 100644 --- a/website/docs/cdktf/python/r/organization_membership.html.markdown +++ b/website/docs/cdktf/python/r/organization_membership.html.markdown @@ -24,15 +24,18 @@ be updated manually. Basic usage: ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.organization_membership import OrganizationMembership +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - tfe.organization_membership.OrganizationMembership(self, "test", + OrganizationMembership(self, "test", email="user@company.com", organization="my-org-name" ) @@ -66,4 +69,4 @@ terraform import tfe_organization_membership.test my-org-name/user@example.com terraform import tfe_organization_membership.test ou-wAs3zYmWAhYK7peR ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/organization_module_sharing.html.markdown b/website/docs/cdktf/python/r/organization_module_sharing.html.markdown index 492a62139..165fb1666 100644 --- a/website/docs/cdktf/python/r/organization_module_sharing.html.markdown +++ b/website/docs/cdktf/python/r/organization_module_sharing.html.markdown @@ -19,15 +19,18 @@ use of an admin token and is for Terraform Enterprise only. Basic usage: ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.organization_module_sharing import OrganizationModuleSharing +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - tfe.organization_module_sharing.OrganizationModuleSharing(self, "test", + OrganizationModuleSharing(self, "test", module_consumers=["my-org-name-2", "my-org-name-3"], organization="my-org-name" ) @@ -40,4 +43,4 @@ The following arguments are supported: * `organization` - (Optional) Name of the organization. If omitted, organization must be defined in the provider config. * `module_consumers` - (Required) Names of the organizations to consume the module registry. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/organization_run_task.html.markdown b/website/docs/cdktf/python/r/organization_run_task.html.markdown index 535677464..076f8a0b6 100644 --- a/website/docs/cdktf/python/r/organization_run_task.html.markdown +++ b/website/docs/cdktf/python/r/organization_run_task.html.markdown @@ -18,15 +18,18 @@ The tfe_organization_run_task resource creates, updates and destroys [Organizati Basic usage: ```python -import constructs as constructs -import cdktf as cdktf -# Provider bindings are generated by running cdktf get. +# 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. -import ...gen.providers.tfe as tfe -class MyConvertedCode(cdktf.TerraformStack): +# +from imports.tfe.organization_run_task import OrganizationRunTask +class MyConvertedCode(TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - tfe.organization_run_task.OrganizationRunTask(self, "example", + OrganizationRunTask(self, "example", description="An example task", enabled=True, name="task-name", @@ -60,4 +63,4 @@ import ID. For example: terraform import tfe_organization_run_task.test my-org-name/task-name ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/agent_pool.html.markdown b/website/docs/cdktf/typescript/r/agent_pool.html.markdown index 5b7085fc6..1b3d9b210 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 -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) { +// 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) { super(scope, name); - 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", { + const testOrganization = new Organization(this, "test-organization", { + email: "admin@company.com", + name: "my-org-name", + }); + new AgentPool(this, "test-agent-pool", { name: "my-agent-pool-name", - organization: cdktf.Token.asString(tfeOrganizationTestOrganization.name), + organization: testOrganization.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 + \ 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 9458015d2..035622708 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 @@ -19,34 +19,48 @@ for Business account. Basic usage: -```hcl -resource "tfe_organization" "test-organization" { - name = "my-org-name" - email = "admin@company.com" +```typescript +// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug +import { Construct } from "constructs"; +import { Token, TerraformStack } from "cdktf"; +/* + * Provider bindings are generated by running `cdktf get`. + * See https://cdk.tf/provider-generation for more details. + */ +import { AgentPool } from "./.gen/providers/tfe/agent-pool"; +import { AgentPoolAllowedWorkspaces } from "./.gen/providers/tfe/agent-pool-allowed-workspaces"; +import { Organization } from "./.gen/providers/tfe/organization"; +import { Workspace } from "./.gen/providers/tfe/workspace"; +class MyConvertedCode extends TerraformStack { + constructor(scope: Construct, name: string) { + super(scope, name); + const testOrganization = new Organization(this, "test-organization", { + email: "admin@company.com", + name: "my-org-name", + }); + const test = new Workspace(this, "test", { + name: "my-workspace-name", + organization: Token.asString(tfeOrganizationTest.name), + }); + new AgentPool(this, "test-agent-pool", { + name: "my-agent-pool-name", + organization: testOrganization.name, + organizationScoped: true, + }); + new AgentPoolAllowedWorkspaces(this, "foobar", { + agentPoolId: Token.asString(tfeAgentPoolFoobar.id), + allowedWorkspaceIds: [test.id], + }); + } } -resource "tfe_workspace" "test" { - name = "my-workspace-name" - organization = tfe_organization.test.name -} - -resource "tfe_agent_pool" "test-agent-pool" { - name = "my-agent-pool-name" - organization = tfe_organization.test-organization.name - organization_scoped = true -} - -resource "tfe_agent_pool_allowed_workspaces" "foobar" { - agent_pool_id = tfe_agent_pool.foobar.id - allowed_workspace_ids = [tfe_workspace.test.id] -} ``` ## Argument Reference The following arguments are supported: -* `agentPoolId` - (Required) ID of the team. +* `agentPoolId` - (Required) The ID of the agent pool. * `allowedWorkspaceIds` - (Required) IDs of workspaces to be added as allowed workspaces on the agent pool. @@ -59,4 +73,4 @@ terraform import tfe_agent_pool_allowed_workspaces.foobar apool-rW0KoLSlnuNb5adB ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/agent_token.html.markdown b/website/docs/cdktf/typescript/r/agent_token.html.markdown index e37e6da4d..530a19d6a 100644 --- a/website/docs/cdktf/typescript/r/agent_token.html.markdown +++ b/website/docs/cdktf/typescript/r/agent_token.html.markdown @@ -17,32 +17,29 @@ These tokens allow agents to communicate securely with Terraform Cloud. Basic usage: ```typescript -import * as constructs from "constructs"; -import * as cdktf from "cdktf"; -/*Provider bindings are generated by running cdktf get. -See https://cdk.tf/provider-generation for more details.*/ -import * as tfe from "./.gen/providers/tfe"; -class MyConvertedCode extends cdktf.TerraformStack { - constructor(scope: constructs.Construct, name: string) { +// 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) { super(scope, name); - 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), + 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, description: "my-agent-token-name", }); } @@ -63,4 +60,4 @@ The following arguments are supported: * `description` - The description of agent token. * `token` - The generated token. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/no_code_module.html.markdown b/website/docs/cdktf/typescript/r/no_code_module.html.markdown index f740a6434..bd4c0def0 100644 --- a/website/docs/cdktf/typescript/r/no_code_module.html.markdown +++ b/website/docs/cdktf/typescript/r/no_code_module.html.markdown @@ -16,41 +16,34 @@ Creates, updates and destroys no-code module for registry modules. Basic usage: ```typescript -import * as constructs from "constructs"; -import * as cdktf from "cdktf"; -/*Provider bindings are generated by running cdktf get. -See https://cdk.tf/provider-generation for more details.*/ -import * as tfe from "./.gen/providers/tfe"; -class MyConvertedCode extends cdktf.TerraformStack { - constructor(scope: constructs.Construct, name: string) { +// 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) { super(scope, name); - 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), - } - ); + 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, + }); /*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 tfe.noCodeModule.NoCodeModule( - this, - "foobar_2", - { - organization: cdktf.Token.asString(tfeOrganizationFoobar.id), - registryModule: cdktf.Token.asString(tfeRegistryModuleFoobar.id), - } - ); + const tfeNoCodeModuleFoobar = new NoCodeModule(this, "foobar_2", { + organization: foobar.id, + registryModule: 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"); } @@ -61,53 +54,46 @@ class MyConvertedCode extends cdktf.TerraformStack { Creating a no-code module with variable options: ```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) { +// 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) { super(scope, name); - 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), - } - ); + 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, + }); /*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 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", - }, - ], - } - ); + 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", + }, + ], + }); /*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"); } @@ -141,4 +127,4 @@ No-code modules can be imported; use `` as the import ID. For terraform import tfe_no_code_module.test nocode-qV9JnKRkmtMa4zcA ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/notification_configuration.html.markdown b/website/docs/cdktf/typescript/r/notification_configuration.html.markdown index 81ee6208b..f772d9699 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 -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) { +// 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) { super(scope, name); - 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", { + 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: cdktf.Token.asString(tfeOrganizationTest.id), + 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 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), - } - ); + const tfeNotificationConfigurationTest = new 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: 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,50 +64,52 @@ class MyConvertedCode extends cdktf.TerraformStack { With `destinationType` of `email`: ```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) { +// 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) { super(scope, name); - const tfeOrganizationTest = new tfe.organization.Organization( + const test = new Organization(this, "test", { + email: "admin@company.com", + name: "my-org-name", + }); + const tfeOrganizationMembershipTest = new OrganizationMembership( this, - "test", + "test_1", { - 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 tfe.workspace.Workspace(this, "test_2", { + const tfeWorkspaceTest = new Workspace(this, "test_2", { name: "my-workspace-name", - organization: cdktf.Token.asString(tfeOrganizationTest.id), + 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 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), - } - ); + 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), + } + ); /*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"); } @@ -118,55 +120,57 @@ class MyConvertedCode extends cdktf.TerraformStack { (**TFE only**) With `destinationType` of `email`, using `emailAddresses` list and `emailUsers`: ```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) { +// 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) { super(scope, name); - const tfeOrganizationTest = new tfe.organization.Organization( + const test = new Organization(this, "test", { + email: "admin@company.com", + name: "my-org-name", + }); + const tfeOrganizationMembershipTest = new OrganizationMembership( this, - "test", + "test_1", { - 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 tfe.workspace.Workspace(this, "test_2", { + const tfeWorkspaceTest = new Workspace(this, "test_2", { name: "my-workspace-name", - organization: cdktf.Token.asString(tfeOrganizationTest.id), + 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 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), - } - ); + 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), + } + ); /*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"); } @@ -216,4 +220,4 @@ Notification configurations can be imported; use ` \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/oauth_client.html.markdown b/website/docs/cdktf/typescript/r/oauth_client.html.markdown index da2e6cca5..5fe9abf31 100644 --- a/website/docs/cdktf/typescript/r/oauth_client.html.markdown +++ b/website/docs/cdktf/typescript/r/oauth_client.html.markdown @@ -19,15 +19,18 @@ provider. Basic usage: ```typescript -import * as constructs from "constructs"; -import * as cdktf from "cdktf"; -/*Provider bindings are generated by running cdktf get. -See https://cdk.tf/provider-generation for more details.*/ -import * as tfe from "./.gen/providers/tfe"; -class MyConvertedCode extends cdktf.TerraformStack { - constructor(scope: constructs.Construct, name: string) { +// 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) { super(scope, name); - new tfe.oauthClient.OauthClient(this, "test", { + new OauthClient(this, "test", { apiUrl: "https://api.github.com", httpUrl: "https://github.com", name: "my-github-oauth-client", @@ -47,15 +50,18 @@ See [documentation for TFC/E setup](https://developer.hashicorp.com/terraform/cl **Note:** This resource requires a private key when creating Azure DevOps Server OAuth clients. ```typescript -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) { +// 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) { super(scope, name); - new tfe.oauthClient.OauthClient(this, "test", { + new OauthClient(this, "test", { apiUrl: "https://ado.example.com", httpUrl: "https://ado.example.com", name: "my-ado-oauth-client", @@ -78,15 +84,18 @@ When using BitBucket Server, you must use three required fields: `key`, `secret` ```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) { +// 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) { super(scope, name); - new tfe.oauthClient.OauthClient(this, "test", { + new OauthClient(this, "test", { apiUrl: "https://bbs.example.com", httpUrl: "https://bss.example.com", key: "", @@ -133,4 +142,4 @@ Link. * `id` - The ID of the OAuth client. * `oauthTokenId` - The ID of the OAuth token associated with the OAuth client. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/organization.html.markdown b/website/docs/cdktf/typescript/r/organization.html.markdown index cbaab56b4..94f77e3c1 100644 --- a/website/docs/cdktf/typescript/r/organization.html.markdown +++ b/website/docs/cdktf/typescript/r/organization.html.markdown @@ -16,15 +16,18 @@ Manages organizations. Basic usage: ```typescript -import * as constructs from "constructs"; -import * as cdktf from "cdktf"; -/*Provider bindings are generated by running cdktf get. -See https://cdk.tf/provider-generation for more details.*/ -import * as tfe from "./.gen/providers/tfe"; -class MyConvertedCode extends cdktf.TerraformStack { - constructor(scope: constructs.Construct, name: string) { +// 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) { super(scope, name); - new tfe.organization.Organization(this, "test", { + new Organization(this, "test", { email: "admin@company.com", name: "my-org-name", }); @@ -64,4 +67,4 @@ example: terraform import tfe_organization.test my-org-name ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/organization_membership.html.markdown b/website/docs/cdktf/typescript/r/organization_membership.html.markdown index 1ba96fccd..af3a1efb7 100644 --- a/website/docs/cdktf/typescript/r/organization_membership.html.markdown +++ b/website/docs/cdktf/typescript/r/organization_membership.html.markdown @@ -24,15 +24,18 @@ be updated manually. Basic usage: ```typescript -import * as constructs from "constructs"; -import * as cdktf from "cdktf"; -/*Provider bindings are generated by running cdktf get. -See https://cdk.tf/provider-generation for more details.*/ -import * as tfe from "./.gen/providers/tfe"; -class MyConvertedCode extends cdktf.TerraformStack { - constructor(scope: constructs.Construct, name: string) { +// 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) { super(scope, name); - new tfe.organizationMembership.OrganizationMembership(this, "test", { + new OrganizationMembership(this, "test", { email: "user@company.com", organization: "my-org-name", }); @@ -69,4 +72,4 @@ terraform import tfe_organization_membership.test my-org-name/user@example.com terraform import tfe_organization_membership.test ou-wAs3zYmWAhYK7peR ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/organization_module_sharing.html.markdown b/website/docs/cdktf/typescript/r/organization_module_sharing.html.markdown index 7a8d6f4bc..6b1954c0d 100644 --- a/website/docs/cdktf/typescript/r/organization_module_sharing.html.markdown +++ b/website/docs/cdktf/typescript/r/organization_module_sharing.html.markdown @@ -19,15 +19,18 @@ use of an admin token and is for Terraform Enterprise only. Basic usage: ```typescript -import * as constructs from "constructs"; -import * as cdktf from "cdktf"; -/*Provider bindings are generated by running cdktf get. -See https://cdk.tf/provider-generation for more details.*/ -import * as tfe from "./.gen/providers/tfe"; -class MyConvertedCode extends cdktf.TerraformStack { - constructor(scope: constructs.Construct, name: string) { +// 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) { super(scope, name); - new tfe.organizationModuleSharing.OrganizationModuleSharing(this, "test", { + new OrganizationModuleSharing(this, "test", { moduleConsumers: ["my-org-name-2", "my-org-name-3"], organization: "my-org-name", }); @@ -43,4 +46,4 @@ The following arguments are supported: * `organization` - (Optional) Name of the organization. If omitted, organization must be defined in the provider config. * `moduleConsumers` - (Required) Names of the organizations to consume the module registry. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/organization_run_task.html.markdown b/website/docs/cdktf/typescript/r/organization_run_task.html.markdown index af88749b5..c7b69cabc 100644 --- a/website/docs/cdktf/typescript/r/organization_run_task.html.markdown +++ b/website/docs/cdktf/typescript/r/organization_run_task.html.markdown @@ -18,15 +18,18 @@ The tfe_organization_run_task resource creates, updates and destroys [Organizati Basic usage: ```typescript -import * as constructs from "constructs"; -import * as cdktf from "cdktf"; -/*Provider bindings are generated by running cdktf get. -See https://cdk.tf/provider-generation for more details.*/ -import * as tfe from "./.gen/providers/tfe"; -class MyConvertedCode extends cdktf.TerraformStack { - constructor(scope: constructs.Construct, name: string) { +// 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) { super(scope, name); - new tfe.organizationRunTask.OrganizationRunTask(this, "example", { + new OrganizationRunTask(this, "example", { description: "An example task", enabled: true, name: "task-name", @@ -63,4 +66,4 @@ import ID. For example: terraform import tfe_organization_run_task.test my-org-name/task-name ``` - \ No newline at end of file + \ No newline at end of file