From 61dccf0057565036ae97498c58def9abda6eab78 Mon Sep 17 00:00:00 2001 From: Mark DeCrane Date: Thu, 14 Mar 2024 11:29:15 -0400 Subject: [PATCH 1/2] Updating changelog, readme, docs for 0.53.0 release --- CHANGELOG.md | 2 ++ README.md | 5 ++--- website/docs/index.html.markdown | 6 +++--- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4813d6bd3..d926f8156 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ ## UNRELEASED +## v0.53.0 + FEATURES: * `r/tfe_workspace`: Add `ignore_additional_tag_names` which explicitly ignores `tag_names` _not_ defined by config so they will not be overwritten by the configured tags, by @brandonc and @mbillow [1254](https://github.com/hashicorp/terraform-provider-tfe/pull/1254) diff --git a/README.md b/README.md index 62f1af9ab..46be170f6 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,5 @@ Terraform - # Terraform Cloud/Enterprise Provider The official Terraform provider for [Terraform Cloud/Enterprise](https://www.hashicorp.com/products/terraform). @@ -29,7 +28,7 @@ Declare the provider in your configuration and `terraform init` will automatical terraform { required_providers { tfe = { - version = "~> 0.51.1" + version = "~> 0.53.0" } } } @@ -45,7 +44,7 @@ The above snippet using `required_providers` is for Terraform 0.13+; if you are ```hcl provider "tfe" { - version = "~> 0.51.1" + version = "~> 0.53.0" ... } ``` diff --git a/website/docs/index.html.markdown b/website/docs/index.html.markdown index dd9dfbf81..51add7bd3 100644 --- a/website/docs/index.html.markdown +++ b/website/docs/index.html.markdown @@ -75,7 +75,7 @@ automatically installed by `terraform init` in the future: terraform { required_providers { tfe = { - version = "~> 0.52.0" + version = "~> 0.53.0" } } } @@ -88,7 +88,7 @@ The above snippet using `required_providers` is for Terraform 0.13+; if you are ```hcl provider "tfe" { - version = "~> 0.52.0" + version = "~> 0.53.0" ... } ``` @@ -101,7 +101,7 @@ For more information on provider installation and constraining provider versions provider "tfe" { hostname = var.hostname # Optional, defaults to Terraform Cloud `app.terraform.io` token = var.token - version = "~> 0.52.0" + version = "~> 0.53.0" } # Create an organization From 93f0a4a59e73788fc2760d5c4ea05e55592d0bb1 Mon Sep 17 00:00:00 2001 From: Maed223 <72527044+Maed223@users.noreply.github.com> Date: Thu, 14 Mar 2024 16:15:08 +0000 Subject: [PATCH 2/2] cdktf: update documentation --- .../d/github_installation.html.markdown | 17 +- .../csharp/d/no_code_module.html.markdown | 42 +++ .../cdktf/csharp/d/organization.html.markdown | 9 +- .../cdktf/csharp/d/policy_set.html.markdown | 4 +- .../csharp/d/registry_gpg_key.html.markdown | 47 +++ .../csharp/d/registry_gpg_keys.html.markdown | 48 +++ .../csharp/d/registry_provider.html.markdown | 73 +++++ .../csharp/d/registry_providers.html.markdown | 94 ++++++ .../cdktf/csharp/d/workspace.html.markdown | 4 +- website/docs/cdktf/csharp/index.html.markdown | 8 +- .../r/admin_organization_settings.markdown | 8 +- ...gent_pool_allowed_workspaces.html.markdown | 67 ++-- .../cdktf/csharp/r/opa_version.html.markdown | 68 ++++ .../cdktf/csharp/r/organization.html.markdown | 5 +- ...rganization_default_settings.html.markdown | 68 ++++ .../cdktf/csharp/r/policy_set.html.markdown | 35 +- .../csharp/r/registry_gpg_key.html.markdown | 48 +++ .../csharp/r/registry_module.html.markdown | 46 ++- .../csharp/r/registry_provider.html.markdown | 103 ++++++ .../csharp/r/sentinel_version.html.markdown | 68 ++++ .../r/team_project_access.html.markdown | 2 +- .../cdktf/csharp/r/workspace.html.markdown | 47 +-- .../csharp/r/workspace_settings.markdown | 145 +++++++++ .../go/d/github_installation.html.markdown | 17 +- .../cdktf/go/d/no_code_module.html.markdown | 42 +++ .../cdktf/go/d/organization.html.markdown | 9 +- .../docs/cdktf/go/d/policy_set.html.markdown | 4 +- .../cdktf/go/d/registry_gpg_key.html.markdown | 50 +++ .../go/d/registry_gpg_keys.html.markdown | 51 +++ .../go/d/registry_provider.html.markdown | 79 +++++ .../go/d/registry_providers.html.markdown | 103 ++++++ .../docs/cdktf/go/d/workspace.html.markdown | 4 +- website/docs/cdktf/go/index.html.markdown | 8 +- .../go/r/admin_organization_settings.markdown | 8 +- ...gent_pool_allowed_workspaces.html.markdown | 71 ++--- .../docs/cdktf/go/r/opa_version.html.markdown | 71 +++++ .../cdktf/go/r/organization.html.markdown | 5 +- ...rganization_default_settings.html.markdown | 76 +++++ .../docs/cdktf/go/r/policy_set.html.markdown | 35 +- .../cdktf/go/r/registry_gpg_key.html.markdown | 48 +++ .../cdktf/go/r/registry_module.html.markdown | 53 +++- .../go/r/registry_provider.html.markdown | 111 +++++++ .../cdktf/go/r/sentinel_version.html.markdown | 71 +++++ .../go/r/team_project_access.html.markdown | 2 +- .../docs/cdktf/go/r/workspace.html.markdown | 49 +-- .../cdktf/go/r/workspace_settings.markdown | 169 ++++++++++ .../java/d/github_installation.html.markdown | 17 +- .../cdktf/java/d/no_code_module.html.markdown | 42 +++ .../cdktf/java/d/organization.html.markdown | 9 +- .../cdktf/java/d/policy_set.html.markdown | 4 +- .../java/d/registry_gpg_key.html.markdown | 46 +++ .../java/d/registry_gpg_keys.html.markdown | 47 +++ .../java/d/registry_provider.html.markdown | 71 +++++ .../java/d/registry_providers.html.markdown | 91 ++++++ .../docs/cdktf/java/d/workspace.html.markdown | 4 +- website/docs/cdktf/java/index.html.markdown | 8 +- .../r/admin_organization_settings.markdown | 8 +- ...gent_pool_allowed_workspaces.html.markdown | 69 ++-- .../cdktf/java/r/opa_version.html.markdown | 67 ++++ .../cdktf/java/r/organization.html.markdown | 5 +- ...rganization_default_settings.html.markdown | 70 ++++ .../cdktf/java/r/policy_set.html.markdown | 35 +- .../java/r/registry_gpg_key.html.markdown | 48 +++ .../java/r/registry_module.html.markdown | 47 ++- .../java/r/registry_provider.html.markdown | 103 ++++++ .../java/r/sentinel_version.html.markdown | 67 ++++ .../java/r/team_project_access.html.markdown | 2 +- .../docs/cdktf/java/r/workspace.html.markdown | 49 +-- .../cdktf/java/r/workspace_settings.markdown | 149 +++++++++ .../cdktf/python/d/agent_pool.html.markdown | 17 +- .../d/github_installation.html.markdown | 32 +- .../cdktf/python/d/ip_ranges.html.markdown | 21 +- .../python/d/no_code_module.html.markdown | 33 +- .../cdktf/python/d/oauth_client.html.markdown | 47 ++- .../cdktf/python/d/organization.html.markdown | 17 +- .../d/organization_members.html.markdown | 22 +- .../d/organization_membership.html.markdown | 47 ++- .../d/organization_run_task.html.markdown | 17 +- .../python/d/organization_tags.html.markdown | 17 +- .../python/d/organizations.html.markdown | 17 +- .../docs/cdktf/python/d/outputs.html.markdown | 39 +-- .../cdktf/python/d/policy_set.html.markdown | 17 +- .../docs/cdktf/python/d/project.html.markdown | 17 +- .../python/d/registry_gpg_key.html.markdown | 17 +- .../python/d/registry_gpg_keys.html.markdown | 17 +- .../python/d/registry_provider.html.markdown | 32 +- .../python/d/registry_providers.html.markdown | 47 ++- .../python/d/saml_settings.html.markdown | 42 +-- .../docs/cdktf/python/d/slug.html.markdown | 22 +- .../docs/cdktf/python/d/ssh_key.html.markdown | 17 +- .../docs/cdktf/python/d/team.html.markdown | 17 +- .../cdktf/python/d/team_access.html.markdown | 17 +- .../d/team_project_access.html.markdown | 17 +- .../docs/cdktf/python/d/teams.html.markdown | 17 +- .../cdktf/python/d/variable_set.html.markdown | 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 +- website/docs/cdktf/python/index.html.markdown | 51 ++- .../r/admin_organization_settings.markdown | 74 ++--- .../cdktf/python/r/agent_pool.html.markdown | 22 +- ...gent_pool_allowed_workspaces.html.markdown | 72 ++--- .../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/opa_version.html.markdown | 17 +- .../cdktf/python/r/organization.html.markdown | 17 +- ...rganization_default_settings.html.markdown | 35 +- .../r/organization_membership.html.markdown | 17 +- .../organization_module_sharing.html.markdown | 17 +- .../r/organization_run_task.html.markdown | 17 +- .../python/r/organization_token.html.markdown | 48 +-- .../docs/cdktf/python/r/policy.html.markdown | 32 +- .../cdktf/python/r/policy_set.html.markdown | 121 +++---- .../r/policy_set_parameter.html.markdown | 28 +- .../docs/cdktf/python/r/project.html.markdown | 22 +- .../python/r/project_policy_set.html.markdown | 61 ++-- .../r/project_variable_set.html.markdown | 35 +- .../python/r/registry_gpg_key.html.markdown | 23 +- .../python/r/registry_module.html.markdown | 146 ++++----- .../python/r/registry_provider.html.markdown | 44 ++- .../cdktf/python/r/run_trigger.html.markdown | 33 +- .../python/r/saml_settings.html.markdown | 35 +- .../python/r/sentinel_policy.html.markdown | 17 +- .../python/r/sentinel_version.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 | 63 ++-- .../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 | 65 ++-- .../python/r/terraform_version.html.markdown | 17 +- .../cdktf/python/r/variable.html.markdown | 118 +++---- .../cdktf/python/r/variable_set.html.markdown | 115 +++---- .../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 +- .../python/r/workspace_settings.markdown | 98 +++--- .../r/workspace_variable_set.html.markdown | 35 +- .../typescript/d/agent_pool.html.markdown | 21 +- .../d/github_installation.html.markdown | 58 ++-- .../typescript/d/ip_ranges.html.markdown | 29 +- .../typescript/d/no_code_module.html.markdown | 36 +-- .../typescript/d/oauth_client.html.markdown | 65 ++-- .../typescript/d/organization.html.markdown | 23 +- .../d/organization_members.html.markdown | 26 +- .../d/organization_membership.html.markdown | 89 +++--- .../d/organization_run_task.html.markdown | 31 +- .../d/organization_tags.html.markdown | 23 +- .../typescript/d/organizations.html.markdown | 21 +- .../cdktf/typescript/d/outputs.html.markdown | 51 +-- .../typescript/d/policy_set.html.markdown | 21 +- .../cdktf/typescript/d/project.html.markdown | 21 +- .../d/registry_gpg_key.html.markdown | 21 +- .../d/registry_gpg_keys.html.markdown | 21 +- .../d/registry_provider.html.markdown | 42 ++- .../d/registry_providers.html.markdown | 71 ++--- .../typescript/d/saml_settings.html.markdown | 41 +-- .../cdktf/typescript/d/slug.html.markdown | 28 +- .../cdktf/typescript/d/ssh_key.html.markdown | 21 +- .../cdktf/typescript/d/team.html.markdown | 21 +- .../typescript/d/team_access.html.markdown | 23 +- .../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 | 23 +- .../typescript/d/workspace_ids.html.markdown | 29 +- .../d/workspace_run_task.html.markdown | 21 +- .../docs/cdktf/typescript/index.html.markdown | 69 ++-- .../r/admin_organization_settings.markdown | 73 ++--- .../typescript/r/agent_pool.html.markdown | 36 +-- ...gent_pool_allowed_workspaces.html.markdown | 78 ++--- .../typescript/r/agent_token.html.markdown | 49 +-- .../typescript/r/no_code_module.html.markdown | 140 ++++---- .../notification_configuration.html.markdown | 224 +++++++------ .../typescript/r/oauth_client.html.markdown | 75 ++--- .../typescript/r/opa_version.html.markdown | 21 +- .../typescript/r/organization.html.markdown | 23 +- ...rganization_default_settings.html.markdown | 67 ++-- .../r/organization_membership.html.markdown | 21 +- .../organization_module_sharing.html.markdown | 23 +- .../r/organization_run_task.html.markdown | 21 +- .../r/organization_token.html.markdown | 51 +-- .../cdktf/typescript/r/policy.html.markdown | 44 ++- .../typescript/r/policy_set.html.markdown | 124 +++----- .../r/policy_set_parameter.html.markdown | 48 +-- .../cdktf/typescript/r/project.html.markdown | 36 +-- .../r/project_policy_set.html.markdown | 60 ++-- .../r/project_variable_set.html.markdown | 60 ++-- .../r/registry_gpg_key.html.markdown | 24 +- .../r/registry_module.html.markdown | 300 ++++++++++-------- .../r/registry_provider.html.markdown | 84 ++--- .../typescript/r/run_trigger.html.markdown | 63 ++-- .../typescript/r/saml_settings.html.markdown | 38 +-- .../r/sentinel_policy.html.markdown | 25 +- .../r/sentinel_version.html.markdown | 21 +- .../cdktf/typescript/r/ssh_key.html.markdown | 21 +- .../cdktf/typescript/r/team.html.markdown | 40 +-- .../typescript/r/team_access.html.markdown | 33 +- .../typescript/r/team_member.html.markdown | 26 +- .../typescript/r/team_members.html.markdown | 68 ++-- .../r/team_organization_member.html.markdown | 47 ++- .../r/team_organization_members.html.markdown | 115 ++++--- .../r/team_project_access.html.markdown | 67 ++-- .../typescript/r/team_token.html.markdown | 56 ++-- .../r/terraform_version.html.markdown | 21 +- .../cdktf/typescript/r/variable.html.markdown | 145 ++++----- .../typescript/r/variable_set.html.markdown | 165 +++++----- .../typescript/r/workspace.html.markdown | 83 +++-- .../r/workspace_policy_set.html.markdown | 53 ++-- ...rkspace_policy_set_exclusion.html.markdown | 61 ++-- .../typescript/r/workspace_run.html.markdown | 192 ++++++----- .../r/workspace_run_task.html.markdown | 28 +- .../typescript/r/workspace_settings.markdown | 156 ++++----- .../r/workspace_variable_set.html.markdown | 57 ++-- 223 files changed, 6191 insertions(+), 4393 deletions(-) create mode 100644 website/docs/cdktf/csharp/d/no_code_module.html.markdown create mode 100644 website/docs/cdktf/csharp/d/registry_gpg_key.html.markdown create mode 100644 website/docs/cdktf/csharp/d/registry_gpg_keys.html.markdown create mode 100644 website/docs/cdktf/csharp/d/registry_provider.html.markdown create mode 100644 website/docs/cdktf/csharp/d/registry_providers.html.markdown create mode 100644 website/docs/cdktf/csharp/r/opa_version.html.markdown create mode 100644 website/docs/cdktf/csharp/r/organization_default_settings.html.markdown create mode 100644 website/docs/cdktf/csharp/r/registry_gpg_key.html.markdown create mode 100644 website/docs/cdktf/csharp/r/registry_provider.html.markdown create mode 100644 website/docs/cdktf/csharp/r/sentinel_version.html.markdown create mode 100644 website/docs/cdktf/csharp/r/workspace_settings.markdown create mode 100644 website/docs/cdktf/go/d/no_code_module.html.markdown create mode 100644 website/docs/cdktf/go/d/registry_gpg_key.html.markdown create mode 100644 website/docs/cdktf/go/d/registry_gpg_keys.html.markdown create mode 100644 website/docs/cdktf/go/d/registry_provider.html.markdown create mode 100644 website/docs/cdktf/go/d/registry_providers.html.markdown create mode 100644 website/docs/cdktf/go/r/opa_version.html.markdown create mode 100644 website/docs/cdktf/go/r/organization_default_settings.html.markdown create mode 100644 website/docs/cdktf/go/r/registry_gpg_key.html.markdown create mode 100644 website/docs/cdktf/go/r/registry_provider.html.markdown create mode 100644 website/docs/cdktf/go/r/sentinel_version.html.markdown create mode 100644 website/docs/cdktf/go/r/workspace_settings.markdown create mode 100644 website/docs/cdktf/java/d/no_code_module.html.markdown create mode 100644 website/docs/cdktf/java/d/registry_gpg_key.html.markdown create mode 100644 website/docs/cdktf/java/d/registry_gpg_keys.html.markdown create mode 100644 website/docs/cdktf/java/d/registry_provider.html.markdown create mode 100644 website/docs/cdktf/java/d/registry_providers.html.markdown create mode 100644 website/docs/cdktf/java/r/opa_version.html.markdown create mode 100644 website/docs/cdktf/java/r/organization_default_settings.html.markdown create mode 100644 website/docs/cdktf/java/r/registry_gpg_key.html.markdown create mode 100644 website/docs/cdktf/java/r/registry_provider.html.markdown create mode 100644 website/docs/cdktf/java/r/sentinel_version.html.markdown create mode 100644 website/docs/cdktf/java/r/workspace_settings.markdown diff --git a/website/docs/cdktf/csharp/d/github_installation.html.markdown b/website/docs/cdktf/csharp/d/github_installation.html.markdown index 72fe93ac1..a562458bd 100644 --- a/website/docs/cdktf/csharp/d/github_installation.html.markdown +++ b/website/docs/cdktf/csharp/d/github_installation.html.markdown @@ -5,6 +5,8 @@ description: |- Get information on the Github App Installation. --- + + # Data Source: tfe_github_app_installation Use this data source to get information about the Github App Installation. @@ -24,7 +26,7 @@ class MyConvertedCode : TerraformStack public MyConvertedCode(Construct scope, string name) : base(scope, name) { new DataTfeGithubAppInstallation.DataTfeGithubAppInstallation(this, "gha_installation", new DataTfeGithubAppInstallationConfig { - InstallationId = 12345 + InstallationId = 12345678 }); } } @@ -43,7 +45,7 @@ class MyConvertedCode : TerraformStack public MyConvertedCode(Construct scope, string name) : base(scope, name) { new DataTfeGithubAppInstallation.DataTfeGithubAppInstallation(this, "gha_installation", new DataTfeGithubAppInstallationConfig { - Name = "installation_name" + Name = "github_username_or_organization" }); } } @@ -51,11 +53,11 @@ class MyConvertedCode : TerraformStack ## Argument Reference -The following arguments are supported. At least one of `Name`, `InstallationId` must be set. +The following arguments are supported. At least one of `Name`, `InstallationId` must be set. + +* `InstallationId` - (Optional) ID of the Github Installation. The installation ID can be found in the URL slug when visiting the installation's configuration page, e.g `Https://githubCom/settings/installations/12345678`. +* `Name` - (Optional) Name of the Github user or organization account that installed the app. -* `InstallationId` - (Optional) ID of the Github Installation as shown in Github. -* `Name` - (Optional) Name of the Github Installation as shown in Github. - Must be one of: `InstallationId` or `Name`. ## Attributes Reference @@ -63,4 +65,5 @@ Must be one of: `InstallationId` or `Name`. In addition to all arguments above, the following attributes are exported: * `Id` - The internal ID of the Github Installation. This is different from the `InstallationId`. - \ No newline at end of file + + \ No newline at end of file diff --git a/website/docs/cdktf/csharp/d/no_code_module.html.markdown b/website/docs/cdktf/csharp/d/no_code_module.html.markdown new file mode 100644 index 000000000..9d77a582e --- /dev/null +++ b/website/docs/cdktf/csharp/d/no_code_module.html.markdown @@ -0,0 +1,42 @@ +--- +layout: "tfe" +page_title: "Terraform Enterprise: tfe_no_code_module" +description: |- + Get information on a no-code module. +--- + + + +# Data Source: tfe_registry_provider + +Use this data source to read the details of an existing No-Code-Allowed module. + +## Example Usage + +```hcl +resource "tfe_no_code_module" "foobar" { + organization = tfe_organization.foobar.id + registry_module = tfe_registry_module.foobar.id +} + +data "tfe_no_code_module" "foobar" { + id = tfe_no_code_module.foobar.id +} +``` + +## Argument Reference + +The following arguments are supported: + +* `Id` - (Required) ID of the no-code module. + +## Attributes Reference + +* `Id` - ID of the no-code module. +* `Organization` - Organization name that the no-code module belongs to. +* `Namespace` - Namespace name that the no-code module belongs to. +* `RegistryModuleId` - ID of the registry module for the no-code module. +* `VersionPin` - Version number the no-code module is pinned to. +* `Enabled` - Indicates if this no-code module is currently enabled + + \ No newline at end of file diff --git a/website/docs/cdktf/csharp/d/organization.html.markdown b/website/docs/cdktf/csharp/d/organization.html.markdown index f87ae042a..c4fc8f4fb 100644 --- a/website/docs/cdktf/csharp/d/organization.html.markdown +++ b/website/docs/cdktf/csharp/d/organization.html.markdown @@ -5,6 +5,8 @@ description: |- Get information on an Organization. --- + + # Data Source: tfe_organization Use this data source to get information about an organization. @@ -31,13 +33,12 @@ class MyConvertedCode : TerraformStack ## Argument Reference The following arguments are supported: -* `Name` - (Required) Name of the organization. +* `Name` - (Optional) Name of the organization. If omitted, organization must be defined in the provider config. ## Attributes Reference In addition to all arguments above, the following attributes are exported: -* `Name` - Name of the organization. * `Email` - Admin email address. * `ExternalId` - An identifier for the organization. * `AssessmentsEnforced` - (Available only in Terraform Cloud) Whether to force health assessments (drift detection) on all eligible workspaces or allow workspaces to set thier own preferences. @@ -45,5 +46,7 @@ In addition to all arguments above, the following attributes are exported: * `CostEstimationEnabled` - Whether or not the cost estimation feature is enabled for all workspaces in the organization. Defaults to true. In a Terraform Cloud organization which does not have Teams & Governance features, this value is always false and cannot be changed. In Terraform Enterprise, Cost Estimation must also be enabled in Site Administration. * `OwnersTeamSamlRoleId` - The name of the "owners" team. * `SendPassingStatusesForUntriggeredSpeculativePlans` - Whether or not to send VCS status updates for untriggered speculative plans. This can be useful if large numbers of untriggered workspaces are exhausting request limits for connected version control service providers like GitHub. Defaults to true. In Terraform Enterprise, this setting has no effect and cannot be changed but is also available in Site Administration. +* `AggregatedCommitStatusEnabled` - Whether or not to enable Aggregated Status Checks. This can be useful for monorepo repositories with multiple workspaces receiving status checks for events such as a pull request. * `DefaultProjectId` - ID of the organization's default project. All workspaces created without specifying a project ID are created in this project. - \ No newline at end of file + + \ No newline at end of file diff --git a/website/docs/cdktf/csharp/d/policy_set.html.markdown b/website/docs/cdktf/csharp/d/policy_set.html.markdown index 71c2914c6..81d037b37 100644 --- a/website/docs/cdktf/csharp/d/policy_set.html.markdown +++ b/website/docs/cdktf/csharp/d/policy_set.html.markdown @@ -48,6 +48,8 @@ The following arguments are supported: * `Description` - Description of the policy set. * `Global` - Whether or not the policy set applies to all workspaces in the organization. * `Kind` - The policy-as-code framework for the policy. Valid values are "sentinel" and "opa". +* `AgentEnabled` - Whether or not the policy set is run as a policy evaluation within the agent. True by default for all "opa" policy sets. +* `PolicyToolVersion` - The policy tool version to run the evaluation against. * `Overridable` - Whether users can override this policy when it fails during a run. Only valid for OPA policies. * `WorkspaceIds` - IDs of the workspaces that use the policy set. * `ExcludedWorkspaceIds` - IDs of the workspaces that do not use the policy set. @@ -67,4 +69,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/csharp/d/registry_gpg_key.html.markdown b/website/docs/cdktf/csharp/d/registry_gpg_key.html.markdown new file mode 100644 index 000000000..3114101b4 --- /dev/null +++ b/website/docs/cdktf/csharp/d/registry_gpg_key.html.markdown @@ -0,0 +1,47 @@ +--- +layout: "tfe" +page_title: "Terraform Enterprise: tfe_registry_gpg_key" +description: |- + Get information on a private registry GPG key. +--- + + + +# Data Source: tfe_registry_gpg_key + +Use this data source to get information about a private registry GPG key. + +## Example Usage + +```csharp +using Constructs; +using HashiCorp.Cdktf; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +using Gen.Providers.Tfe; +class MyConvertedCode : TerraformStack +{ + public MyConvertedCode(Construct scope, string name) : base(scope, name) + { + new DataTfeRegistryGpgKey.DataTfeRegistryGpgKey(this, "example", new DataTfeRegistryGpgKeyConfig { + Id = "13DFECCA3B58CE4A", + Organization = "my-org-name" + }); + } +} +``` + +## Argument Reference + +The following arguments are supported: + +* `Id` - (Required) ID of the GPG key. +* `Organization` - (Optional) Name of the organization. If omitted, organization must be defined in the provider config. + +## Attributes Reference + +* `AsciiArmor` - ASCII-armored representation of the GPG key. +* `CreatedAt` - The time when the GPG key was created. +* `UpdatedAt` - The time when the GPG key was last updated. + + \ No newline at end of file diff --git a/website/docs/cdktf/csharp/d/registry_gpg_keys.html.markdown b/website/docs/cdktf/csharp/d/registry_gpg_keys.html.markdown new file mode 100644 index 000000000..628ce6774 --- /dev/null +++ b/website/docs/cdktf/csharp/d/registry_gpg_keys.html.markdown @@ -0,0 +1,48 @@ +--- +layout: "tfe" +page_title: "Terraform Enterprise: tfe_registry_gpg_keys" +description: |- + Get information on private registry GPG keys of an organization. +--- + + + +# Data Source: tfe_registry_gpg_key + +Use this data source to get information about all private registry GPG keys of an organization. + +## Example Usage + +```csharp +using Constructs; +using HashiCorp.Cdktf; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +using Gen.Providers.Tfe; +class MyConvertedCode : TerraformStack +{ + public MyConvertedCode(Construct scope, string name) : base(scope, name) + { + new DataTfeRegistryGpgKeys.DataTfeRegistryGpgKeys(this, "all", new DataTfeRegistryGpgKeysConfig { + Organization = "my-org-name" + }); + } +} +``` + +## Argument Reference + +The following arguments are supported: + +* `Organization` - (Optional) Name of the organization. If omitted, organization must be defined in the provider config. + +## Attributes Reference + +* `Keys` - List of GPG keys in the organization. Each element contains the following attributes: + * `Id` - ID of the GPG key. + * `Organization` - Name of the organization. + * `AsciiArmor` - ASCII-armored representation of the GPG key. + * `CreatedAt` - The time when the GPG key was created. + * `UpdatedAt` - The time when the GPG key was last updated. + + \ No newline at end of file diff --git a/website/docs/cdktf/csharp/d/registry_provider.html.markdown b/website/docs/cdktf/csharp/d/registry_provider.html.markdown new file mode 100644 index 000000000..fcdec26cd --- /dev/null +++ b/website/docs/cdktf/csharp/d/registry_provider.html.markdown @@ -0,0 +1,73 @@ +--- +layout: "tfe" +page_title: "Terraform Enterprise: tfe_registry_provider" +description: |- + Get information on a public or private provider in the private registry. +--- + + + +# Data Source: tfe_registry_provider + +Use this data source to get information about a public or private provider in the private registry. + +## Example Usage + +A private provider: + +```csharp +using Constructs; +using HashiCorp.Cdktf; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +using Gen.Providers.Tfe; +class MyConvertedCode : TerraformStack +{ + public MyConvertedCode(Construct scope, string name) : base(scope, name) + { + new RegistryProvider.RegistryProvider(this, "example", new RegistryProviderConfig { + Name = "my-provider", + Organization = "my-org-name" + }); + } +} +``` + +A public provider: + +```csharp +using Constructs; +using HashiCorp.Cdktf; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +using Gen.Providers.Tfe; +class MyConvertedCode : TerraformStack +{ + public MyConvertedCode(Construct scope, string name) : base(scope, name) + { + new RegistryProvider.RegistryProvider(this, "example", new RegistryProviderConfig { + Name = "aws", + Namespace = "hashicorp", + Organization = "my-org-name", + RegistryName = "public" + }); + } +} +``` + +## Argument Reference + +The following arguments are supported: + +* `Organization` - (Optional) Name of the organization. If omitted, organization must be defined in the provider config. +* `RegistryName` - (Optional) Whether this is a publicly maintained provider or private. Must be either `Public` or `Private`. Defaults to `Private`. +* `Namespace` - (Optional) The namespace of the provider. Required if `RegistryName` is `Public`, otherwise it can't be configured, and it will be set to same value as the `Organization`. +* `Name` - (Required) Name of the provider. + +## Attributes Reference + +* `Id` - ID of the provider. +* `CreatedAt` - The time when the provider was created. +* `UpdatedAt` - The time when the provider was last updated. + + \ No newline at end of file diff --git a/website/docs/cdktf/csharp/d/registry_providers.html.markdown b/website/docs/cdktf/csharp/d/registry_providers.html.markdown new file mode 100644 index 000000000..f3e82e314 --- /dev/null +++ b/website/docs/cdktf/csharp/d/registry_providers.html.markdown @@ -0,0 +1,94 @@ +--- +layout: "tfe" +page_title: "Terraform Enterprise: tfe_registry_providers" +description: |- + Get information on public and private providers in the private registry. +--- + + + +# Data Source: tfe_registry_providers + +Use this data source to get information about public and private providers in the private registry. + +## Example Usage + +All providers: + +```csharp +using Constructs; +using HashiCorp.Cdktf; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +using Gen.Providers.Tfe; +class MyConvertedCode : TerraformStack +{ + public MyConvertedCode(Construct scope, string name) : base(scope, name) + { + new DataTfeRegistryProviders.DataTfeRegistryProviders(this, "all", new DataTfeRegistryProvidersConfig { + Organization = "my-org-name" + }); + } +} +``` + +All private providers: + +```csharp +using Constructs; +using HashiCorp.Cdktf; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +using Gen.Providers.Tfe; +class MyConvertedCode : TerraformStack +{ + public MyConvertedCode(Construct scope, string name) : base(scope, name) + { + new DataTfeRegistryProviders.DataTfeRegistryProviders(this, "private", new DataTfeRegistryProvidersConfig { + Organization = "my-org-name", + RegistryName = "private" + }); + } +} +``` + +Providers with "hashicorp" in their namespace or name: + +```csharp +using Constructs; +using HashiCorp.Cdktf; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +using Gen.Providers.Tfe; +class MyConvertedCode : TerraformStack +{ + public MyConvertedCode(Construct scope, string name) : base(scope, name) + { + new DataTfeRegistryProviders.DataTfeRegistryProviders(this, "hashicorp", new DataTfeRegistryProvidersConfig { + Organization = "my-org-name", + Search = "hashicorp" + }); + } +} +``` + +## Argument Reference + +The following arguments are supported: + +* `Organization` - (Optional) Name of the organization. If omitted, organization must be defined in the provider config. +* `RegistryName` - (Optional) Whether to list only public or private providers. Must be either `Public` or `Private`. +* `Search` - (Optional) A query string to do a fuzzy search on provider name and namespace. + +## Attributes Reference + +* `Providers` - List of the providers. Each element contains the following attributes: + * `Id` - ID of the provider. + * `Organization` - Name of the organization. + * `RegistryName` - Whether this is a publicly maintained provider or private. + * `Namespace` - Namespace of the provider. + * `Name` - Name of the provider. + * `CreatedAt` - Time when the provider was created. + * `UpdatedAt` - Time when the provider was last updated. + + \ No newline at end of file diff --git a/website/docs/cdktf/csharp/d/workspace.html.markdown b/website/docs/cdktf/csharp/d/workspace.html.markdown index eacbfd771..baef07cdf 100644 --- a/website/docs/cdktf/csharp/d/workspace.html.markdown +++ b/website/docs/cdktf/csharp/d/workspace.html.markdown @@ -73,7 +73,7 @@ In addition to all arguments above, the following attributes are exported: * `TriggerPatterns` - List of [glob patterns](https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings/vcs#glob-patterns-for-automatic-run-triggering) that describe the files Terraform Cloud monitors for changes. Trigger patterns are always appended to the root directory of the repository. * `VcsRepo` - Settings for the workspace's VCS repository. * `WorkingDirectory` - A relative path that Terraform will execute within. -* `ExecutionMode` - Indicates the [execution mode](https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings#execution-mode) of the workspace. Possible values include `Remote`, `Local`, or `Agent`. +* `ExecutionMode` - Indicates the [execution mode](https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings#execution-mode) of the workspace. **Note:** This value might be derived from an organization-level default or set on the workspace itself; see the [`TfeWorkspaceSettings` resource](tfe_workspace_settings) for details. * `HtmlUrl` - The URL to the browsable HTML overview of the workspace @@ -88,4 +88,4 @@ The `VcsRepo` block contains: * `OauthTokenId` - OAuth token ID of the configured VCS connection. * `TagsRegex` - A regular expression used to trigger a Workspace run for matching Git tags. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/csharp/index.html.markdown b/website/docs/cdktf/csharp/index.html.markdown index cea2a6a1c..c87eddf03 100644 --- a/website/docs/cdktf/csharp/index.html.markdown +++ b/website/docs/cdktf/csharp/index.html.markdown @@ -77,7 +77,7 @@ automatically installed by `terraform init` in the future: terraform { required_providers { tfe = { - version = "~> 0.51.1" + version = "~> 0.53.0" } } } @@ -90,7 +90,7 @@ The above snippet using `RequiredProviders` is for Terraform 0.13+; if you are u ```hcl provider "tfe" { - version = "~> 0.51.1" + version = "~> 0.53.0" ... } ``` @@ -103,7 +103,7 @@ For more information on provider installation and constraining provider versions provider "tfe" { hostname = var.hostname # Optional, defaults to Terraform Cloud `AppTerraformIo` token = var.token - version = "~> 0.51.1" + version = "~> 0.53.0" } # Create an organization @@ -129,4 +129,4 @@ The following arguments are supported: arguments. Ensure that the organization already exists prior to using this argument. This can also be specified using the `TfeOrganization` environment variable. - + \ No newline at end of file diff --git a/website/docs/cdktf/csharp/r/admin_organization_settings.markdown b/website/docs/cdktf/csharp/r/admin_organization_settings.markdown index f9f49c9d2..76ce2f2e8 100644 --- a/website/docs/cdktf/csharp/r/admin_organization_settings.markdown +++ b/website/docs/cdktf/csharp/r/admin_organization_settings.markdown @@ -5,6 +5,8 @@ description: |- Manages admin settings for an organization (Terraform Enterprise Only). --- + + # tfe_admin_organization_settings Manage admin settings for an organization. This resource requires the @@ -64,8 +66,4 @@ The following arguments are supported: * `SsoEnabled` - True if SSO is enabled in this organization -## Import - -This resource does not manage the creation of an organization and there is no need to import it. - - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/csharp/r/agent_pool_allowed_workspaces.html.markdown b/website/docs/cdktf/csharp/r/agent_pool_allowed_workspaces.html.markdown index b04692099..87264830a 100644 --- a/website/docs/cdktf/csharp/r/agent_pool_allowed_workspaces.html.markdown +++ b/website/docs/cdktf/csharp/r/agent_pool_allowed_workspaces.html.markdown @@ -9,7 +9,7 @@ description: |- # tfe_agent_pool_allowed_workspaces -Adds and removes allowed workspaces on an agent pool +Adds and removes allowed workspaces on an agent pool. ~> **NOTE:** This resource requires using the provider with Terraform Cloud and a Terraform Cloud for Business account. @@ -17,36 +17,38 @@ for Business account. ## Example Usage -Basic usage: - -```csharp -using Constructs; -using HashiCorp.Cdktf; -/*Provider bindings are generated by running cdktf get. -See https://cdk.tf/provider-generation for more details.*/ -using Gen.Providers.Tfe; -class MyConvertedCode : TerraformStack -{ - public MyConvertedCode(Construct scope, string name) : base(scope, name) - { - var tfeOrganizationTestOrganization = new Organization.Organization(this, "test-organization", new OrganizationConfig { - Email = "admin@company.com", - Name = "my-org-name" - }); - var tfeWorkspaceTestWorkspace = new Workspace.Workspace(this, "test-workspace", new WorkspaceConfig { - Name = "my-workspace-name", - Organization = Token.AsString(tfeOrganizationTestOrganization.Name) - }); - var tfeAgentPoolTestAgentPool = new AgentPool.AgentPool(this, "test-agent-pool", new AgentPoolConfig { - Name = "my-agent-pool-name", - Organization = Token.AsString(tfeOrganizationTestOrganization.Name), - OrganizationScoped = false - }); - new AgentPoolAllowedWorkspaces.AgentPoolAllowedWorkspaces(this, "test-allowed-workspaces", new AgentPoolAllowedWorkspacesConfig { - AgentPoolId = Token.AsString(tfeAgentPoolTestAgentPool.Id), - AllowedWorkspaceIds = new [] { Token.AsString(tfeWorkspaceTestWorkspace.Id) } - }); - } +In this example, the agent pool and workspace are connected through other resources that manage the agent pool permissions as well as the workspace execution mode. Notice that the `TfeWorkspaceSettings` uses the agent pool reference found in `TfeAgentPoolAllowedWorkspaces` in order to create the permission to use the agent pool before assigning it. + +```hcl +resource "tfe_organization" "test-organization" { + name = "my-org-name" + email = "admin@company.com" +} + +// Ensure workspace and agent pool are create first +resource "tfe_workspace" "test-workspace" { + name = "my-workspace-name" + organization = tfe_organization.test-organization.name +} + +resource "tfe_agent_pool" "test-agent-pool" { + name = "my-agent-pool-name" + organization = tfe_organization.test-organization.name + organization_scoped = false +} + +// Ensure permissions are assigned second +resource "tfe_agent_pool_allowed_workspaces" "allowed" { + agent_pool_id = tfe_agent_pool.test-agent-pool.id + allowed_workspace_ids = [for key, value in tfe_workspace.test.*.id : value] +} + +// Lastly, ensure the workspace agent execution is assigned last by +// referencing allowed_workspaces +resource "tfe_workspace_settings" "test-workspace-settings" { + workspace_id = tfe_workspace.test-workspace.id + execution_mode = "agent" + agent_pool_id = tfe_agent_pool_allowed_workspaces.allowed.id } ``` @@ -66,5 +68,4 @@ A resource can be imported; use `` as the import ID. For example: terraform import tfe_agent_pool_allowed_workspaces.foobar apool-rW0KoLSlnuNb5adB ``` - - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/csharp/r/opa_version.html.markdown b/website/docs/cdktf/csharp/r/opa_version.html.markdown new file mode 100644 index 000000000..3445e35ce --- /dev/null +++ b/website/docs/cdktf/csharp/r/opa_version.html.markdown @@ -0,0 +1,68 @@ +--- +layout: "tfe" +page_title: "Terraform Enterprise: tfe_opa_version" +description: |- + Manages OPA versions +--- + + + +# tfe_opa_version + +Manage OPA versions available on Terraform Enterprise. + +## Example Usage + +Basic Usage: + +```csharp +using Constructs; +using HashiCorp.Cdktf; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +using Gen.Providers.Tfe; +class MyConvertedCode : TerraformStack +{ + public MyConvertedCode(Construct scope, string name) : base(scope, name) + { + new OpaVersion.OpaVersion(this, "test", new OpaVersionConfig { + Sha = "e75ac73deb69a6b3aa667cb0b8b731aee79e2904", + Url = "https://tfe-host.com/path/to/opa", + Version = "0.58.0-custom" + }); + } +} +``` + +## Argument Reference + +The following arguments are supported: + +* `Version` - (Required) A semantic version string in N.N.N or N.N.N-bundleName format. +* `Url` - (Required) The URL where a 64-bit Linux binary of this version can be downloaded. +* `Sha` - (Required) The SHA-256 checksum of the compressed OPA binary. +* `Official` - (Optional) Whether or not this is an official release of OPA. Defaults to "false". +* `Enabled` - (Optional) Whether or not this version of OPA is enabled for use in Terraform Cloud/Enterprise. Defaults to "true". +* `Beta` - (Optional) Whether or not this version of OPA is beta pre-release. Defaults to "false". +* `Deprecated` - (Optional) Whether or not this version of OPA is deprecated. Defaults to "false". +* `DeprecatedReason` - (Optional) Additional context about why a version of OPA is deprecated. Defaults to "null" unless `Deprecated` is true. + +## Attributes Reference + +* `Id` The ID of the OPA version + +## Import + +OPA versions can be imported; use `` or `` as the import ID. For example: + +```shell +terraform import tfe_opa_version.test tool-L4oe7rNwn7J4E5Yr +``` + +```shell +terraform import tfe_opa_version.test 0.58.0 +``` + +-> **Note:** You can fetch a OPA version ID from the URL of an existing version in the Terraform Cloud UI. The ID is in the format `tool-` + + \ No newline at end of file diff --git a/website/docs/cdktf/csharp/r/organization.html.markdown b/website/docs/cdktf/csharp/r/organization.html.markdown index da087c241..9731348cc 100644 --- a/website/docs/cdktf/csharp/r/organization.html.markdown +++ b/website/docs/cdktf/csharp/r/organization.html.markdown @@ -5,6 +5,8 @@ description: |- Manages organizations. --- + + # tfe_organization Manages organizations. @@ -46,6 +48,7 @@ The following arguments are supported: * `OwnersTeamSamlRoleId` - (Optional) The name of the "owners" team. * `CostEstimationEnabled` - (Optional) Whether or not the cost estimation feature is enabled for all workspaces in the organization. Defaults to true. In a Terraform Cloud organization which does not have Teams & Governance features, this value is always false and cannot be changed. In Terraform Enterprise, Cost Estimation must also be enabled in Site Administration. * `SendPassingStatusesForUntriggeredSpeculativePlans` - (Optional) Whether or not to send VCS status updates for untriggered speculative plans. This can be useful if large numbers of untriggered workspaces are exhausting request limits for connected version control service providers like GitHub. Defaults to false. In Terraform Enterprise, this setting has no effect and cannot be changed but is also available in Site Administration. +* `AggregatedCommitStatusEnabled` - (Optional) Whether or not to enable Aggregated Status Checks. This can be useful for monorepo repositories with multiple workspaces receiving status checks for events such as a pull request. If enabled, `SendPassingStatusesForUntriggeredSpeculativePlans` needs to be false. * `AssessmentsEnforced` - (Optional) (Available only in Terraform Cloud) Whether to force health assessments (drift detection) on all eligible workspaces or allow workspaces to set their own preferences. * `AllowForceDeleteWorkspaces` - (Optional) Whether workspace administrators are permitted to delete workspaces with resources under management. If false, only organization owners may delete these workspaces. Defaults to false. @@ -62,4 +65,4 @@ example: terraform import tfe_organization.test my-org-name ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/csharp/r/organization_default_settings.html.markdown b/website/docs/cdktf/csharp/r/organization_default_settings.html.markdown new file mode 100644 index 000000000..b3e87d051 --- /dev/null +++ b/website/docs/cdktf/csharp/r/organization_default_settings.html.markdown @@ -0,0 +1,68 @@ +--- +layout: "tfe" +page_title: "Terraform Enterprise: tfe_organization_default_settings +description: |- + Sets the workspace defaults for an organization +--- + + + +# tfe_organization_default_settings + +Primarily, this is used to set the default execution mode of an organization. Settings configured here will be used as the default for all workspaces in the organization, unless they specify their own values with a [`TfeWorkspaceSettings` resource](workspace_settings.html) (or deprecated attributes on the workspace resource). + +## Example Usage + +Basic usage: + +```csharp +using Constructs; +using HashiCorp.Cdktf; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +using Gen.Providers.Tfe; +class MyConvertedCode : TerraformStack +{ + public MyConvertedCode(Construct scope, string name) : base(scope, name) + { + var tfeOrganizationTest = new Organization.Organization(this, "test", new OrganizationConfig { + Email = "admin@company.com", + Name = "my-org-name" + }); + var tfeAgentPoolMyAgents = new AgentPool.AgentPool(this, "my_agents", new AgentPoolConfig { + Name = "agent_smiths", + Organization = Token.AsString(tfeOrganizationTest.Name) + }); + var tfeOrganizationDefaultSettingsOrgDefault = + new OrganizationDefaultSettings.OrganizationDefaultSettings(this, "org_default", new OrganizationDefaultSettingsConfig { + DefaultAgentPoolId = Token.AsString(tfeAgentPoolMyAgents.Id), + DefaultExecutionMode = "agent", + Organization = Token.AsString(tfeOrganizationTest.Name) + }); + new Workspace.Workspace(this, "my_workspace", new WorkspaceConfig { + DependsOn = new [] { tfeOrganizationDefaultSettingsOrgDefault }, + Name = "my-workspace" + }); + } +} +``` + +## Argument Reference + +The following arguments are supported: + +* `DefaultExecutionMode` - (Optional) Which [execution mode](https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings#execution-mode) + to use as the default for all workspaces in the organization. Valid values are `Remote`, `Local` or`Agent`. +* `DefaultAgentPoolId` - (Optional) The ID of an agent pool to assign to the workspace. Requires `DefaultExecutionMode` to be set to `Agent`. This value _must not_ be provided if `DefaultExecutionMode` is set to any other value. +* `Organization` - (Optional) Name of the organization. If omitted, organization must be defined in the provider config. + + +## Import + +Organization default execution mode can be imported; use `` as the import ID. For example: + +```shell +terraform import tfe_organization_default_execution_mode.test my-org-name +``` + + \ No newline at end of file diff --git a/website/docs/cdktf/csharp/r/policy_set.html.markdown b/website/docs/cdktf/csharp/r/policy_set.html.markdown index c153e085c..ce16d3adb 100644 --- a/website/docs/cdktf/csharp/r/policy_set.html.markdown +++ b/website/docs/cdktf/csharp/r/policy_set.html.markdown @@ -5,6 +5,8 @@ description: |- Manages policy sets. --- + + # tfe_policy_set Policies are rules enforced on Terraform runs. Two policy-as-code frameworks are @@ -21,12 +23,14 @@ 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] + name = "my-policy-set" + description = "A brand new policy set" + organization = "my-org-name" + kind = "sentinel" + agent_enabled = "true" + policy_tool_version = "0.24.1" + policies_path = "policies/my-policy-set" + workspace_ids = [tfe_workspace.test.id] vcs_repo { identifier = "my-org-name/my-policy-set-repository" @@ -41,12 +45,14 @@ 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] + name = "my-policy-set" + description = "A brand new policy set" + organization = "my-org-name" + kind = "sentinel" + agent_enabled = "true" + policy_tool_version = "0.24.1" + policy_ids = [tfe_sentinel_policy.test.id] + workspace_ids = [tfe_workspace.test.id] } ``` @@ -81,6 +87,9 @@ The following arguments are supported: * `Kind` - (Optional) The policy-as-code framework associated with the policy. Defaults to `Sentinel` if not provided. Valid values are `Sentinel` and `Opa`. A policy set can only have policies that have the same underlying kind. +* `AgentEnabled` - (Optional) Whether or not the policy set is run as a policy evaluation within the agent. + True by default for all "opa" policy sets. +* `PolicyToolVersion` - (Optional) The policy tool version to run the evaluation against. * `Overridable` - (Optional) Whether or not users can override this policy when it fails during a run. Defaults to `False`. Only valid for OPA policies. * `Organization` - (Optional) Name of the organization. If omitted, organization must be defined in the provider config. @@ -126,4 +135,4 @@ Policy sets can be imported; use `` as the import ID. For example terraform import tfe_policy_set.test polset-wAs3zYmWAhYK7peR ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/csharp/r/registry_gpg_key.html.markdown b/website/docs/cdktf/csharp/r/registry_gpg_key.html.markdown new file mode 100644 index 000000000..00c924dd0 --- /dev/null +++ b/website/docs/cdktf/csharp/r/registry_gpg_key.html.markdown @@ -0,0 +1,48 @@ +--- +layout: "tfe" +page_title: "Terraform Enterprise: tfe_registry_gpg_key" +description: |- + Manages private registry GPG keys. +--- + + + +# tfe_registry_gpg_key + +Manages a public key of the GPG key pair used to sign releases of private providers in the private registry. + +The provided GPG key must be ASCII-armored, i.e. starting with: +"`-----BEGIN PGP PUBLIC KEY BLOCK-----\n\n...`". + +## Example Usage + +```hcl +resource "tfe_registry_gpg_key" "example" { + organization = "my-org-name" + ascii_armor = file("my-public-key.asc") +} +``` + +## Argument Reference + +The following arguments are supported: + +* `AsciiArmor` - (Required) ASCII-armored representation of the GPG key. +* `Organization` - (Optional) Name of the organization. If omitted, organization must be defined in the provider config. + +## Attributes Reference + +* `Id` - ID of the GPG key. +* `CreatedAt` - The time when the GPG key was created. +* `UpdatedAt` - The time when the GPG key was last updated. + +## Import + +Keys can be imported; use `/` as the import ID. For +example: + +```shell +terraform import tfe_registry_gpg_key.example my-org-name/34365D9472D7468F +``` + + \ No newline at end of file diff --git a/website/docs/cdktf/csharp/r/registry_module.html.markdown b/website/docs/cdktf/csharp/r/registry_module.html.markdown index 1fb935029..d79ea5c63 100644 --- a/website/docs/cdktf/csharp/r/registry_module.html.markdown +++ b/website/docs/cdktf/csharp/r/registry_module.html.markdown @@ -47,6 +47,44 @@ class MyConvertedCode : TerraformStack } ``` +Create private registry module with tests enabled: + +```csharp +using Constructs; +using HashiCorp.Cdktf; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +using Gen.Providers.Tfe; +class MyConvertedCode : TerraformStack +{ + public MyConvertedCode(Construct scope, string name) : base(scope, name) + { + var tfeOrganizationTestOrganization = new Organization.Organization(this, "test-organization", new OrganizationConfig { + Email = "admin@company.com", + Name = "my-org-name" + }); + var tfeOauthClientTestOauthClient = new OauthClient.OauthClient(this, "test-oauth-client", new OauthClientConfig { + ApiUrl = "https://api.github.com", + HttpUrl = "https://github.com", + OauthToken = "my-vcs-provider-token", + Organization = Token.AsString(tfeOrganizationTestOrganization.Name), + ServiceProvider = "github" + }); + new RegistryModule.RegistryModule(this, "test-registry-module", new RegistryModuleConfig { + TestConfig = new [] { new RegistryModuleTestConfig { + TestsEnabled = true + } }, + VcsRepo = new RegistryModuleVcsRepo { + Branch = "main", + DisplayIdentifier = "my-org-name/terraform-provider-name", + Identifier = "my-org-name/terraform-provider-name", + OauthTokenId = Token.AsString(tfeOauthClientTestOauthClient.OauthTokenId) + } + }); + } +} +``` + Create private registry module with GitHub App: ```csharp @@ -176,6 +214,9 @@ The following arguments are supported: * `Namespace` - (Optional) The namespace of a public registry module. It can be used if `ModuleProvider` is set and `RegistryName` is public. * `RegistryName` - (Optional) Whether the registry module is private or public. It can be used if `ModuleProvider` is set. +The `TestConfig` block supports +* `TestsEnabled` - (Optional) Specifies whether tests run for the registry module. Tests are only supported for branch-based publishing. + The `VcsRepo` block supports: * `DisplayIdentifier` - (Required) The display identifier for your VCS repository. @@ -186,6 +227,8 @@ The `VcsRepo` block supports: and repository in your VCS provider. The format for Azure DevOps is `//_git/`. * `OauthTokenId` - (Optional) Token ID of the VCS Connection (OAuth Connection Token) to use. This conflicts with `GithubAppInstallationId` and can only be used if `GithubAppInstallationId` is not used. * `GithubAppInstallationId` - (Optional) The installation id of the Github App. This conflicts with `OauthTokenId` and can only be used if `OauthTokenId` is not used. +* `Branch` - (Optional) The git branch used for publishing when using branch-based publishing for the registry module. When a `Branch` is set, `Tags` will be returned as `False`. +* `Tags` - (Optional) Specifies whether tag based publishing is enabled for the registry module. When `Tags` is set to `True`, the `Branch` must be set to an empty value. ## Attributes Reference @@ -194,6 +237,7 @@ The `VcsRepo` block supports: * `Name` - The name of registry module. * `Organization` - The name of the organization associated with the registry module. * `Namespace` - The namespace of the module. For private modules this is the name of the organization that owns the module. +* `PublishingMechanism` - The publishing mechanism used when releasing new versions of the module. * `RegistryName` - The registry name of the registry module depicting whether the registry module is private or public. * `NoCode` - **Deprecated** The property that will enable or disable a module as no-code provisioning ready. Use the tfe_no_code_module resource instead. @@ -212,4 +256,4 @@ terraform import tfe_registry_module.test my-org-name/public/namespace/name/prov terraform import tfe_registry_module.test my-org-name/name/provider/mod-qV9JnKRkmtMa4zcA ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/csharp/r/registry_provider.html.markdown b/website/docs/cdktf/csharp/r/registry_provider.html.markdown new file mode 100644 index 000000000..f6295952d --- /dev/null +++ b/website/docs/cdktf/csharp/r/registry_provider.html.markdown @@ -0,0 +1,103 @@ +--- +layout: "tfe" +page_title: "Terraform Enterprise: tfe_registry_provider" +description: |- + Manages public and private providers in the private registry. +--- + + + +# tfe_registry_provider + +Manages public and private providers in the private registry. + +## Example Usage + +Create private provider: + +```csharp +using Constructs; +using HashiCorp.Cdktf; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +using Gen.Providers.Tfe; +class MyConvertedCode : TerraformStack +{ + public MyConvertedCode(Construct scope, string name) : base(scope, name) + { + var tfeOrganizationExample = new Organization.Organization(this, "example", new OrganizationConfig { + Email = "admin@company.com", + Name = "my-org-name" + }); + var tfeRegistryProviderExample = + new RegistryProvider.RegistryProvider(this, "example_1", new RegistryProviderConfig { + Name = "my-provider", + Organization = Token.AsString(tfeOrganizationExample.Name) + }); + /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ + tfeRegistryProviderExample.OverrideLogicalId("example"); + } +} +``` + +Create public provider: + +```csharp +using Constructs; +using HashiCorp.Cdktf; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +using Gen.Providers.Tfe; +class MyConvertedCode : TerraformStack +{ + public MyConvertedCode(Construct scope, string name) : base(scope, name) + { + var tfeOrganizationExample = new Organization.Organization(this, "example", new OrganizationConfig { + Email = "admin@company.com", + Name = "my-org-name" + }); + var tfeRegistryProviderExample = + new RegistryProvider.RegistryProvider(this, "example_1", new RegistryProviderConfig { + Name = "aws", + Namespace = "hashicorp", + Organization = Token.AsString(tfeOrganizationExample.Name), + RegistryName = "public" + }); + /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ + tfeRegistryProviderExample.OverrideLogicalId("example"); + } +} +``` + +## Argument Reference + +The following arguments are supported: + +* `Organization` - (Optional) Name of the organization. If omitted, organization must be defined in the provider config. +* `RegistryName` - (Optional) Whether this is a publicly maintained provider or private. Must be either `Public` or `Private`. Defaults to `Private`. +* `Namespace` - (Optional) The namespace of the provider. Required if `RegistryName` is `Public`, otherwise it can't be configured, and it will be set to same value as the `Organization`. +* `Name` - (Required) Name of the provider. + +## Attributes Reference + +* `Id` - ID of the provider. +* `CreatedAt` - The time when the provider was created. +* `UpdatedAt` - The time when the provider was last updated. + +## Import + +Providers can be imported; use `///` as the import ID. + +For example a private provider: + +```shell +terraform import tfe_registry_provider.example my-org-name/private/my-org-name/my-provider +``` + +Or a public provider: + +```shell +terraform import tfe_registry_provider.example my-org-name/public/hashicorp/aws +``` + + \ No newline at end of file diff --git a/website/docs/cdktf/csharp/r/sentinel_version.html.markdown b/website/docs/cdktf/csharp/r/sentinel_version.html.markdown new file mode 100644 index 000000000..b1c40adaf --- /dev/null +++ b/website/docs/cdktf/csharp/r/sentinel_version.html.markdown @@ -0,0 +1,68 @@ +--- +layout: "tfe" +page_title: "Terraform Enterprise: tfe_sentinel_version" +description: |- + Manages Sentinel versions +--- + + + +# tfe_sentinel_version + +Manage Sentinel versions available on Terraform Cloud/Enterprise. + +## Example Usage + +Basic Usage: + +```csharp +using Constructs; +using HashiCorp.Cdktf; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +using Gen.Providers.Tfe; +class MyConvertedCode : TerraformStack +{ + public MyConvertedCode(Construct scope, string name) : base(scope, name) + { + new SentinelVersion.SentinelVersion(this, "test", new SentinelVersionConfig { + Sha = "e75ac73deb69a6b3aa667cb0b8b731aee79e2904", + Url = "https://tfe-host.com/path/to/sentinel.zip", + Version = "0.24.0-custom" + }); + } +} +``` + +## Argument Reference + +The following arguments are supported: + +* `Version` - (Required) A semantic version string in N.N.N or N.N.N-bundleName format. +* `Url` - (Required) The URL where a ZIP-compressed 64-bit Linux binary of this version can be downloaded. +* `Sha` - (Required) The SHA-256 checksum of the compressed Sentinel binary. +* `Official` - (Optional) Whether or not this is an official release of Sentinel. Defaults to "false". +* `Enabled` - (Optional) Whether or not this version of Sentinel is enabled for use in Terraform Cloud/Enterprise. Defaults to "true". +* `Beta` - (Optional) Whether or not this version of Sentinel is beta pre-release. Defaults to "false". +* `Deprecated` - (Optional) Whether or not this version of Sentinel is deprecated. Defaults to "false". +* `DeprecatedReason` - (Optional) Additional context about why a version of Sentinel is deprecated. Defaults to "null" unless `Deprecated` is true. + +## Attributes Reference + +* `Id` The ID of the Sentinel version + +## Import + +Sentinel versions can be imported; use `` or `` as the import ID. For example: + +```shell +terraform import tfe_sentinel_version.test tool-L4oe7rNwn7J4E5Yr +``` + +```shell +terraform import tfe_sentinel_version.test 0.24.0 +``` + +-> **Note:** You can fetch a Sentinel version ID from the URL of an existing version in the Terraform Cloud UI. The ID is in the format `tool-` + + \ No newline at end of file diff --git a/website/docs/cdktf/csharp/r/team_project_access.html.markdown b/website/docs/cdktf/csharp/r/team_project_access.html.markdown index 2be7db365..24536719d 100644 --- a/website/docs/cdktf/csharp/r/team_project_access.html.markdown +++ b/website/docs/cdktf/csharp/r/team_project_access.html.markdown @@ -141,4 +141,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/csharp/r/workspace.html.markdown b/website/docs/cdktf/csharp/r/workspace.html.markdown index 8eae67322..e7cf18ea1 100644 --- a/website/docs/cdktf/csharp/r/workspace.html.markdown +++ b/website/docs/cdktf/csharp/r/workspace.html.markdown @@ -11,6 +11,8 @@ description: |- Provides a workspace resource. +~> **NOTE:** Setting the execution mode and agent pool affinity directly on the workspace is deprecated in favor of using both [tfe_workspace_settings](workspace_settings) and [tfe_organization_default_settings](organization_default_settings), since they allow more precise control and fully support [agent_pool_allowed_workspaces](agent_pool_allowed_workspaces). Use caution when unsetting `ExecutionMode`, as it now leaves any prior value unmanaged instead of reverting to the old default value of `"remote"`. + ~> **NOTE:** Using `GlobalRemoteState` or `RemoteStateConsumerIds` requires using the provider with Terraform Cloud or an instance of Terraform Enterprise at least as recent as v202104-1. ## Example Usage @@ -40,7 +42,7 @@ class MyConvertedCode : TerraformStack } ``` -With `ExecutionMode` of `Agent`: +Usage with vcs_repo: ```csharp using Constructs; @@ -56,15 +58,22 @@ class MyConvertedCode : TerraformStack Email = "admin@company.com", Name = "my-org-name" }); - var tfeAgentPoolTestAgentPool = new AgentPool.AgentPool(this, "test-agent-pool", new AgentPoolConfig { - Name = "my-agent-pool-name", - Organization = Token.AsString(tfeOrganizationTestOrganization.Name) + var tfeOauthClientTest = new OauthClient.OauthClient(this, "test", new OauthClientConfig { + ApiUrl = "https://api.github.com", + HttpUrl = "https://github.com", + OauthToken = "oauth_token_id", + Organization = tfeOrganizationTestOrganization, + ServiceProvider = "github" }); - new Workspace.Workspace(this, "test", new WorkspaceConfig { - AgentPoolId = Token.AsString(tfeAgentPoolTestAgentPool.Id), - ExecutionMode = "agent", - Name = "my-workspace-name", - Organization = Token.AsString(tfeOrganizationTestOrganization.Name) + new Workspace.Workspace(this, "parent", new WorkspaceConfig { + Name = "parent-ws", + Organization = tfeOrganizationTestOrganization, + QueueAllRuns = false, + VcsRepo = new WorkspaceVcsRepo { + Branch = "main", + Identifier = "my-org-name/vcs-repository", + OauthTokenId = Token.AsString(tfeOauthClientTest.OauthTokenId) + } }); } } @@ -75,20 +84,13 @@ class MyConvertedCode : TerraformStack The following arguments are supported: * `Name` - (Required) Name of the workspace. -* `AgentPoolId` - (Optional) The ID of an agent pool to assign to the workspace. Requires `ExecutionMode` - to be set to `Agent`. This value _must not_ be provided if `ExecutionMode` is set to any other value or if `Operations` is - provided. +* `AgentPoolId` - (Optional) **Deprecated** The ID of an agent pool to assign to the workspace. Use [tfe_workspace_settings](workspace_settings) instead. * `AllowDestroyPlan` - (Optional) Whether destroy plans can be queued on the workspace. * `AssessmentsEnabled` - (Optional) Whether to regularly run health assessments such as drift detection on the workspace. Defaults to `False`. * `AutoApply` - (Optional) Whether to automatically apply changes when a Terraform plan is successful. Defaults to `False`. * `AutoApplyRunTrigger` - (Optional) Whether to automatically apply changes for runs that were created by run triggers from another workspace. Defaults to `False`. * `Description` - (Optional) A description for the workspace. -* `ExecutionMode` - (Optional) Which [execution mode](https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings#execution-mode) - to use. Using Terraform Cloud, valid values are `Remote`, `Local` or`Agent`. - Defaults to `Remote`. Using Terraform Enterprise, only `Remote`and `Local` - execution modes are valid. When set to `Local`, the workspace will be used - for state storage only. This value _must not_ be provided if `Operations` - is provided. +* `ExecutionMode` - (Optional) **Deprecated** Which [execution mode](https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings#execution-mode) to use. Use [tfe_workspace_settings](workspace_settings) instead. * `FileTriggersEnabled` - (Optional) Whether to filter runs based on the changed files in a VCS push. Defaults to `True`. If enabled, the working directory and trigger prefixes describe a set of paths which must contain changes for a @@ -132,6 +134,11 @@ The following arguments are supported: workspace will display their output as text logs. * `SshKeyId` - (Optional) The ID of an SSH key to assign to the workspace. * `TagNames` - (Optional) A list of tag names for this workspace. Note that tags must only contain lowercase letters, numbers, colons, or hyphens. +* `IgnoreAdditionalTagNames` - (Optional) Explicitly ignores `TagNames` +_not_ defined by config so they will not be overwritten by the configured +tags. This creates exceptional behavior in terraform with respect +to `TagNames` and is not recommended. This value must be applied before it +will be used. * `TerraformVersion` - (Optional) The version of Terraform to use for this workspace. This can be either an exact version or a [version constraint](https://developer.hashicorp.com/terraform/language/expressions/version-constraints) @@ -166,7 +173,7 @@ In addition to all arguments above, the following attributes are exported: * `Id` - The workspace ID. * `ResourceCount` - The number of resources managed by the workspace. -* `HtmlUrl` - The URL to the browsable HTML overview of the workspace +* `HtmlUrl` - The URL to the browsable HTML overview of the workspace. ## Import @@ -181,4 +188,4 @@ terraform import tfe_workspace.test ws-CH5in3chf8RJjrVd terraform import tfe_workspace.test my-org-name/my-wkspace-name ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/csharp/r/workspace_settings.markdown b/website/docs/cdktf/csharp/r/workspace_settings.markdown new file mode 100644 index 000000000..3199f9e63 --- /dev/null +++ b/website/docs/cdktf/csharp/r/workspace_settings.markdown @@ -0,0 +1,145 @@ +--- +layout: "tfe" +page_title: "Terraform Enterprise: tfe_workspace_setting" +description: |- + Manages workspace settings. +--- + + + +# tfe_workspace_settings + +Manages or reads execution mode and agent pool settings for a workspace. This also interacts with the organization's default values for several settings, which can be managed with [tfe_organization_default_settings](organization_default_settings.html). If other resources need to identify whether a setting is a default or an explicit value set for the workspace, you can refer to the read-only `Overwrites` argument. + +## Example Usage + +Basic usage: + +```csharp +using Constructs; +using HashiCorp.Cdktf; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +using Gen.Providers.Tfe; +class MyConvertedCode : TerraformStack +{ + public MyConvertedCode(Construct scope, string name) : base(scope, name) + { + var tfeOrganizationTestOrganization = new Organization.Organization(this, "test-organization", new OrganizationConfig { + Email = "admin@company.com", + Name = "my-org-name" + }); + var tfeWorkspaceTest = new Workspace.Workspace(this, "test", new WorkspaceConfig { + Name = "my-workspace-name", + Organization = Token.AsString(tfeOrganizationTestOrganization.Name) + }); + new WorkspaceSettings.WorkspaceSettings(this, "test-settings", new WorkspaceSettingsConfig { + ExecutionMode = "local", + WorkspaceId = Token.AsString(tfeWorkspaceTest.Id) + }); + } +} +``` + +With `ExecutionMode` of `Agent`: + +```csharp +using Constructs; +using HashiCorp.Cdktf; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +using Gen.Providers.Tfe; +class MyConvertedCode : TerraformStack +{ + public MyConvertedCode(Construct scope, string name) : base(scope, name) + { + var tfeOrganizationTestOrganization = new Organization.Organization(this, "test-organization", new OrganizationConfig { + Email = "admin@company.com", + Name = "my-org-name" + }); + var tfeWorkspaceTest = new Workspace.Workspace(this, "test", new WorkspaceConfig { + Name = "my-workspace-name", + Organization = Token.AsString(tfeOrganizationTestOrganization.Name) + }); + var tfeAgentPoolTestAgentPool = new AgentPool.AgentPool(this, "test-agent-pool", new AgentPoolConfig { + Name = "my-agent-pool-name", + Organization = Token.AsString(tfeOrganizationTestOrganization.Name) + }); + var tfeAgentPoolAllowedWorkspacesTest = + new AgentPoolAllowedWorkspaces.AgentPoolAllowedWorkspaces(this, "test_3", new AgentPoolAllowedWorkspacesConfig { + AgentPoolId = Token.AsString(tfeAgentPoolTestAgentPool.Id), + AllowedWorkspaceIds = new [] { Token.AsString(tfeWorkspaceTest.Id) } + }); + /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ + tfeAgentPoolAllowedWorkspacesTest.OverrideLogicalId("test"); + new WorkspaceSettings.WorkspaceSettings(this, "test-settings", new WorkspaceSettingsConfig { + AgentPoolId = Token.AsString(tfeAgentPoolAllowedWorkspacesTest.AgentPoolId), + ExecutionMode = "agent", + WorkspaceId = Token.AsString(tfeWorkspaceTest.Id) + }); + } +} +``` + +This resource may be used as a data source when no optional arguments are defined: + +```csharp +using Constructs; +using HashiCorp.Cdktf; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +using Gen.Providers.Tfe; +class MyConvertedCode : TerraformStack +{ + public MyConvertedCode(Construct scope, string name) : base(scope, name) + { + var dataTfeWorkspaceTest = new DataTfeWorkspace.DataTfeWorkspace(this, "test", new DataTfeWorkspaceConfig { + Name = "my-workspace-name", + Organization = "my-org-name" + }); + var tfeWorkspaceSettingsTest = + new WorkspaceSettings.WorkspaceSettings(this, "test_1", new WorkspaceSettingsConfig { + WorkspaceId = Token.AsString(dataTfeWorkspaceTest.Id) + }); + /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ + tfeWorkspaceSettingsTest.OverrideLogicalId("test"); + new TerraformOutput(this, "workspace-explicit-local-execution", new TerraformOutputConfig { + Value = Fn.Alltrue(Token.AsAny(new [] { Op.Eq(tfeWorkspaceSettingsTest.ExecutionMode, "local"), PropertyAccess(tfeWorkspaceSettingsTest.Overwrites, new [] { "0", "\"execution_mode\"" }) })) + }); + } +} +``` + +## Argument Reference + +The following arguments are supported: + +* `WorkspaceId` - (Required) ID of the workspace. +* `AgentPoolId` - (Optional) The ID of an agent pool to assign to the workspace. Requires `ExecutionMode` + to be set to `Agent`. This value _must not_ be provided if `ExecutionMode` is set to any other value. +* `ExecutionMode` - (Optional) Which [execution mode](https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings#execution-mode) + to use. Using Terraform Cloud, valid values are `Remote`, `Local` or `Agent`. Using Terraform Enterprise, only `Remote` and `Local` execution modes are valid. When set to `Local`, the workspace will be used for state storage only. **Important:** If you omit this attribute, the resource configures the workspace to use your organization's default execution mode (which in turn defaults to `Remote`), removing any explicit value that might have previously been set for the workspace. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `Id` - The workspace ID. +* `Overwrites` - Can be used to check whether a setting is currently inheriting its value from another resource. + - `ExecutionMode` - Set to `True` if the execution mode of the workspace is being determined by the setting on the workspace itself. It will be `False` if the execution mode is inherited from another resource (e.g. the organization's default execution mode) + - `AgentPool` - Set to `True` if the agent pool of the workspace is being determined by the setting on the workspace itself. It will be `False` if the agent pool is inherited from another resource (e.g. the organization's default agent pool) + +## Import + +Workspaces can be imported; use `` or `/` as the +import ID. For example: + +```shell +terraform import tfe_workspace_settings.test ws-CH5in3chf8RJjrVd +``` + +```shell +terraform import tfe_workspace_settings.test my-org-name/my-wkspace-name +``` + + \ No newline at end of file diff --git a/website/docs/cdktf/go/d/github_installation.html.markdown b/website/docs/cdktf/go/d/github_installation.html.markdown index 941c10e9e..56d3c18f9 100644 --- a/website/docs/cdktf/go/d/github_installation.html.markdown +++ b/website/docs/cdktf/go/d/github_installation.html.markdown @@ -5,6 +5,8 @@ description: |- Get information on the Github App Installation. --- + + # Data Source: tfe_github_app_installation Use this data source to get information about the Github App Installation. @@ -27,7 +29,7 @@ func newMyConvertedCode(scope construct, name *string) *myConvertedCode { this := &myConvertedCode{} cdktf.NewTerraformStack_Override(this, scope, name) dataTfeGithubAppInstallation.NewDataTfeGithubAppInstallation(this, jsii.String("gha_installation"), &dataTfeGithubAppInstallationConfig{ - installationId: jsii.Number(12345), + installationId: jsii.Number(12345678), }) return this } @@ -49,7 +51,7 @@ func newMyConvertedCode(scope construct, name *string) *myConvertedCode { this := &myConvertedCode{} cdktf.NewTerraformStack_Override(this, scope, name) dataTfeGithubAppInstallation.NewDataTfeGithubAppInstallation(this, jsii.String("gha_installation"), &dataTfeGithubAppInstallationConfig{ - name: jsii.String("installation_name"), + name: jsii.String("github_username_or_organization"), }) return this } @@ -57,11 +59,11 @@ func newMyConvertedCode(scope construct, name *string) *myConvertedCode { ## Argument Reference -The following arguments are supported. At least one of `Name`, `InstallationId` must be set. +The following arguments are supported. At least one of `Name`, `InstallationId` must be set. + +* `InstallationId` - (Optional) ID of the Github Installation. The installation ID can be found in the URL slug when visiting the installation's configuration page, e.g `Https://githubCom/settings/installations/12345678`. +* `Name` - (Optional) Name of the Github user or organization account that installed the app. -* `InstallationId` - (Optional) ID of the Github Installation as shown in Github. -* `Name` - (Optional) Name of the Github Installation as shown in Github. - Must be one of: `InstallationId` or `Name`. ## Attributes Reference @@ -69,4 +71,5 @@ Must be one of: `InstallationId` or `Name`. In addition to all arguments above, the following attributes are exported: * `Id` - The internal ID of the Github Installation. This is different from the `InstallationId`. - \ No newline at end of file + + \ No newline at end of file diff --git a/website/docs/cdktf/go/d/no_code_module.html.markdown b/website/docs/cdktf/go/d/no_code_module.html.markdown new file mode 100644 index 000000000..9d77a582e --- /dev/null +++ b/website/docs/cdktf/go/d/no_code_module.html.markdown @@ -0,0 +1,42 @@ +--- +layout: "tfe" +page_title: "Terraform Enterprise: tfe_no_code_module" +description: |- + Get information on a no-code module. +--- + + + +# Data Source: tfe_registry_provider + +Use this data source to read the details of an existing No-Code-Allowed module. + +## Example Usage + +```hcl +resource "tfe_no_code_module" "foobar" { + organization = tfe_organization.foobar.id + registry_module = tfe_registry_module.foobar.id +} + +data "tfe_no_code_module" "foobar" { + id = tfe_no_code_module.foobar.id +} +``` + +## Argument Reference + +The following arguments are supported: + +* `Id` - (Required) ID of the no-code module. + +## Attributes Reference + +* `Id` - ID of the no-code module. +* `Organization` - Organization name that the no-code module belongs to. +* `Namespace` - Namespace name that the no-code module belongs to. +* `RegistryModuleId` - ID of the registry module for the no-code module. +* `VersionPin` - Version number the no-code module is pinned to. +* `Enabled` - Indicates if this no-code module is currently enabled + + \ No newline at end of file diff --git a/website/docs/cdktf/go/d/organization.html.markdown b/website/docs/cdktf/go/d/organization.html.markdown index ad64043cc..dba59c1a3 100644 --- a/website/docs/cdktf/go/d/organization.html.markdown +++ b/website/docs/cdktf/go/d/organization.html.markdown @@ -5,6 +5,8 @@ description: |- Get information on an Organization. --- + + # Data Source: tfe_organization Use this data source to get information about an organization. @@ -34,13 +36,12 @@ func newMyConvertedCode(scope construct, name *string) *myConvertedCode { ## Argument Reference The following arguments are supported: -* `Name` - (Required) Name of the organization. +* `Name` - (Optional) Name of the organization. If omitted, organization must be defined in the provider config. ## Attributes Reference In addition to all arguments above, the following attributes are exported: -* `Name` - Name of the organization. * `Email` - Admin email address. * `ExternalId` - An identifier for the organization. * `AssessmentsEnforced` - (Available only in Terraform Cloud) Whether to force health assessments (drift detection) on all eligible workspaces or allow workspaces to set thier own preferences. @@ -48,5 +49,7 @@ In addition to all arguments above, the following attributes are exported: * `CostEstimationEnabled` - Whether or not the cost estimation feature is enabled for all workspaces in the organization. Defaults to true. In a Terraform Cloud organization which does not have Teams & Governance features, this value is always false and cannot be changed. In Terraform Enterprise, Cost Estimation must also be enabled in Site Administration. * `OwnersTeamSamlRoleId` - The name of the "owners" team. * `SendPassingStatusesForUntriggeredSpeculativePlans` - Whether or not to send VCS status updates for untriggered speculative plans. This can be useful if large numbers of untriggered workspaces are exhausting request limits for connected version control service providers like GitHub. Defaults to true. In Terraform Enterprise, this setting has no effect and cannot be changed but is also available in Site Administration. +* `AggregatedCommitStatusEnabled` - Whether or not to enable Aggregated Status Checks. This can be useful for monorepo repositories with multiple workspaces receiving status checks for events such as a pull request. * `DefaultProjectId` - ID of the organization's default project. All workspaces created without specifying a project ID are created in this project. - \ No newline at end of file + + \ No newline at end of file diff --git a/website/docs/cdktf/go/d/policy_set.html.markdown b/website/docs/cdktf/go/d/policy_set.html.markdown index b2e4ddee0..6b24d9df5 100644 --- a/website/docs/cdktf/go/d/policy_set.html.markdown +++ b/website/docs/cdktf/go/d/policy_set.html.markdown @@ -51,6 +51,8 @@ The following arguments are supported: * `Description` - Description of the policy set. * `Global` - Whether or not the policy set applies to all workspaces in the organization. * `Kind` - The policy-as-code framework for the policy. Valid values are "sentinel" and "opa". +* `AgentEnabled` - Whether or not the policy set is run as a policy evaluation within the agent. True by default for all "opa" policy sets. +* `PolicyToolVersion` - The policy tool version to run the evaluation against. * `Overridable` - Whether users can override this policy when it fails during a run. Only valid for OPA policies. * `WorkspaceIds` - IDs of the workspaces that use the policy set. * `ExcludedWorkspaceIds` - IDs of the workspaces that do not use the policy set. @@ -70,4 +72,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/go/d/registry_gpg_key.html.markdown b/website/docs/cdktf/go/d/registry_gpg_key.html.markdown new file mode 100644 index 000000000..ed45eddce --- /dev/null +++ b/website/docs/cdktf/go/d/registry_gpg_key.html.markdown @@ -0,0 +1,50 @@ +--- +layout: "tfe" +page_title: "Terraform Enterprise: tfe_registry_gpg_key" +description: |- + Get information on a private registry GPG key. +--- + + + +# Data Source: tfe_registry_gpg_key + +Use this data source to get information about a private registry GPG key. + +## Example Usage + +```go +import constructs "github.com/aws/constructs-go/constructs" +import cdktf "github.com/hashicorp/terraform-cdk-go/cdktf" +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import "github.com/aws-samples/dummy/gen/providers/tfe/dataTfeRegistryGpgKey" +type myConvertedCode struct { + terraformStack +} + +func newMyConvertedCode(scope construct, name *string) *myConvertedCode { + this := &myConvertedCode{} + cdktf.NewTerraformStack_Override(this, scope, name) + dataTfeRegistryGpgKey.NewDataTfeRegistryGpgKey(this, jsii.String("example"), &dataTfeRegistryGpgKeyConfig{ + id: jsii.String("13DFECCA3B58CE4A"), + organization: jsii.String("my-org-name"), + }) + return this +} +``` + +## Argument Reference + +The following arguments are supported: + +* `Id` - (Required) ID of the GPG key. +* `Organization` - (Optional) Name of the organization. If omitted, organization must be defined in the provider config. + +## Attributes Reference + +* `AsciiArmor` - ASCII-armored representation of the GPG key. +* `CreatedAt` - The time when the GPG key was created. +* `UpdatedAt` - The time when the GPG key was last updated. + + \ No newline at end of file diff --git a/website/docs/cdktf/go/d/registry_gpg_keys.html.markdown b/website/docs/cdktf/go/d/registry_gpg_keys.html.markdown new file mode 100644 index 000000000..8e09b0a64 --- /dev/null +++ b/website/docs/cdktf/go/d/registry_gpg_keys.html.markdown @@ -0,0 +1,51 @@ +--- +layout: "tfe" +page_title: "Terraform Enterprise: tfe_registry_gpg_keys" +description: |- + Get information on private registry GPG keys of an organization. +--- + + + +# Data Source: tfe_registry_gpg_key + +Use this data source to get information about all private registry GPG keys of an organization. + +## Example Usage + +```go +import constructs "github.com/aws/constructs-go/constructs" +import cdktf "github.com/hashicorp/terraform-cdk-go/cdktf" +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import "github.com/aws-samples/dummy/gen/providers/tfe/dataTfeRegistryGpgKeys" +type myConvertedCode struct { + terraformStack +} + +func newMyConvertedCode(scope construct, name *string) *myConvertedCode { + this := &myConvertedCode{} + cdktf.NewTerraformStack_Override(this, scope, name) + dataTfeRegistryGpgKeys.NewDataTfeRegistryGpgKeys(this, jsii.String("all"), &dataTfeRegistryGpgKeysConfig{ + organization: jsii.String("my-org-name"), + }) + return this +} +``` + +## Argument Reference + +The following arguments are supported: + +* `Organization` - (Optional) Name of the organization. If omitted, organization must be defined in the provider config. + +## Attributes Reference + +* `Keys` - List of GPG keys in the organization. Each element contains the following attributes: + * `Id` - ID of the GPG key. + * `Organization` - Name of the organization. + * `AsciiArmor` - ASCII-armored representation of the GPG key. + * `CreatedAt` - The time when the GPG key was created. + * `UpdatedAt` - The time when the GPG key was last updated. + + \ No newline at end of file diff --git a/website/docs/cdktf/go/d/registry_provider.html.markdown b/website/docs/cdktf/go/d/registry_provider.html.markdown new file mode 100644 index 000000000..593b3e261 --- /dev/null +++ b/website/docs/cdktf/go/d/registry_provider.html.markdown @@ -0,0 +1,79 @@ +--- +layout: "tfe" +page_title: "Terraform Enterprise: tfe_registry_provider" +description: |- + Get information on a public or private provider in the private registry. +--- + + + +# Data Source: tfe_registry_provider + +Use this data source to get information about a public or private provider in the private registry. + +## Example Usage + +A private provider: + +```go +import constructs "github.com/aws/constructs-go/constructs" +import cdktf "github.com/hashicorp/terraform-cdk-go/cdktf" +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import "github.com/aws-samples/dummy/gen/providers/tfe/registryProvider" +type myConvertedCode struct { + terraformStack +} + +func newMyConvertedCode(scope construct, name *string) *myConvertedCode { + this := &myConvertedCode{} + cdktf.NewTerraformStack_Override(this, scope, name) + registryProvider.NewRegistryProvider(this, jsii.String("example"), ®istryProviderConfig{ + name: jsii.String("my-provider"), + organization: jsii.String("my-org-name"), + }) + return this +} +``` + +A public provider: + +```go +import constructs "github.com/aws/constructs-go/constructs" +import cdktf "github.com/hashicorp/terraform-cdk-go/cdktf" +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import "github.com/aws-samples/dummy/gen/providers/tfe/registryProvider" +type myConvertedCode struct { + terraformStack +} + +func newMyConvertedCode(scope construct, name *string) *myConvertedCode { + this := &myConvertedCode{} + cdktf.NewTerraformStack_Override(this, scope, name) + registryProvider.NewRegistryProvider(this, jsii.String("example"), ®istryProviderConfig{ + name: jsii.String("aws"), + namespace: jsii.String("hashicorp"), + organization: jsii.String("my-org-name"), + registryName: jsii.String("public"), + }) + return this +} +``` + +## Argument Reference + +The following arguments are supported: + +* `Organization` - (Optional) Name of the organization. If omitted, organization must be defined in the provider config. +* `RegistryName` - (Optional) Whether this is a publicly maintained provider or private. Must be either `Public` or `Private`. Defaults to `Private`. +* `Namespace` - (Optional) The namespace of the provider. Required if `RegistryName` is `Public`, otherwise it can't be configured, and it will be set to same value as the `Organization`. +* `Name` - (Required) Name of the provider. + +## Attributes Reference + +* `Id` - ID of the provider. +* `CreatedAt` - The time when the provider was created. +* `UpdatedAt` - The time when the provider was last updated. + + \ No newline at end of file diff --git a/website/docs/cdktf/go/d/registry_providers.html.markdown b/website/docs/cdktf/go/d/registry_providers.html.markdown new file mode 100644 index 000000000..67caf9bd9 --- /dev/null +++ b/website/docs/cdktf/go/d/registry_providers.html.markdown @@ -0,0 +1,103 @@ +--- +layout: "tfe" +page_title: "Terraform Enterprise: tfe_registry_providers" +description: |- + Get information on public and private providers in the private registry. +--- + + + +# Data Source: tfe_registry_providers + +Use this data source to get information about public and private providers in the private registry. + +## Example Usage + +All providers: + +```go +import constructs "github.com/aws/constructs-go/constructs" +import cdktf "github.com/hashicorp/terraform-cdk-go/cdktf" +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import "github.com/aws-samples/dummy/gen/providers/tfe/dataTfeRegistryProviders" +type myConvertedCode struct { + terraformStack +} + +func newMyConvertedCode(scope construct, name *string) *myConvertedCode { + this := &myConvertedCode{} + cdktf.NewTerraformStack_Override(this, scope, name) + dataTfeRegistryProviders.NewDataTfeRegistryProviders(this, jsii.String("all"), &dataTfeRegistryProvidersConfig{ + organization: jsii.String("my-org-name"), + }) + return this +} +``` + +All private providers: + +```go +import constructs "github.com/aws/constructs-go/constructs" +import cdktf "github.com/hashicorp/terraform-cdk-go/cdktf" +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import "github.com/aws-samples/dummy/gen/providers/tfe/dataTfeRegistryProviders" +type myConvertedCode struct { + terraformStack +} + +func newMyConvertedCode(scope construct, name *string) *myConvertedCode { + this := &myConvertedCode{} + cdktf.NewTerraformStack_Override(this, scope, name) + dataTfeRegistryProviders.NewDataTfeRegistryProviders(this, jsii.String("private"), &dataTfeRegistryProvidersConfig{ + organization: jsii.String("my-org-name"), + registryName: jsii.String("private"), + }) + return this +} +``` + +Providers with "hashicorp" in their namespace or name: + +```go +import constructs "github.com/aws/constructs-go/constructs" +import cdktf "github.com/hashicorp/terraform-cdk-go/cdktf" +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import "github.com/aws-samples/dummy/gen/providers/tfe/dataTfeRegistryProviders" +type myConvertedCode struct { + terraformStack +} + +func newMyConvertedCode(scope construct, name *string) *myConvertedCode { + this := &myConvertedCode{} + cdktf.NewTerraformStack_Override(this, scope, name) + dataTfeRegistryProviders.NewDataTfeRegistryProviders(this, jsii.String("hashicorp"), &dataTfeRegistryProvidersConfig{ + organization: jsii.String("my-org-name"), + search: jsii.String("hashicorp"), + }) + return this +} +``` + +## Argument Reference + +The following arguments are supported: + +* `Organization` - (Optional) Name of the organization. If omitted, organization must be defined in the provider config. +* `RegistryName` - (Optional) Whether to list only public or private providers. Must be either `Public` or `Private`. +* `Search` - (Optional) A query string to do a fuzzy search on provider name and namespace. + +## Attributes Reference + +* `Providers` - List of the providers. Each element contains the following attributes: + * `Id` - ID of the provider. + * `Organization` - Name of the organization. + * `RegistryName` - Whether this is a publicly maintained provider or private. + * `Namespace` - Namespace of the provider. + * `Name` - Name of the provider. + * `CreatedAt` - Time when the provider was created. + * `UpdatedAt` - Time when the provider was last updated. + + \ No newline at end of file diff --git a/website/docs/cdktf/go/d/workspace.html.markdown b/website/docs/cdktf/go/d/workspace.html.markdown index df1d3ac00..81084b9c6 100644 --- a/website/docs/cdktf/go/d/workspace.html.markdown +++ b/website/docs/cdktf/go/d/workspace.html.markdown @@ -76,7 +76,7 @@ In addition to all arguments above, the following attributes are exported: * `TriggerPatterns` - List of [glob patterns](https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings/vcs#glob-patterns-for-automatic-run-triggering) that describe the files Terraform Cloud monitors for changes. Trigger patterns are always appended to the root directory of the repository. * `VcsRepo` - Settings for the workspace's VCS repository. * `WorkingDirectory` - A relative path that Terraform will execute within. -* `ExecutionMode` - Indicates the [execution mode](https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings#execution-mode) of the workspace. Possible values include `Remote`, `Local`, or `Agent`. +* `ExecutionMode` - Indicates the [execution mode](https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings#execution-mode) of the workspace. **Note:** This value might be derived from an organization-level default or set on the workspace itself; see the [`TfeWorkspaceSettings` resource](tfe_workspace_settings) for details. * `HtmlUrl` - The URL to the browsable HTML overview of the workspace @@ -91,4 +91,4 @@ The `VcsRepo` block contains: * `OauthTokenId` - OAuth token ID of the configured VCS connection. * `TagsRegex` - A regular expression used to trigger a Workspace run for matching Git tags. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/go/index.html.markdown b/website/docs/cdktf/go/index.html.markdown index cea2a6a1c..c87eddf03 100644 --- a/website/docs/cdktf/go/index.html.markdown +++ b/website/docs/cdktf/go/index.html.markdown @@ -77,7 +77,7 @@ automatically installed by `terraform init` in the future: terraform { required_providers { tfe = { - version = "~> 0.51.1" + version = "~> 0.53.0" } } } @@ -90,7 +90,7 @@ The above snippet using `RequiredProviders` is for Terraform 0.13+; if you are u ```hcl provider "tfe" { - version = "~> 0.51.1" + version = "~> 0.53.0" ... } ``` @@ -103,7 +103,7 @@ For more information on provider installation and constraining provider versions provider "tfe" { hostname = var.hostname # Optional, defaults to Terraform Cloud `AppTerraformIo` token = var.token - version = "~> 0.51.1" + version = "~> 0.53.0" } # Create an organization @@ -129,4 +129,4 @@ The following arguments are supported: arguments. Ensure that the organization already exists prior to using this argument. This can also be specified using the `TfeOrganization` environment variable. - + \ No newline at end of file diff --git a/website/docs/cdktf/go/r/admin_organization_settings.markdown b/website/docs/cdktf/go/r/admin_organization_settings.markdown index f9f49c9d2..76ce2f2e8 100644 --- a/website/docs/cdktf/go/r/admin_organization_settings.markdown +++ b/website/docs/cdktf/go/r/admin_organization_settings.markdown @@ -5,6 +5,8 @@ description: |- Manages admin settings for an organization (Terraform Enterprise Only). --- + + # tfe_admin_organization_settings Manage admin settings for an organization. This resource requires the @@ -64,8 +66,4 @@ The following arguments are supported: * `SsoEnabled` - True if SSO is enabled in this organization -## Import - -This resource does not manage the creation of an organization and there is no need to import it. - - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/go/r/agent_pool_allowed_workspaces.html.markdown b/website/docs/cdktf/go/r/agent_pool_allowed_workspaces.html.markdown index 2a99c7204..87264830a 100644 --- a/website/docs/cdktf/go/r/agent_pool_allowed_workspaces.html.markdown +++ b/website/docs/cdktf/go/r/agent_pool_allowed_workspaces.html.markdown @@ -9,7 +9,7 @@ description: |- # tfe_agent_pool_allowed_workspaces -Adds and removes allowed workspaces on an agent pool +Adds and removes allowed workspaces on an agent pool. ~> **NOTE:** This resource requires using the provider with Terraform Cloud and a Terraform Cloud for Business account. @@ -17,44 +17,38 @@ for Business account. ## Example Usage -Basic usage: - -```go -import constructs "github.com/aws/constructs-go/constructs" -import "github.com/hashicorp/terraform-cdk-go/cdktf" -/*Provider bindings are generated by running cdktf get. -See https://cdk.tf/provider-generation for more details.*/ -import "github.com/aws-samples/dummy/gen/providers/tfe/organization" -import "github.com/aws-samples/dummy/gen/providers/tfe/workspace" -import "github.com/aws-samples/dummy/gen/providers/tfe/agentPool" -import "github.com/aws-samples/dummy/gen/providers/tfe/agentPoolAllowedWorkspaces" -type myConvertedCode struct { - terraformStack +In this example, the agent pool and workspace are connected through other resources that manage the agent pool permissions as well as the workspace execution mode. Notice that the `TfeWorkspaceSettings` uses the agent pool reference found in `TfeAgentPoolAllowedWorkspaces` in order to create the permission to use the agent pool before assigning it. + +```hcl +resource "tfe_organization" "test-organization" { + name = "my-org-name" + email = "admin@company.com" +} + +// Ensure workspace and agent pool are create first +resource "tfe_workspace" "test-workspace" { + name = "my-workspace-name" + organization = tfe_organization.test-organization.name +} + +resource "tfe_agent_pool" "test-agent-pool" { + name = "my-agent-pool-name" + organization = tfe_organization.test-organization.name + organization_scoped = false +} + +// Ensure permissions are assigned second +resource "tfe_agent_pool_allowed_workspaces" "allowed" { + agent_pool_id = tfe_agent_pool.test-agent-pool.id + allowed_workspace_ids = [for key, value in tfe_workspace.test.*.id : value] } -func newMyConvertedCode(scope construct, name *string) *myConvertedCode { - this := &myConvertedCode{} - cdktf.NewTerraformStack_Override(this, scope, name) - tfeOrganizationTestOrganization := organization.NewOrganization(this, jsii.String("test-organization"), &organizationConfig{ - email: jsii.String("admin@company.com"), - name: jsii.String("my-org-name"), - }) - tfeWorkspaceTestWorkspace := workspace.NewWorkspace(this, jsii.String("test-workspace"), &workspaceConfig{ - name: jsii.String("my-workspace-name"), - organization: cdktf.Token_AsString(tfeOrganizationTestOrganization.name), - }) - tfeAgentPoolTestAgentPool := agentPool.NewAgentPool(this, jsii.String("test-agent-pool"), &agentPoolConfig{ - name: jsii.String("my-agent-pool-name"), - organization: cdktf.Token_*AsString(tfeOrganizationTestOrganization.name), - organizationScoped: jsii.Boolean(false), - }) - agentPoolAllowedWorkspaces.NewAgentPoolAllowedWorkspaces(this, jsii.String("test-allowed-workspaces"), &agentPoolAllowedWorkspacesConfig{ - agentPoolId: cdktf.Token_*AsString(tfeAgentPoolTestAgentPool.id), - allowedWorkspaceIds: []*string{ - cdktf.Token_*AsString(tfeWorkspaceTestWorkspace.id), - }, - }) - return this +// Lastly, ensure the workspace agent execution is assigned last by +// referencing allowed_workspaces +resource "tfe_workspace_settings" "test-workspace-settings" { + workspace_id = tfe_workspace.test-workspace.id + execution_mode = "agent" + agent_pool_id = tfe_agent_pool_allowed_workspaces.allowed.id } ``` @@ -74,5 +68,4 @@ A resource can be imported; use `` as the import ID. For example: terraform import tfe_agent_pool_allowed_workspaces.foobar apool-rW0KoLSlnuNb5adB ``` - - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/go/r/opa_version.html.markdown b/website/docs/cdktf/go/r/opa_version.html.markdown new file mode 100644 index 000000000..3404fc6b2 --- /dev/null +++ b/website/docs/cdktf/go/r/opa_version.html.markdown @@ -0,0 +1,71 @@ +--- +layout: "tfe" +page_title: "Terraform Enterprise: tfe_opa_version" +description: |- + Manages OPA versions +--- + + + +# tfe_opa_version + +Manage OPA versions available on Terraform Enterprise. + +## Example Usage + +Basic Usage: + +```go +import constructs "github.com/aws/constructs-go/constructs" +import cdktf "github.com/hashicorp/terraform-cdk-go/cdktf" +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import "github.com/aws-samples/dummy/gen/providers/tfe/opaVersion" +type myConvertedCode struct { + terraformStack +} + +func newMyConvertedCode(scope construct, name *string) *myConvertedCode { + this := &myConvertedCode{} + cdktf.NewTerraformStack_Override(this, scope, name) + opaVersion.NewOpaVersion(this, jsii.String("test"), &opaVersionConfig{ + sha: jsii.String("e75ac73deb69a6b3aa667cb0b8b731aee79e2904"), + url: jsii.String("https://tfe-host.com/path/to/opa"), + version: jsii.String("0.58.0-custom"), + }) + return this +} +``` + +## Argument Reference + +The following arguments are supported: + +* `Version` - (Required) A semantic version string in N.N.N or N.N.N-bundleName format. +* `Url` - (Required) The URL where a 64-bit Linux binary of this version can be downloaded. +* `Sha` - (Required) The SHA-256 checksum of the compressed OPA binary. +* `Official` - (Optional) Whether or not this is an official release of OPA. Defaults to "false". +* `Enabled` - (Optional) Whether or not this version of OPA is enabled for use in Terraform Cloud/Enterprise. Defaults to "true". +* `Beta` - (Optional) Whether or not this version of OPA is beta pre-release. Defaults to "false". +* `Deprecated` - (Optional) Whether or not this version of OPA is deprecated. Defaults to "false". +* `DeprecatedReason` - (Optional) Additional context about why a version of OPA is deprecated. Defaults to "null" unless `Deprecated` is true. + +## Attributes Reference + +* `Id` The ID of the OPA version + +## Import + +OPA versions can be imported; use `` or `` as the import ID. For example: + +```shell +terraform import tfe_opa_version.test tool-L4oe7rNwn7J4E5Yr +``` + +```shell +terraform import tfe_opa_version.test 0.58.0 +``` + +-> **Note:** You can fetch a OPA version ID from the URL of an existing version in the Terraform Cloud UI. The ID is in the format `tool-` + + \ No newline at end of file diff --git a/website/docs/cdktf/go/r/organization.html.markdown b/website/docs/cdktf/go/r/organization.html.markdown index 382d4b4db..18aa8b09a 100644 --- a/website/docs/cdktf/go/r/organization.html.markdown +++ b/website/docs/cdktf/go/r/organization.html.markdown @@ -5,6 +5,8 @@ description: |- Manages organizations. --- + + # tfe_organization Manages organizations. @@ -49,6 +51,7 @@ The following arguments are supported: * `OwnersTeamSamlRoleId` - (Optional) The name of the "owners" team. * `CostEstimationEnabled` - (Optional) Whether or not the cost estimation feature is enabled for all workspaces in the organization. Defaults to true. In a Terraform Cloud organization which does not have Teams & Governance features, this value is always false and cannot be changed. In Terraform Enterprise, Cost Estimation must also be enabled in Site Administration. * `SendPassingStatusesForUntriggeredSpeculativePlans` - (Optional) Whether or not to send VCS status updates for untriggered speculative plans. This can be useful if large numbers of untriggered workspaces are exhausting request limits for connected version control service providers like GitHub. Defaults to false. In Terraform Enterprise, this setting has no effect and cannot be changed but is also available in Site Administration. +* `AggregatedCommitStatusEnabled` - (Optional) Whether or not to enable Aggregated Status Checks. This can be useful for monorepo repositories with multiple workspaces receiving status checks for events such as a pull request. If enabled, `SendPassingStatusesForUntriggeredSpeculativePlans` needs to be false. * `AssessmentsEnforced` - (Optional) (Available only in Terraform Cloud) Whether to force health assessments (drift detection) on all eligible workspaces or allow workspaces to set their own preferences. * `AllowForceDeleteWorkspaces` - (Optional) Whether workspace administrators are permitted to delete workspaces with resources under management. If false, only organization owners may delete these workspaces. Defaults to false. @@ -65,4 +68,4 @@ example: terraform import tfe_organization.test my-org-name ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/go/r/organization_default_settings.html.markdown b/website/docs/cdktf/go/r/organization_default_settings.html.markdown new file mode 100644 index 000000000..4fb9e6bea --- /dev/null +++ b/website/docs/cdktf/go/r/organization_default_settings.html.markdown @@ -0,0 +1,76 @@ +--- +layout: "tfe" +page_title: "Terraform Enterprise: tfe_organization_default_settings +description: |- + Sets the workspace defaults for an organization +--- + + + +# tfe_organization_default_settings + +Primarily, this is used to set the default execution mode of an organization. Settings configured here will be used as the default for all workspaces in the organization, unless they specify their own values with a [`TfeWorkspaceSettings` resource](workspace_settings.html) (or deprecated attributes on the workspace resource). + +## Example Usage + +Basic usage: + +```go +import constructs "github.com/aws/constructs-go/constructs" +import "github.com/hashicorp/terraform-cdk-go/cdktf" +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import "github.com/aws-samples/dummy/gen/providers/tfe/organization" +import "github.com/aws-samples/dummy/gen/providers/tfe/agentPool" +import "github.com/aws-samples/dummy/gen/providers/tfe/organizationDefaultSettings" +import "github.com/aws-samples/dummy/gen/providers/tfe/workspace" +type myConvertedCode struct { + terraformStack +} + +func newMyConvertedCode(scope construct, name *string) *myConvertedCode { + this := &myConvertedCode{} + cdktf.NewTerraformStack_Override(this, scope, name) + tfeOrganizationTest := organization.NewOrganization(this, jsii.String("test"), &organizationConfig{ + email: jsii.String("admin@company.com"), + name: jsii.String("my-org-name"), + }) + tfeAgentPoolMyAgents := agentPool.NewAgentPool(this, jsii.String("my_agents"), &agentPoolConfig{ + name: jsii.String("agent_smiths"), + organization: cdktf.Token_AsString(tfeOrganizationTest.name), + }) + tfeOrganizationDefaultSettingsOrgDefault := + organizationDefaultSettings.NewOrganizationDefaultSettings(this, jsii.String("org_default"), &organizationDefaultSettingsConfig{ + defaultAgentPoolId: cdktf.Token_*AsString(tfeAgentPoolMyAgents.id), + defaultExecutionMode: jsii.String("agent"), + organization: cdktf.Token_*AsString(tfeOrganizationTest.name), + }) + workspace.NewWorkspace(this, jsii.String("my_workspace"), &workspaceConfig{ + dependsOn: []iTerraformDependable{ + tfeOrganizationDefaultSettingsOrgDefault, + }, + name: jsii.String("my-workspace"), + }) + return this +} +``` + +## Argument Reference + +The following arguments are supported: + +* `DefaultExecutionMode` - (Optional) Which [execution mode](https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings#execution-mode) + to use as the default for all workspaces in the organization. Valid values are `Remote`, `Local` or`Agent`. +* `DefaultAgentPoolId` - (Optional) The ID of an agent pool to assign to the workspace. Requires `DefaultExecutionMode` to be set to `Agent`. This value _must not_ be provided if `DefaultExecutionMode` is set to any other value. +* `Organization` - (Optional) Name of the organization. If omitted, organization must be defined in the provider config. + + +## Import + +Organization default execution mode can be imported; use `` as the import ID. For example: + +```shell +terraform import tfe_organization_default_execution_mode.test my-org-name +``` + + \ No newline at end of file diff --git a/website/docs/cdktf/go/r/policy_set.html.markdown b/website/docs/cdktf/go/r/policy_set.html.markdown index c153e085c..ce16d3adb 100644 --- a/website/docs/cdktf/go/r/policy_set.html.markdown +++ b/website/docs/cdktf/go/r/policy_set.html.markdown @@ -5,6 +5,8 @@ description: |- Manages policy sets. --- + + # tfe_policy_set Policies are rules enforced on Terraform runs. Two policy-as-code frameworks are @@ -21,12 +23,14 @@ 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] + name = "my-policy-set" + description = "A brand new policy set" + organization = "my-org-name" + kind = "sentinel" + agent_enabled = "true" + policy_tool_version = "0.24.1" + policies_path = "policies/my-policy-set" + workspace_ids = [tfe_workspace.test.id] vcs_repo { identifier = "my-org-name/my-policy-set-repository" @@ -41,12 +45,14 @@ 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] + name = "my-policy-set" + description = "A brand new policy set" + organization = "my-org-name" + kind = "sentinel" + agent_enabled = "true" + policy_tool_version = "0.24.1" + policy_ids = [tfe_sentinel_policy.test.id] + workspace_ids = [tfe_workspace.test.id] } ``` @@ -81,6 +87,9 @@ The following arguments are supported: * `Kind` - (Optional) The policy-as-code framework associated with the policy. Defaults to `Sentinel` if not provided. Valid values are `Sentinel` and `Opa`. A policy set can only have policies that have the same underlying kind. +* `AgentEnabled` - (Optional) Whether or not the policy set is run as a policy evaluation within the agent. + True by default for all "opa" policy sets. +* `PolicyToolVersion` - (Optional) The policy tool version to run the evaluation against. * `Overridable` - (Optional) Whether or not users can override this policy when it fails during a run. Defaults to `False`. Only valid for OPA policies. * `Organization` - (Optional) Name of the organization. If omitted, organization must be defined in the provider config. @@ -126,4 +135,4 @@ Policy sets can be imported; use `` as the import ID. For example terraform import tfe_policy_set.test polset-wAs3zYmWAhYK7peR ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/go/r/registry_gpg_key.html.markdown b/website/docs/cdktf/go/r/registry_gpg_key.html.markdown new file mode 100644 index 000000000..00c924dd0 --- /dev/null +++ b/website/docs/cdktf/go/r/registry_gpg_key.html.markdown @@ -0,0 +1,48 @@ +--- +layout: "tfe" +page_title: "Terraform Enterprise: tfe_registry_gpg_key" +description: |- + Manages private registry GPG keys. +--- + + + +# tfe_registry_gpg_key + +Manages a public key of the GPG key pair used to sign releases of private providers in the private registry. + +The provided GPG key must be ASCII-armored, i.e. starting with: +"`-----BEGIN PGP PUBLIC KEY BLOCK-----\n\n...`". + +## Example Usage + +```hcl +resource "tfe_registry_gpg_key" "example" { + organization = "my-org-name" + ascii_armor = file("my-public-key.asc") +} +``` + +## Argument Reference + +The following arguments are supported: + +* `AsciiArmor` - (Required) ASCII-armored representation of the GPG key. +* `Organization` - (Optional) Name of the organization. If omitted, organization must be defined in the provider config. + +## Attributes Reference + +* `Id` - ID of the GPG key. +* `CreatedAt` - The time when the GPG key was created. +* `UpdatedAt` - The time when the GPG key was last updated. + +## Import + +Keys can be imported; use `/` as the import ID. For +example: + +```shell +terraform import tfe_registry_gpg_key.example my-org-name/34365D9472D7468F +``` + + \ No newline at end of file diff --git a/website/docs/cdktf/go/r/registry_module.html.markdown b/website/docs/cdktf/go/r/registry_module.html.markdown index ba24cd66d..5ea05e661 100644 --- a/website/docs/cdktf/go/r/registry_module.html.markdown +++ b/website/docs/cdktf/go/r/registry_module.html.markdown @@ -52,6 +52,51 @@ func newMyConvertedCode(scope construct, name *string) *myConvertedCode { } ``` +Create private registry module with tests enabled: + +```go +import constructs "github.com/aws/constructs-go/constructs" +import "github.com/hashicorp/terraform-cdk-go/cdktf" +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import "github.com/aws-samples/dummy/gen/providers/tfe/organization" +import "github.com/aws-samples/dummy/gen/providers/tfe/oauthClient" +import "github.com/aws-samples/dummy/gen/providers/tfe/registryModule" +type myConvertedCode struct { + terraformStack +} + +func newMyConvertedCode(scope construct, name *string) *myConvertedCode { + this := &myConvertedCode{} + cdktf.NewTerraformStack_Override(this, scope, name) + tfeOrganizationTestOrganization := organization.NewOrganization(this, jsii.String("test-organization"), &organizationConfig{ + email: jsii.String("admin@company.com"), + name: jsii.String("my-org-name"), + }) + tfeOauthClientTestOauthClient := oauthClient.NewOauthClient(this, jsii.String("test-oauth-client"), &oauthClientConfig{ + apiUrl: jsii.String("https://api.github.com"), + httpUrl: jsii.String("https://github.com"), + oauthToken: jsii.String("my-vcs-provider-token"), + organization: cdktf.Token_AsString(tfeOrganizationTestOrganization.name), + serviceProvider: jsii.String("github"), + }) + registryModule.NewRegistryModule(this, jsii.String("test-registry-module"), ®istryModuleConfig{ + testConfig: []interface{}{ + ®istryModuleTestConfig{ + testsEnabled: jsii.Boolean(true), + }, + }, + vcsRepo: ®istryModuleVcsRepo{ + branch: jsii.String("main"), + displayIdentifier: jsii.String("my-org-name/terraform-provider-name"), + identifier: jsii.String("my-org-name/terraform-provider-name"), + oauthTokenId: cdktf.Token_*AsString(tfeOauthClientTestOauthClient.oauthTokenId), + }, + }) + return this +} +``` + Create private registry module with GitHub App: ```go @@ -199,6 +244,9 @@ The following arguments are supported: * `Namespace` - (Optional) The namespace of a public registry module. It can be used if `ModuleProvider` is set and `RegistryName` is public. * `RegistryName` - (Optional) Whether the registry module is private or public. It can be used if `ModuleProvider` is set. +The `TestConfig` block supports +* `TestsEnabled` - (Optional) Specifies whether tests run for the registry module. Tests are only supported for branch-based publishing. + The `VcsRepo` block supports: * `DisplayIdentifier` - (Required) The display identifier for your VCS repository. @@ -209,6 +257,8 @@ The `VcsRepo` block supports: and repository in your VCS provider. The format for Azure DevOps is `//_git/`. * `OauthTokenId` - (Optional) Token ID of the VCS Connection (OAuth Connection Token) to use. This conflicts with `GithubAppInstallationId` and can only be used if `GithubAppInstallationId` is not used. * `GithubAppInstallationId` - (Optional) The installation id of the Github App. This conflicts with `OauthTokenId` and can only be used if `OauthTokenId` is not used. +* `Branch` - (Optional) The git branch used for publishing when using branch-based publishing for the registry module. When a `Branch` is set, `Tags` will be returned as `False`. +* `Tags` - (Optional) Specifies whether tag based publishing is enabled for the registry module. When `Tags` is set to `True`, the `Branch` must be set to an empty value. ## Attributes Reference @@ -217,6 +267,7 @@ The `VcsRepo` block supports: * `Name` - The name of registry module. * `Organization` - The name of the organization associated with the registry module. * `Namespace` - The namespace of the module. For private modules this is the name of the organization that owns the module. +* `PublishingMechanism` - The publishing mechanism used when releasing new versions of the module. * `RegistryName` - The registry name of the registry module depicting whether the registry module is private or public. * `NoCode` - **Deprecated** The property that will enable or disable a module as no-code provisioning ready. Use the tfe_no_code_module resource instead. @@ -235,4 +286,4 @@ terraform import tfe_registry_module.test my-org-name/public/namespace/name/prov terraform import tfe_registry_module.test my-org-name/name/provider/mod-qV9JnKRkmtMa4zcA ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/go/r/registry_provider.html.markdown b/website/docs/cdktf/go/r/registry_provider.html.markdown new file mode 100644 index 000000000..8cdf415fd --- /dev/null +++ b/website/docs/cdktf/go/r/registry_provider.html.markdown @@ -0,0 +1,111 @@ +--- +layout: "tfe" +page_title: "Terraform Enterprise: tfe_registry_provider" +description: |- + Manages public and private providers in the private registry. +--- + + + +# tfe_registry_provider + +Manages public and private providers in the private registry. + +## Example Usage + +Create private provider: + +```go +import constructs "github.com/aws/constructs-go/constructs" +import "github.com/hashicorp/terraform-cdk-go/cdktf" +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import "github.com/aws-samples/dummy/gen/providers/tfe/organization" +import "github.com/aws-samples/dummy/gen/providers/tfe/registryProvider" +type myConvertedCode struct { + terraformStack +} + +func newMyConvertedCode(scope construct, name *string) *myConvertedCode { + this := &myConvertedCode{} + cdktf.NewTerraformStack_Override(this, scope, name) + tfeOrganizationExample := organization.NewOrganization(this, jsii.String("example"), &organizationConfig{ + email: jsii.String("admin@company.com"), + name: jsii.String("my-org-name"), + }) + tfeRegistryProviderExample := + registryProvider.NewRegistryProvider(this, jsii.String("example_1"), ®istryProviderConfig{ + name: jsii.String("my-provider"), + organization: cdktf.Token_AsString(tfeOrganizationExample.name), + }) + /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ + tfeRegistryProviderExample.OverrideLogicalId(jsii.String("example")) + return this +} +``` + +Create public provider: + +```go +import constructs "github.com/aws/constructs-go/constructs" +import "github.com/hashicorp/terraform-cdk-go/cdktf" +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import "github.com/aws-samples/dummy/gen/providers/tfe/organization" +import "github.com/aws-samples/dummy/gen/providers/tfe/registryProvider" +type myConvertedCode struct { + terraformStack +} + +func newMyConvertedCode(scope construct, name *string) *myConvertedCode { + this := &myConvertedCode{} + cdktf.NewTerraformStack_Override(this, scope, name) + tfeOrganizationExample := organization.NewOrganization(this, jsii.String("example"), &organizationConfig{ + email: jsii.String("admin@company.com"), + name: jsii.String("my-org-name"), + }) + tfeRegistryProviderExample := + registryProvider.NewRegistryProvider(this, jsii.String("example_1"), ®istryProviderConfig{ + name: jsii.String("aws"), + namespace: jsii.String("hashicorp"), + organization: cdktf.Token_AsString(tfeOrganizationExample.name), + registryName: jsii.String("public"), + }) + /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ + tfeRegistryProviderExample.OverrideLogicalId(jsii.String("example")) + return this +} +``` + +## Argument Reference + +The following arguments are supported: + +* `Organization` - (Optional) Name of the organization. If omitted, organization must be defined in the provider config. +* `RegistryName` - (Optional) Whether this is a publicly maintained provider or private. Must be either `Public` or `Private`. Defaults to `Private`. +* `Namespace` - (Optional) The namespace of the provider. Required if `RegistryName` is `Public`, otherwise it can't be configured, and it will be set to same value as the `Organization`. +* `Name` - (Required) Name of the provider. + +## Attributes Reference + +* `Id` - ID of the provider. +* `CreatedAt` - The time when the provider was created. +* `UpdatedAt` - The time when the provider was last updated. + +## Import + +Providers can be imported; use `///` as the import ID. + +For example a private provider: + +```shell +terraform import tfe_registry_provider.example my-org-name/private/my-org-name/my-provider +``` + +Or a public provider: + +```shell +terraform import tfe_registry_provider.example my-org-name/public/hashicorp/aws +``` + + \ No newline at end of file diff --git a/website/docs/cdktf/go/r/sentinel_version.html.markdown b/website/docs/cdktf/go/r/sentinel_version.html.markdown new file mode 100644 index 000000000..d3e4dc21f --- /dev/null +++ b/website/docs/cdktf/go/r/sentinel_version.html.markdown @@ -0,0 +1,71 @@ +--- +layout: "tfe" +page_title: "Terraform Enterprise: tfe_sentinel_version" +description: |- + Manages Sentinel versions +--- + + + +# tfe_sentinel_version + +Manage Sentinel versions available on Terraform Cloud/Enterprise. + +## Example Usage + +Basic Usage: + +```go +import constructs "github.com/aws/constructs-go/constructs" +import cdktf "github.com/hashicorp/terraform-cdk-go/cdktf" +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import "github.com/aws-samples/dummy/gen/providers/tfe/sentinelVersion" +type myConvertedCode struct { + terraformStack +} + +func newMyConvertedCode(scope construct, name *string) *myConvertedCode { + this := &myConvertedCode{} + cdktf.NewTerraformStack_Override(this, scope, name) + sentinelVersion.NewSentinelVersion(this, jsii.String("test"), &sentinelVersionConfig{ + sha: jsii.String("e75ac73deb69a6b3aa667cb0b8b731aee79e2904"), + url: jsii.String("https://tfe-host.com/path/to/sentinel.zip"), + version: jsii.String("0.24.0-custom"), + }) + return this +} +``` + +## Argument Reference + +The following arguments are supported: + +* `Version` - (Required) A semantic version string in N.N.N or N.N.N-bundleName format. +* `Url` - (Required) The URL where a ZIP-compressed 64-bit Linux binary of this version can be downloaded. +* `Sha` - (Required) The SHA-256 checksum of the compressed Sentinel binary. +* `Official` - (Optional) Whether or not this is an official release of Sentinel. Defaults to "false". +* `Enabled` - (Optional) Whether or not this version of Sentinel is enabled for use in Terraform Cloud/Enterprise. Defaults to "true". +* `Beta` - (Optional) Whether or not this version of Sentinel is beta pre-release. Defaults to "false". +* `Deprecated` - (Optional) Whether or not this version of Sentinel is deprecated. Defaults to "false". +* `DeprecatedReason` - (Optional) Additional context about why a version of Sentinel is deprecated. Defaults to "null" unless `Deprecated` is true. + +## Attributes Reference + +* `Id` The ID of the Sentinel version + +## Import + +Sentinel versions can be imported; use `` or `` as the import ID. For example: + +```shell +terraform import tfe_sentinel_version.test tool-L4oe7rNwn7J4E5Yr +``` + +```shell +terraform import tfe_sentinel_version.test 0.24.0 +``` + +-> **Note:** You can fetch a Sentinel version ID from the URL of an existing version in the Terraform Cloud UI. The ID is in the format `tool-` + + \ No newline at end of file diff --git a/website/docs/cdktf/go/r/team_project_access.html.markdown b/website/docs/cdktf/go/r/team_project_access.html.markdown index ea298cee3..c64cfb21c 100644 --- a/website/docs/cdktf/go/r/team_project_access.html.markdown +++ b/website/docs/cdktf/go/r/team_project_access.html.markdown @@ -155,4 +155,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/go/r/workspace.html.markdown b/website/docs/cdktf/go/r/workspace.html.markdown index 9f91e668a..ec6f8d392 100644 --- a/website/docs/cdktf/go/r/workspace.html.markdown +++ b/website/docs/cdktf/go/r/workspace.html.markdown @@ -11,6 +11,8 @@ description: |- Provides a workspace resource. +~> **NOTE:** Setting the execution mode and agent pool affinity directly on the workspace is deprecated in favor of using both [tfe_workspace_settings](workspace_settings) and [tfe_organization_default_settings](organization_default_settings), since they allow more precise control and fully support [agent_pool_allowed_workspaces](agent_pool_allowed_workspaces). Use caution when unsetting `ExecutionMode`, as it now leaves any prior value unmanaged instead of reverting to the old default value of `"remote"`. + ~> **NOTE:** Using `GlobalRemoteState` or `RemoteStateConsumerIds` requires using the provider with Terraform Cloud or an instance of Terraform Enterprise at least as recent as v202104-1. ## Example Usage @@ -47,7 +49,7 @@ func newMyConvertedCode(scope construct, name *string) *myConvertedCode { } ``` -With `ExecutionMode` of `Agent`: +Usage with vcs_repo: ```go import constructs "github.com/aws/constructs-go/constructs" @@ -55,7 +57,7 @@ import "github.com/hashicorp/terraform-cdk-go/cdktf" /*Provider bindings are generated by running cdktf get. See https://cdk.tf/provider-generation for more details.*/ import "github.com/aws-samples/dummy/gen/providers/tfe/organization" -import "github.com/aws-samples/dummy/gen/providers/tfe/agentPool" +import "github.com/aws-samples/dummy/gen/providers/tfe/oauthClient" import "github.com/aws-samples/dummy/gen/providers/tfe/workspace" type myConvertedCode struct { terraformStack @@ -68,15 +70,22 @@ func newMyConvertedCode(scope construct, name *string) *myConvertedCode { email: jsii.String("admin@company.com"), name: jsii.String("my-org-name"), }) - tfeAgentPoolTestAgentPool := agentPool.NewAgentPool(this, jsii.String("test-agent-pool"), &agentPoolConfig{ - name: jsii.String("my-agent-pool-name"), - organization: cdktf.Token_AsString(tfeOrganizationTestOrganization.name), + tfeOauthClientTest := oauthClient.NewOauthClient(this, jsii.String("test"), &oauthClientConfig{ + apiUrl: jsii.String("https://api.github.com"), + httpUrl: jsii.String("https://github.com"), + oauthToken: jsii.String("oauth_token_id"), + organization: tfeOrganizationTestOrganization, + serviceProvider: jsii.String("github"), }) - workspace.NewWorkspace(this, jsii.String("test"), &workspaceConfig{ - agentPoolId: cdktf.Token_*AsString(tfeAgentPoolTestAgentPool.id), - executionMode: jsii.String("agent"), - name: jsii.String("my-workspace-name"), - organization: cdktf.Token_*AsString(tfeOrganizationTestOrganization.name), + workspace.NewWorkspace(this, jsii.String("parent"), &workspaceConfig{ + name: jsii.String("parent-ws"), + organization: tfeOrganizationTestOrganization, + queueAllRuns: jsii.Boolean(false), + vcsRepo: &workspaceVcsRepo{ + branch: jsii.String("main"), + identifier: jsii.String("my-org-name/vcs-repository"), + oauthTokenId: cdktf.Token_AsString(tfeOauthClientTest.oauthTokenId), + }, }) return this } @@ -87,20 +96,13 @@ func newMyConvertedCode(scope construct, name *string) *myConvertedCode { The following arguments are supported: * `Name` - (Required) Name of the workspace. -* `AgentPoolId` - (Optional) The ID of an agent pool to assign to the workspace. Requires `ExecutionMode` - to be set to `Agent`. This value _must not_ be provided if `ExecutionMode` is set to any other value or if `Operations` is - provided. +* `AgentPoolId` - (Optional) **Deprecated** The ID of an agent pool to assign to the workspace. Use [tfe_workspace_settings](workspace_settings) instead. * `AllowDestroyPlan` - (Optional) Whether destroy plans can be queued on the workspace. * `AssessmentsEnabled` - (Optional) Whether to regularly run health assessments such as drift detection on the workspace. Defaults to `False`. * `AutoApply` - (Optional) Whether to automatically apply changes when a Terraform plan is successful. Defaults to `False`. * `AutoApplyRunTrigger` - (Optional) Whether to automatically apply changes for runs that were created by run triggers from another workspace. Defaults to `False`. * `Description` - (Optional) A description for the workspace. -* `ExecutionMode` - (Optional) Which [execution mode](https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings#execution-mode) - to use. Using Terraform Cloud, valid values are `Remote`, `Local` or`Agent`. - Defaults to `Remote`. Using Terraform Enterprise, only `Remote`and `Local` - execution modes are valid. When set to `Local`, the workspace will be used - for state storage only. This value _must not_ be provided if `Operations` - is provided. +* `ExecutionMode` - (Optional) **Deprecated** Which [execution mode](https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings#execution-mode) to use. Use [tfe_workspace_settings](workspace_settings) instead. * `FileTriggersEnabled` - (Optional) Whether to filter runs based on the changed files in a VCS push. Defaults to `True`. If enabled, the working directory and trigger prefixes describe a set of paths which must contain changes for a @@ -144,6 +146,11 @@ The following arguments are supported: workspace will display their output as text logs. * `SshKeyId` - (Optional) The ID of an SSH key to assign to the workspace. * `TagNames` - (Optional) A list of tag names for this workspace. Note that tags must only contain lowercase letters, numbers, colons, or hyphens. +* `IgnoreAdditionalTagNames` - (Optional) Explicitly ignores `TagNames` +_not_ defined by config so they will not be overwritten by the configured +tags. This creates exceptional behavior in terraform with respect +to `TagNames` and is not recommended. This value must be applied before it +will be used. * `TerraformVersion` - (Optional) The version of Terraform to use for this workspace. This can be either an exact version or a [version constraint](https://developer.hashicorp.com/terraform/language/expressions/version-constraints) @@ -178,7 +185,7 @@ In addition to all arguments above, the following attributes are exported: * `Id` - The workspace ID. * `ResourceCount` - The number of resources managed by the workspace. -* `HtmlUrl` - The URL to the browsable HTML overview of the workspace +* `HtmlUrl` - The URL to the browsable HTML overview of the workspace. ## Import @@ -193,4 +200,4 @@ terraform import tfe_workspace.test ws-CH5in3chf8RJjrVd terraform import tfe_workspace.test my-org-name/my-wkspace-name ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/go/r/workspace_settings.markdown b/website/docs/cdktf/go/r/workspace_settings.markdown new file mode 100644 index 000000000..3b5cd4d88 --- /dev/null +++ b/website/docs/cdktf/go/r/workspace_settings.markdown @@ -0,0 +1,169 @@ +--- +layout: "tfe" +page_title: "Terraform Enterprise: tfe_workspace_setting" +description: |- + Manages workspace settings. +--- + + + +# tfe_workspace_settings + +Manages or reads execution mode and agent pool settings for a workspace. This also interacts with the organization's default values for several settings, which can be managed with [tfe_organization_default_settings](organization_default_settings.html). If other resources need to identify whether a setting is a default or an explicit value set for the workspace, you can refer to the read-only `Overwrites` argument. + +## Example Usage + +Basic usage: + +```go +import constructs "github.com/aws/constructs-go/constructs" +import "github.com/hashicorp/terraform-cdk-go/cdktf" +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import "github.com/aws-samples/dummy/gen/providers/tfe/organization" +import "github.com/aws-samples/dummy/gen/providers/tfe/workspace" +import "github.com/aws-samples/dummy/gen/providers/tfe/workspaceSettings" +type myConvertedCode struct { + terraformStack +} + +func newMyConvertedCode(scope construct, name *string) *myConvertedCode { + this := &myConvertedCode{} + cdktf.NewTerraformStack_Override(this, scope, name) + tfeOrganizationTestOrganization := organization.NewOrganization(this, jsii.String("test-organization"), &organizationConfig{ + email: jsii.String("admin@company.com"), + name: jsii.String("my-org-name"), + }) + tfeWorkspaceTest := workspace.NewWorkspace(this, jsii.String("test"), &workspaceConfig{ + name: jsii.String("my-workspace-name"), + organization: cdktf.Token_AsString(tfeOrganizationTestOrganization.name), + }) + workspaceSettings.NewWorkspaceSettings(this, jsii.String("test-settings"), &workspaceSettingsConfig{ + executionMode: jsii.String("local"), + workspaceId: cdktf.Token_*AsString(tfeWorkspaceTest.id), + }) + return this +} +``` + +With `ExecutionMode` of `Agent`: + +```go +import constructs "github.com/aws/constructs-go/constructs" +import "github.com/hashicorp/terraform-cdk-go/cdktf" +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import "github.com/aws-samples/dummy/gen/providers/tfe/organization" +import "github.com/aws-samples/dummy/gen/providers/tfe/workspace" +import "github.com/aws-samples/dummy/gen/providers/tfe/agentPool" +import "github.com/aws-samples/dummy/gen/providers/tfe/agentPoolAllowedWorkspaces" +import "github.com/aws-samples/dummy/gen/providers/tfe/workspaceSettings" +type myConvertedCode struct { + terraformStack +} + +func newMyConvertedCode(scope construct, name *string) *myConvertedCode { + this := &myConvertedCode{} + cdktf.NewTerraformStack_Override(this, scope, name) + tfeOrganizationTestOrganization := organization.NewOrganization(this, jsii.String("test-organization"), &organizationConfig{ + email: jsii.String("admin@company.com"), + name: jsii.String("my-org-name"), + }) + tfeWorkspaceTest := workspace.NewWorkspace(this, jsii.String("test"), &workspaceConfig{ + name: jsii.String("my-workspace-name"), + organization: cdktf.Token_AsString(tfeOrganizationTestOrganization.name), + }) + tfeAgentPoolTestAgentPool := agentPool.NewAgentPool(this, jsii.String("test-agent-pool"), &agentPoolConfig{ + name: jsii.String("my-agent-pool-name"), + organization: cdktf.Token_*AsString(tfeOrganizationTestOrganization.name), + }) + tfeAgentPoolAllowedWorkspacesTest := + agentPoolAllowedWorkspaces.NewAgentPoolAllowedWorkspaces(this, jsii.String("test_3"), &agentPoolAllowedWorkspacesConfig{ + agentPoolId: cdktf.Token_*AsString(tfeAgentPoolTestAgentPool.id), + allowedWorkspaceIds: []*string{ + cdktf.Token_*AsString(tfeWorkspaceTest.id), + }, + }) + /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ + tfeAgentPoolAllowedWorkspacesTest.OverrideLogicalId(jsii.String("test")) + workspaceSettings.NewWorkspaceSettings(this, jsii.String("test-settings"), &workspaceSettingsConfig{ + agentPoolId: cdktf.Token_*AsString(tfeAgentPoolAllowedWorkspacesTest.agentPoolId), + executionMode: jsii.String("agent"), + workspaceId: cdktf.Token_*AsString(tfeWorkspaceTest.id), + }) + return this +} +``` + +This resource may be used as a data source when no optional arguments are defined: + +```go +import constructs "github.com/aws/constructs-go/constructs" +import "github.com/hashicorp/terraform-cdk-go/cdktf" +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import "github.com/aws-samples/dummy/gen/providers/tfe/dataTfeWorkspace" +import "github.com/aws-samples/dummy/gen/providers/tfe/workspaceSettings" +type myConvertedCode struct { + terraformStack +} + +func newMyConvertedCode(scope construct, name *string) *myConvertedCode { + this := &myConvertedCode{} + cdktf.NewTerraformStack_Override(this, scope, name) + dataTfeWorkspaceTest := dataTfeWorkspace.NewDataTfeWorkspace(this, jsii.String("test"), &dataTfeWorkspaceConfig{ + name: jsii.String("my-workspace-name"), + organization: jsii.String("my-org-name"), + }) + tfeWorkspaceSettingsTest := + workspaceSettings.NewWorkspaceSettings(this, jsii.String("test_1"), &workspaceSettingsConfig{ + workspaceId: cdktf.Token_AsString(dataTfeWorkspaceTest.id), + }) + /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ + tfeWorkspaceSettingsTest.OverrideLogicalId(jsii.String("test")) + cdktf.NewTerraformOutput(this, jsii.String("workspace-explicit-local-execution"), &TerraformOutputConfig{ + Value: cdktf.Fn_Alltrue(cdktf.Token_AsAny([]interface{}{ + cdktf.Op_Eq(tfeWorkspaceSettingsTest.executionMode, jsii.String("local")), + cdktf.propertyAccess(tfeWorkspaceSettingsTest.overwrites, []interface{}{ + jsii.String("0"), + jsii.String("\"execution_mode\""), + }), + })), + }) + return this +} +``` + +## Argument Reference + +The following arguments are supported: + +* `WorkspaceId` - (Required) ID of the workspace. +* `AgentPoolId` - (Optional) The ID of an agent pool to assign to the workspace. Requires `ExecutionMode` + to be set to `Agent`. This value _must not_ be provided if `ExecutionMode` is set to any other value. +* `ExecutionMode` - (Optional) Which [execution mode](https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings#execution-mode) + to use. Using Terraform Cloud, valid values are `Remote`, `Local` or `Agent`. Using Terraform Enterprise, only `Remote` and `Local` execution modes are valid. When set to `Local`, the workspace will be used for state storage only. **Important:** If you omit this attribute, the resource configures the workspace to use your organization's default execution mode (which in turn defaults to `Remote`), removing any explicit value that might have previously been set for the workspace. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `Id` - The workspace ID. +* `Overwrites` - Can be used to check whether a setting is currently inheriting its value from another resource. + - `ExecutionMode` - Set to `True` if the execution mode of the workspace is being determined by the setting on the workspace itself. It will be `False` if the execution mode is inherited from another resource (e.g. the organization's default execution mode) + - `AgentPool` - Set to `True` if the agent pool of the workspace is being determined by the setting on the workspace itself. It will be `False` if the agent pool is inherited from another resource (e.g. the organization's default agent pool) + +## Import + +Workspaces can be imported; use `` or `/` as the +import ID. For example: + +```shell +terraform import tfe_workspace_settings.test ws-CH5in3chf8RJjrVd +``` + +```shell +terraform import tfe_workspace_settings.test my-org-name/my-wkspace-name +``` + + \ No newline at end of file diff --git a/website/docs/cdktf/java/d/github_installation.html.markdown b/website/docs/cdktf/java/d/github_installation.html.markdown index fe6335717..846c465b5 100644 --- a/website/docs/cdktf/java/d/github_installation.html.markdown +++ b/website/docs/cdktf/java/d/github_installation.html.markdown @@ -5,6 +5,8 @@ description: |- Get information on the Github App Installation. --- + + # Data Source: tfe_github_app_installation Use this data source to get information about the Github App Installation. @@ -23,7 +25,7 @@ public class MyConvertedCode extends TerraformStack { public MyConvertedCode(Construct scope, String name) { super(scope, name); new DataTfeGithubAppInstallation(this, "gha_installation", new DataTfeGithubAppInstallationConfig() - .installationId(12345) + .installationId(12345678) ); } } @@ -41,7 +43,7 @@ public class MyConvertedCode extends TerraformStack { public MyConvertedCode(Construct scope, String name) { super(scope, name); new DataTfeGithubAppInstallation(this, "gha_installation", new DataTfeGithubAppInstallationConfig() - .name("installation_name") + .name("github_username_or_organization") ); } } @@ -49,11 +51,11 @@ public class MyConvertedCode extends TerraformStack { ## Argument Reference -The following arguments are supported. At least one of `name`, `installationId` must be set. +The following arguments are supported. At least one of `name`, `installationId` must be set. + +* `installationId` - (Optional) ID of the Github Installation. The installation ID can be found in the URL slug when visiting the installation's configuration page, e.g `https://githubCom/settings/installations/12345678`. +* `name` - (Optional) Name of the Github user or organization account that installed the app. -* `installationId` - (Optional) ID of the Github Installation as shown in Github. -* `name` - (Optional) Name of the Github Installation as shown in Github. - Must be one of: `installationId` or `name`. ## Attributes Reference @@ -61,4 +63,5 @@ Must be one of: `installationId` or `name`. In addition to all arguments above, the following attributes are exported: * `id` - The internal ID of the Github Installation. This is different from the `installationId`. - \ No newline at end of file + + \ No newline at end of file diff --git a/website/docs/cdktf/java/d/no_code_module.html.markdown b/website/docs/cdktf/java/d/no_code_module.html.markdown new file mode 100644 index 000000000..e8a11ff3b --- /dev/null +++ b/website/docs/cdktf/java/d/no_code_module.html.markdown @@ -0,0 +1,42 @@ +--- +layout: "tfe" +page_title: "Terraform Enterprise: tfe_no_code_module" +description: |- + Get information on a no-code module. +--- + + + +# Data Source: tfe_registry_provider + +Use this data source to read the details of an existing No-Code-Allowed module. + +## Example Usage + +```hcl +resource "tfe_no_code_module" "foobar" { + organization = tfe_organization.foobar.id + registry_module = tfe_registry_module.foobar.id +} + +data "tfe_no_code_module" "foobar" { + id = tfe_no_code_module.foobar.id +} +``` + +## Argument Reference + +The following arguments are supported: + +* `id` - (Required) ID of the no-code module. + +## Attributes Reference + +* `id` - ID of the no-code module. +* `organization` - Organization name that the no-code module belongs to. +* `namespace` - Namespace name that the no-code module belongs to. +* `registryModuleId` - ID of the registry module for the no-code module. +* `versionPin` - Version number the no-code module is pinned to. +* `enabled` - Indicates if this no-code module is currently enabled + + \ No newline at end of file diff --git a/website/docs/cdktf/java/d/organization.html.markdown b/website/docs/cdktf/java/d/organization.html.markdown index c0d5a0764..c91e00ea9 100644 --- a/website/docs/cdktf/java/d/organization.html.markdown +++ b/website/docs/cdktf/java/d/organization.html.markdown @@ -5,6 +5,8 @@ description: |- Get information on an Organization. --- + + # Data Source: tfe_organization Use this data source to get information about an organization. @@ -30,13 +32,12 @@ public class MyConvertedCode extends TerraformStack { ## Argument Reference The following arguments are supported: -* `name` - (Required) Name of the organization. +* `name` - (Optional) Name of the organization. If omitted, organization must be defined in the provider config. ## Attributes Reference In addition to all arguments above, the following attributes are exported: -* `name` - Name of the organization. * `email` - Admin email address. * `externalId` - An identifier for the organization. * `assessmentsEnforced` - (Available only in Terraform Cloud) Whether to force health assessments (drift detection) on all eligible workspaces or allow workspaces to set thier own preferences. @@ -44,5 +45,7 @@ In addition to all arguments above, the following attributes are exported: * `costEstimationEnabled` - Whether or not the cost estimation feature is enabled for all workspaces in the organization. Defaults to true. In a Terraform Cloud organization which does not have Teams & Governance features, this value is always false and cannot be changed. In Terraform Enterprise, Cost Estimation must also be enabled in Site Administration. * `ownersTeamSamlRoleId` - The name of the "owners" team. * `sendPassingStatusesForUntriggeredSpeculativePlans` - Whether or not to send VCS status updates for untriggered speculative plans. This can be useful if large numbers of untriggered workspaces are exhausting request limits for connected version control service providers like GitHub. Defaults to true. In Terraform Enterprise, this setting has no effect and cannot be changed but is also available in Site Administration. +* `aggregatedCommitStatusEnabled` - Whether or not to enable Aggregated Status Checks. This can be useful for monorepo repositories with multiple workspaces receiving status checks for events such as a pull request. * `defaultProjectId` - ID of the organization's default project. All workspaces created without specifying a project ID are created in this project. - \ No newline at end of file + + \ No newline at end of file diff --git a/website/docs/cdktf/java/d/policy_set.html.markdown b/website/docs/cdktf/java/d/policy_set.html.markdown index a5973dda4..8f4062649 100644 --- a/website/docs/cdktf/java/d/policy_set.html.markdown +++ b/website/docs/cdktf/java/d/policy_set.html.markdown @@ -47,6 +47,8 @@ The following arguments are supported: * `description` - Description of the policy set. * `global` - Whether or not the policy set applies to all workspaces in the organization. * `kind` - The policy-as-code framework for the policy. Valid values are "sentinel" and "opa". +* `agentEnabled` - Whether or not the policy set is run as a policy evaluation within the agent. True by default for all "opa" policy sets. +* `policyToolVersion` - The policy tool version to run the evaluation against. * `overridable` - Whether users can override this policy when it fails during a run. Only valid for OPA policies. * `workspaceIds` - IDs of the workspaces that use the policy set. * `excludedWorkspaceIds` - IDs of the workspaces that do not use the policy set. @@ -66,4 +68,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/java/d/registry_gpg_key.html.markdown b/website/docs/cdktf/java/d/registry_gpg_key.html.markdown new file mode 100644 index 000000000..3f881a74e --- /dev/null +++ b/website/docs/cdktf/java/d/registry_gpg_key.html.markdown @@ -0,0 +1,46 @@ +--- +layout: "tfe" +page_title: "Terraform Enterprise: tfe_registry_gpg_key" +description: |- + Get information on a private registry GPG key. +--- + + + +# Data Source: tfe_registry_gpg_key + +Use this data source to get information about a private registry GPG key. + +## Example Usage + +```java +import software.constructs.*; +import com.hashicorp.cdktf.*; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import gen.providers.tfe.dataTfeRegistryGpgKey.*; +public class MyConvertedCode extends TerraformStack { + public MyConvertedCode(Construct scope, String name) { + super(scope, name); + new DataTfeRegistryGpgKey(this, "example", new DataTfeRegistryGpgKeyConfig() + .id("13DFECCA3B58CE4A") + .organization("my-org-name") + ); + } +} +``` + +## Argument Reference + +The following arguments are supported: + +* `id` - (Required) ID of the GPG key. +* `organization` - (Optional) Name of the organization. If omitted, organization must be defined in the provider config. + +## Attributes Reference + +* `asciiArmor` - ASCII-armored representation of the GPG key. +* `createdAt` - The time when the GPG key was created. +* `updatedAt` - The time when the GPG key was last updated. + + \ No newline at end of file diff --git a/website/docs/cdktf/java/d/registry_gpg_keys.html.markdown b/website/docs/cdktf/java/d/registry_gpg_keys.html.markdown new file mode 100644 index 000000000..dad2e79f1 --- /dev/null +++ b/website/docs/cdktf/java/d/registry_gpg_keys.html.markdown @@ -0,0 +1,47 @@ +--- +layout: "tfe" +page_title: "Terraform Enterprise: tfe_registry_gpg_keys" +description: |- + Get information on private registry GPG keys of an organization. +--- + + + +# Data Source: tfe_registry_gpg_key + +Use this data source to get information about all private registry GPG keys of an organization. + +## Example Usage + +```java +import software.constructs.*; +import com.hashicorp.cdktf.*; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import gen.providers.tfe.dataTfeRegistryGpgKeys.*; +public class MyConvertedCode extends TerraformStack { + public MyConvertedCode(Construct scope, String name) { + super(scope, name); + new DataTfeRegistryGpgKeys(this, "all", new DataTfeRegistryGpgKeysConfig() + .organization("my-org-name") + ); + } +} +``` + +## Argument Reference + +The following arguments are supported: + +* `organization` - (Optional) Name of the organization. If omitted, organization must be defined in the provider config. + +## Attributes Reference + +* `keys` - List of GPG keys in the organization. Each element contains the following attributes: + * `id` - ID of the GPG key. + * `organization` - Name of the organization. + * `asciiArmor` - ASCII-armored representation of the GPG key. + * `createdAt` - The time when the GPG key was created. + * `updatedAt` - The time when the GPG key was last updated. + + \ No newline at end of file diff --git a/website/docs/cdktf/java/d/registry_provider.html.markdown b/website/docs/cdktf/java/d/registry_provider.html.markdown new file mode 100644 index 000000000..99d663d27 --- /dev/null +++ b/website/docs/cdktf/java/d/registry_provider.html.markdown @@ -0,0 +1,71 @@ +--- +layout: "tfe" +page_title: "Terraform Enterprise: tfe_registry_provider" +description: |- + Get information on a public or private provider in the private registry. +--- + + + +# Data Source: tfe_registry_provider + +Use this data source to get information about a public or private provider in the private registry. + +## Example Usage + +A private provider: + +```java +import software.constructs.*; +import com.hashicorp.cdktf.*; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import gen.providers.tfe.registryProvider.*; +public class MyConvertedCode extends TerraformStack { + public MyConvertedCode(Construct scope, String name) { + super(scope, name); + new RegistryProvider(this, "example", new RegistryProviderConfig() + .name("my-provider") + .organization("my-org-name") + ); + } +} +``` + +A public provider: + +```java +import software.constructs.*; +import com.hashicorp.cdktf.*; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import gen.providers.tfe.registryProvider.*; +public class MyConvertedCode extends TerraformStack { + public MyConvertedCode(Construct scope, String name) { + super(scope, name); + new RegistryProvider(this, "example", new RegistryProviderConfig() + .name("aws") + .namespace("hashicorp") + .organization("my-org-name") + .registryName("public") + ); + } +} +``` + +## Argument Reference + +The following arguments are supported: + +* `organization` - (Optional) Name of the organization. If omitted, organization must be defined in the provider config. +* `registryName` - (Optional) Whether this is a publicly maintained provider or private. Must be either `public` or `private`. Defaults to `private`. +* `namespace` - (Optional) The namespace of the provider. Required if `registryName` is `public`, otherwise it can't be configured, and it will be set to same value as the `organization`. +* `name` - (Required) Name of the provider. + +## Attributes Reference + +* `id` - ID of the provider. +* `createdAt` - The time when the provider was created. +* `updatedAt` - The time when the provider was last updated. + + \ No newline at end of file diff --git a/website/docs/cdktf/java/d/registry_providers.html.markdown b/website/docs/cdktf/java/d/registry_providers.html.markdown new file mode 100644 index 000000000..535051836 --- /dev/null +++ b/website/docs/cdktf/java/d/registry_providers.html.markdown @@ -0,0 +1,91 @@ +--- +layout: "tfe" +page_title: "Terraform Enterprise: tfe_registry_providers" +description: |- + Get information on public and private providers in the private registry. +--- + + + +# Data Source: tfe_registry_providers + +Use this data source to get information about public and private providers in the private registry. + +## Example Usage + +All providers: + +```java +import software.constructs.*; +import com.hashicorp.cdktf.*; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import gen.providers.tfe.dataTfeRegistryProviders.*; +public class MyConvertedCode extends TerraformStack { + public MyConvertedCode(Construct scope, String name) { + super(scope, name); + new DataTfeRegistryProviders(this, "all", new DataTfeRegistryProvidersConfig() + .organization("my-org-name") + ); + } +} +``` + +All private providers: + +```java +import software.constructs.*; +import com.hashicorp.cdktf.*; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import gen.providers.tfe.dataTfeRegistryProviders.*; +public class MyConvertedCode extends TerraformStack { + public MyConvertedCode(Construct scope, String name) { + super(scope, name); + new DataTfeRegistryProviders(this, "private", new DataTfeRegistryProvidersConfig() + .organization("my-org-name") + .registryName("private") + ); + } +} +``` + +Providers with "hashicorp" in their namespace or name: + +```java +import software.constructs.*; +import com.hashicorp.cdktf.*; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import gen.providers.tfe.dataTfeRegistryProviders.*; +public class MyConvertedCode extends TerraformStack { + public MyConvertedCode(Construct scope, String name) { + super(scope, name); + new DataTfeRegistryProviders(this, "hashicorp", new DataTfeRegistryProvidersConfig() + .organization("my-org-name") + .search("hashicorp") + ); + } +} +``` + +## Argument Reference + +The following arguments are supported: + +* `organization` - (Optional) Name of the organization. If omitted, organization must be defined in the provider config. +* `registryName` - (Optional) Whether to list only public or private providers. Must be either `public` or `private`. +* `search` - (Optional) A query string to do a fuzzy search on provider name and namespace. + +## Attributes Reference + +* `providers` - List of the providers. Each element contains the following attributes: + * `id` - ID of the provider. + * `organization` - Name of the organization. + * `registryName` - Whether this is a publicly maintained provider or private. + * `namespace` - Namespace of the provider. + * `name` - Name of the provider. + * `createdAt` - Time when the provider was created. + * `updatedAt` - Time when the provider was last updated. + + \ No newline at end of file diff --git a/website/docs/cdktf/java/d/workspace.html.markdown b/website/docs/cdktf/java/d/workspace.html.markdown index 371cf05ba..c2757acbe 100644 --- a/website/docs/cdktf/java/d/workspace.html.markdown +++ b/website/docs/cdktf/java/d/workspace.html.markdown @@ -72,7 +72,7 @@ In addition to all arguments above, the following attributes are exported: * `triggerPatterns` - List of [glob patterns](https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings/vcs#glob-patterns-for-automatic-run-triggering) that describe the files Terraform Cloud monitors for changes. Trigger patterns are always appended to the root directory of the repository. * `vcsRepo` - Settings for the workspace's VCS repository. * `workingDirectory` - A relative path that Terraform will execute within. -* `executionMode` - Indicates the [execution mode](https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings#execution-mode) of the workspace. Possible values include `remote`, `local`, or `agent`. +* `executionMode` - Indicates the [execution mode](https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings#execution-mode) of the workspace. **Note:** This value might be derived from an organization-level default or set on the workspace itself; see the [`tfeWorkspaceSettings` resource](tfe_workspace_settings) for details. * `htmlUrl` - The URL to the browsable HTML overview of the workspace @@ -87,4 +87,4 @@ The `vcsRepo` block contains: * `oauthTokenId` - OAuth token ID of the configured VCS connection. * `tagsRegex` - A regular expression used to trigger a Workspace run for matching Git tags. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/java/index.html.markdown b/website/docs/cdktf/java/index.html.markdown index 43998b27c..f5fc97051 100644 --- a/website/docs/cdktf/java/index.html.markdown +++ b/website/docs/cdktf/java/index.html.markdown @@ -77,7 +77,7 @@ automatically installed by `terraform init` in the future: terraform { required_providers { tfe = { - version = "~> 0.51.1" + version = "~> 0.53.0" } } } @@ -90,7 +90,7 @@ The above snippet using `requiredProviders` is for Terraform 0.13+; if you are u ```hcl provider "tfe" { - version = "~> 0.51.1" + version = "~> 0.53.0" ... } ``` @@ -103,7 +103,7 @@ For more information on provider installation and constraining provider versions provider "tfe" { hostname = var.hostname # Optional, defaults to Terraform Cloud `appTerraformIo` token = var.token - version = "~> 0.51.1" + version = "~> 0.53.0" } # Create an organization @@ -129,4 +129,4 @@ The following arguments are supported: arguments. Ensure that the organization already exists prior to using this argument. This can also be specified using the `tfeOrganization` environment variable. - + \ No newline at end of file diff --git a/website/docs/cdktf/java/r/admin_organization_settings.markdown b/website/docs/cdktf/java/r/admin_organization_settings.markdown index bfcd410d0..1aaced2ae 100644 --- a/website/docs/cdktf/java/r/admin_organization_settings.markdown +++ b/website/docs/cdktf/java/r/admin_organization_settings.markdown @@ -5,6 +5,8 @@ description: |- Manages admin settings for an organization (Terraform Enterprise Only). --- + + # tfe_admin_organization_settings Manage admin settings for an organization. This resource requires the @@ -64,8 +66,4 @@ The following arguments are supported: * `ssoEnabled` - True if SSO is enabled in this organization -## Import - -This resource does not manage the creation of an organization and there is no need to import it. - - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/java/r/agent_pool_allowed_workspaces.html.markdown b/website/docs/cdktf/java/r/agent_pool_allowed_workspaces.html.markdown index b98fae86d..78e686b1f 100644 --- a/website/docs/cdktf/java/r/agent_pool_allowed_workspaces.html.markdown +++ b/website/docs/cdktf/java/r/agent_pool_allowed_workspaces.html.markdown @@ -9,7 +9,7 @@ description: |- # tfe_agent_pool_allowed_workspaces -Adds and removes allowed workspaces on an agent pool +Adds and removes allowed workspaces on an agent pool. ~> **NOTE:** This resource requires using the provider with Terraform Cloud and a Terraform Cloud for Business account. @@ -17,38 +17,38 @@ for Business account. ## Example Usage -Basic usage: - -```java -import software.constructs.*; -import com.hashicorp.cdktf.*; -/*Provider bindings are generated by running cdktf get. -See https://cdk.tf/provider-generation for more details.*/ -import gen.providers.tfe.organization.*; -import gen.providers.tfe.workspace.*; -import gen.providers.tfe.agentPool.*; -import gen.providers.tfe.agentPoolAllowedWorkspaces.*; -public class MyConvertedCode extends TerraformStack { - public MyConvertedCode(Construct scope, String name) { - super(scope, name); - Organization tfeOrganizationTestOrganization = new Organization(this, "test-organization", new OrganizationConfig() - .email("admin@company.com") - .name("my-org-name") - ); - Workspace tfeWorkspaceTestWorkspace = new Workspace(this, "test-workspace", new WorkspaceConfig() - .name("my-workspace-name") - .organization(Token.asString(tfeOrganizationTestOrganization.getName())) - ); - AgentPool tfeAgentPoolTestAgentPool = new AgentPool(this, "test-agent-pool", new AgentPoolConfig() - .name("my-agent-pool-name") - .organization(Token.asString(tfeOrganizationTestOrganization.getName())) - .organizationScoped(false) - ); - new AgentPoolAllowedWorkspaces(this, "test-allowed-workspaces", new AgentPoolAllowedWorkspacesConfig() - .agentPoolId(Token.asString(tfeAgentPoolTestAgentPool.getId())) - .allowedWorkspaceIds(List.of(Token.asString(tfeWorkspaceTestWorkspace.getId()))) - ); - } +In this example, the agent pool and workspace are connected through other resources that manage the agent pool permissions as well as the workspace execution mode. Notice that the `tfeWorkspaceSettings` uses the agent pool reference found in `tfeAgentPoolAllowedWorkspaces` in order to create the permission to use the agent pool before assigning it. + +```hcl +resource "tfe_organization" "test-organization" { + name = "my-org-name" + email = "admin@company.com" +} + +// Ensure workspace and agent pool are create first +resource "tfe_workspace" "test-workspace" { + name = "my-workspace-name" + organization = tfe_organization.test-organization.name +} + +resource "tfe_agent_pool" "test-agent-pool" { + name = "my-agent-pool-name" + organization = tfe_organization.test-organization.name + organization_scoped = false +} + +// Ensure permissions are assigned second +resource "tfe_agent_pool_allowed_workspaces" "allowed" { + agent_pool_id = tfe_agent_pool.test-agent-pool.id + allowed_workspace_ids = [for key, value in tfe_workspace.test.*.id : value] +} + +// Lastly, ensure the workspace agent execution is assigned last by +// referencing allowed_workspaces +resource "tfe_workspace_settings" "test-workspace-settings" { + workspace_id = tfe_workspace.test-workspace.id + execution_mode = "agent" + agent_pool_id = tfe_agent_pool_allowed_workspaces.allowed.id } ``` @@ -68,5 +68,4 @@ A resource can be imported; use `` as the import ID. For example: terraform import tfe_agent_pool_allowed_workspaces.foobar apool-rW0KoLSlnuNb5adB ``` - - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/java/r/opa_version.html.markdown b/website/docs/cdktf/java/r/opa_version.html.markdown new file mode 100644 index 000000000..73ad963fc --- /dev/null +++ b/website/docs/cdktf/java/r/opa_version.html.markdown @@ -0,0 +1,67 @@ +--- +layout: "tfe" +page_title: "Terraform Enterprise: tfe_opa_version" +description: |- + Manages OPA versions +--- + + + +# tfe_opa_version + +Manage OPA versions available on Terraform Enterprise. + +## Example Usage + +Basic Usage: + +```java +import software.constructs.*; +import com.hashicorp.cdktf.*; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import gen.providers.tfe.opaVersion.*; +public class MyConvertedCode extends TerraformStack { + public MyConvertedCode(Construct scope, String name) { + super(scope, name); + new OpaVersion(this, "test", new OpaVersionConfig() + .sha("e75ac73deb69a6b3aa667cb0b8b731aee79e2904") + .url("https://tfe-host.com/path/to/opa") + .version("0.58.0-custom") + ); + } +} +``` + +## Argument Reference + +The following arguments are supported: + +* `version` - (Required) A semantic version string in N.N.N or N.N.N-bundleName format. +* `url` - (Required) The URL where a 64-bit Linux binary of this version can be downloaded. +* `sha` - (Required) The SHA-256 checksum of the compressed OPA binary. +* `official` - (Optional) Whether or not this is an official release of OPA. Defaults to "false". +* `enabled` - (Optional) Whether or not this version of OPA is enabled for use in Terraform Cloud/Enterprise. Defaults to "true". +* `beta` - (Optional) Whether or not this version of OPA is beta pre-release. Defaults to "false". +* `deprecated` - (Optional) Whether or not this version of OPA is deprecated. Defaults to "false". +* `deprecatedReason` - (Optional) Additional context about why a version of OPA is deprecated. Defaults to "null" unless `deprecated` is true. + +## Attributes Reference + +* `id` The ID of the OPA version + +## Import + +OPA versions can be imported; use `` or `` as the import ID. For example: + +```shell +terraform import tfe_opa_version.test tool-L4oe7rNwn7J4E5Yr +``` + +```shell +terraform import tfe_opa_version.test 0.58.0 +``` + +-> **Note:** You can fetch a OPA version ID from the URL of an existing version in the Terraform Cloud UI. The ID is in the format `tool-` + + \ No newline at end of file diff --git a/website/docs/cdktf/java/r/organization.html.markdown b/website/docs/cdktf/java/r/organization.html.markdown index a7ee9dcde..28d572537 100644 --- a/website/docs/cdktf/java/r/organization.html.markdown +++ b/website/docs/cdktf/java/r/organization.html.markdown @@ -5,6 +5,8 @@ description: |- Manages organizations. --- + + # tfe_organization Manages organizations. @@ -45,6 +47,7 @@ The following arguments are supported: * `ownersTeamSamlRoleId` - (Optional) The name of the "owners" team. * `costEstimationEnabled` - (Optional) Whether or not the cost estimation feature is enabled for all workspaces in the organization. Defaults to true. In a Terraform Cloud organization which does not have Teams & Governance features, this value is always false and cannot be changed. In Terraform Enterprise, Cost Estimation must also be enabled in Site Administration. * `sendPassingStatusesForUntriggeredSpeculativePlans` - (Optional) Whether or not to send VCS status updates for untriggered speculative plans. This can be useful if large numbers of untriggered workspaces are exhausting request limits for connected version control service providers like GitHub. Defaults to false. In Terraform Enterprise, this setting has no effect and cannot be changed but is also available in Site Administration. +* `aggregatedCommitStatusEnabled` - (Optional) Whether or not to enable Aggregated Status Checks. This can be useful for monorepo repositories with multiple workspaces receiving status checks for events such as a pull request. If enabled, `sendPassingStatusesForUntriggeredSpeculativePlans` needs to be false. * `assessmentsEnforced` - (Optional) (Available only in Terraform Cloud) Whether to force health assessments (drift detection) on all eligible workspaces or allow workspaces to set their own preferences. * `allowForceDeleteWorkspaces` - (Optional) Whether workspace administrators are permitted to delete workspaces with resources under management. If false, only organization owners may delete these workspaces. Defaults to false. @@ -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/java/r/organization_default_settings.html.markdown b/website/docs/cdktf/java/r/organization_default_settings.html.markdown new file mode 100644 index 000000000..b973f6bd3 --- /dev/null +++ b/website/docs/cdktf/java/r/organization_default_settings.html.markdown @@ -0,0 +1,70 @@ +--- +layout: "tfe" +page_title: "Terraform Enterprise: tfe_organization_default_settings +description: |- + Sets the workspace defaults for an organization +--- + + + +# tfe_organization_default_settings + +Primarily, this is used to set the default execution mode of an organization. Settings configured here will be used as the default for all workspaces in the organization, unless they specify their own values with a [`tfeWorkspaceSettings` resource](workspace_settings.html) (or deprecated attributes on the workspace resource). + +## Example Usage + +Basic usage: + +```java +import software.constructs.*; +import com.hashicorp.cdktf.*; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import gen.providers.tfe.organization.*; +import gen.providers.tfe.agentPool.*; +import gen.providers.tfe.organizationDefaultSettings.*; +import gen.providers.tfe.workspace.*; +public class MyConvertedCode extends TerraformStack { + public MyConvertedCode(Construct scope, String name) { + super(scope, name); + Organization tfeOrganizationTest = new Organization(this, "test", new OrganizationConfig() + .email("admin@company.com") + .name("my-org-name") + ); + AgentPool tfeAgentPoolMyAgents = new AgentPool(this, "my_agents", new AgentPoolConfig() + .name("agent_smiths") + .organization(Token.asString(tfeOrganizationTest.getName())) + ); + OrganizationDefaultSettings tfeOrganizationDefaultSettingsOrgDefault = + new OrganizationDefaultSettings(this, "org_default", new OrganizationDefaultSettingsConfig() + .defaultAgentPoolId(Token.asString(tfeAgentPoolMyAgents.getId())) + .defaultExecutionMode("agent") + .organization(Token.asString(tfeOrganizationTest.getName())) + ); + new Workspace(this, "my_workspace", new WorkspaceConfig() + .dependsOn(List.of(tfeOrganizationDefaultSettingsOrgDefault)) + .name("my-workspace") + ); + } +} +``` + +## Argument Reference + +The following arguments are supported: + +* `defaultExecutionMode` - (Optional) Which [execution mode](https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings#execution-mode) + to use as the default for all workspaces in the organization. Valid values are `remote`, `local` or`agent`. +* `defaultAgentPoolId` - (Optional) The ID of an agent pool to assign to the workspace. Requires `defaultExecutionMode` to be set to `agent`. This value _must not_ be provided if `defaultExecutionMode` is set to any other value. +* `organization` - (Optional) Name of the organization. If omitted, organization must be defined in the provider config. + + +## Import + +Organization default execution mode can be imported; use `` as the import ID. For example: + +```shell +terraform import tfe_organization_default_execution_mode.test my-org-name +``` + + \ No newline at end of file diff --git a/website/docs/cdktf/java/r/policy_set.html.markdown b/website/docs/cdktf/java/r/policy_set.html.markdown index 2998a1e98..3a3a14959 100644 --- a/website/docs/cdktf/java/r/policy_set.html.markdown +++ b/website/docs/cdktf/java/r/policy_set.html.markdown @@ -5,6 +5,8 @@ description: |- Manages policy sets. --- + + # tfe_policy_set Policies are rules enforced on Terraform runs. Two policy-as-code frameworks are @@ -21,12 +23,14 @@ 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] + name = "my-policy-set" + description = "A brand new policy set" + organization = "my-org-name" + kind = "sentinel" + agent_enabled = "true" + policy_tool_version = "0.24.1" + policies_path = "policies/my-policy-set" + workspace_ids = [tfe_workspace.test.id] vcs_repo { identifier = "my-org-name/my-policy-set-repository" @@ -41,12 +45,14 @@ 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] + name = "my-policy-set" + description = "A brand new policy set" + organization = "my-org-name" + kind = "sentinel" + agent_enabled = "true" + policy_tool_version = "0.24.1" + policy_ids = [tfe_sentinel_policy.test.id] + workspace_ids = [tfe_workspace.test.id] } ``` @@ -81,6 +87,9 @@ The following arguments are supported: * `kind` - (Optional) The policy-as-code framework associated with the policy. Defaults to `sentinel` if not provided. Valid values are `sentinel` and `opa`. A policy set can only have policies that have the same underlying kind. +* `agentEnabled` - (Optional) Whether or not the policy set is run as a policy evaluation within the agent. + True by default for all "opa" policy sets. +* `policyToolVersion` - (Optional) The policy tool version to run the evaluation against. * `overridable` - (Optional) Whether or not users can override this policy when it fails during a run. Defaults to `false`. Only valid for OPA policies. * `organization` - (Optional) Name of the organization. If omitted, organization must be defined in the provider config. @@ -126,4 +135,4 @@ Policy sets can be imported; use `` as the import ID. For example terraform import tfe_policy_set.test polset-wAs3zYmWAhYK7peR ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/java/r/registry_gpg_key.html.markdown b/website/docs/cdktf/java/r/registry_gpg_key.html.markdown new file mode 100644 index 000000000..851e98f10 --- /dev/null +++ b/website/docs/cdktf/java/r/registry_gpg_key.html.markdown @@ -0,0 +1,48 @@ +--- +layout: "tfe" +page_title: "Terraform Enterprise: tfe_registry_gpg_key" +description: |- + Manages private registry GPG keys. +--- + + + +# tfe_registry_gpg_key + +Manages a public key of the GPG key pair used to sign releases of private providers in the private registry. + +The provided GPG key must be ASCII-armored, i.e. starting with: +"`-----BEGIN PGP PUBLIC KEY BLOCK-----\n\n...`". + +## Example Usage + +```hcl +resource "tfe_registry_gpg_key" "example" { + organization = "my-org-name" + ascii_armor = file("my-public-key.asc") +} +``` + +## Argument Reference + +The following arguments are supported: + +* `asciiArmor` - (Required) ASCII-armored representation of the GPG key. +* `organization` - (Optional) Name of the organization. If omitted, organization must be defined in the provider config. + +## Attributes Reference + +* `id` - ID of the GPG key. +* `createdAt` - The time when the GPG key was created. +* `updatedAt` - The time when the GPG key was last updated. + +## Import + +Keys can be imported; use `/` as the import ID. For +example: + +```shell +terraform import tfe_registry_gpg_key.example my-org-name/34365D9472D7468F +``` + + \ No newline at end of file diff --git a/website/docs/cdktf/java/r/registry_module.html.markdown b/website/docs/cdktf/java/r/registry_module.html.markdown index 17f153627..7b4570b1a 100644 --- a/website/docs/cdktf/java/r/registry_module.html.markdown +++ b/website/docs/cdktf/java/r/registry_module.html.markdown @@ -48,6 +48,45 @@ public class MyConvertedCode extends TerraformStack { } ``` +Create private registry module with tests enabled: + +```java +import software.constructs.*; +import com.hashicorp.cdktf.*; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import gen.providers.tfe.organization.*; +import gen.providers.tfe.oauthClient.*; +import gen.providers.tfe.registryModule.*; +public class MyConvertedCode extends TerraformStack { + public MyConvertedCode(Construct scope, String name) { + super(scope, name); + Organization tfeOrganizationTestOrganization = new Organization(this, "test-organization", new OrganizationConfig() + .email("admin@company.com") + .name("my-org-name") + ); + OauthClient tfeOauthClientTestOauthClient = new OauthClient(this, "test-oauth-client", new OauthClientConfig() + .apiUrl("https://api.github.com") + .httpUrl("https://github.com") + .oauthToken("my-vcs-provider-token") + .organization(Token.asString(tfeOrganizationTestOrganization.getName())) + .serviceProvider("github") + ); + new RegistryModule(this, "test-registry-module", new RegistryModuleConfig() + .testConfig(List.of(new RegistryModuleTestConfig() + .testsEnabled(true) + )) + .vcsRepo(new RegistryModuleVcsRepo() + .branch("main") + .displayIdentifier("my-org-name/terraform-provider-name") + .identifier("my-org-name/terraform-provider-name") + .oauthTokenId(Token.asString(tfeOauthClientTestOauthClient.getOauthTokenId())) + ) + ); + } +} +``` + Create private registry module with GitHub App: ```java @@ -179,6 +218,9 @@ The following arguments are supported: * `namespace` - (Optional) The namespace of a public registry module. It can be used if `moduleProvider` is set and `registryName` is public. * `registryName` - (Optional) Whether the registry module is private or public. It can be used if `moduleProvider` is set. +The `testConfig` block supports +* `testsEnabled` - (Optional) Specifies whether tests run for the registry module. Tests are only supported for branch-based publishing. + The `vcsRepo` block supports: * `displayIdentifier` - (Required) The display identifier for your VCS repository. @@ -189,6 +231,8 @@ The `vcsRepo` block supports: and repository in your VCS provider. The format for Azure DevOps is `//_git/`. * `oauthTokenId` - (Optional) Token ID of the VCS Connection (OAuth Connection Token) to use. This conflicts with `githubAppInstallationId` and can only be used if `githubAppInstallationId` is not used. * `githubAppInstallationId` - (Optional) The installation id of the Github App. This conflicts with `oauthTokenId` and can only be used if `oauthTokenId` is not used. +* `branch` - (Optional) The git branch used for publishing when using branch-based publishing for the registry module. When a `branch` is set, `tags` will be returned as `false`. +* `tags` - (Optional) Specifies whether tag based publishing is enabled for the registry module. When `tags` is set to `true`, the `branch` must be set to an empty value. ## Attributes Reference @@ -197,6 +241,7 @@ The `vcsRepo` block supports: * `name` - The name of registry module. * `organization` - The name of the organization associated with the registry module. * `namespace` - The namespace of the module. For private modules this is the name of the organization that owns the module. +* `publishingMechanism` - The publishing mechanism used when releasing new versions of the module. * `registryName` - The registry name of the registry module depicting whether the registry module is private or public. * `noCode` - **Deprecated** The property that will enable or disable a module as no-code provisioning ready. Use the tfe_no_code_module resource instead. @@ -215,4 +260,4 @@ terraform import tfe_registry_module.test my-org-name/public/namespace/name/prov terraform import tfe_registry_module.test my-org-name/name/provider/mod-qV9JnKRkmtMa4zcA ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/java/r/registry_provider.html.markdown b/website/docs/cdktf/java/r/registry_provider.html.markdown new file mode 100644 index 000000000..5ef512fff --- /dev/null +++ b/website/docs/cdktf/java/r/registry_provider.html.markdown @@ -0,0 +1,103 @@ +--- +layout: "tfe" +page_title: "Terraform Enterprise: tfe_registry_provider" +description: |- + Manages public and private providers in the private registry. +--- + + + +# tfe_registry_provider + +Manages public and private providers in the private registry. + +## Example Usage + +Create private provider: + +```java +import software.constructs.*; +import com.hashicorp.cdktf.*; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import gen.providers.tfe.organization.*; +import gen.providers.tfe.registryProvider.*; +public class MyConvertedCode extends TerraformStack { + public MyConvertedCode(Construct scope, String name) { + super(scope, name); + Organization tfeOrganizationExample = new Organization(this, "example", new OrganizationConfig() + .email("admin@company.com") + .name("my-org-name") + ); + RegistryProvider tfeRegistryProviderExample = + new RegistryProvider(this, "example_1", new RegistryProviderConfig() + .name("my-provider") + .organization(Token.asString(tfeOrganizationExample.getName())) + ); + /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ + tfeRegistryProviderExample.overrideLogicalId("example"); + } +} +``` + +Create public provider: + +```java +import software.constructs.*; +import com.hashicorp.cdktf.*; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import gen.providers.tfe.organization.*; +import gen.providers.tfe.registryProvider.*; +public class MyConvertedCode extends TerraformStack { + public MyConvertedCode(Construct scope, String name) { + super(scope, name); + Organization tfeOrganizationExample = new Organization(this, "example", new OrganizationConfig() + .email("admin@company.com") + .name("my-org-name") + ); + RegistryProvider tfeRegistryProviderExample = + new RegistryProvider(this, "example_1", new RegistryProviderConfig() + .name("aws") + .namespace("hashicorp") + .organization(Token.asString(tfeOrganizationExample.getName())) + .registryName("public") + ); + /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ + tfeRegistryProviderExample.overrideLogicalId("example"); + } +} +``` + +## Argument Reference + +The following arguments are supported: + +* `organization` - (Optional) Name of the organization. If omitted, organization must be defined in the provider config. +* `registryName` - (Optional) Whether this is a publicly maintained provider or private. Must be either `public` or `private`. Defaults to `private`. +* `namespace` - (Optional) The namespace of the provider. Required if `registryName` is `public`, otherwise it can't be configured, and it will be set to same value as the `organization`. +* `name` - (Required) Name of the provider. + +## Attributes Reference + +* `id` - ID of the provider. +* `createdAt` - The time when the provider was created. +* `updatedAt` - The time when the provider was last updated. + +## Import + +Providers can be imported; use `///` as the import ID. + +For example a private provider: + +```shell +terraform import tfe_registry_provider.example my-org-name/private/my-org-name/my-provider +``` + +Or a public provider: + +```shell +terraform import tfe_registry_provider.example my-org-name/public/hashicorp/aws +``` + + \ No newline at end of file diff --git a/website/docs/cdktf/java/r/sentinel_version.html.markdown b/website/docs/cdktf/java/r/sentinel_version.html.markdown new file mode 100644 index 000000000..4dfbecd80 --- /dev/null +++ b/website/docs/cdktf/java/r/sentinel_version.html.markdown @@ -0,0 +1,67 @@ +--- +layout: "tfe" +page_title: "Terraform Enterprise: tfe_sentinel_version" +description: |- + Manages Sentinel versions +--- + + + +# tfe_sentinel_version + +Manage Sentinel versions available on Terraform Cloud/Enterprise. + +## Example Usage + +Basic Usage: + +```java +import software.constructs.*; +import com.hashicorp.cdktf.*; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import gen.providers.tfe.sentinelVersion.*; +public class MyConvertedCode extends TerraformStack { + public MyConvertedCode(Construct scope, String name) { + super(scope, name); + new SentinelVersion(this, "test", new SentinelVersionConfig() + .sha("e75ac73deb69a6b3aa667cb0b8b731aee79e2904") + .url("https://tfe-host.com/path/to/sentinel.zip") + .version("0.24.0-custom") + ); + } +} +``` + +## Argument Reference + +The following arguments are supported: + +* `version` - (Required) A semantic version string in N.N.N or N.N.N-bundleName format. +* `url` - (Required) The URL where a ZIP-compressed 64-bit Linux binary of this version can be downloaded. +* `sha` - (Required) The SHA-256 checksum of the compressed Sentinel binary. +* `official` - (Optional) Whether or not this is an official release of Sentinel. Defaults to "false". +* `enabled` - (Optional) Whether or not this version of Sentinel is enabled for use in Terraform Cloud/Enterprise. Defaults to "true". +* `beta` - (Optional) Whether or not this version of Sentinel is beta pre-release. Defaults to "false". +* `deprecated` - (Optional) Whether or not this version of Sentinel is deprecated. Defaults to "false". +* `deprecatedReason` - (Optional) Additional context about why a version of Sentinel is deprecated. Defaults to "null" unless `deprecated` is true. + +## Attributes Reference + +* `id` The ID of the Sentinel version + +## Import + +Sentinel versions can be imported; use `` or `` as the import ID. For example: + +```shell +terraform import tfe_sentinel_version.test tool-L4oe7rNwn7J4E5Yr +``` + +```shell +terraform import tfe_sentinel_version.test 0.24.0 +``` + +-> **Note:** You can fetch a Sentinel version ID from the URL of an existing version in the Terraform Cloud UI. The ID is in the format `tool-` + + \ No newline at end of file diff --git a/website/docs/cdktf/java/r/team_project_access.html.markdown b/website/docs/cdktf/java/r/team_project_access.html.markdown index bb3d6a831..c776470a9 100644 --- a/website/docs/cdktf/java/r/team_project_access.html.markdown +++ b/website/docs/cdktf/java/r/team_project_access.html.markdown @@ -143,4 +143,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/java/r/workspace.html.markdown b/website/docs/cdktf/java/r/workspace.html.markdown index 548fdd526..dbc42ef46 100644 --- a/website/docs/cdktf/java/r/workspace.html.markdown +++ b/website/docs/cdktf/java/r/workspace.html.markdown @@ -11,6 +11,8 @@ description: |- Provides a workspace resource. +~> **NOTE:** Setting the execution mode and agent pool affinity directly on the workspace is deprecated in favor of using both [tfe_workspace_settings](workspace_settings) and [tfe_organization_default_settings](organization_default_settings), since they allow more precise control and fully support [agent_pool_allowed_workspaces](agent_pool_allowed_workspaces). Use caution when unsetting `executionMode`, as it now leaves any prior value unmanaged instead of reverting to the old default value of `"remote"`. + ~> **NOTE:** Using `globalRemoteState` or `remoteStateConsumerIds` requires using the provider with Terraform Cloud or an instance of Terraform Enterprise at least as recent as v202104-1. ## Example Usage @@ -40,7 +42,7 @@ public class MyConvertedCode extends TerraformStack { } ``` -With `executionMode` of `agent`: +Usage with vcs_repo: ```java import software.constructs.*; @@ -48,7 +50,7 @@ import com.hashicorp.cdktf.*; /*Provider bindings are generated by running cdktf get. See https://cdk.tf/provider-generation for more details.*/ import gen.providers.tfe.organization.*; -import gen.providers.tfe.agentPool.*; +import gen.providers.tfe.oauthClient.*; import gen.providers.tfe.workspace.*; public class MyConvertedCode extends TerraformStack { public MyConvertedCode(Construct scope, String name) { @@ -57,15 +59,22 @@ public class MyConvertedCode extends TerraformStack { .email("admin@company.com") .name("my-org-name") ); - AgentPool tfeAgentPoolTestAgentPool = new AgentPool(this, "test-agent-pool", new AgentPoolConfig() - .name("my-agent-pool-name") - .organization(Token.asString(tfeOrganizationTestOrganization.getName())) + OauthClient tfeOauthClientTest = new OauthClient(this, "test", new OauthClientConfig() + .apiUrl("https://api.github.com") + .httpUrl("https://github.com") + .oauthToken("oauth_token_id") + .organization(tfeOrganizationTestOrganization) + .serviceProvider("github") ); - new Workspace(this, "test", new WorkspaceConfig() - .agentPoolId(Token.asString(tfeAgentPoolTestAgentPool.getId())) - .executionMode("agent") - .name("my-workspace-name") - .organization(Token.asString(tfeOrganizationTestOrganization.getName())) + new Workspace(this, "parent", new WorkspaceConfig() + .name("parent-ws") + .organization(tfeOrganizationTestOrganization) + .queueAllRuns(false) + .vcsRepo(new WorkspaceVcsRepo() + .branch("main") + .identifier("my-org-name/vcs-repository") + .oauthTokenId(Token.asString(tfeOauthClientTest.getOauthTokenId())) + ) ); } } @@ -76,20 +85,13 @@ public class MyConvertedCode extends TerraformStack { The following arguments are supported: * `name` - (Required) Name of the workspace. -* `agentPoolId` - (Optional) The ID of an agent pool to assign to the workspace. Requires `executionMode` - to be set to `agent`. This value _must not_ be provided if `executionMode` is set to any other value or if `operations` is - provided. +* `agentPoolId` - (Optional) **Deprecated** The ID of an agent pool to assign to the workspace. Use [tfe_workspace_settings](workspace_settings) instead. * `allowDestroyPlan` - (Optional) Whether destroy plans can be queued on the workspace. * `assessmentsEnabled` - (Optional) Whether to regularly run health assessments such as drift detection on the workspace. Defaults to `false`. * `autoApply` - (Optional) Whether to automatically apply changes when a Terraform plan is successful. Defaults to `false`. * `autoApplyRunTrigger` - (Optional) Whether to automatically apply changes for runs that were created by run triggers from another workspace. Defaults to `false`. * `description` - (Optional) A description for the workspace. -* `executionMode` - (Optional) Which [execution mode](https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings#execution-mode) - to use. Using Terraform Cloud, valid values are `remote`, `local` or`agent`. - Defaults to `remote`. Using Terraform Enterprise, only `remote`and `local` - execution modes are valid. When set to `local`, the workspace will be used - for state storage only. This value _must not_ be provided if `operations` - is provided. +* `executionMode` - (Optional) **Deprecated** Which [execution mode](https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings#execution-mode) to use. Use [tfe_workspace_settings](workspace_settings) instead. * `fileTriggersEnabled` - (Optional) Whether to filter runs based on the changed files in a VCS push. Defaults to `true`. If enabled, the working directory and trigger prefixes describe a set of paths which must contain changes for a @@ -133,6 +135,11 @@ The following arguments are supported: workspace will display their output as text logs. * `sshKeyId` - (Optional) The ID of an SSH key to assign to the workspace. * `tagNames` - (Optional) A list of tag names for this workspace. Note that tags must only contain lowercase letters, numbers, colons, or hyphens. +* `ignoreAdditionalTagNames` - (Optional) Explicitly ignores `tagNames` +_not_ defined by config so they will not be overwritten by the configured +tags. This creates exceptional behavior in terraform with respect +to `tagNames` and is not recommended. This value must be applied before it +will be used. * `terraformVersion` - (Optional) The version of Terraform to use for this workspace. This can be either an exact version or a [version constraint](https://developer.hashicorp.com/terraform/language/expressions/version-constraints) @@ -167,7 +174,7 @@ In addition to all arguments above, the following attributes are exported: * `id` - The workspace ID. * `resourceCount` - The number of resources managed by the workspace. -* `htmlUrl` - The URL to the browsable HTML overview of the workspace +* `htmlUrl` - The URL to the browsable HTML overview of the workspace. ## Import @@ -182,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/java/r/workspace_settings.markdown b/website/docs/cdktf/java/r/workspace_settings.markdown new file mode 100644 index 000000000..f1b7262d3 --- /dev/null +++ b/website/docs/cdktf/java/r/workspace_settings.markdown @@ -0,0 +1,149 @@ +--- +layout: "tfe" +page_title: "Terraform Enterprise: tfe_workspace_setting" +description: |- + Manages workspace settings. +--- + + + +# tfe_workspace_settings + +Manages or reads execution mode and agent pool settings for a workspace. This also interacts with the organization's default values for several settings, which can be managed with [tfe_organization_default_settings](organization_default_settings.html). If other resources need to identify whether a setting is a default or an explicit value set for the workspace, you can refer to the read-only `overwrites` argument. + +## Example Usage + +Basic usage: + +```java +import software.constructs.*; +import com.hashicorp.cdktf.*; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import gen.providers.tfe.organization.*; +import gen.providers.tfe.workspace.*; +import gen.providers.tfe.workspaceSettings.*; +public class MyConvertedCode extends TerraformStack { + public MyConvertedCode(Construct scope, String name) { + super(scope, name); + Organization tfeOrganizationTestOrganization = new Organization(this, "test-organization", new OrganizationConfig() + .email("admin@company.com") + .name("my-org-name") + ); + Workspace tfeWorkspaceTest = new Workspace(this, "test", new WorkspaceConfig() + .name("my-workspace-name") + .organization(Token.asString(tfeOrganizationTestOrganization.getName())) + ); + new WorkspaceSettings(this, "test-settings", new WorkspaceSettingsConfig() + .executionMode("local") + .workspaceId(Token.asString(tfeWorkspaceTest.getId())) + ); + } +} +``` + +With `executionMode` of `agent`: + +```java +import software.constructs.*; +import com.hashicorp.cdktf.*; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import gen.providers.tfe.organization.*; +import gen.providers.tfe.workspace.*; +import gen.providers.tfe.agentPool.*; +import gen.providers.tfe.agentPoolAllowedWorkspaces.*; +import gen.providers.tfe.workspaceSettings.*; +public class MyConvertedCode extends TerraformStack { + public MyConvertedCode(Construct scope, String name) { + super(scope, name); + Organization tfeOrganizationTestOrganization = new Organization(this, "test-organization", new OrganizationConfig() + .email("admin@company.com") + .name("my-org-name") + ); + Workspace tfeWorkspaceTest = new Workspace(this, "test", new WorkspaceConfig() + .name("my-workspace-name") + .organization(Token.asString(tfeOrganizationTestOrganization.getName())) + ); + AgentPool tfeAgentPoolTestAgentPool = new AgentPool(this, "test-agent-pool", new AgentPoolConfig() + .name("my-agent-pool-name") + .organization(Token.asString(tfeOrganizationTestOrganization.getName())) + ); + AgentPoolAllowedWorkspaces tfeAgentPoolAllowedWorkspacesTest = + new AgentPoolAllowedWorkspaces(this, "test_3", new AgentPoolAllowedWorkspacesConfig() + .agentPoolId(Token.asString(tfeAgentPoolTestAgentPool.getId())) + .allowedWorkspaceIds(List.of(Token.asString(tfeWorkspaceTest.getId()))) + ); + /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ + tfeAgentPoolAllowedWorkspacesTest.overrideLogicalId("test"); + new WorkspaceSettings(this, "test-settings", new WorkspaceSettingsConfig() + .agentPoolId(Token.asString(tfeAgentPoolAllowedWorkspacesTest.getAgentPoolId())) + .executionMode("agent") + .workspaceId(Token.asString(tfeWorkspaceTest.getId())) + ); + } +} +``` + +This resource may be used as a data source when no optional arguments are defined: + +```java +import software.constructs.*; +import com.hashicorp.cdktf.*; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import gen.providers.tfe.dataTfeWorkspace.*; +import gen.providers.tfe.workspaceSettings.*; +public class MyConvertedCode extends TerraformStack { + public MyConvertedCode(Construct scope, String name) { + super(scope, name); + DataTfeWorkspace dataTfeWorkspaceTest = new DataTfeWorkspace(this, "test", new DataTfeWorkspaceConfig() + .name("my-workspace-name") + .organization("my-org-name") + ); + WorkspaceSettings tfeWorkspaceSettingsTest = + new WorkspaceSettings(this, "test_1", new WorkspaceSettingsConfig() + .workspaceId(Token.asString(dataTfeWorkspaceTest.getId())) + ); + /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ + tfeWorkspaceSettingsTest.overrideLogicalId("test"); + TerraformOutput.Builder.create(this, "workspace-explicit-local-execution") + .value(Fn.alltrue(Token.asAny(List.of(Op.eq(tfeWorkspaceSettingsTest.getExecutionMode(), "local"), propertyAccess(tfeWorkspaceSettingsTest.getOverwrites(), List.of("0", "\"execution_mode\"")))))) + .build(); + } +} +``` + +## Argument Reference + +The following arguments are supported: + +* `workspaceId` - (Required) ID of the workspace. +* `agentPoolId` - (Optional) The ID of an agent pool to assign to the workspace. Requires `executionMode` + to be set to `agent`. This value _must not_ be provided if `executionMode` is set to any other value. +* `executionMode` - (Optional) Which [execution mode](https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings#execution-mode) + to use. Using Terraform Cloud, valid values are `remote`, `local` or `agent`. Using Terraform Enterprise, only `remote` and `local` execution modes are valid. When set to `local`, the workspace will be used for state storage only. **Important:** If you omit this attribute, the resource configures the workspace to use your organization's default execution mode (which in turn defaults to `remote`), removing any explicit value that might have previously been set for the workspace. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +* `id` - The workspace ID. +* `overwrites` - Can be used to check whether a setting is currently inheriting its value from another resource. + - `executionMode` - Set to `true` if the execution mode of the workspace is being determined by the setting on the workspace itself. It will be `false` if the execution mode is inherited from another resource (e.g. the organization's default execution mode) + - `agentPool` - Set to `true` if the agent pool of the workspace is being determined by the setting on the workspace itself. It will be `false` if the agent pool is inherited from another resource (e.g. the organization's default agent pool) + +## Import + +Workspaces can be imported; use `` or `/` as the +import ID. For example: + +```shell +terraform import tfe_workspace_settings.test ws-CH5in3chf8RJjrVd +``` + +```shell +terraform import tfe_workspace_settings.test my-org-name/my-wkspace-name +``` + + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/agent_pool.html.markdown b/website/docs/cdktf/python/d/agent_pool.html.markdown index df964f4cc..7293e009c 100644 --- a/website/docs/cdktf/python/d/agent_pool.html.markdown +++ b/website/docs/cdktf/python/d/agent_pool.html.markdown @@ -14,18 +14,15 @@ Use this data source to get information about an agent pool. ## Example Usage ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.data_tfe_agent_pool import DataTfeAgentPool -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - DataTfeAgentPool(self, "test", + tfe.data_tfe_agent_pool.DataTfeAgentPool(self, "test", name="my-agent-pool-name", organization="my-org-name" ) @@ -45,4 +42,4 @@ In addition to all arguments above, the following attributes are exported: * `id` - The agent pool ID. * `organization_scoped` - Whether or not the agent pool can be used by all workspaces in the organization. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/github_installation.html.markdown b/website/docs/cdktf/python/d/github_installation.html.markdown index 2d5ab9fd9..30c40a42b 100644 --- a/website/docs/cdktf/python/d/github_installation.html.markdown +++ b/website/docs/cdktf/python/d/github_installation.html.markdown @@ -16,18 +16,15 @@ Use this data source to get information about the Github App Installation. ### Finding a Github App Installation by its installation ID ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.data_tfe_github_app_installation import DataTfeGithubAppInstallation -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - DataTfeGithubAppInstallation(self, "gha_installation", + tfe.data_tfe_github_app_installation.DataTfeGithubAppInstallation(self, "gha_installation", installation_id=12345678 ) ``` @@ -35,18 +32,15 @@ class MyConvertedCode(TerraformStack): ### Finding a Github App Installation by its name ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.data_tfe_github_app_installation import DataTfeGithubAppInstallation -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - DataTfeGithubAppInstallation(self, "gha_installation", + tfe.data_tfe_github_app_installation.DataTfeGithubAppInstallation(self, "gha_installation", name="github_username_or_organization" ) ``` @@ -66,4 +60,4 @@ 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 545b0540a..d51c305d5 100644 --- a/website/docs/cdktf/python/d/ip_ranges.html.markdown +++ b/website/docs/cdktf/python/d/ip_ranges.html.markdown @@ -14,20 +14,17 @@ Use this data source to retrieve a list of Terraform Cloud's IP ranges. For more ## Example Usage ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformOutput, TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.data_tfe_ip_ranges import DataTfeIpRanges -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - addresses = DataTfeIpRanges(self, "addresses") - TerraformOutput(self, "notifications_ips", - value=addresses.notifications + data_tfe_ip_ranges_addresses = tfe.data_tfe_ip_ranges.DataTfeIpRanges(self, "addresses") + cdktf.TerraformOutput(self, "notifications_ips", + value=data_tfe_ip_ranges_addresses.notifications ) ``` @@ -45,4 +42,4 @@ The following attributes are exported: * `vcs` - The list of IP ranges in CIDR notation used for connecting to VCS providers. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/no_code_module.html.markdown b/website/docs/cdktf/python/d/no_code_module.html.markdown index 76a3c8037..72ccc9fb9 100644 --- a/website/docs/cdktf/python/d/no_code_module.html.markdown +++ b/website/docs/cdktf/python/d/no_code_module.html.markdown @@ -13,28 +13,15 @@ Use this data source to read the details of an existing No-Code-Allowed module. ## Example Usage -```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import Token, TerraformStack -# -# Provider bindings are generated by running `cdktf get`. -# See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.data_tfe_no_code_module import DataTfeNoCodeModule -from imports.tfe.no_code_module import NoCodeModule -class MyConvertedCode(TerraformStack): - def __init__(self, scope, name): - super().__init__(scope, name) - foobar = NoCodeModule(self, "foobar", - organization=Token.as_string(tfe_organization_foobar.id), - registry_module=Token.as_string(tfe_registry_module_foobar.id) - ) - data_tfe_no_code_module_foobar = DataTfeNoCodeModule(self, "foobar_1", - id=foobar.id - ) - # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. - data_tfe_no_code_module_foobar.override_logical_id("foobar") +```hcl +resource "tfe_no_code_module" "foobar" { + organization = tfe_organization.foobar.id + registry_module = tfe_registry_module.foobar.id +} + +data "tfe_no_code_module" "foobar" { + id = tfe_no_code_module.foobar.id +} ``` ## Argument Reference @@ -52,4 +39,4 @@ The following arguments are supported: * `version_pin` - Version number the no-code module is pinned to. * `enabled` - Indicates if this no-code module is currently enabled - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/oauth_client.html.markdown b/website/docs/cdktf/python/d/oauth_client.html.markdown index 79b1e70ef..4aec1ba13 100644 --- a/website/docs/cdktf/python/d/oauth_client.html.markdown +++ b/website/docs/cdktf/python/d/oauth_client.html.markdown @@ -16,18 +16,15 @@ Use this data source to get information about an OAuth client. ### Finding an OAuth client by its ID ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.data_tfe_oauth_client import DataTfeOauthClient -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - DataTfeOauthClient(self, "client", + tfe.data_tfe_oauth_client.DataTfeOauthClient(self, "client", oauth_client_id="oc-XXXXXXX" ) ``` @@ -35,18 +32,15 @@ class MyConvertedCode(TerraformStack): ### Finding an OAuth client by its name ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.data_tfe_oauth_client import DataTfeOauthClient -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - DataTfeOauthClient(self, "client", + tfe.data_tfe_oauth_client.DataTfeOauthClient(self, "client", name="my-oauth-client", organization="my-org" ) @@ -55,18 +49,15 @@ class MyConvertedCode(TerraformStack): ### Finding an OAuth client by its service provider ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.data_tfe_oauth_client import DataTfeOauthClient -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - DataTfeOauthClient(self, "client", + tfe.data_tfe_oauth_client.DataTfeOauthClient(self, "client", organization="my-org", service_provider="github" ) @@ -102,4 +93,4 @@ In addition to all arguments above, the following attributes are exported: * `service_provider` - The API identifier of the OAuth service provider. * `service_provider_display_name` - The display name of the OAuth service provider. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/organization.html.markdown b/website/docs/cdktf/python/d/organization.html.markdown index e28ac7661..41cb64aea 100644 --- a/website/docs/cdktf/python/d/organization.html.markdown +++ b/website/docs/cdktf/python/d/organization.html.markdown @@ -14,18 +14,15 @@ Use this data source to get information about an organization. ## Example Usage ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.data_tfe_organization import DataTfeOrganization -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - DataTfeOrganization(self, "foo", + tfe.data_tfe_organization.DataTfeOrganization(self, "foo", name="organization-name" ) ``` @@ -49,4 +46,4 @@ In addition to all arguments above, the following attributes are exported: * `aggregated_commit_status_enabled` - Whether or not to enable Aggregated Status Checks. This can be useful for monorepo repositories with multiple workspaces receiving status checks for events such as a pull request. * `default_project_id` - ID of the organization's default project. All workspaces created without specifying a project ID are created in this project. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/organization_members.html.markdown b/website/docs/cdktf/python/d/organization_members.html.markdown index d27f10272..73670ef47 100644 --- a/website/docs/cdktf/python/d/organization_members.html.markdown +++ b/website/docs/cdktf/python/d/organization_members.html.markdown @@ -14,24 +14,20 @@ Use this data source to get information about members of an organization. ## Example Usage ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.data_tfe_organization_members import DataTfeOrganizationMembers -from imports.tfe.organization import Organization -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - bar = Organization(self, "bar", + tfe_organization_bar = tfe.organization.Organization(self, "bar", email="user@hashicorp.com", name="org-bar" ) - DataTfeOrganizationMembers(self, "foo", - organization=bar.name + tfe.data_tfe_organization_members.DataTfeOrganizationMembers(self, "foo", + organization=cdktf.Token.as_string(tfe_organization_bar.name) ) ``` @@ -52,4 +48,4 @@ The `member` block contains: * `user_id` - The ID of the user. * `organization_membership_id` - The ID of the organization membership. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/organization_membership.html.markdown b/website/docs/cdktf/python/d/organization_membership.html.markdown index 5d34fc000..cc1def6d2 100644 --- a/website/docs/cdktf/python/d/organization_membership.html.markdown +++ b/website/docs/cdktf/python/d/organization_membership.html.markdown @@ -22,18 +22,15 @@ be updated manually. ### Fetch by email ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.data_tfe_organization_membership import DataTfeOrganizationMembership -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - DataTfeOrganizationMembership(self, "test", + tfe.data_tfe_organization_membership.DataTfeOrganizationMembership(self, "test", email="user@company.com", organization="my-org-name" ) @@ -42,18 +39,15 @@ class MyConvertedCode(TerraformStack): ### Fetch by username ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.data_tfe_organization_membership import DataTfeOrganizationMembership -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - DataTfeOrganizationMembership(self, "test", + tfe.data_tfe_organization_membership.DataTfeOrganizationMembership(self, "test", organization="my-org-name", username="my-username" ) @@ -62,18 +56,15 @@ class MyConvertedCode(TerraformStack): ### Fetch by organization membership ID ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.data_tfe_organization_membership import DataTfeOrganizationMembership -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - DataTfeOrganizationMembership(self, "test", + tfe.data_tfe_organization_membership.DataTfeOrganizationMembership(self, "test", organization="my-org-name", organization_membership_id="ou-xxxxxxxxxxx" ) @@ -98,4 +89,4 @@ In addition to all arguments above, the following attributes are exported: * `user_id` - The ID of the user associated with the organization membership. * `username` - The username of the user associated with the organization membership. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/organization_run_task.html.markdown b/website/docs/cdktf/python/d/organization_run_task.html.markdown index f4057ee90..8429aa128 100644 --- a/website/docs/cdktf/python/d/organization_run_task.html.markdown +++ b/website/docs/cdktf/python/d/organization_run_task.html.markdown @@ -16,18 +16,15 @@ Use this data source to get information about an [Organization Run tasks](https: ## Example Usage ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.data_tfe_organization_run_task import DataTfeOrganizationRunTask -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - DataTfeOrganizationRunTask(self, "example", + tfe.data_tfe_organization_run_task.DataTfeOrganizationRunTask(self, "example", name="task-name", organization="my-org-name" ) @@ -50,4 +47,4 @@ In addition to all arguments above, the following attributes are exported: * `id` - The ID of the task. * `url` - URL to send a task payload. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/organization_tags.html.markdown b/website/docs/cdktf/python/d/organization_tags.html.markdown index 35e8ecf05..4fffc37f9 100644 --- a/website/docs/cdktf/python/d/organization_tags.html.markdown +++ b/website/docs/cdktf/python/d/organization_tags.html.markdown @@ -14,18 +14,15 @@ Use this data source to get information about the workspace tags for a given org ## Example Usage ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.data_tfe_organization_tags import DataTfeOrganizationTags -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - DataTfeOrganizationTags(self, "example", + tfe.data_tfe_organization_tags.DataTfeOrganizationTags(self, "example", organization="my-org-name" ) ``` @@ -47,4 +44,4 @@ The `tag` block contains: * `name` - The name of the workspace tag * `id` - The ID of the workspace tag * `workspace_count` - The number of workspaces the tag is associate with - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/organizations.html.markdown b/website/docs/cdktf/python/d/organizations.html.markdown index 40acebd22..292e9c76f 100644 --- a/website/docs/cdktf/python/d/organizations.html.markdown +++ b/website/docs/cdktf/python/d/organizations.html.markdown @@ -14,18 +14,15 @@ Use this data source to get a list of Organizations and a map of their IDs. ## Example Usage ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.data_tfe_organizations import DataTfeOrganizations -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - DataTfeOrganizations(self, "foo") + tfe.data_tfe_organizations.DataTfeOrganizations(self, "foo") ``` ## Argument Reference @@ -44,4 +41,4 @@ The following attributes are exported: * `names` - A list of names of every organization. * `ids` - A map of organization names and their IDs. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/outputs.html.markdown b/website/docs/cdktf/python/d/outputs.html.markdown index 81fff84bc..07a84479c 100644 --- a/website/docs/cdktf/python/d/outputs.html.markdown +++ b/website/docs/cdktf/python/d/outputs.html.markdown @@ -20,29 +20,20 @@ Using the `tfe_outputs` data source, the outputs `foo` and `bar` can be used as In the example below, assume we have outputs defined in a `my-org/my-workspace`: -```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. -# See https://cdk.tf/provider-generation for more details. -# -from imports.random.id import Id -from imports.tfe.data_tfe_outputs import DataTfeOutputs -class MyConvertedCode(TerraformStack): - def __init__(self, scope, name): - super().__init__(scope, name) - foo = DataTfeOutputs(self, "foo", - organization="my-org", - workspace="my-workspace" - ) - Id(self, "vpc_id", - byte_length=8, - keepers={ - "bar": foo.values.bar - } - ) +```hcl +data "tfe_outputs" "foo" { + organization = "my-org" + workspace = "my-workspace" +} + +resource "random_id" "vpc_id" { + keepers = { + # Generate a new ID any time the value of 'bar' in workspace 'my-org/my-workspace' changes. + bar = data.tfe_outputs.foo.values.bar + } + + byte_length = 8 +} ``` ## Argument Reference @@ -59,4 +50,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 f07549b13..1a5e415fc 100644 --- a/website/docs/cdktf/python/d/policy_set.html.markdown +++ b/website/docs/cdktf/python/d/policy_set.html.markdown @@ -16,18 +16,15 @@ This data source is used to retrieve a policy set defined in a specified organiz For workspace policies: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.data_tfe_policy_set import DataTfePolicySet -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - DataTfePolicySet(self, "test", + tfe.data_tfe_policy_set.DataTfePolicySet(self, "test", name="my-policy-set-name", organization="my-org-name" ) @@ -69,4 +66,4 @@ The `vcs_repo` block contains: * `oauth_token_id` - OAuth token ID of the configured VCS connection. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/project.html.markdown b/website/docs/cdktf/python/d/project.html.markdown index 7d521d696..4a596f35f 100644 --- a/website/docs/cdktf/python/d/project.html.markdown +++ b/website/docs/cdktf/python/d/project.html.markdown @@ -14,18 +14,15 @@ Use this data source to get information about a project. ## Example Usage ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.data_tfe_project import DataTfeProject -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - DataTfeProject(self, "foo", + tfe.data_tfe_project.DataTfeProject(self, "foo", name="my-project-name", organization="my-org-name" ) @@ -44,4 +41,4 @@ In addition to all arguments above, the following attributes are exported: * `id` - The project ID. * `workspace_ids` - IDs of the workspaces that are associated with the project. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/registry_gpg_key.html.markdown b/website/docs/cdktf/python/d/registry_gpg_key.html.markdown index a89adf1e9..3c1958eca 100644 --- a/website/docs/cdktf/python/d/registry_gpg_key.html.markdown +++ b/website/docs/cdktf/python/d/registry_gpg_key.html.markdown @@ -14,18 +14,15 @@ Use this data source to get information about a private registry GPG key. ## Example Usage ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.data_tfe_registry_gpg_key import DataTfeRegistryGpgKey -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - DataTfeRegistryGpgKey(self, "example", + tfe.data_tfe_registry_gpg_key.DataTfeRegistryGpgKey(self, "example", id="13DFECCA3B58CE4A", organization="my-org-name" ) @@ -44,4 +41,4 @@ The following arguments are supported: * `created_at` - The time when the GPG key was created. * `updated_at` - The time when the GPG key was last updated. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/registry_gpg_keys.html.markdown b/website/docs/cdktf/python/d/registry_gpg_keys.html.markdown index 3320a1c75..381cfb0e9 100644 --- a/website/docs/cdktf/python/d/registry_gpg_keys.html.markdown +++ b/website/docs/cdktf/python/d/registry_gpg_keys.html.markdown @@ -14,18 +14,15 @@ Use this data source to get information about all private registry GPG keys of a ## Example Usage ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.data_tfe_registry_gpg_keys import DataTfeRegistryGpgKeys -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - DataTfeRegistryGpgKeys(self, "all", + tfe.data_tfe_registry_gpg_keys.DataTfeRegistryGpgKeys(self, "all", organization="my-org-name" ) ``` @@ -45,4 +42,4 @@ The following arguments are supported: * `created_at` - The time when the GPG key was created. * `updated_at` - The time when the GPG key was last updated. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/registry_provider.html.markdown b/website/docs/cdktf/python/d/registry_provider.html.markdown index f77027dfb..1bc8c11a0 100644 --- a/website/docs/cdktf/python/d/registry_provider.html.markdown +++ b/website/docs/cdktf/python/d/registry_provider.html.markdown @@ -16,18 +16,15 @@ Use this data source to get information about a public or private provider in th A private provider: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe. import RegistryProvider -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - RegistryProvider(self, "example", + tfe.registry_provider.RegistryProvider(self, "example", name="my-provider", organization="my-org-name" ) @@ -36,18 +33,15 @@ class MyConvertedCode(TerraformStack): A public provider: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe. import RegistryProvider -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - RegistryProvider(self, "example", + tfe.registry_provider.RegistryProvider(self, "example", name="aws", namespace="hashicorp", organization="my-org-name", @@ -70,4 +64,4 @@ The following arguments are supported: * `created_at` - The time when the provider was created. * `updated_at` - The time when the provider was last updated. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/registry_providers.html.markdown b/website/docs/cdktf/python/d/registry_providers.html.markdown index c423eb4ba..03eec5f49 100644 --- a/website/docs/cdktf/python/d/registry_providers.html.markdown +++ b/website/docs/cdktf/python/d/registry_providers.html.markdown @@ -16,18 +16,15 @@ Use this data source to get information about public and private providers in th All providers: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe. import DataTfeRegistryProviders -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - DataTfeRegistryProviders(self, "all", + tfe.data_tfe_registry_providers.DataTfeRegistryProviders(self, "all", organization="my-org-name" ) ``` @@ -35,18 +32,15 @@ class MyConvertedCode(TerraformStack): All private providers: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe. import DataTfeRegistryProviders -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - DataTfeRegistryProviders(self, "private", + tfe.data_tfe_registry_providers.DataTfeRegistryProviders(self, "private", organization="my-org-name", registry_name="private" ) @@ -55,18 +49,15 @@ class MyConvertedCode(TerraformStack): Providers with "hashicorp" in their namespace or name: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe. import DataTfeRegistryProviders -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - DataTfeRegistryProviders(self, "hashicorp", + tfe.data_tfe_registry_providers.DataTfeRegistryProviders(self, "hashicorp", organization="my-org-name", search="hashicorp" ) @@ -91,4 +82,4 @@ The following arguments are supported: * `created_at` - Time when the provider was created. * `updated_at` - Time when the provider was last updated. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/saml_settings.html.markdown b/website/docs/cdktf/python/d/saml_settings.html.markdown index f103ca385..338f92bfc 100644 --- a/website/docs/cdktf/python/d/saml_settings.html.markdown +++ b/website/docs/cdktf/python/d/saml_settings.html.markdown @@ -16,31 +16,21 @@ Use this data source to get information about SAML Settings. It applies only to Basic usage: -```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. -# See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.data_tfe_saml_settings import DataTfeSamlSettings -from imports.tfe.provider import TfeProvider -class MyConvertedCode(TerraformStack): - def __init__(self, scope, name): - super().__init__(scope, name) - TfeProvider(self, "tfe", - hostname=hostname.string_value, - token=token.string_value - ) - admin = TfeProvider(self, "tfe_1", - alias="admin", - hostname=hostname.string_value, - token=admin_token.string_value - ) - DataTfeSamlSettings(self, "foo", - provider=admin - ) +```hcl +provider "tfe" { + hostname = var.hostname + token = var.token +} + +provider "tfe" { + alias = "admin" + hostname = var.hostname + token = var.admin_token +} + +data "tfe_saml_settings" "foo" { + provider = tfe.admin +} ``` ## Argument Reference @@ -74,4 +64,4 @@ The following attributes are exported: * `signature_signing_method` - Signature Signing Method. * `signature_digest_method` - Signature Digest Method. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/slug.html.markdown b/website/docs/cdktf/python/d/slug.html.markdown index c4f0c8a54..6537c5f55 100644 --- a/website/docs/cdktf/python/d/slug.html.markdown +++ b/website/docs/cdktf/python/d/slug.html.markdown @@ -21,25 +21,21 @@ tar file containing configuration files (a Terraform "slug") when those files ch Tracking a local directory to upload the Sentinel configuration and policies: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import Token, TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.data_tfe_slug import DataTfeSlug -from imports.tfe.policy_set import PolicySet -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - test = DataTfeSlug(self, "test", + data_tfe_slug_test = tfe.data_tfe_slug.DataTfeSlug(self, "test", source_path="policies/my-policy-set" ) - tfe_policy_set_test = PolicySet(self, "test_1", + tfe_policy_set_test = tfe.policy_set.PolicySet(self, "test_1", name="my-policy-set", organization="my-org-name", - slug=Token.as_string_map(test) + slug=cdktf.Token.as_string_map(data_tfe_slug_test) ) # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. tfe_policy_set_test.override_logical_id("test") @@ -51,4 +47,4 @@ The following arguments are supported: * `source_path` - (Required) The path to the directory where the files are located. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/ssh_key.html.markdown b/website/docs/cdktf/python/d/ssh_key.html.markdown index d5d2e6bba..e95a873b6 100644 --- a/website/docs/cdktf/python/d/ssh_key.html.markdown +++ b/website/docs/cdktf/python/d/ssh_key.html.markdown @@ -14,18 +14,15 @@ Use this data source to get information about a SSH key. ## Example Usage ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.data_tfe_ssh_key import DataTfeSshKey -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - DataTfeSshKey(self, "test", + tfe.data_tfe_ssh_key.DataTfeSshKey(self, "test", name="my-ssh-key-name", organization="my-org-name" ) @@ -44,4 +41,4 @@ In addition to all arguments above, the following attributes are exported: * `id` - The ID of the SSH key. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/team.html.markdown b/website/docs/cdktf/python/d/team.html.markdown index 620317566..3e4f2c5e4 100644 --- a/website/docs/cdktf/python/d/team.html.markdown +++ b/website/docs/cdktf/python/d/team.html.markdown @@ -14,18 +14,15 @@ Use this data source to get information about a team. ## Example Usage ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.data_tfe_team import DataTfeTeam -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - DataTfeTeam(self, "test", + tfe.data_tfe_team.DataTfeTeam(self, "test", name="my-team-name", organization="my-org-name" ) @@ -45,4 +42,4 @@ In addition to all arguments above, the following attributes are exported: * `id` - The ID of the team. * `sso_team_id` - (Optional) The [SSO Team ID](https://developer.hashicorp.com/terraform/cloud-docs/users-teams-organizations/single-sign-on#team-names-and-sso-team-ids) of the team, if it has been defined - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/team_access.html.markdown b/website/docs/cdktf/python/d/team_access.html.markdown index d0e17f1f6..9755cf929 100644 --- a/website/docs/cdktf/python/d/team_access.html.markdown +++ b/website/docs/cdktf/python/d/team_access.html.markdown @@ -14,18 +14,15 @@ Use this data source to get information about team permissions for a workspace. ## Example Usage ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.data_tfe_team_access import DataTfeTeamAccess -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - DataTfeTeamAccess(self, "test", + tfe.data_tfe_team_access.DataTfeTeamAccess(self, "test", team_id="my-team-id", workspace_id="my-workspace-id" ) @@ -55,4 +52,4 @@ The `permissions` block contains: * `workspace_locking` - Whether permission is granted to manually lock the workspace or not. * `run_tasks` - Boolean determining whether or not to grant the team permission to manage workspace run tasks. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/team_project_access.html.markdown b/website/docs/cdktf/python/d/team_project_access.html.markdown index b6e18fa24..503c9eb11 100644 --- a/website/docs/cdktf/python/d/team_project_access.html.markdown +++ b/website/docs/cdktf/python/d/team_project_access.html.markdown @@ -14,18 +14,15 @@ Use this data source to get information about team permissions for a project. ## Example Usage ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.data_tfe_team_project_access import DataTfeTeamProjectAccess -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - DataTfeTeamProjectAccess(self, "test", + tfe.data_tfe_team_project_access.DataTfeTeamProjectAccess(self, "test", project_id="my-project-id", team_id="my-team-id" ) @@ -45,4 +42,4 @@ In addition to all arguments above, the following attributes are exported: * `id` The team project access ID. * `access` - The type of access granted to the team on the project. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/teams.html.markdown b/website/docs/cdktf/python/d/teams.html.markdown index 6580fd5fb..d812caa3c 100644 --- a/website/docs/cdktf/python/d/teams.html.markdown +++ b/website/docs/cdktf/python/d/teams.html.markdown @@ -14,18 +14,15 @@ Use this data source to get a list of Teams in an Organization and a map of thei ## Example Usage ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.data_tfe_teams import DataTfeTeams -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - DataTfeTeams(self, "foo", + tfe.data_tfe_teams.DataTfeTeams(self, "foo", organization="my-org-name" ) ``` @@ -42,4 +39,4 @@ In addition to all arguments above, the following attributes are exported: * `id` - Name of the organization. * `names` - A list of team names in an organization. * `ids` - A map of team names in an organization and their IDs. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/variable_set.html.markdown b/website/docs/cdktf/python/d/variable_set.html.markdown index 27fae8882..3db389fb4 100644 --- a/website/docs/cdktf/python/d/variable_set.html.markdown +++ b/website/docs/cdktf/python/d/variable_set.html.markdown @@ -16,18 +16,15 @@ This data source is used to retrieve a named variable set For workspace variables: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.data_tfe_variable_set import DataTfeVariableSet -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - DataTfeVariableSet(self, "test", + tfe.data_tfe_variable_set.DataTfeVariableSet(self, "test", name="my-variable-set-name", organization="my-org-name" ) @@ -52,4 +49,4 @@ The following arguments are supported: * `variable_ids` - IDs of the variables attached to the variable set. * `project_ids` - IDs of the projects that use the variable set. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/variables.html.markdown b/website/docs/cdktf/python/d/variables.html.markdown index cd3625403..86ecde0ac 100644 --- a/website/docs/cdktf/python/d/variables.html.markdown +++ b/website/docs/cdktf/python/d/variables.html.markdown @@ -16,24 +16,20 @@ This data source is used to retrieve all variables defined in a specified worksp For workspace variables: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import Token, TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.data_tfe_variables import DataTfeVariables -from imports.tfe.data_tfe_workspace import DataTfeWorkspace -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - test = DataTfeWorkspace(self, "test", + data_tfe_workspace_test = tfe.data_tfe_workspace.DataTfeWorkspace(self, "test", name="my-workspace-name", organization="my-org-name" ) - data_tfe_variables_test = DataTfeVariables(self, "test_1", - workspace_id=Token.as_string(test.id) + data_tfe_variables_test = tfe.data_tfe_variables.DataTfeVariables(self, "test_1", + workspace_id=cdktf.Token.as_string(data_tfe_workspace_test.id) ) # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. data_tfe_variables_test.override_logical_id("test") @@ -42,24 +38,21 @@ class MyConvertedCode(TerraformStack): For variable set variables: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import Token, TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.data_tfe_variable_set import DataTfeVariableSet -from imports.tfe.data_tfe_variables import DataTfeVariables -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - test = DataTfeVariableSet(self, "test", + data_tfe_variable_set_test = + tfe.data_tfe_variable_set.DataTfeVariableSet(self, "test", name="my-variable-set-name", organization="my-org-name" ) - data_tfe_variables_test = DataTfeVariables(self, "test_1", - variable_set_id=Token.as_string(test.id) + data_tfe_variables_test = tfe.data_tfe_variables.DataTfeVariables(self, "test_1", + variable_set_id=cdktf.Token.as_string(data_tfe_variable_set_test.id) ) # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. data_tfe_variables_test.override_logical_id("test") @@ -87,4 +80,4 @@ The `variables, terraform and env` blocks contains: * `sensitive` - If the variable is marked as sensitive or not * `hcl` - If the variable is marked as HCL or not - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/workspace.html.markdown b/website/docs/cdktf/python/d/workspace.html.markdown index a60c39267..f58885718 100644 --- a/website/docs/cdktf/python/d/workspace.html.markdown +++ b/website/docs/cdktf/python/d/workspace.html.markdown @@ -16,18 +16,15 @@ Use this data source to get information about a workspace. ## Example Usage ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.data_tfe_workspace import DataTfeWorkspace -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - DataTfeWorkspace(self, "test", + tfe.data_tfe_workspace.DataTfeWorkspace(self, "test", name="my-workspace-name", organization="my-org-name" ) @@ -88,4 +85,4 @@ The `vcs_repo` block contains: * `oauth_token_id` - OAuth token ID of the configured VCS connection. * `tags_regex` - A regular expression used to trigger a Workspace run for matching Git tags. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/workspace_ids.html.markdown b/website/docs/cdktf/python/d/workspace_ids.html.markdown index ca8b5f27a..31ac562e9 100644 --- a/website/docs/cdktf/python/d/workspace_ids.html.markdown +++ b/website/docs/cdktf/python/d/workspace_ids.html.markdown @@ -14,30 +14,27 @@ Use this data source to get a map of workspace IDs. ## Example Usage ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.data_tfe_workspace_ids import DataTfeWorkspaceIds -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - DataTfeWorkspaceIds(self, "all", + tfe.data_tfe_workspace_ids.DataTfeWorkspaceIds(self, "all", names=["*"], organization="my-org-name" ) - DataTfeWorkspaceIds(self, "app-frontend", + tfe.data_tfe_workspace_ids.DataTfeWorkspaceIds(self, "app-frontend", names=["app-frontend-prod", "app-frontend-dev1", "app-frontend-staging"], organization="my-org-name" ) - DataTfeWorkspaceIds(self, "prod-apps", + tfe.data_tfe_workspace_ids.DataTfeWorkspaceIds(self, "prod-apps", organization="my-org-name", tag_names=["prod", "app", "aws"] ) - DataTfeWorkspaceIds(self, "prod-only", + tfe.data_tfe_workspace_ids.DataTfeWorkspaceIds(self, "prod-only", exclude_tags=["app"], organization="my-org-name", tag_names=["prod"] @@ -64,4 +61,4 @@ In addition to all arguments above, the following attributes are exported: * `full_names` - A map of workspace names and their full names, which look like `/`. * `ids` - A map of workspace names and their opaque, immutable IDs, which look like `ws-`. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/d/workspace_run_task.html.markdown b/website/docs/cdktf/python/d/workspace_run_task.html.markdown index 84261df7d..a278338f7 100644 --- a/website/docs/cdktf/python/d/workspace_run_task.html.markdown +++ b/website/docs/cdktf/python/d/workspace_run_task.html.markdown @@ -16,18 +16,15 @@ Use this data source to get information about a [Workspace Run tasks](https://de ## Example Usage ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.data_tfe_workspace_run_task import DataTfeWorkspaceRunTask -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - DataTfeWorkspaceRunTask(self, "foobar", + tfe.data_tfe_workspace_run_task.DataTfeWorkspaceRunTask(self, "foobar", task_id="task-def456", workspace_id="ws-abc123" ) @@ -48,4 +45,4 @@ In addition to all arguments above, the following attributes are exported: * `id` - The ID of the Workspace Run task. * `stage` - Which stage the task will run in. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/index.html.markdown b/website/docs/cdktf/python/index.html.markdown index 94170cc21..5630e1b1b 100644 --- a/website/docs/cdktf/python/index.html.markdown +++ b/website/docs/cdktf/python/index.html.markdown @@ -73,13 +73,14 @@ For production use, you should constrain the acceptable provider versions via configuration, to ensure that new versions with breaking changes will not be automatically installed by `terraform init` in the future: -```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -class MyConvertedCode(TerraformStack): - def __init__(self, scope, name): - super().__init__(scope, name) +```hcl +terraform { + required_providers { + tfe = { + version = "~> 0.53.0" + } + } +} ``` As this provider is still at version zero, you should constrain the acceptable @@ -89,7 +90,7 @@ The above snippet using `required_providers` is for Terraform 0.13+; if you are ```hcl provider "tfe" { - version = "~> 0.52.0" + version = "~> 0.53.0" ... } ``` @@ -98,27 +99,17 @@ For more information on provider installation and constraining provider versions ## Example Usage -```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. -# See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.organization import Organization -from imports.tfe.provider import TfeProvider -class MyConvertedCode(TerraformStack): - def __init__(self, scope, name, *, email, name): - super().__init__(scope, name) - TfeProvider(self, "tfe", - hostname=hostname.string_value, - token=token.string_value - ) - Organization(self, "org", - email=email, - name=name - ) +```hcl +provider "tfe" { + hostname = var.hostname # Optional, defaults to Terraform Cloud `app.terraform.io` + token = var.token + version = "~> 0.53.0" +} + +# Create an organization +resource "tfe_organization" "org" { + # ... +} ``` ## Argument Reference @@ -138,4 +129,4 @@ The following arguments are supported: arguments. Ensure that the organization already exists prior to using this argument. This can also be specified using the `TFE_ORGANIZATION` environment variable. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/admin_organization_settings.markdown b/website/docs/cdktf/python/r/admin_organization_settings.markdown index 43e9e3b4e..4ecb2b61b 100644 --- a/website/docs/cdktf/python/r/admin_organization_settings.markdown +++ b/website/docs/cdktf/python/r/admin_organization_settings.markdown @@ -17,45 +17,39 @@ incorporating an admin token in your provider config. Basic usage: -```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. -# See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.admin_organization_settings import AdminOrganizationSettings -from imports.tfe.organization import Organization -from imports.tfe.provider import TfeProvider -class MyConvertedCode(TerraformStack): - def __init__(self, scope, name): - super().__init__(scope, name) - TfeProvider(self, "tfe", - hostname=hostname.string_value, - token=token.string_value - ) - admin = TfeProvider(self, "tfe_1", - alias="admin", - hostname=hostname.string_value, - token=admin_token.string_value - ) - a_module_consumer = Organization(self, "a-module-consumer", - email="admin@company.com", - name="my-other-org" - ) - a_module_producer = Organization(self, "a-module-producer", - email="admin@company.com", - name="my-org" - ) - AdminOrganizationSettings(self, "test-settings", - access_beta_tools=False, - global_module_sharing=False, - module_sharing_consumer_organizations=[a_module_consumer.name], - organization=a_module_producer.name, - provider="${tfe.admin}", - workspace_limit=15 - ) +```hcl + +provider "tfe" { + hostname = var.hostname + token = var.token +} + +provider "tfe" { + alias = "admin" + hostname = var.hostname + token = var.admin_token +} + +resource "tfe_organization" "a-module-producer" { + name = "my-org" + email = "admin@company.com" +} + +resource "tfe_organization" "a-module-consumer" { + name = "my-other-org" + email = "admin@company.com" +} + +resource "tfe_admin_organization_settings" "test-settings" { + provider = tfe.admin + organization = tfe_organization.a-module-producer.name + workspace_limit = 15 + access_beta_tools = false + global_module_sharing = false + module_sharing_consumer_organizations = [ + tfe_organization.a-module-consumer.name + ] +} ``` ## Argument Reference @@ -72,4 +66,4 @@ The following arguments are supported: * `sso_enabled` - True if SSO is enabled in this organization - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/agent_pool.html.markdown b/website/docs/cdktf/python/r/agent_pool.html.markdown index f0997789c..7f5d6afd1 100644 --- a/website/docs/cdktf/python/r/agent_pool.html.markdown +++ b/website/docs/cdktf/python/r/agent_pool.html.markdown @@ -18,25 +18,21 @@ pools to run remote operations with isolated, private, or on-premises infrastruc Basic usage: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.agent_pool import AgentPool -from imports.tfe.organization import Organization -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - test_organization = Organization(self, "test-organization", + tfe_organization_test_organization = tfe.organization.Organization(self, "test-organization", email="admin@company.com", name="my-org-name" ) - AgentPool(self, "test-agent-pool", + tfe.agent_pool.AgentPool(self, "test-agent-pool", name="my-agent-pool-name", - organization=test_organization.name, + organization=cdktf.Token.as_string(tfe_organization_test_organization.name), organization_scoped=True ) ``` @@ -67,4 +63,4 @@ terraform import tfe_agent_pool.test apool-rW0KoLSlnuNb5adB terraform import tfe_workspace.test my-org-name/my-agent-pool-name ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/agent_pool_allowed_workspaces.html.markdown b/website/docs/cdktf/python/r/agent_pool_allowed_workspaces.html.markdown index b3908db0f..b122ffaf7 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,45 +19,37 @@ for Business account. In this example, the agent pool and workspace are connected through other resources that manage the agent pool permissions as well as the workspace execution mode. Notice that the `tfe_workspace_settings` uses the agent pool reference found in `tfe_agent_pool_allowed_workspaces` in order to create the permission to use the agent pool before assigning it. -```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import Fn, Token, TerraformStack -# -# Provider bindings are generated by running `cdktf get`. -# See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.agent_pool import AgentPool -from imports.tfe.agent_pool_allowed_workspaces import AgentPoolAllowedWorkspaces -from imports.tfe.organization import Organization -from imports.tfe.workspace import Workspace -from imports.tfe.workspace_settings import WorkspaceSettings -class MyConvertedCode(TerraformStack): - 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 = Workspace(self, "test-workspace", - name="my-workspace-name", - organization=test_organization.name - ) - test_agent_pool = AgentPool(self, "test-agent-pool", - name="my-agent-pool-name", - organization=test_organization.name, - organization_scoped=False - ) - allowed = AgentPoolAllowedWorkspaces(self, "allowed", - agent_pool_id=test_agent_pool.id, - allowed_workspace_ids=Token.as_list("${[ for key, value in ${" + - Fn.lookup_nested(test, ["*", "id"]) + "} : value]}") - ) - WorkspaceSettings(self, "test-workspace-settings", - agent_pool_id=allowed.id, - execution_mode="agent", - workspace_id=test_workspace.id - ) +```hcl +resource "tfe_organization" "test-organization" { + name = "my-org-name" + email = "admin@company.com" +} + +// Ensure workspace and agent pool are create first +resource "tfe_workspace" "test-workspace" { + name = "my-workspace-name" + organization = tfe_organization.test-organization.name +} + +resource "tfe_agent_pool" "test-agent-pool" { + name = "my-agent-pool-name" + organization = tfe_organization.test-organization.name + organization_scoped = false +} + +// Ensure permissions are assigned second +resource "tfe_agent_pool_allowed_workspaces" "allowed" { + agent_pool_id = tfe_agent_pool.test-agent-pool.id + allowed_workspace_ids = [for key, value in tfe_workspace.test.*.id : value] +} + +// Lastly, ensure the workspace agent execution is assigned last by +// referencing allowed_workspaces +resource "tfe_workspace_settings" "test-workspace-settings" { + workspace_id = tfe_workspace.test-workspace.id + execution_mode = "agent" + agent_pool_id = tfe_agent_pool_allowed_workspaces.allowed.id +} ``` ## Argument Reference @@ -76,4 +68,4 @@ A resource can be imported; use `` as the import ID. For example: terraform import tfe_agent_pool_allowed_workspaces.foobar apool-rW0KoLSlnuNb5adB ``` - \ No newline at end of file + \ 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 0a6b17a56..7cc7972c4 100644 --- a/website/docs/cdktf/python/r/agent_token.html.markdown +++ b/website/docs/cdktf/python/r/agent_token.html.markdown @@ -17,29 +17,24 @@ These tokens allow agents to communicate securely with Terraform Cloud. Basic usage: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.agent_pool import AgentPool -from imports.tfe.agent_token import AgentToken -from imports.tfe.organization import Organization -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - test_organization = Organization(self, "test-organization", + tfe_organization_test_organization = tfe.organization.Organization(self, "test-organization", email="admin@company.com", name="my-org-name" ) - test_agent_pool = AgentPool(self, "test-agent-pool", + tfe_agent_pool_test_agent_pool = tfe.agent_pool.AgentPool(self, "test-agent-pool", name="my-agent-pool-name", - organization=test_organization.id + organization=cdktf.Token.as_string(tfe_organization_test_organization.id) ) - AgentToken(self, "test-agent-token", - agent_pool_id=test_agent_pool.id, + tfe.agent_token.AgentToken(self, "test-agent-token", + agent_pool_id=cdktf.Token.as_string(tfe_agent_pool_test_agent_pool.id), description="my-agent-token-name" ) ``` @@ -57,4 +52,4 @@ The following arguments are supported: * `description` - The description of agent token. * `token` - The generated token. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/no_code_module.html.markdown b/website/docs/cdktf/python/r/no_code_module.html.markdown index a35a6503c..797abcd7c 100644 --- a/website/docs/cdktf/python/r/no_code_module.html.markdown +++ b/website/docs/cdktf/python/r/no_code_module.html.markdown @@ -16,33 +16,28 @@ Creates, updates and destroys no-code module for registry modules. Basic usage: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import Token, TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.no_code_module import NoCodeModule -from imports.tfe.organization import Organization -from imports.tfe.registry_module import RegistryModule -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - foobar = Organization(self, "foobar", + tfe_organization_foobar = tfe.organization.Organization(self, "foobar", email="admin@company.com", name="my-org-name" ) - tfe_registry_module_foobar = RegistryModule(self, "foobar_1", + tfe_registry_module_foobar = tfe.registry_module.RegistryModule(self, "foobar_1", module_provider="my_provider", name="test_module", - organization=foobar.id + organization=cdktf.Token.as_string(tfe_organization_foobar.id) ) # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. tfe_registry_module_foobar.override_logical_id("foobar") - tfe_no_code_module_foobar = NoCodeModule(self, "foobar_2", - organization=foobar.id, - registry_module=Token.as_string(tfe_registry_module_foobar.id) + tfe_no_code_module_foobar = tfe.no_code_module.NoCodeModule(self, "foobar_2", + organization=cdktf.Token.as_string(tfe_organization_foobar.id), + registry_module=cdktf.Token.as_string(tfe_registry_module_foobar.id) ) # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. tfe_no_code_module_foobar.override_logical_id("foobar") @@ -51,33 +46,28 @@ class MyConvertedCode(TerraformStack): Creating a no-code module with variable options: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import Token, TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.no_code_module import NoCodeModule -from imports.tfe.organization import Organization -from imports.tfe.registry_module import RegistryModule -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - foobar = Organization(self, "foobar", + tfe_organization_foobar = tfe.organization.Organization(self, "foobar", email="admin@company.com", name="my-org-name" ) - tfe_registry_module_foobar = RegistryModule(self, "foobar_1", + tfe_registry_module_foobar = tfe.registry_module.RegistryModule(self, "foobar_1", module_provider="my_provider", name="test_module", - organization=foobar.id + organization=cdktf.Token.as_string(tfe_organization_foobar.id) ) # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. tfe_registry_module_foobar.override_logical_id("foobar") - tfe_no_code_module_foobar = NoCodeModule(self, "foobar_2", - organization=foobar.id, - registry_module=Token.as_string(tfe_registry_module_foobar.id), + tfe_no_code_module_foobar = tfe.no_code_module.NoCodeModule(self, "foobar_2", + organization=cdktf.Token.as_string(tfe_organization_foobar.id), + registry_module=cdktf.Token.as_string(tfe_registry_module_foobar.id), variable_options=[NoCodeModuleVariableOptions( name="ami", options=["ami-0", "ami-1", "ami-2"], @@ -119,4 +109,4 @@ No-code modules can be imported; use `` as the import ID. For terraform import tfe_no_code_module.test nocode-qV9JnKRkmtMa4zcA ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/notification_configuration.html.markdown b/website/docs/cdktf/python/r/notification_configuration.html.markdown index d6e1694af..d84e282c3 100644 --- a/website/docs/cdktf/python/r/notification_configuration.html.markdown +++ b/website/docs/cdktf/python/r/notification_configuration.html.markdown @@ -19,36 +19,32 @@ Each workspace can have up to 20 notification configurations, and they apply to Basic usage: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import Token, TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.notification_configuration import NotificationConfiguration -from imports.tfe.organization import Organization -from imports.tfe.workspace import Workspace -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - test = Organization(self, "test", + tfe_organization_test = tfe.organization.Organization(self, "test", email="admin@company.com", name="my-org-name" ) - tfe_workspace_test = Workspace(self, "test_1", + tfe_workspace_test = tfe.workspace.Workspace(self, "test_1", name="my-workspace-name", - organization=test.id + organization=cdktf.Token.as_string(tfe_organization_test.id) ) # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. tfe_workspace_test.override_logical_id("test") - tfe_notification_configuration_test = NotificationConfiguration(self, "test_2", + tfe_notification_configuration_test = + tfe.notification_configuration.NotificationConfiguration(self, "test_2", destination_type="generic", enabled=True, name="my-test-notification-configuration", triggers=["run:created", "run:planning", "run:errored"], url="https://example.com", - workspace_id=Token.as_string(tfe_workspace_test.id) + workspace_id=cdktf.Token.as_string(tfe_workspace_test.id) ) # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. tfe_notification_configuration_test.override_logical_id("test") @@ -57,43 +53,41 @@ class MyConvertedCode(TerraformStack): With `destination_type` of `email`: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import Token, TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.notification_configuration import NotificationConfiguration -from imports.tfe.organization import Organization -from imports.tfe.organization_membership import OrganizationMembership -from imports.tfe.workspace import Workspace -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - test = Organization(self, "test", + tfe_organization_test = tfe.organization.Organization(self, "test", email="admin@company.com", name="my-org-name" ) - tfe_organization_membership_test = OrganizationMembership(self, "test_1", + tfe_organization_membership_test = + tfe.organization_membership.OrganizationMembership(self, "test_1", email="test.member@company.com", organization="my-org-name" ) # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. tfe_organization_membership_test.override_logical_id("test") - tfe_workspace_test = Workspace(self, "test_2", + tfe_workspace_test = tfe.workspace.Workspace(self, "test_2", name="my-workspace-name", - organization=test.id + organization=cdktf.Token.as_string(tfe_organization_test.id) ) # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. tfe_workspace_test.override_logical_id("test") - tfe_notification_configuration_test = NotificationConfiguration(self, "test_3", + tfe_notification_configuration_test = + tfe.notification_configuration.NotificationConfiguration(self, "test_3", destination_type="email", - email_user_ids=[Token.as_string(tfe_organization_membership_test.user_id)], + email_user_ids=[ + cdktf.Token.as_string(tfe_organization_membership_test.user_id) + ], enabled=True, name="my-test-email-notification-configuration", triggers=["run:created", "run:planning", "run:errored"], - workspace_id=Token.as_string(tfe_workspace_test.id) + workspace_id=cdktf.Token.as_string(tfe_workspace_test.id) ) # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. tfe_notification_configuration_test.override_logical_id("test") @@ -102,45 +96,43 @@ class MyConvertedCode(TerraformStack): (**TFE only**) With `destination_type` of `email`, using `email_addresses` list and `email_users`: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import Token, TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.notification_configuration import NotificationConfiguration -from imports.tfe.organization import Organization -from imports.tfe.organization_membership import OrganizationMembership -from imports.tfe.workspace import Workspace -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - test = Organization(self, "test", + tfe_organization_test = tfe.organization.Organization(self, "test", email="admin@company.com", name="my-org-name" ) - tfe_organization_membership_test = OrganizationMembership(self, "test_1", + tfe_organization_membership_test = + tfe.organization_membership.OrganizationMembership(self, "test_1", email="test.member@company.com", organization="my-org-name" ) # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. tfe_organization_membership_test.override_logical_id("test") - tfe_workspace_test = Workspace(self, "test_2", + tfe_workspace_test = tfe.workspace.Workspace(self, "test_2", name="my-workspace-name", - organization=test.id + organization=cdktf.Token.as_string(tfe_organization_test.id) ) # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. tfe_workspace_test.override_logical_id("test") - tfe_notification_configuration_test = NotificationConfiguration(self, "test_3", + tfe_notification_configuration_test = + tfe.notification_configuration.NotificationConfiguration(self, "test_3", destination_type="email", email_addresses=["user1@company.com", "user2@company.com", "user3@company.com" ], - email_user_ids=[Token.as_string(tfe_organization_membership_test.user_id)], + email_user_ids=[ + cdktf.Token.as_string(tfe_organization_membership_test.user_id) + ], enabled=True, name="my-test-email-notification-configuration", triggers=["run:created", "run:planning", "run:errored"], - workspace_id=Token.as_string(tfe_workspace_test.id) + workspace_id=cdktf.Token.as_string(tfe_workspace_test.id) ) # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. tfe_notification_configuration_test.override_logical_id("test") @@ -188,4 +180,4 @@ Notification configurations can be imported; use ` \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/oauth_client.html.markdown b/website/docs/cdktf/python/r/oauth_client.html.markdown index a0d2139ef..f739902ae 100644 --- a/website/docs/cdktf/python/r/oauth_client.html.markdown +++ b/website/docs/cdktf/python/r/oauth_client.html.markdown @@ -19,18 +19,15 @@ provider. Basic usage: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.oauth_client import OauthClient -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - OauthClient(self, "test", + tfe.oauth_client.OauthClient(self, "test", api_url="https://api.github.com", http_url="https://github.com", name="my-github-oauth-client", @@ -47,18 +44,15 @@ See [documentation for TFC/E setup](https://developer.hashicorp.com/terraform/cl **Note:** This resource requires a private key when creating Azure DevOps Server OAuth clients. ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.oauth_client import OauthClient -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - OauthClient(self, "test", + tfe.oauth_client.OauthClient(self, "test", api_url="https://ado.example.com", http_url="https://ado.example.com", name="my-ado-oauth-client", @@ -77,18 +71,15 @@ When using BitBucket Server, you must use three required fields: `key`, `secret` ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.oauth_client import OauthClient -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - OauthClient(self, "test", + tfe.oauth_client.OauthClient(self, "test", api_url="https://bbs.example.com", http_url="https://bss.example.com", key="", @@ -130,4 +121,4 @@ Link. * `id` - The ID of the OAuth client. * `oauth_token_id` - The ID of the OAuth token associated with the OAuth client. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/opa_version.html.markdown b/website/docs/cdktf/python/r/opa_version.html.markdown index a6beba2e4..82787ff8a 100644 --- a/website/docs/cdktf/python/r/opa_version.html.markdown +++ b/website/docs/cdktf/python/r/opa_version.html.markdown @@ -16,18 +16,15 @@ Manage OPA versions available on Terraform Enterprise. Basic Usage: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.opa_version import OpaVersion -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - OpaVersion(self, "test", + tfe.opa_version.OpaVersion(self, "test", sha="e75ac73deb69a6b3aa667cb0b8b731aee79e2904", url="https://tfe-host.com/path/to/opa", version="0.58.0-custom" @@ -65,4 +62,4 @@ terraform import tfe_opa_version.test 0.58.0 -> **Note:** You can fetch a OPA version ID from the URL of an existing version in the 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/organization.html.markdown b/website/docs/cdktf/python/r/organization.html.markdown index babd13d88..4d983a3d8 100644 --- a/website/docs/cdktf/python/r/organization.html.markdown +++ b/website/docs/cdktf/python/r/organization.html.markdown @@ -16,18 +16,15 @@ Manages organizations. Basic usage: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.organization import Organization -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - Organization(self, "test", + tfe.organization.Organization(self, "test", email="admin@company.com", name="my-org-name" ) @@ -65,4 +62,4 @@ example: terraform import tfe_organization.test my-org-name ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/organization_default_settings.html.markdown b/website/docs/cdktf/python/r/organization_default_settings.html.markdown index b96435924..5e64a6c1b 100644 --- a/website/docs/cdktf/python/r/organization_default_settings.html.markdown +++ b/website/docs/cdktf/python/r/organization_default_settings.html.markdown @@ -16,35 +16,30 @@ Primarily, this is used to set the default execution mode of an organization. Se Basic usage: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.agent_pool import AgentPool -from imports.tfe.organization import Organization -from imports.tfe.organization_default_settings import OrganizationDefaultSettings -from imports.tfe.workspace import Workspace -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - test = Organization(self, "test", + tfe_organization_test = tfe.organization.Organization(self, "test", email="admin@company.com", name="my-org-name" ) - my_agents = AgentPool(self, "my_agents", + tfe_agent_pool_my_agents = tfe.agent_pool.AgentPool(self, "my_agents", name="agent_smiths", - organization=test.name + organization=cdktf.Token.as_string(tfe_organization_test.name) ) - org_default = OrganizationDefaultSettings(self, "org_default", - default_agent_pool_id=my_agents.id, + tfe_organization_default_settings_org_default = + tfe.organization_default_settings.OrganizationDefaultSettings(self, "org_default", + default_agent_pool_id=cdktf.Token.as_string(tfe_agent_pool_my_agents.id), default_execution_mode="agent", - organization=test.name + organization=cdktf.Token.as_string(tfe_organization_test.name) ) - Workspace(self, "my_workspace", - depends_on=[org_default], + tfe.workspace.Workspace(self, "my_workspace", + depends_on=[tfe_organization_default_settings_org_default], name="my-workspace" ) ``` @@ -67,4 +62,4 @@ Organization default execution mode can be imported; use `` a terraform import tfe_organization_default_execution_mode.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 93f7c20b1..1582dadb2 100644 --- a/website/docs/cdktf/python/r/organization_membership.html.markdown +++ b/website/docs/cdktf/python/r/organization_membership.html.markdown @@ -24,18 +24,15 @@ be updated manually. Basic usage: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.organization_membership import OrganizationMembership -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - OrganizationMembership(self, "test", + tfe.organization_membership.OrganizationMembership(self, "test", email="user@company.com", organization="my-org-name" ) @@ -69,4 +66,4 @@ terraform import tfe_organization_membership.test my-org-name/user@example.com terraform import tfe_organization_membership.test ou-wAs3zYmWAhYK7peR ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/organization_module_sharing.html.markdown b/website/docs/cdktf/python/r/organization_module_sharing.html.markdown index 5e606ea7c..492a62139 100644 --- a/website/docs/cdktf/python/r/organization_module_sharing.html.markdown +++ b/website/docs/cdktf/python/r/organization_module_sharing.html.markdown @@ -19,18 +19,15 @@ use of an admin token and is for Terraform Enterprise only. Basic usage: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.organization_module_sharing import OrganizationModuleSharing -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - OrganizationModuleSharing(self, "test", + tfe.organization_module_sharing.OrganizationModuleSharing(self, "test", module_consumers=["my-org-name-2", "my-org-name-3"], organization="my-org-name" ) @@ -43,4 +40,4 @@ The following arguments are supported: * `organization` - (Optional) Name of the organization. If omitted, organization must be defined in the provider config. * `module_consumers` - (Required) Names of the organizations to consume the module registry. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/organization_run_task.html.markdown b/website/docs/cdktf/python/r/organization_run_task.html.markdown index 0f562bca2..535677464 100644 --- a/website/docs/cdktf/python/r/organization_run_task.html.markdown +++ b/website/docs/cdktf/python/r/organization_run_task.html.markdown @@ -18,18 +18,15 @@ The tfe_organization_run_task resource creates, updates and destroys [Organizati Basic usage: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.organization_run_task import OrganizationRunTask -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - OrganizationRunTask(self, "example", + tfe.organization_run_task.OrganizationRunTask(self, "example", description="An example task", enabled=True, name="task-name", @@ -63,4 +60,4 @@ import ID. For example: terraform import tfe_organization_run_task.test my-org-name/task-name ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/organization_token.html.markdown b/website/docs/cdktf/python/r/organization_token.html.markdown index 02e9544c7..66f833f7b 100644 --- a/website/docs/cdktf/python/r/organization_token.html.markdown +++ b/website/docs/cdktf/python/r/organization_token.html.markdown @@ -17,18 +17,15 @@ can be used to act as the organization service account. Basic usage: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.organization_token import OrganizationToken -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - OrganizationToken(self, "test", + tfe.organization_token.OrganizationToken(self, "test", organization="my-org-name" ) ``` @@ -49,28 +46,15 @@ never expire. When a token has an expiry: -```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import Token, TerraformStack -# -# Provider bindings are generated by running `cdktf get`. -# See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.organization_token import OrganizationToken -from imports.time.rotating import Rotating -class MyConvertedCode(TerraformStack): - def __init__(self, scope, name): - super().__init__(scope, name) - # The following providers are missing schema information and might need manual adjustments to synthesize correctly: time. - # For a more precise conversion please use the --provider flag in convert. - example = Rotating(self, "example", - rotation_days=30 - ) - OrganizationToken(self, "test", - expired_at=Token.as_string(example.rotation_rfc3339), - organization=Token.as_string(org.name) - ) +```hcl +resource "time_rotating" "example" { + rotation_days = 30 +} + +resource "tfe_organization_token" "test" { + organization = data.tfe_organization.org.name + expired_at = time_rotating.example.rotation_rfc3339 +} ``` ## Attributes Reference @@ -87,4 +71,4 @@ For example: terraform import tfe_organization_token.test my-org-name ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/policy.html.markdown b/website/docs/cdktf/python/r/policy.html.markdown index 3e794c4d2..5da71d87c 100644 --- a/website/docs/cdktf/python/r/policy.html.markdown +++ b/website/docs/cdktf/python/r/policy.html.markdown @@ -21,18 +21,15 @@ enforced during runs. Basic usage for Sentinel: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.policy import Policy -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - Policy(self, "test", + tfe.policy.Policy(self, "test", description="This policy always passes", enforce_mode="hard-mandatory", kind="sentinel", @@ -45,18 +42,15 @@ class MyConvertedCode(TerraformStack): Basic usage for Open Policy Agent(OPA): ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.policy import Policy -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - Policy(self, "test", + tfe.policy.Policy(self, "test", description="This policy always passes", enforce_mode="mandatory", kind="opa", @@ -97,4 +91,4 @@ import ID. For example: terraform import tfe_policy.test my-org-name/pol-wAs3zYmWAhYK7peR ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/policy_set.html.markdown b/website/docs/cdktf/python/r/policy_set.html.markdown index 83e93767f..3bb9ac5db 100644 --- a/website/docs/cdktf/python/r/policy_set.html.markdown +++ b/website/docs/cdktf/python/r/policy_set.html.markdown @@ -21,89 +21,58 @@ for workspaces that the policy set is attached to. Basic usage (VCS-based policy set): -```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import Token, TerraformStack -# -# Provider bindings are generated by running `cdktf get`. -# See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.policy_set import PolicySet -class MyConvertedCode(TerraformStack): - def __init__(self, scope, name): - super().__init__(scope, name) - PolicySet(self, "test", - agent_enabled=Token.as_boolean("true"), - description="A brand new policy set", - kind="sentinel", - name="my-policy-set", - organization="my-org-name", - policies_path="policies/my-policy-set", - policy_tool_version="0.24.1", - vcs_repo=PolicySetVcsRepo( - branch="main", - identifier="my-org-name/my-policy-set-repository", - ingress_submodules=False, - oauth_token_id=Token.as_string(tfe_oauth_client_test.oauth_token_id) - ), - workspace_ids=[Token.as_string(tfe_workspace_test.id)] - ) +```hcl +resource "tfe_policy_set" "test" { + name = "my-policy-set" + description = "A brand new policy set" + organization = "my-org-name" + kind = "sentinel" + agent_enabled = "true" + policy_tool_version = "0.24.1" + policies_path = "policies/my-policy-set" + workspace_ids = [tfe_workspace.test.id] + + vcs_repo { + identifier = "my-org-name/my-policy-set-repository" + branch = "main" + ingress_submodules = false + oauth_token_id = tfe_oauth_client.test.oauth_token_id + } +} ``` Using manually-specified policies: -```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import Token, TerraformStack -# -# Provider bindings are generated by running `cdktf get`. -# See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.policy_set import PolicySet -class MyConvertedCode(TerraformStack): - def __init__(self, scope, name): - super().__init__(scope, name) - PolicySet(self, "test", - agent_enabled=Token.as_boolean("true"), - description="A brand new policy set", - kind="sentinel", - name="my-policy-set", - organization="my-org-name", - policy_ids=[Token.as_string(tfe_sentinel_policy_test.id)], - policy_tool_version="0.24.1", - workspace_ids=[Token.as_string(tfe_workspace_test.id)] - ) +```hcl +resource "tfe_policy_set" "test" { + name = "my-policy-set" + description = "A brand new policy set" + organization = "my-org-name" + kind = "sentinel" + agent_enabled = "true" + policy_tool_version = "0.24.1" + policy_ids = [tfe_sentinel_policy.test.id] + workspace_ids = [tfe_workspace.test.id] +} ``` Manually uploaded policy set, in lieu of VCS: -```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import Token, TerraformStack -# -# Provider bindings are generated by running `cdktf get`. -# See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.data_tfe_slug import DataTfeSlug -from imports.tfe.policy_set import PolicySet -class MyConvertedCode(TerraformStack): - def __init__(self, scope, name): - super().__init__(scope, name) - test = DataTfeSlug(self, "test", - source_path="policies/my-policy-set" - ) - tfe_policy_set_test = PolicySet(self, "test_1", - description="A brand new policy set", - name="my-policy-set", - organization="my-org-name", - slug=Token.as_string_map(test), - workspace_ids=[Token.as_string(tfe_workspace_test.id)] - ) - # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. - tfe_policy_set_test.override_logical_id("test") +```hcl +data "tfe_slug" "test" { + // point to the local directory where the policies are located. + source_path = "policies/my-policy-set" +} + +resource "tfe_policy_set" "test" { + name = "my-policy-set" + description = "A brand new policy set" + organization = "my-org-name" + workspace_ids = [tfe_workspace.test.id] + + // reference the tfe_slug data source. + slug = data.tfe_slug.test +} ``` ## Argument Reference @@ -166,4 +135,4 @@ Policy sets can be imported; use `` as the import ID. For example terraform import tfe_policy_set.test polset-wAs3zYmWAhYK7peR ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/policy_set_parameter.html.markdown b/website/docs/cdktf/python/r/policy_set_parameter.html.markdown index 5904442c7..9758004e6 100644 --- a/website/docs/cdktf/python/r/policy_set_parameter.html.markdown +++ b/website/docs/cdktf/python/r/policy_set_parameter.html.markdown @@ -16,32 +16,28 @@ Creates, updates and destroys policy set parameters. Basic usage: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import Token, TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.organization import Organization -from imports.tfe.policy_set import PolicySet -from imports.tfe.policy_set_parameter import PolicySetParameter -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - test = Organization(self, "test", + tfe_organization_test = tfe.organization.Organization(self, "test", email="admin@company.com", name="my-org-name" ) - tfe_policy_set_test = PolicySet(self, "test_1", + tfe_policy_set_test = tfe.policy_set.PolicySet(self, "test_1", name="my-policy-set-name", - organization=test.id + organization=cdktf.Token.as_string(tfe_organization_test.id) ) # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. tfe_policy_set_test.override_logical_id("test") - tfe_policy_set_parameter_test = PolicySetParameter(self, "test_2", + tfe_policy_set_parameter_test = + tfe.policy_set_parameter.PolicySetParameter(self, "test_2", key="my_key_name", - policy_set_id=Token.as_string(tfe_policy_set_test.id), + policy_set_id=cdktf.Token.as_string(tfe_policy_set_test.id), value="my_value_name" ) # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. @@ -73,4 +69,4 @@ terraform import tfe_policy_set_parameter.test polset-wAs3zYmWAhYK7peR/var-5rTwn ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/project.html.markdown b/website/docs/cdktf/python/r/project.html.markdown index 106e20258..0763e2626 100644 --- a/website/docs/cdktf/python/r/project.html.markdown +++ b/website/docs/cdktf/python/r/project.html.markdown @@ -16,25 +16,21 @@ Provides a project resource. Basic usage: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.organization import Organization -from imports.tfe.project import Project -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - test_organization = Organization(self, "test-organization", + tfe_organization_test_organization = tfe.organization.Organization(self, "test-organization", email="admin@company.com", name="my-org-name" ) - Project(self, "test", + tfe.project.Project(self, "test", name="projectname", - organization=test_organization.name + organization=cdktf.Token.as_string(tfe_organization_test_organization.name) ) ``` @@ -59,4 +55,4 @@ Projects can be imported; use `` as the import ID. For example: terraform import tfe_project.test prj-niVoeESBXT8ZREhr ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/project_policy_set.html.markdown b/website/docs/cdktf/python/r/project_policy_set.html.markdown index 85ad3e390..fda2dad7a 100644 --- a/website/docs/cdktf/python/r/project_policy_set.html.markdown +++ b/website/docs/cdktf/python/r/project_policy_set.html.markdown @@ -15,44 +15,27 @@ Adds and removes policy sets from a project Basic usage: -```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import Token, TerraformStack -# -# Provider bindings are generated by running `cdktf get`. -# See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.organization import Organization -from imports.tfe.policy_set import PolicySet -from imports.tfe.project import Project -from imports.tfe.project_policy_set import ProjectPolicySet -class MyConvertedCode(TerraformStack): - def __init__(self, scope, name): - super().__init__(scope, name) - test = Organization(self, "test", - email="admin@company.com", - name="my-org-name" - ) - tfe_policy_set_test = PolicySet(self, "test_1", - description="Some description.", - name="my-policy-set", - organization=test.name - ) - # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. - tfe_policy_set_test.override_logical_id("test") - tfe_project_test = Project(self, "test_2", - name="my-project-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 = 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") +```hcl +resource "tfe_organization" "test" { + name = "my-org-name" + email = "admin@company.com" +} + +resource "tfe_project" "test" { + name = "my-project-name" + organization = tfe_organization.test.name +} + +resource "tfe_policy_set" "test" { + name = "my-policy-set" + description = "Some description." + organization = tfe_organization.test.name +} + +resource "tfe_project_policy_set" "test" { + policy_set_id = tfe_policy_set.test.id + project_id = tfe_project.test.id +} ``` ## Argument Reference @@ -74,4 +57,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 648c90db8..da5561bc7 100644 --- a/website/docs/cdktf/python/r/project_variable_set.html.markdown +++ b/website/docs/cdktf/python/r/project_variable_set.html.markdown @@ -16,40 +16,35 @@ Adds and removes variable sets from a project Basic usage: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import Token, TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.organization import Organization -from imports.tfe.project import Project -from imports.tfe.project_variable_set import ProjectVariableSet -from imports.tfe.variable_set import VariableSet -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - test = Organization(self, "test", + tfe_organization_test = tfe.organization.Organization(self, "test", email="admin@company.com", name="my-org-name" ) - tfe_project_test = Project(self, "test_1", + tfe_project_test = tfe.project.Project(self, "test_1", name="my-project-name", - organization=test.name + organization=cdktf.Token.as_string(tfe_organization_test.name) ) # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. tfe_project_test.override_logical_id("test") - tfe_variable_set_test = VariableSet(self, "test_2", + tfe_variable_set_test = tfe.variable_set.VariableSet(self, "test_2", description="Some description.", name="Test Varset", - organization=test.name + organization=cdktf.Token.as_string(tfe_organization_test.name) ) # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. tfe_variable_set_test.override_logical_id("test") - tfe_project_variable_set_test = ProjectVariableSet(self, "test_3", - project_id=Token.as_string(tfe_project_test.id), - variable_set_id=Token.as_string(tfe_variable_set_test.id) + tfe_project_variable_set_test = + tfe.project_variable_set.ProjectVariableSet(self, "test_3", + project_id=cdktf.Token.as_string(tfe_project_test.id), + variable_set_id=cdktf.Token.as_string(tfe_variable_set_test.id) ) # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. tfe_project_variable_set_test.override_logical_id("test") @@ -74,4 +69,4 @@ Project Variable Sets can be imported; use `// \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/registry_gpg_key.html.markdown b/website/docs/cdktf/python/r/registry_gpg_key.html.markdown index e087f01bb..256e03929 100644 --- a/website/docs/cdktf/python/r/registry_gpg_key.html.markdown +++ b/website/docs/cdktf/python/r/registry_gpg_key.html.markdown @@ -16,22 +16,11 @@ The provided GPG key must be ASCII-armored, i.e. starting with: ## Example Usage -```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import Fn, Token, TerraformStack -# -# Provider bindings are generated by running `cdktf get`. -# See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.registry_gpg_key import RegistryGpgKey -class MyConvertedCode(TerraformStack): - def __init__(self, scope, name): - super().__init__(scope, name) - RegistryGpgKey(self, "example", - ascii_armor=Token.as_string(Fn.file("my-public-key.asc")), - organization="my-org-name" - ) +```hcl +resource "tfe_registry_gpg_key" "example" { + organization = "my-org-name" + ascii_armor = file("my-public-key.asc") +} ``` ## Argument Reference @@ -56,4 +45,4 @@ example: terraform import tfe_registry_gpg_key.example my-org-name/34365D9472D7468F ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/registry_module.html.markdown b/website/docs/cdktf/python/r/registry_module.html.markdown index 9aadf00f2..91e05ab11 100644 --- a/website/docs/cdktf/python/r/registry_module.html.markdown +++ b/website/docs/cdktf/python/r/registry_module.html.markdown @@ -16,35 +16,30 @@ Terraform Cloud's private module registry helps you share Terraform modules acro Basic usage with VCS: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.oauth_client import OauthClient -from imports.tfe.organization import Organization -from imports.tfe.registry_module import RegistryModule -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - test_organization = Organization(self, "test-organization", + tfe_organization_test_organization = tfe.organization.Organization(self, "test-organization", email="admin@company.com", name="my-org-name" ) - test_oauth_client = OauthClient(self, "test-oauth-client", + tfe_oauth_client_test_oauth_client = tfe.oauth_client.OauthClient(self, "test-oauth-client", api_url="https://api.github.com", http_url="https://github.com", oauth_token="my-vcs-provider-token", - organization=test_organization.name, + organization=cdktf.Token.as_string(tfe_organization_test_organization.name), service_provider="github" ) - RegistryModule(self, "test-registry-module", + tfe.registry_module.RegistryModule(self, "test-registry-module", vcs_repo=RegistryModuleVcsRepo( display_identifier="my-org-name/terraform-provider-name", identifier="my-org-name/terraform-provider-name", - oauth_token_id=test_oauth_client.oauth_token_id + oauth_token_id=cdktf.Token.as_string(tfe_oauth_client_test_oauth_client.oauth_token_id) ) ) ``` @@ -52,31 +47,26 @@ class MyConvertedCode(TerraformStack): Create private registry module with tests enabled: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.oauth_client import OauthClient -from imports.tfe.organization import Organization -from imports.tfe.registry_module import RegistryModule -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - test_organization = Organization(self, "test-organization", + tfe_organization_test_organization = tfe.organization.Organization(self, "test-organization", email="admin@company.com", name="my-org-name" ) - test_oauth_client = OauthClient(self, "test-oauth-client", + tfe_oauth_client_test_oauth_client = tfe.oauth_client.OauthClient(self, "test-oauth-client", api_url="https://api.github.com", http_url="https://github.com", oauth_token="my-vcs-provider-token", - organization=test_organization.name, + organization=cdktf.Token.as_string(tfe_organization_test_organization.name), service_provider="github" ) - RegistryModule(self, "test-registry-module", + tfe.registry_module.RegistryModule(self, "test-registry-module", test_config=[RegistryModuleTestConfig( tests_enabled=True ) @@ -85,7 +75,7 @@ class MyConvertedCode(TerraformStack): branch="main", display_identifier="my-org-name/terraform-provider-name", identifier="my-org-name/terraform-provider-name", - oauth_token_id=test_oauth_client.oauth_token_id + oauth_token_id=cdktf.Token.as_string(tfe_oauth_client_test_oauth_client.oauth_token_id) ) ) ``` @@ -93,31 +83,27 @@ class MyConvertedCode(TerraformStack): Create private registry module with GitHub App: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import Token, TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.data_tfe_github_app_installation import DataTfeGithubAppInstallation -from imports.tfe.organization import Organization -from imports.tfe.registry_module import RegistryModule -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - test_organization = Organization(self, "test-organization", + tfe_organization_test_organization = tfe.organization.Organization(self, "test-organization", email="admin@company.com", name="my-org-name" ) - gha_installation = DataTfeGithubAppInstallation(self, "gha_installation", + data_tfe_github_app_installation_gha_installation = + tfe.data_tfe_github_app_installation.DataTfeGithubAppInstallation(self, "gha_installation", name="YOUR_GH_NAME" ) - RegistryModule(self, "petstore", - organization=test_organization.name, + tfe.registry_module.RegistryModule(self, "petstore", + organization=cdktf.Token.as_string(tfe_organization_test_organization.name), vcs_repo=RegistryModuleVcsRepo( display_identifier="GH_NAME/REPO_NAME", - github_app_installation_id=Token.as_string(gha_installation.id), + github_app_installation_id=cdktf.Token.as_string(data_tfe_github_app_installation_gha_installation.id), identifier="GH_NAME/REPO_NAME" ) ) @@ -126,26 +112,22 @@ class MyConvertedCode(TerraformStack): Create private registry module without VCS: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.organization import Organization -from imports.tfe.registry_module import RegistryModule -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - test_organization = Organization(self, "test-organization", + tfe_organization_test_organization = tfe.organization.Organization(self, "test-organization", email="admin@company.com", name="my-org-name" ) - RegistryModule(self, "test-private-registry-module", + tfe.registry_module.RegistryModule(self, "test-private-registry-module", module_provider="my_provider", name="another_test_module", - organization=test_organization.name, + organization=cdktf.Token.as_string(tfe_organization_test_organization.name), registry_name="private" ) ``` @@ -153,27 +135,23 @@ class MyConvertedCode(TerraformStack): Create public registry module: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.organization import Organization -from imports.tfe.registry_module import RegistryModule -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - test_organization = Organization(self, "test-organization", + tfe_organization_test_organization = tfe.organization.Organization(self, "test-organization", email="admin@company.com", name="my-org-name" ) - RegistryModule(self, "test-public-registry-module", + tfe.registry_module.RegistryModule(self, "test-public-registry-module", module_provider="aws", name="vpc", namespace="terraform-aws-modules", - organization=test_organization.name, + organization=cdktf.Token.as_string(tfe_organization_test_organization.name), registry_name="public" ) ``` @@ -181,33 +159,29 @@ class MyConvertedCode(TerraformStack): Create no-code provisioning registry module: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.no_code_module import NoCodeModule -from imports.tfe.organization import Organization -from imports.tfe.registry_module import RegistryModule -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - test_organization = Organization(self, "test-organization", + tfe_organization_test_organization = tfe.organization.Organization(self, "test-organization", email="admin@company.com", name="my-org-name" ) - test_no_code_provisioning_registry_module = RegistryModule(self, "test-no-code-provisioning-registry-module", + tfe_registry_module_test_no_code_provisioning_registry_module = + tfe.registry_module.RegistryModule(self, "test-no-code-provisioning-registry-module", module_provider="aws", name="vpc", namespace="terraform-aws-modules", - organization=test_organization.name, + organization=cdktf.Token.as_string(tfe_organization_test_organization.name), registry_name="public" ) - NoCodeModule(self, "foobar", - organization=test_organization.id, - registry_module=test_no_code_provisioning_registry_module.id + tfe.no_code_module.NoCodeModule(self, "foobar", + organization=cdktf.Token.as_string(tfe_organization_test_organization.id), + registry_module=cdktf.Token.as_string(tfe_registry_module_test_no_code_provisioning_registry_module.id) ) ``` @@ -265,4 +239,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/registry_provider.html.markdown b/website/docs/cdktf/python/r/registry_provider.html.markdown index 5fdd3ac45..4090c9498 100644 --- a/website/docs/cdktf/python/r/registry_provider.html.markdown +++ b/website/docs/cdktf/python/r/registry_provider.html.markdown @@ -16,25 +16,22 @@ Manages public and private providers in the private registry. Create private provider: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe. import RegistryProvider -from imports.tfe.organization import Organization -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - example = Organization(self, "example", + tfe_organization_example = tfe.organization.Organization(self, "example", email="admin@company.com", name="my-org-name" ) - tfe_registry_provider_example = RegistryProvider(self, "example_1", + tfe_registry_provider_example = + tfe.registry_provider.RegistryProvider(self, "example_1", name="my-provider", - organization=example.name + organization=cdktf.Token.as_string(tfe_organization_example.name) ) # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. tfe_registry_provider_example.override_logical_id("example") @@ -43,26 +40,23 @@ class MyConvertedCode(TerraformStack): Create public provider: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe. import RegistryProvider -from imports.tfe.organization import Organization -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - example = Organization(self, "example", + tfe_organization_example = tfe.organization.Organization(self, "example", email="admin@company.com", name="my-org-name" ) - tfe_registry_provider_example = RegistryProvider(self, "example_1", + tfe_registry_provider_example = + tfe.registry_provider.RegistryProvider(self, "example_1", name="aws", namespace="hashicorp", - organization=example.name, + organization=cdktf.Token.as_string(tfe_organization_example.name), registry_name="public" ) # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. @@ -100,4 +94,4 @@ Or a public provider: terraform import tfe_registry_provider.example my-org-name/public/hashicorp/aws ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/run_trigger.html.markdown b/website/docs/cdktf/python/r/run_trigger.html.markdown index 1ef9fc6f8..f4dd3b56c 100644 --- a/website/docs/cdktf/python/r/run_trigger.html.markdown +++ b/website/docs/cdktf/python/r/run_trigger.html.markdown @@ -19,34 +19,29 @@ to up to 20 source workspaces. Basic usage: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.organization import Organization -from imports.tfe.run_trigger import RunTrigger -from imports.tfe.workspace import Workspace -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - test_organization = Organization(self, "test-organization", + tfe_organization_test_organization = tfe.organization.Organization(self, "test-organization", email="admin@company.com", name="my-org-name" ) - test_sourceable = Workspace(self, "test-sourceable", + tfe_workspace_test_sourceable = tfe.workspace.Workspace(self, "test-sourceable", name="my-sourceable-workspace-name", - organization=test_organization.id + organization=cdktf.Token.as_string(tfe_organization_test_organization.id) ) - test_workspace = Workspace(self, "test-workspace", + tfe_workspace_test_workspace = tfe.workspace.Workspace(self, "test-workspace", name="my-workspace-name", - organization=test_organization.id + organization=cdktf.Token.as_string(tfe_organization_test_organization.id) ) - RunTrigger(self, "test", - sourceable_id=test_sourceable.id, - workspace_id=test_workspace.id + tfe.run_trigger.RunTrigger(self, "test", + sourceable_id=cdktf.Token.as_string(tfe_workspace_test_sourceable.id), + workspace_id=cdktf.Token.as_string(tfe_workspace_test_workspace.id) ) ``` @@ -70,4 +65,4 @@ Run triggers can be imported; use `` as the import ID. For examp terraform import tfe_run_trigger.test rt-qV9JnKRkmtMa4zcA ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/saml_settings.html.markdown b/website/docs/cdktf/python/r/saml_settings.html.markdown index 3842ee3c9..0fa49386c 100644 --- a/website/docs/cdktf/python/r/saml_settings.html.markdown +++ b/website/docs/cdktf/python/r/saml_settings.html.markdown @@ -15,28 +15,17 @@ Use this resource to create, update and destroy SAML Settings. It applies only t Basic usage for SAML Settings: -```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. -# See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.provider import TfeProvider -from imports.tfe.saml_settings import SamlSettings -class MyConvertedCode(TerraformStack): - def __init__(self, scope, name): - super().__init__(scope, name) - TfeProvider(self, "tfe", - hostname=hostname.string_value, - token=admin_token.string_value - ) - SamlSettings(self, "this", - idp_cert="foobarCertificate", - slo_endpoint_url="https://example.com/slo_endpoint_url", - sso_endpoint_url="https://example.com/sso_endpoint_url" - ) +```hcl +provider "tfe" { + hostname = var.hostname + token = var.admin_token +} + +resource "tfe_saml_settings" "this" { + idp_cert = "foobarCertificate" + slo_endpoint_url = "https://example.com/slo_endpoint_url" + sso_endpoint_url = "https://example.com/sso_endpoint_url" + } ``` ## Argument Reference @@ -75,4 +64,4 @@ SAML Settings can be imported. terraform import tfe_saml_settings.this saml ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/sentinel_policy.html.markdown b/website/docs/cdktf/python/r/sentinel_policy.html.markdown index 39b7518af..73d0ed16c 100644 --- a/website/docs/cdktf/python/r/sentinel_policy.html.markdown +++ b/website/docs/cdktf/python/r/sentinel_policy.html.markdown @@ -21,18 +21,15 @@ enforced during runs. Basic usage: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.sentinel_policy import SentinelPolicy -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - SentinelPolicy(self, "test", + tfe.sentinel_policy.SentinelPolicy(self, "test", description="This policy always passes", enforce_mode="hard-mandatory", name="my-policy-name", @@ -66,4 +63,4 @@ import ID. For example: terraform import tfe_sentinel_policy.test my-org-name/pol-wAs3zYmWAhYK7peR ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/sentinel_version.html.markdown b/website/docs/cdktf/python/r/sentinel_version.html.markdown index f1cf14543..c94cc8b4d 100644 --- a/website/docs/cdktf/python/r/sentinel_version.html.markdown +++ b/website/docs/cdktf/python/r/sentinel_version.html.markdown @@ -16,18 +16,15 @@ Manage Sentinel versions available on Terraform Cloud/Enterprise. Basic Usage: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.sentinel_version import SentinelVersion -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - SentinelVersion(self, "test", + tfe.sentinel_version.SentinelVersion(self, "test", sha="e75ac73deb69a6b3aa667cb0b8b731aee79e2904", url="https://tfe-host.com/path/to/sentinel.zip", version="0.24.0-custom" @@ -65,4 +62,4 @@ terraform import tfe_sentinel_version.test 0.24.0 -> **Note:** You can fetch a Sentinel version ID from the URL of an existing version in the 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/ssh_key.html.markdown b/website/docs/cdktf/python/r/ssh_key.html.markdown index 777ce33f4..177974c7f 100644 --- a/website/docs/cdktf/python/r/ssh_key.html.markdown +++ b/website/docs/cdktf/python/r/ssh_key.html.markdown @@ -17,18 +17,15 @@ key. An organization can have multiple SSH keys available. Basic usage: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.ssh_key import SshKey -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - SshKey(self, "test", + tfe.ssh_key.SshKey(self, "test", key="private-ssh-key", name="my-ssh-key-name", organization="my-org-name" @@ -52,4 +49,4 @@ The following arguments are supported: Because the Terraform Enterprise API does not return the private SSH key content, this resource cannot be imported. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/team.html.markdown b/website/docs/cdktf/python/r/team.html.markdown index 8986aeff9..bec6f6a88 100644 --- a/website/docs/cdktf/python/r/team.html.markdown +++ b/website/docs/cdktf/python/r/team.html.markdown @@ -16,18 +16,15 @@ Manages teams. Basic usage: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.team import Team -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - Team(self, "test", + tfe.team.Team(self, "test", name="my-team-name", organization="my-org-name" ) @@ -36,18 +33,15 @@ class MyConvertedCode(TerraformStack): Organization Permission usage: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.team import Team -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - Team(self, "test", + tfe.team.Team(self, "test", name="my-team-name", organization="my-org-name", organization_access=TeamOrganizationAccess( @@ -97,4 +91,4 @@ or terraform import tfe_team.test my-org-name/my-team-name ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/team_access.html.markdown b/website/docs/cdktf/python/r/team_access.html.markdown index a52e519f8..ab50b1a2d 100644 --- a/website/docs/cdktf/python/r/team_access.html.markdown +++ b/website/docs/cdktf/python/r/team_access.html.markdown @@ -16,33 +16,28 @@ Associate a team to permissions on a workspace. Basic usage: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import Token, TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.team import Team -from imports.tfe.team_access import TeamAccess -from imports.tfe.workspace import Workspace -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - test = Team(self, "test", + tfe_team_test = tfe.team.Team(self, "test", name="my-team-name", organization="my-org-name" ) - tfe_workspace_test = Workspace(self, "test_1", + tfe_workspace_test = tfe.workspace.Workspace(self, "test_1", name="my-workspace-name", organization="my-org-name" ) # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. tfe_workspace_test.override_logical_id("test") - tfe_team_access_test = TeamAccess(self, "test_2", + tfe_team_access_test = tfe.team_access.TeamAccess(self, "test_2", access="read", - team_id=test.id, - workspace_id=Token.as_string(tfe_workspace_test.id) + team_id=cdktf.Token.as_string(tfe_team_test.id), + workspace_id=cdktf.Token.as_string(tfe_workspace_test.id) ) # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. tfe_team_access_test.override_logical_id("test") @@ -82,4 +77,4 @@ example: terraform import tfe_team_access.test my-org-name/my-workspace-name/tws-8S5wnRbRpogw6apb ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/team_member.html.markdown b/website/docs/cdktf/python/r/team_member.html.markdown index e0e91ab64..e146c6558 100644 --- a/website/docs/cdktf/python/r/team_member.html.markdown +++ b/website/docs/cdktf/python/r/team_member.html.markdown @@ -25,24 +25,20 @@ used once. All four resources cannot be used for the same team simultaneously. Basic usage: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.team import Team -from imports.tfe.team_member import TeamMember -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - test = Team(self, "test", + tfe_team_test = tfe.team.Team(self, "test", name="my-team-name", organization="my-org-name" ) - tfe_team_member_test = TeamMember(self, "test_1", - team_id=test.id, + tfe_team_member_test = tfe.team_member.TeamMember(self, "test_1", + team_id=cdktf.Token.as_string(tfe_team_test.id), username="sander" ) # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. @@ -65,4 +61,4 @@ example: terraform import tfe_team_member.test team-47qC3LmA47piVan7/sander ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/team_members.html.markdown b/website/docs/cdktf/python/r/team_members.html.markdown index 405b4b098..7f8e1ac35 100644 --- a/website/docs/cdktf/python/r/team_members.html.markdown +++ b/website/docs/cdktf/python/r/team_members.html.markdown @@ -25,24 +25,20 @@ used once. All four resources cannot be used for the same team simultaneously. Basic usage: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.team import Team -from imports.tfe.team_members import TeamMembers -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - test = Team(self, "test", + tfe_team_test = tfe.team.Team(self, "test", name="my-team-name", organization="my-org-name" ) - tfe_team_members_test = TeamMembers(self, "test_1", - team_id=test.id, + tfe_team_members_test = tfe.team_members.TeamMembers(self, "test_1", + team_id=cdktf.Token.as_string(tfe_team_test.id), usernames=["admin", "sander"] ) # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. @@ -51,30 +47,23 @@ class MyConvertedCode(TerraformStack): With a set of usernames: -```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import Fn, Token, TerraformStack -# -# Provider bindings are generated by running `cdktf get`. -# See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.team import Team -from imports.tfe.team_members import TeamMembers -class MyConvertedCode(TerraformStack): - def __init__(self, scope, name): - super().__init__(scope, name) - all_usernames = Fn.toset(["user1", "user2"]) - test = Team(self, "test", - name="my-team-name", - organization="my-org-name" - ) - tfe_team_members_test = TeamMembers(self, "test_1", - team_id=test.id, - usernames=Token.as_list("${[ for user in ${" + all_usernames + "} : user]}") - ) - # 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") +```hcl +locals { + all_usernames = toset([ + "user1", + "user2", + ]) +} + +resource "tfe_team" "test" { + name = "my-team-name" + organization = "my-org-name" +} + +resource "tfe_team_members" "test" { + team_id = tfe_team.test.id + usernames = [for user in local.all_usernames : user] +} ``` ## Argument Reference @@ -96,4 +85,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 048cfa5d9..5353364f6 100644 --- a/website/docs/cdktf/python/r/team_organization_member.html.markdown +++ b/website/docs/cdktf/python/r/team_organization_member.html.markdown @@ -24,32 +24,29 @@ an instance of Terraform Enterprise at least as recent as v202004-1. Basic usage: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import Token, TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.organization_membership import OrganizationMembership -from imports.tfe.team import Team -from imports.tfe.team_organization_member import TeamOrganizationMember -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - test = OrganizationMembership(self, "test", + tfe_organization_membership_test = + tfe.organization_membership.OrganizationMembership(self, "test", email="example@hashicorp.com", organization="my-org-name" ) - tfe_team_test = Team(self, "test_1", + tfe_team_test = tfe.team.Team(self, "test_1", name="my-team-name", organization="my-org-name" ) # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. tfe_team_test.override_logical_id("test") - tfe_team_organization_member_test = TeamOrganizationMember(self, "test_2", - organization_membership_id=test.id, - team_id=Token.as_string(tfe_team_test.id) + tfe_team_organization_member_test = + tfe.team_organization_member.TeamOrganizationMember(self, "test_2", + organization_membership_id=cdktf.Token.as_string(tfe_organization_membership_test.id), + team_id=cdktf.Token.as_string(tfe_team_test.id) ) # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. tfe_team_organization_member_test.override_logical_id("test") @@ -75,4 +72,4 @@ or terraform import tfe_team_organization_member.test my-org-name/user@company.com/my-team-name ``` ~> **NOTE:** The `//` import ID format cannot be used if there are `/` characters in the user's email. These users must be imported with the `/` format instead - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/team_organization_members.html.markdown b/website/docs/cdktf/python/r/team_organization_members.html.markdown index 7895bcf61..04ced9cca 100644 --- a/website/docs/cdktf/python/r/team_organization_members.html.markdown +++ b/website/docs/cdktf/python/r/team_organization_members.html.markdown @@ -24,36 +24,37 @@ an instance of Terraform Enterprise at least as recent as v202004-1. Basic usage: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import Token, TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.organization_membership import OrganizationMembership -from imports.tfe.team import Team -from imports.tfe.team_organization_members import TeamOrganizationMembers -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - sample = OrganizationMembership(self, "sample", + tfe_organization_membership_sample = + tfe.organization_membership.OrganizationMembership(self, "sample", email="sample@hashicorp.com", organization="my-org-name" ) - test = OrganizationMembership(self, "test", + tfe_organization_membership_test = + tfe.organization_membership.OrganizationMembership(self, "test", email="example@hashicorp.com", organization="my-org-name" ) - tfe_team_test = Team(self, "test_2", + tfe_team_test = tfe.team.Team(self, "test_2", name="my-team-name", organization="my-org-name" ) # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. tfe_team_test.override_logical_id("test") - tfe_team_organization_members_test = TeamOrganizationMembers(self, "test_3", - organization_membership_ids=[test.id, sample.id], - team_id=Token.as_string(tfe_team_test.id) + tfe_team_organization_members_test = + tfe.team_organization_members.TeamOrganizationMembers(self, "test_3", + organization_membership_ids=[ + cdktf.Token.as_string(tfe_organization_membership_test.id), + cdktf.Token.as_string(tfe_organization_membership_sample.id) + ], + team_id=cdktf.Token.as_string(tfe_team_test.id) ) # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. tfe_team_organization_members_test.override_logical_id("test") @@ -62,38 +63,35 @@ class MyConvertedCode(TerraformStack): With a set of organization members: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import Fn, Token, TerraformIterator, TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.organization_membership import OrganizationMembership -from imports.tfe.team import Team -from imports.tfe.team_organization_members import TeamOrganizationMembers -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - all_users = Fn.toset(["user1@hashicorp.com", "user2@hashicorp.com"]) + all_users = cdktf.Fn.toset(["user1@hashicorp.com", "user2@hashicorp.com" + ]) # In most cases loops should be handled in the programming language context and # not inside of the Terraform context. If you are looping over something external, e.g. a variable or a file input # you should consider using a for loop. If you are looping over something only known to Terraform, e.g. a result of a data source # you need to keep this like it is. - all_membership_for_each_iterator = TerraformIterator.from_list( - Token.as_any(all_users)) - OrganizationMembership(self, "all_membership", - email=Token.as_string(all_membership_for_each_iterator.key), + tfe_organization_membership_all_membership_for_each_iterator = + cdktf.TerraformIterator.from_list(cdktf.Token.as_any(all_users)) + tfe.organization_membership.OrganizationMembership(self, "all_membership", + email=cdktf.Token.as_string(tfe_organization_membership_all_membership_for_each_iterator.key), organization="my-org-name", - for_each=all_membership_for_each_iterator + for_each=tfe_organization_membership_all_membership_for_each_iterator ) - test = Team(self, "test", + tfe_team_test = tfe.team.Team(self, "test", name="my-team-name", organization="my-org-name" ) - tfe_team_organization_members_test = TeamOrganizationMembers(self, "test_2", - organization_membership_ids=Token.as_list("${[ for member in ${" + all_users + "} : tfe_organization_membership.all_membership[member].id]}"), - team_id=test.id + tfe_team_organization_members_test = + tfe.team_organization_members.TeamOrganizationMembers(self, "test_2", + organization_membership_ids=cdktf.Token.as_list("${[ for member in ${" + all_users + "} : tfe_organization_membership.all_membership[member].id]}"), + team_id=cdktf.Token.as_string(tfe_team_test.id) ) # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. tfe_team_organization_members_test.override_logical_id("test") @@ -115,4 +113,4 @@ as the import ID. For example: terraform import tfe_team_organization_members.test team-47qC3LmA47piVan7 ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/team_project_access.html.markdown b/website/docs/cdktf/python/r/team_project_access.html.markdown index 6a9a2b5c2..826b49805 100644 --- a/website/docs/cdktf/python/r/team_project_access.html.markdown +++ b/website/docs/cdktf/python/r/team_project_access.html.markdown @@ -16,31 +16,27 @@ Associate a team to permissions on a project. Basic usage: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.project import Project -from imports.tfe.team import Team -from imports.tfe.team_project_access import TeamProjectAccess -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - test = Project(self, "test", + tfe_project_test = tfe.project.Project(self, "test", name="myproject", organization="my-org-name" ) - admin = Team(self, "admin", + tfe_team_admin = tfe.team.Team(self, "admin", name="my-admin-team", organization="my-org-name" ) - tfe_team_project_access_admin = TeamProjectAccess(self, "admin_2", + tfe_team_project_access_admin = + tfe.team_project_access.TeamProjectAccess(self, "admin_2", access="admin", - project_id=test.id, - team_id=admin.id + project_id=cdktf.Token.as_string(tfe_project_test.id), + team_id=cdktf.Token.as_string(tfe_team_admin.id) ) # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. tfe_team_project_access_admin.override_logical_id("admin") @@ -88,36 +84,31 @@ The following permissions apply to all workspaces (and future workspaces) in the ## Example Usage with Custom Project Permissions ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.project import Project -from imports.tfe.team import Team -from imports.tfe.team_project_access import TeamProjectAccess -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - test = Project(self, "test", + tfe_project_test = tfe.project.Project(self, "test", name="myproject", organization="my-org-name" ) - dev = Team(self, "dev", + tfe_team_dev = tfe.team.Team(self, "dev", name="my-dev-team", organization="my-org-name" ) - TeamProjectAccess(self, "custom", + tfe.team_project_access.TeamProjectAccess(self, "custom", access="custom", project_access=[TeamProjectAccessProjectAccess( settings="read", teams="none" ) ], - project_id=test.id, - team_id=dev.id, + project_id=cdktf.Token.as_string(tfe_project_test.id), + team_id=cdktf.Token.as_string(tfe_team_dev.id), workspace_access=[TeamProjectAccessWorkspaceAccess( create=True, delete=False, @@ -146,4 +137,4 @@ example: terraform import tfe_team_project_access.admin tprj-2pmtXpZa4YzVMTPi ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/team_token.html.markdown b/website/docs/cdktf/python/r/team_token.html.markdown index d3a7c2688..81354724f 100644 --- a/website/docs/cdktf/python/r/team_token.html.markdown +++ b/website/docs/cdktf/python/r/team_token.html.markdown @@ -16,24 +16,20 @@ Generates a new team token and overrides existing token if one exists. Basic usage: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.team import Team -from imports.tfe.team_token import TeamToken -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - test = Team(self, "test", + tfe_team_test = tfe.team.Team(self, "test", name="my-team-name", organization="my-org-name" ) - tfe_team_token_test = TeamToken(self, "test_1", - team_id=test.id + tfe_team_token_test = tfe.team_token.TeamToken(self, "test_1", + team_id=cdktf.Token.as_string(tfe_team_test.id) ) # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. tfe_team_token_test.override_logical_id("test") @@ -55,35 +51,20 @@ never expire. When a token has an expiry: -```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import Token, TerraformStack -# -# Provider bindings are generated by running `cdktf get`. -# See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.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. - test = Team(self, "test", - name="my-team-name", - organization="my-org-name" - ) - example = Rotating(self, "example", - rotation_days=30 - ) - tfe_team_token_test = TeamToken(self, "test_2", - expired_at=Token.as_string(example.rotation_rfc3339), - team_id=test.id - ) - # 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") +```hcl +resource "tfe_team" "test" { + name = "my-team-name" + organization = "my-org-name" +} + +resource "time_rotating" "example" { + rotation_days = 30 +} + +resource "tfe_team_token" "test" { + team_id = tfe_team.test.id + expired_at = time_rotating.example.rotation_rfc3339 +} ``` ## Attributes Reference @@ -99,4 +80,4 @@ Team tokens can be imported; use `` as the import ID. For example: terraform import tfe_team_token.test team-47qC3LmA47piVan7 ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/terraform_version.html.markdown b/website/docs/cdktf/python/r/terraform_version.html.markdown index 010e15457..5d19d8f3e 100644 --- a/website/docs/cdktf/python/r/terraform_version.html.markdown +++ b/website/docs/cdktf/python/r/terraform_version.html.markdown @@ -16,18 +16,15 @@ Manage Terraform versions available on Terraform Cloud/Enterprise. Basic Usage: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.terraform_version import TerraformVersion -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - TerraformVersion(self, "test", + tfe.terraform_version.TerraformVersion(self, "test", sha="e75ac73deb69a6b3aa667cb0b8b731aee79e2904", url="https://tfe-host.com/path/to/terraform.zip", version="1.1.2-custom" @@ -65,4 +62,4 @@ terraform import tfe_terraform_version.test 1.1.2 -> **Note:** You can fetch a Terraform version ID from the URL of an existing version in the Terraform Cloud UI. The ID is in the format `tool-` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/variable.html.markdown b/website/docs/cdktf/python/r/variable.html.markdown index a606daed4..a32fa5e33 100644 --- a/website/docs/cdktf/python/r/variable.html.markdown +++ b/website/docs/cdktf/python/r/variable.html.markdown @@ -16,35 +16,30 @@ Creates, updates and destroys variables. Basic usage for workspaces: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import Token, TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.organization import Organization -from imports.tfe.variable import Variable -from imports.tfe.workspace import Workspace -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - test = Organization(self, "test", + tfe_organization_test = tfe.organization.Organization(self, "test", email="admin@company.com", name="my-org-name" ) - tfe_workspace_test = Workspace(self, "test_1", + tfe_workspace_test = tfe.workspace.Workspace(self, "test_1", name="my-workspace-name", - organization=test.name + organization=cdktf.Token.as_string(tfe_organization_test.name) ) # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. tfe_workspace_test.override_logical_id("test") - tfe_variable_test = Variable(self, "test_2", + tfe_variable_test = tfe.variable.Variable(self, "test_2", category="terraform", description="a useful description", key="my_key_name", value="my_value_name", - workspace_id=Token.as_string(tfe_workspace_test.id) + workspace_id=cdktf.Token.as_string(tfe_workspace_test.id) ) # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. tfe_variable_test.override_logical_id("test") @@ -53,44 +48,39 @@ class MyConvertedCode(TerraformStack): Basic usage for variable sets: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import Token, TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.organization import Organization -from imports.tfe.variable import Variable -from imports.tfe.variable_set import VariableSet -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - test = Organization(self, "test", + tfe_organization_test = tfe.organization.Organization(self, "test", email="admin@company.com", name="my-org-name" ) - tfe_variable_set_test = VariableSet(self, "test_1", + tfe_variable_set_test = tfe.variable_set.VariableSet(self, "test_1", description="Some description.", global=False, name="Test Varset", - organization=test.name + organization=cdktf.Token.as_string(tfe_organization_test.name) ) # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. tfe_variable_set_test.override_logical_id("test") - Variable(self, "test-a", + tfe.variable.Variable(self, "test-a", category="terraform", description="a useful description", key="seperate_variable", value="my_value_name", - variable_set_id=Token.as_string(tfe_variable_set_test.id) + variable_set_id=cdktf.Token.as_string(tfe_variable_set_test.id) ) - Variable(self, "test-b", + tfe.variable.Variable(self, "test-b", category="env", description="an environment variable", key="another_variable", value="my_value_name", - variable_set_id=Token.as_string(tfe_variable_set_test.id) + variable_set_id=cdktf.Token.as_string(tfe_variable_set_test.id) ) ``` @@ -129,41 +119,33 @@ While the `value` field may be referenced in other resources, for safety it is a The `readable_value` attribute is not sensitive, and will not be redacted; instead, it will be null if the variable is sensitive. This allows other resources to reference it, while keeping their plan outputs readable. For example: -```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. -# See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.variable import Variable -from imports.tfe.workspace import Workspace -class MyConvertedCode(TerraformStack): - def __init__(self, scope, name): - super().__init__(scope, name) - sensitive_var = Variable(self, "sensitive_var", - category="terraform", - key="sensitive_key", - sensitive=True, - value="sensitive_value", - workspace_id=workspace.id - ) - visible_var = Variable(self, "visible_var", - category="terraform", - key="visible_key", - sensitive=False, - value="visible_value", - workspace_id=workspace.id - ) - Workspace(self, "sensitive_workspace", - name="workspace-${" + sensitive_var.value + "}", - organization="organization name" - ) - Workspace(self, "visible_workspace", - name="workspace-${" + visible_var.readable_value + "}", - organization="organization name" - ) +``` +resource "tfe_variable" "sensitive_var" { + key = "sensitive_key" + value = "sensitive_value" // this will be redacted from plan outputs + category = "terraform" + workspace_id = tfe_workspace.workspace.id + sensitive = true +} + +resource "tfe_variable" "visible_var" { + key = "visible_key" + value = "visible_value" // this will be redacted from plan outputs + category = "terraform" + workspace_id = tfe_workspace.workspace.id + sensitive = false +} + +resource "tfe_workspace" "sensitive_workspace" { + name = "workspace-${tfe_variable.sensitive_var.value}" // this will be redacted from plan outputs + organization = "organization name" +} + +resource "tfe_workspace" "visible_workspace" { + name = "workspace-${tfe_variable.visible_var.readable_value}" // this will not be redacted from plan outputs + organization = "organization name" +} + ``` `readable_value` will be null if the variable is sensitive. `readable_value` may not be set explicitly in the resource configuration. @@ -189,4 +171,4 @@ example: terraform import tfe_variable.test my-org-name/varset-47qC3LmA47piVan7/var-5rTwnSaRPogw6apb ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/variable_set.html.markdown b/website/docs/cdktf/python/r/variable_set.html.markdown index f5e16a6bd..524373524 100644 --- a/website/docs/cdktf/python/r/variable_set.html.markdown +++ b/website/docs/cdktf/python/r/variable_set.html.markdown @@ -16,159 +16,142 @@ Creates, updates and destroys variable sets. Basic usage: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import Token, TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.organization import Organization -from imports.tfe.project import Project -from imports.tfe.project_variable_set import ProjectVariableSet -from imports.tfe.variable import Variable -from imports.tfe.variable_set import VariableSet -from imports.tfe.workspace import Workspace -from imports.tfe.workspace_variable_set import WorkspaceVariableSet -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - test = Organization(self, "test", + tfe_organization_test = tfe.organization.Organization(self, "test", email="admin@company.com", name="my-org-name" ) - tfe_project_test = Project(self, "test_1", + tfe_project_test = tfe.project.Project(self, "test_1", name="projectname", - organization=test.name + organization=cdktf.Token.as_string(tfe_organization_test.name) ) # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. tfe_project_test.override_logical_id("test") - tfe_variable_set_test = VariableSet(self, "test_2", + tfe_variable_set_test = tfe.variable_set.VariableSet(self, "test_2", description="Some description.", name="Test Varset", - organization=test.name + organization=cdktf.Token.as_string(tfe_organization_test.name) ) # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. tfe_variable_set_test.override_logical_id("test") - tfe_workspace_test = Workspace(self, "test_3", + tfe_workspace_test = tfe.workspace.Workspace(self, "test_3", name="my-workspace-name", - organization=test.name + organization=cdktf.Token.as_string(tfe_organization_test.name) ) # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. tfe_workspace_test.override_logical_id("test") - tfe_workspace_variable_set_test = WorkspaceVariableSet(self, "test_4", - variable_set_id=Token.as_string(tfe_variable_set_test.id), - workspace_id=Token.as_string(tfe_workspace_test.id) + tfe_workspace_variable_set_test = + tfe.workspace_variable_set.WorkspaceVariableSet(self, "test_4", + variable_set_id=cdktf.Token.as_string(tfe_variable_set_test.id), + workspace_id=cdktf.Token.as_string(tfe_workspace_test.id) ) # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. tfe_workspace_variable_set_test.override_logical_id("test") - tfe_project_variable_set_test = ProjectVariableSet(self, "test_5", - project_id=Token.as_string(tfe_project_test.id), - variable_set_id=Token.as_string(tfe_variable_set_test.id) + tfe_project_variable_set_test = + tfe.project_variable_set.ProjectVariableSet(self, "test_5", + project_id=cdktf.Token.as_string(tfe_project_test.id), + variable_set_id=cdktf.Token.as_string(tfe_variable_set_test.id) ) # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. tfe_project_variable_set_test.override_logical_id("test") - Variable(self, "test-a", + tfe.variable.Variable(self, "test-a", category="terraform", description="a useful description", key="seperate_variable", value="my_value_name", - variable_set_id=Token.as_string(tfe_variable_set_test.id) + variable_set_id=cdktf.Token.as_string(tfe_variable_set_test.id) ) - Variable(self, "test-b", + tfe.variable.Variable(self, "test-b", category="env", description="an environment variable", key="another_variable", value="my_value_name", - variable_set_id=Token.as_string(tfe_variable_set_test.id) + variable_set_id=cdktf.Token.as_string(tfe_variable_set_test.id) ) ``` Creating a global variable set: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import Token, TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.organization import Organization -from imports.tfe.variable import Variable -from imports.tfe.variable_set import VariableSet -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - test = Organization(self, "test", + tfe_organization_test = tfe.organization.Organization(self, "test", email="admin@company.com", name="my-org-name" ) - tfe_variable_set_test = VariableSet(self, "test_1", + tfe_variable_set_test = tfe.variable_set.VariableSet(self, "test_1", description="Variable set applied to all workspaces.", global=True, name="Global Varset", - organization=test.name + organization=cdktf.Token.as_string(tfe_organization_test.name) ) # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. tfe_variable_set_test.override_logical_id("test") - Variable(self, "test-a", + tfe.variable.Variable(self, "test-a", category="terraform", description="a useful description", key="seperate_variable", value="my_value_name", - variable_set_id=Token.as_string(tfe_variable_set_test.id) + variable_set_id=cdktf.Token.as_string(tfe_variable_set_test.id) ) - Variable(self, "test-b", + tfe.variable.Variable(self, "test-b", category="env", description="an environment variable", key="another_variable", value="my_value_name", - variable_set_id=Token.as_string(tfe_variable_set_test.id) + variable_set_id=cdktf.Token.as_string(tfe_variable_set_test.id) ) ``` Create a priority variable set: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import Token, TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.organization import Organization -from imports.tfe.variable import Variable -from imports.tfe.variable_set import VariableSet -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - test = Organization(self, "test", + tfe_organization_test = tfe.organization.Organization(self, "test", email="admin@company.com", name="my-org-name" ) - tfe_variable_set_test = VariableSet(self, "test_1", + tfe_variable_set_test = tfe.variable_set.VariableSet(self, "test_1", description="Variable set applied to all workspaces.", name="Global Varset", - organization=test.name, + organization=cdktf.Token.as_string(tfe_organization_test.name), priority=True ) # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. tfe_variable_set_test.override_logical_id("test") - Variable(self, "test-a", + tfe.variable.Variable(self, "test-a", category="terraform", description="a useful description", key="seperate_variable", value="my_value_name", - variable_set_id=Token.as_string(tfe_variable_set_test.id) + variable_set_id=cdktf.Token.as_string(tfe_variable_set_test.id) ) - Variable(self, "test-b", + tfe.variable.Variable(self, "test-b", category="env", description="an environment variable", key="another_variable", value="my_value_name", - variable_set_id=Token.as_string(tfe_variable_set_test.id) + variable_set_id=cdktf.Token.as_string(tfe_variable_set_test.id) ) ``` @@ -198,4 +181,4 @@ Variable sets can be imported; use `` as the import ID. For exa terraform import tfe_variable_set.test varset-5rTwnSaRPogw6apb ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/workspace.html.markdown b/website/docs/cdktf/python/r/workspace.html.markdown index 99f3ba59a..606d02e9b 100644 --- a/website/docs/cdktf/python/r/workspace.html.markdown +++ b/website/docs/cdktf/python/r/workspace.html.markdown @@ -20,25 +20,21 @@ Provides a workspace resource. Basic usage: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.organization import Organization -from imports.tfe.workspace import Workspace -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - test_organization = Organization(self, "test-organization", + tfe_organization_test_organization = tfe.organization.Organization(self, "test-organization", email="admin@company.com", name="my-org-name" ) - Workspace(self, "test", + tfe.workspace.Workspace(self, "test", name="my-workspace-name", - organization=test_organization.name, + organization=cdktf.Token.as_string(tfe_organization_test_organization.name), tag_names=["test", "app"] ) ``` @@ -46,38 +42,33 @@ class MyConvertedCode(TerraformStack): Usage with vcs_repo: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.oauth_client import OauthClient -from imports.tfe.organization import Organization -from imports.tfe.workspace import Workspace -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - test_organization = Organization(self, "test-organization", + tfe_organization_test_organization = tfe.organization.Organization(self, "test-organization", email="admin@company.com", name="my-org-name" ) - test = OauthClient(self, "test", + tfe_oauth_client_test = tfe.oauth_client.OauthClient(self, "test", api_url="https://api.github.com", http_url="https://github.com", oauth_token="oauth_token_id", - organization=test_organization, + organization=tfe_organization_test_organization, service_provider="github" ) - Workspace(self, "parent", + tfe.workspace.Workspace(self, "parent", name="parent-ws", - organization=test_organization, + organization=tfe_organization_test_organization, queue_all_runs=False, vcs_repo=WorkspaceVcsRepo( branch="main", identifier="my-org-name/vcs-repository", - oauth_token_id=test.oauth_token_id + oauth_token_id=cdktf.Token.as_string(tfe_oauth_client_test.oauth_token_id) ) ) ``` @@ -191,4 +182,4 @@ terraform import tfe_workspace.test ws-CH5in3chf8RJjrVd terraform import tfe_workspace.test my-org-name/my-wkspace-name ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/workspace_policy_set.html.markdown b/website/docs/cdktf/python/r/workspace_policy_set.html.markdown index bbf800503..733784218 100644 --- a/website/docs/cdktf/python/r/workspace_policy_set.html.markdown +++ b/website/docs/cdktf/python/r/workspace_policy_set.html.markdown @@ -18,40 +18,35 @@ Adds and removes policy sets from a workspace Basic usage: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import Token, TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.organization import Organization -from imports.tfe.policy_set import PolicySet -from imports.tfe.workspace import Workspace -from imports.tfe.workspace_policy_set import WorkspacePolicySet -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - test = Organization(self, "test", + tfe_organization_test = tfe.organization.Organization(self, "test", email="admin@company.com", name="my-org-name" ) - tfe_policy_set_test = PolicySet(self, "test_1", + tfe_policy_set_test = tfe.policy_set.PolicySet(self, "test_1", description="Some description.", name="my-policy-set", - organization=test.name + organization=cdktf.Token.as_string(tfe_organization_test.name) ) # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. tfe_policy_set_test.override_logical_id("test") - tfe_workspace_test = Workspace(self, "test_2", + tfe_workspace_test = tfe.workspace.Workspace(self, "test_2", name="my-workspace-name", - organization=test.name + organization=cdktf.Token.as_string(tfe_organization_test.name) ) # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. tfe_workspace_test.override_logical_id("test") - tfe_workspace_policy_set_test = WorkspacePolicySet(self, "test_3", - policy_set_id=Token.as_string(tfe_policy_set_test.id), - workspace_id=Token.as_string(tfe_workspace_test.id) + tfe_workspace_policy_set_test = + tfe.workspace_policy_set.WorkspacePolicySet(self, "test_3", + policy_set_id=cdktf.Token.as_string(tfe_policy_set_test.id), + workspace_id=cdktf.Token.as_string(tfe_workspace_test.id) ) # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. tfe_workspace_policy_set_test.override_logical_id("test") @@ -76,4 +71,4 @@ Workspace Policy Sets can be imported; use `// \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/workspace_policy_set_exclusion.html.markdown b/website/docs/cdktf/python/r/workspace_policy_set_exclusion.html.markdown index ab821e937..5f052b546 100644 --- a/website/docs/cdktf/python/r/workspace_policy_set_exclusion.html.markdown +++ b/website/docs/cdktf/python/r/workspace_policy_set_exclusion.html.markdown @@ -18,40 +18,35 @@ Adds and removes policy sets from an excluded workspace Basic usage: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import Token, TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.organization import Organization -from imports.tfe.policy_set import PolicySet -from imports.tfe.workspace import Workspace -from imports.tfe.workspace_policy_set_exclusion import WorkspacePolicySetExclusion -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - test = Organization(self, "test", + tfe_organization_test = tfe.organization.Organization(self, "test", email="admin@company.com", name="my-org-name" ) - tfe_policy_set_test = PolicySet(self, "test_1", + tfe_policy_set_test = tfe.policy_set.PolicySet(self, "test_1", description="Some description.", name="my-policy-set", - organization=test.name + organization=cdktf.Token.as_string(tfe_organization_test.name) ) # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. tfe_policy_set_test.override_logical_id("test") - tfe_workspace_test = Workspace(self, "test_2", + tfe_workspace_test = tfe.workspace.Workspace(self, "test_2", name="my-workspace-name", - organization=test.name + organization=cdktf.Token.as_string(tfe_organization_test.name) ) # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. tfe_workspace_test.override_logical_id("test") - tfe_workspace_policy_set_exclusion_test = WorkspacePolicySetExclusion(self, "test_3", - policy_set_id=Token.as_string(tfe_policy_set_test.id), - workspace_id=Token.as_string(tfe_workspace_test.id) + tfe_workspace_policy_set_exclusion_test = + tfe.workspace_policy_set_exclusion.WorkspacePolicySetExclusion(self, "test_3", + policy_set_id=cdktf.Token.as_string(tfe_policy_set_test.id), + workspace_id=cdktf.Token.as_string(tfe_workspace_test.id) ) # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. tfe_workspace_policy_set_exclusion_test.override_logical_id("test") @@ -76,4 +71,4 @@ Excluded Workspace Policy Sets can be imported; use `/ \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/workspace_run.html.markdown b/website/docs/cdktf/python/r/workspace_run.html.markdown index 200047332..e79741bc7 100644 --- a/website/docs/cdktf/python/r/workspace_run.html.markdown +++ b/website/docs/cdktf/python/r/workspace_run.html.markdown @@ -24,52 +24,46 @@ The `tfe_workspace_run` expects to own exactly one apply during a creation and/o Basic usage with multiple workspaces: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.oauth_client import OauthClient -from imports.tfe.organization import Organization -from imports.tfe.workspace import Workspace -from imports.tfe.workspace_run import WorkspaceRun -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - test_organization = Organization(self, "test-organization", + tfe_organization_test_organization = tfe.organization.Organization(self, "test-organization", email="admin@company.com", name="my-org-name" ) - test = OauthClient(self, "test", + tfe_oauth_client_test = tfe.oauth_client.OauthClient(self, "test", api_url="https://api.github.com", http_url="https://github.com", oauth_token="oauth_token_id", - organization=test_organization, + organization=tfe_organization_test_organization, service_provider="github" ) - child = Workspace(self, "child", + tfe_workspace_child = tfe.workspace.Workspace(self, "child", name="child-ws", - organization=test_organization, + organization=tfe_organization_test_organization, queue_all_runs=False, vcs_repo=WorkspaceVcsRepo( branch="main", identifier="my-org-name/vcs-repository", - oauth_token_id=test.oauth_token_id + oauth_token_id=cdktf.Token.as_string(tfe_oauth_client_test.oauth_token_id) ) ) - parent = Workspace(self, "parent", + tfe_workspace_parent = tfe.workspace.Workspace(self, "parent", name="parent-ws", - organization=test_organization, + organization=tfe_organization_test_organization, queue_all_runs=False, vcs_repo=WorkspaceVcsRepo( branch="main", identifier="my-org-name/vcs-repository", - oauth_token_id=test.oauth_token_id + oauth_token_id=cdktf.Token.as_string(tfe_oauth_client_test.oauth_token_id) ) ) - ws_run_parent = WorkspaceRun(self, "ws_run_parent", + tfe_workspace_run_ws_run_parent = tfe.workspace_run.WorkspaceRun(self, "ws_run_parent", apply=WorkspaceRunApply( manual_confirm=False, retry_attempts=5, @@ -82,64 +76,58 @@ class MyConvertedCode(TerraformStack): retry_backoff_min=10, wait_for_run=True ), - workspace_id=parent.id + workspace_id=cdktf.Token.as_string(tfe_workspace_parent.id) ) - WorkspaceRun(self, "ws_run_child", + tfe.workspace_run.WorkspaceRun(self, "ws_run_child", apply=WorkspaceRunApply( manual_confirm=False, retry_attempts=5, retry_backoff_min=5 ), - depends_on=[ws_run_parent], + depends_on=[tfe_workspace_run_ws_run_parent], destroy=WorkspaceRunDestroy( manual_confirm=False, retry_attempts=3, retry_backoff_min=10, wait_for_run=True ), - workspace_id=child.id + workspace_id=cdktf.Token.as_string(tfe_workspace_child.id) ) ``` With manual confirmation: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.oauth_client import OauthClient -from imports.tfe.organization import Organization -from imports.tfe.workspace import Workspace -from imports.tfe.workspace_run import WorkspaceRun -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - test_organization = Organization(self, "test-organization", + tfe_organization_test_organization = tfe.organization.Organization(self, "test-organization", email="admin@company.com", name="my-org-name" ) - test = OauthClient(self, "test", + tfe_oauth_client_test = tfe.oauth_client.OauthClient(self, "test", api_url="https://api.github.com", http_url="https://github.com", oauth_token="oauth_token_id", - organization=test_organization, + organization=tfe_organization_test_organization, service_provider="github" ) - parent = Workspace(self, "parent", + tfe_workspace_parent = tfe.workspace.Workspace(self, "parent", name="parent-ws", - organization=test_organization, + organization=tfe_organization_test_organization, queue_all_runs=False, vcs_repo=WorkspaceVcsRepo( branch="main", identifier="my-org-name/vcs-repository", - oauth_token_id=test.oauth_token_id + oauth_token_id=cdktf.Token.as_string(tfe_oauth_client_test.oauth_token_id) ) ) - WorkspaceRun(self, "ws_run_parent", + tfe.workspace_run.WorkspaceRun(self, "ws_run_parent", apply=WorkspaceRunApply( manual_confirm=True ), @@ -147,49 +135,43 @@ class MyConvertedCode(TerraformStack): manual_confirm=True, wait_for_run=True ), - workspace_id=parent.id + workspace_id=cdktf.Token.as_string(tfe_workspace_parent.id) ) ``` With no retries: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.oauth_client import OauthClient -from imports.tfe.organization import Organization -from imports.tfe.workspace import Workspace -from imports.tfe.workspace_run import WorkspaceRun -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - test_organization = Organization(self, "test-organization", + tfe_organization_test_organization = tfe.organization.Organization(self, "test-organization", email="admin@company.com", name="my-org-name" ) - test = OauthClient(self, "test", + tfe_oauth_client_test = tfe.oauth_client.OauthClient(self, "test", api_url="https://api.github.com", http_url="https://github.com", oauth_token="oauth_token_id", - organization=test_organization, + organization=tfe_organization_test_organization, service_provider="github" ) - parent = Workspace(self, "parent", + tfe_workspace_parent = tfe.workspace.Workspace(self, "parent", name="parent-ws", - organization=test_organization, + organization=tfe_organization_test_organization, queue_all_runs=False, vcs_repo=WorkspaceVcsRepo( branch="main", identifier="my-org-name/vcs-repository", - oauth_token_id=test.oauth_token_id + oauth_token_id=cdktf.Token.as_string(tfe_oauth_client_test.oauth_token_id) ) ) - WorkspaceRun(self, "ws_run_parent", + tfe.workspace_run.WorkspaceRun(self, "ws_run_parent", apply=WorkspaceRunApply( manual_confirm=False, retry=False @@ -199,7 +181,7 @@ class MyConvertedCode(TerraformStack): retry=False, wait_for_run=True ), - workspace_id=parent.id + workspace_id=cdktf.Token.as_string(tfe_workspace_parent.id) ) ``` @@ -228,4 +210,4 @@ Both `apply` and `destroy` block supports: In addition to all arguments above, the following attributes are exported: * `id` - The ID of the run created by this resource. Note, if the resource was created without an `apply{}` configuration block, then this ID will not refer to a real run in Terraform Cloud. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/workspace_run_task.html.markdown b/website/docs/cdktf/python/r/workspace_run_task.html.markdown index b27948513..450d01813 100644 --- a/website/docs/cdktf/python/r/workspace_run_task.html.markdown +++ b/website/docs/cdktf/python/r/workspace_run_task.html.markdown @@ -17,23 +17,12 @@ The tfe_workspace_run_task resource associates, updates and removes [Workspace R Basic usage: -```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. -# See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.workspace_run_task import WorkspaceRunTask -class MyConvertedCode(TerraformStack): - def __init__(self, scope, name): - super().__init__(scope, name) - WorkspaceRunTask(self, "example", - enforcement_level="advisory", - task_id=tfe_organization_run_task.example.id, - workspace_id=tfe_workspace.example.id - ) +```hcl +resource "tfe_workspace_run_task" "example" { + workspace_id = resource.tfe_workspace.example.id + task_id = resource.tfe_organization_run_task.example.id + enforcement_level = "advisory" +} ``` ## Argument Reference @@ -58,4 +47,4 @@ import ID. For example: terraform import tfe_workspace_run_task.test my-org-name/workspace/task-name ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/workspace_settings.markdown b/website/docs/cdktf/python/r/workspace_settings.markdown index 3825237d4..b2982ff8d 100644 --- a/website/docs/cdktf/python/r/workspace_settings.markdown +++ b/website/docs/cdktf/python/r/workspace_settings.markdown @@ -16,105 +16,91 @@ Manages or reads execution mode and agent pool settings for a workspace. This al Basic usage: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.organization import Organization -from imports.tfe.workspace import Workspace -from imports.tfe.workspace_settings import WorkspaceSettings -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - test_organization = Organization(self, "test-organization", + tfe_organization_test_organization = tfe.organization.Organization(self, "test-organization", email="admin@company.com", name="my-org-name" ) - test = Workspace(self, "test", + tfe_workspace_test = tfe.workspace.Workspace(self, "test", name="my-workspace-name", - organization=test_organization.name + organization=cdktf.Token.as_string(tfe_organization_test_organization.name) ) - WorkspaceSettings(self, "test-settings", + tfe.workspace_settings.WorkspaceSettings(self, "test-settings", execution_mode="local", - workspace_id=test.id + workspace_id=cdktf.Token.as_string(tfe_workspace_test.id) ) ``` With `execution_mode` of `agent`: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import Token, TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.agent_pool import AgentPool -from imports.tfe.agent_pool_allowed_workspaces import AgentPoolAllowedWorkspaces -from imports.tfe.organization import Organization -from imports.tfe.workspace import Workspace -from imports.tfe.workspace_settings import WorkspaceSettings -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - test_organization = Organization(self, "test-organization", + tfe_organization_test_organization = tfe.organization.Organization(self, "test-organization", email="admin@company.com", name="my-org-name" ) - test = Workspace(self, "test", + tfe_workspace_test = tfe.workspace.Workspace(self, "test", name="my-workspace-name", - organization=test_organization.name + organization=cdktf.Token.as_string(tfe_organization_test_organization.name) ) - test_agent_pool = AgentPool(self, "test-agent-pool", + tfe_agent_pool_test_agent_pool = tfe.agent_pool.AgentPool(self, "test-agent-pool", name="my-agent-pool-name", - organization=test_organization.name + organization=cdktf.Token.as_string(tfe_organization_test_organization.name) ) - tfe_agent_pool_allowed_workspaces_test = AgentPoolAllowedWorkspaces(self, "test_3", - agent_pool_id=test_agent_pool.id, - allowed_workspace_ids=[test.id] + tfe_agent_pool_allowed_workspaces_test = + tfe.agent_pool_allowed_workspaces.AgentPoolAllowedWorkspaces(self, "test_3", + agent_pool_id=cdktf.Token.as_string(tfe_agent_pool_test_agent_pool.id), + allowed_workspace_ids=[cdktf.Token.as_string(tfe_workspace_test.id)] ) # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. tfe_agent_pool_allowed_workspaces_test.override_logical_id("test") - WorkspaceSettings(self, "test-settings", - agent_pool_id=Token.as_string(tfe_agent_pool_allowed_workspaces_test.agent_pool_id), + tfe.workspace_settings.WorkspaceSettings(self, "test-settings", + agent_pool_id=cdktf.Token.as_string(tfe_agent_pool_allowed_workspaces_test.agent_pool_id), execution_mode="agent", - workspace_id=test.id + workspace_id=cdktf.Token.as_string(tfe_workspace_test.id) ) ``` This resource may be used as a data source when no optional arguments are defined: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import Token, TerraformOutput, Op, Fn, TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.data_tfe_workspace import DataTfeWorkspace -from imports.tfe.workspace_settings import WorkspaceSettings -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - test = DataTfeWorkspace(self, "test", + data_tfe_workspace_test = tfe.data_tfe_workspace.DataTfeWorkspace(self, "test", name="my-workspace-name", organization="my-org-name" ) - tfe_workspace_settings_test = WorkspaceSettings(self, "test_1", - workspace_id=Token.as_string(test.id) + tfe_workspace_settings_test = + tfe.workspace_settings.WorkspaceSettings(self, "test_1", + workspace_id=cdktf.Token.as_string(data_tfe_workspace_test.id) ) # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. tfe_workspace_settings_test.override_logical_id("test") - TerraformOutput(self, "workspace-explicit-local-execution", - value=Fn.alltrue( - Token.as_any([ - Op.eq(tfe_workspace_settings_test.execution_mode, "local"), - Fn.lookup_nested(tfe_workspace_settings_test.overwrites, ["0", "\"execution_mode\"" + cdktf.TerraformOutput(self, "workspace-explicit-local-execution", + value=cdktf.Fn.alltrue( + cdktf.Token.as_any([ + cdktf.Op.eq(tfe_workspace_settings_test.execution_mode, "local"), + cdktf.property_access(tfe_workspace_settings_test.overwrites, ["0", "\"execution_mode\"" ]) ])) ) @@ -152,4 +138,4 @@ terraform import tfe_workspace_settings.test ws-CH5in3chf8RJjrVd terraform import tfe_workspace_settings.test my-org-name/my-wkspace-name ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/python/r/workspace_variable_set.html.markdown b/website/docs/cdktf/python/r/workspace_variable_set.html.markdown index 0d3f249f3..de6cad570 100644 --- a/website/docs/cdktf/python/r/workspace_variable_set.html.markdown +++ b/website/docs/cdktf/python/r/workspace_variable_set.html.markdown @@ -18,40 +18,35 @@ Adds and removes variable sets from a workspace Basic usage: ```python -# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -from constructs import Construct -from cdktf import Token, TerraformStack -# -# Provider bindings are generated by running `cdktf get`. +import constructs as constructs +import cdktf as cdktf +# Provider bindings are generated by running cdktf get. # See https://cdk.tf/provider-generation for more details. -# -from imports.tfe.organization import Organization -from imports.tfe.variable_set import VariableSet -from imports.tfe.workspace import Workspace -from imports.tfe.workspace_variable_set import WorkspaceVariableSet -class MyConvertedCode(TerraformStack): +import ...gen.providers.tfe as tfe +class MyConvertedCode(cdktf.TerraformStack): def __init__(self, scope, name): super().__init__(scope, name) - test = Organization(self, "test", + tfe_organization_test = tfe.organization.Organization(self, "test", email="admin@company.com", name="my-org-name" ) - tfe_variable_set_test = VariableSet(self, "test_1", + tfe_variable_set_test = tfe.variable_set.VariableSet(self, "test_1", description="Some description.", name="Test Varset", - organization=test.name + organization=cdktf.Token.as_string(tfe_organization_test.name) ) # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. tfe_variable_set_test.override_logical_id("test") - tfe_workspace_test = Workspace(self, "test_2", + tfe_workspace_test = tfe.workspace.Workspace(self, "test_2", name="my-workspace-name", - organization=test.name + organization=cdktf.Token.as_string(tfe_organization_test.name) ) # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. tfe_workspace_test.override_logical_id("test") - tfe_workspace_variable_set_test = WorkspaceVariableSet(self, "test_3", - variable_set_id=Token.as_string(tfe_variable_set_test.id), - workspace_id=Token.as_string(tfe_workspace_test.id) + tfe_workspace_variable_set_test = + tfe.workspace_variable_set.WorkspaceVariableSet(self, "test_3", + variable_set_id=cdktf.Token.as_string(tfe_variable_set_test.id), + workspace_id=cdktf.Token.as_string(tfe_workspace_test.id) ) # This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match. tfe_workspace_variable_set_test.override_logical_id("test") @@ -76,4 +71,4 @@ Workspace Variable Sets can be imported; use `// \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/agent_pool.html.markdown b/website/docs/cdktf/typescript/d/agent_pool.html.markdown index 679a0d95e..ffbc8593d 100644 --- a/website/docs/cdktf/typescript/d/agent_pool.html.markdown +++ b/website/docs/cdktf/typescript/d/agent_pool.html.markdown @@ -14,18 +14,15 @@ Use this data source to get information about an agent pool. ## Example Usage ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { DataTfeAgentPool } from "./.gen/providers/tfe/data-tfe-agent-pool"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - new DataTfeAgentPool(this, "test", { + new tfe.dataTfeAgentPool.DataTfeAgentPool(this, "test", { name: "my-agent-pool-name", organization: "my-org-name", }); @@ -48,4 +45,4 @@ In addition to all arguments above, the following attributes are exported: * `id` - The agent pool ID. * `organizationScoped` - Whether or not the agent pool can be used by all workspaces in the organization. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/github_installation.html.markdown b/website/docs/cdktf/typescript/d/github_installation.html.markdown index de4de22b5..7aefb2d43 100644 --- a/website/docs/cdktf/typescript/d/github_installation.html.markdown +++ b/website/docs/cdktf/typescript/d/github_installation.html.markdown @@ -16,20 +16,21 @@ Use this data source to get information about the Github App Installation. ### Finding a Github App Installation by its installation ID ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { DataTfeGithubAppInstallation } from "./.gen/providers/tfe/data-tfe-github-app-installation"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - new DataTfeGithubAppInstallation(this, "gha_installation", { - installationId: 12345678, - }); + new tfe.dataTfeGithubAppInstallation.DataTfeGithubAppInstallation( + this, + "gha_installation", + { + installationId: 12345678, + } + ); } } @@ -38,20 +39,21 @@ class MyConvertedCode extends TerraformStack { ### Finding a Github App Installation by its name ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { DataTfeGithubAppInstallation } from "./.gen/providers/tfe/data-tfe-github-app-installation"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - new DataTfeGithubAppInstallation(this, "gha_installation", { - name: "github_username_or_organization", - }); + new tfe.dataTfeGithubAppInstallation.DataTfeGithubAppInstallation( + this, + "gha_installation", + { + name: "github_username_or_organization", + } + ); } } @@ -61,7 +63,7 @@ class MyConvertedCode extends TerraformStack { The following arguments are supported. At least one of `name`, `installationId` must be set. -* `installationId` - (Optional) ID of the Github Installation. The installation ID can be found in the URL slug when visiting the installation's configuration page, e.g `https://github.com/settings/installations/12345678`. +* `installationId` - (Optional) ID of the Github Installation. The installation ID can be found in the URL slug when visiting the installation's configuration page, e.g `https://githubCom/settings/installations/12345678`. * `name` - (Optional) Name of the Github user or organization account that installed the app. Must be one of: `installationId` or `name`. @@ -72,4 +74,4 @@ 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 93428bb23..3aef65fe1 100644 --- a/website/docs/cdktf/typescript/d/ip_ranges.html.markdown +++ b/website/docs/cdktf/typescript/d/ip_ranges.html.markdown @@ -14,20 +14,21 @@ Use this data source to retrieve a list of Terraform Cloud's IP ranges. For more ## Example Usage ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformOutput, TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { DataTfeIpRanges } from "./.gen/providers/tfe/data-tfe-ip-ranges"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - const addresses = new DataTfeIpRanges(this, "addresses", {}); - new TerraformOutput(this, "notifications_ips", { - value: addresses.notifications, + const dataTfeIpRangesAddresses = new tfe.dataTfeIpRanges.DataTfeIpRanges( + this, + "addresses", + {} + ); + new cdktf.TerraformOutput(this, "notifications_ips", { + value: dataTfeIpRangesAddresses.notifications, }); } } @@ -48,4 +49,4 @@ The following attributes are exported: * `vcs` - The list of IP ranges in CIDR notation used for connecting to VCS providers. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/no_code_module.html.markdown b/website/docs/cdktf/typescript/d/no_code_module.html.markdown index e680d7bd9..e8a11ff3b 100644 --- a/website/docs/cdktf/typescript/d/no_code_module.html.markdown +++ b/website/docs/cdktf/typescript/d/no_code_module.html.markdown @@ -13,35 +13,15 @@ Use this data source to read the details of an existing No-Code-Allowed module. ## Example Usage -```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { Token, TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { DataTfeNoCodeModule } from "./.gen/providers/tfe/data-tfe-no-code-module"; -import { NoCodeModule } from "./.gen/providers/tfe/no-code-module"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { - super(scope, name); - const foobar = new NoCodeModule(this, "foobar", { - organization: Token.asString(tfeOrganizationFoobar.id), - registryModule: Token.asString(tfeRegistryModuleFoobar.id), - }); - const dataTfeNoCodeModuleFoobar = new DataTfeNoCodeModule( - this, - "foobar_1", - { - id: foobar.id, - } - ); - /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ - dataTfeNoCodeModuleFoobar.overrideLogicalId("foobar"); - } +```hcl +resource "tfe_no_code_module" "foobar" { + organization = tfe_organization.foobar.id + registry_module = tfe_registry_module.foobar.id } +data "tfe_no_code_module" "foobar" { + id = tfe_no_code_module.foobar.id +} ``` ## Argument Reference @@ -59,4 +39,4 @@ The following arguments are supported: * `versionPin` - Version number the no-code module is pinned to. * `enabled` - Indicates if this no-code module is currently enabled - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/oauth_client.html.markdown b/website/docs/cdktf/typescript/d/oauth_client.html.markdown index 30064e5c7..fd3cee123 100644 --- a/website/docs/cdktf/typescript/d/oauth_client.html.markdown +++ b/website/docs/cdktf/typescript/d/oauth_client.html.markdown @@ -16,18 +16,15 @@ Use this data source to get information about an OAuth client. ### Finding an OAuth client by its ID ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { DataTfeOauthClient } from "./.gen/providers/tfe/data-tfe-oauth-client"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - new DataTfeOauthClient(this, "client", { + new tfe.dataTfeOauthClient.DataTfeOauthClient(this, "client", { oauthClientId: "oc-XXXXXXX", }); } @@ -38,18 +35,15 @@ class MyConvertedCode extends TerraformStack { ### Finding an OAuth client by its name ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { DataTfeOauthClient } from "./.gen/providers/tfe/data-tfe-oauth-client"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - new DataTfeOauthClient(this, "client", { + new tfe.dataTfeOauthClient.DataTfeOauthClient(this, "client", { name: "my-oauth-client", organization: "my-org", }); @@ -61,18 +55,15 @@ class MyConvertedCode extends TerraformStack { ### Finding an OAuth client by its service provider ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { DataTfeOauthClient } from "./.gen/providers/tfe/data-tfe-oauth-client"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - new DataTfeOauthClient(this, "client", { + new tfe.dataTfeOauthClient.DataTfeOauthClient(this, "client", { organization: "my-org", serviceProvider: "github", }); @@ -92,9 +83,9 @@ be set. * `oauthClientId` - (Optional) ID of the OAuth client. * `organization` - (Optional) The name of the organization in which to search. * `serviceProvider` - (Optional) The API identifier of the OAuth service provider. If set, - must be one of: `ado_server`, `ado_services`, `bitbucket_hosted`, `bitbucket_server`, - `github`, `github_enterprise`, `gitlab_hosted`, `gitlab_community_edition`, or - `gitlab_enterprise_edition`. + must be one of: `adoServer`, `adoServices`, `bitbucketHosted`, `bitbucketServer`, + `github`, `githubEnterprise`, `gitlabHosted`, `gitlabCommunityEdition`, or + `gitlabEnterpriseEdition`. ## Attributes Reference @@ -111,4 +102,4 @@ In addition to all arguments above, the following attributes are exported: * `serviceProvider` - The API identifier of the OAuth service provider. * `serviceProviderDisplayName` - The display name of the OAuth service provider. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/organization.html.markdown b/website/docs/cdktf/typescript/d/organization.html.markdown index 7f2b0b3fc..2ceb1b703 100644 --- a/website/docs/cdktf/typescript/d/organization.html.markdown +++ b/website/docs/cdktf/typescript/d/organization.html.markdown @@ -14,18 +14,15 @@ Use this data source to get information about an organization. ## Example Usage ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { DataTfeOrganization } from "./.gen/providers/tfe/data-tfe-organization"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - new DataTfeOrganization(this, "foo", { + new tfe.dataTfeOrganization.DataTfeOrganization(this, "foo", { name: "organization-name", }); } @@ -45,11 +42,11 @@ In addition to all arguments above, the following attributes are exported: * `email` - Admin email address. * `externalId` - An identifier for the organization. * `assessmentsEnforced` - (Available only in Terraform Cloud) Whether to force health assessments (drift detection) on all eligible workspaces or allow workspaces to set thier own preferences. -* `collaboratorAuthPolicy` - Authentication policy (`password` or `two_factor_mandatory`). Defaults to `password`. +* `collaboratorAuthPolicy` - Authentication policy (`password` or `twoFactorMandatory`). Defaults to `password`. * `costEstimationEnabled` - Whether or not the cost estimation feature is enabled for all workspaces in the organization. Defaults to true. In a Terraform Cloud organization which does not have Teams & Governance features, this value is always false and cannot be changed. In Terraform Enterprise, Cost Estimation must also be enabled in Site Administration. * `ownersTeamSamlRoleId` - The name of the "owners" team. * `sendPassingStatusesForUntriggeredSpeculativePlans` - Whether or not to send VCS status updates for untriggered speculative plans. This can be useful if large numbers of untriggered workspaces are exhausting request limits for connected version control service providers like GitHub. Defaults to true. In Terraform Enterprise, this setting has no effect and cannot be changed but is also available in Site Administration. * `aggregatedCommitStatusEnabled` - Whether or not to enable Aggregated Status Checks. This can be useful for monorepo repositories with multiple workspaces receiving status checks for events such as a pull request. * `defaultProjectId` - ID of the organization's default project. All workspaces created without specifying a project ID are created in this project. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/organization_members.html.markdown b/website/docs/cdktf/typescript/d/organization_members.html.markdown index bc6075dcf..290c8836c 100644 --- a/website/docs/cdktf/typescript/d/organization_members.html.markdown +++ b/website/docs/cdktf/typescript/d/organization_members.html.markdown @@ -14,24 +14,20 @@ Use this data source to get information about members of an organization. ## Example Usage ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { DataTfeOrganizationMembers } from "./.gen/providers/tfe/data-tfe-organization-members"; -import { Organization } from "./.gen/providers/tfe/organization"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - const bar = new Organization(this, "bar", { + const tfeOrganizationBar = new tfe.organization.Organization(this, "bar", { email: "user@hashicorp.com", name: "org-bar", }); - new DataTfeOrganizationMembers(this, "foo", { - organization: bar.name, + new tfe.dataTfeOrganizationMembers.DataTfeOrganizationMembers(this, "foo", { + organization: cdktf.Token.asString(tfeOrganizationBar.name), }); } } @@ -55,4 +51,4 @@ The `member` block contains: * `userId` - The ID of the user. * `organizationMembershipId` - The ID of the organization membership. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/organization_membership.html.markdown b/website/docs/cdktf/typescript/d/organization_membership.html.markdown index 1f6b95439..a5a620a28 100644 --- a/website/docs/cdktf/typescript/d/organization_membership.html.markdown +++ b/website/docs/cdktf/typescript/d/organization_membership.html.markdown @@ -22,21 +22,22 @@ be updated manually. ### Fetch by email ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { DataTfeOrganizationMembership } from "./.gen/providers/tfe/data-tfe-organization-membership"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - new DataTfeOrganizationMembership(this, "test", { - email: "user@company.com", - organization: "my-org-name", - }); + new tfe.dataTfeOrganizationMembership.DataTfeOrganizationMembership( + this, + "test", + { + email: "user@company.com", + organization: "my-org-name", + } + ); } } @@ -45,21 +46,22 @@ class MyConvertedCode extends TerraformStack { ### Fetch by username ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { DataTfeOrganizationMembership } from "./.gen/providers/tfe/data-tfe-organization-membership"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - new DataTfeOrganizationMembership(this, "test", { - organization: "my-org-name", - username: "my-username", - }); + new tfe.dataTfeOrganizationMembership.DataTfeOrganizationMembership( + this, + "test", + { + organization: "my-org-name", + username: "my-username", + } + ); } } @@ -68,21 +70,22 @@ class MyConvertedCode extends TerraformStack { ### Fetch by organization membership ID ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { DataTfeOrganizationMembership } from "./.gen/providers/tfe/data-tfe-organization-membership"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - new DataTfeOrganizationMembership(this, "test", { - organization: "my-org-name", - organizationMembershipId: "ou-xxxxxxxxxxx", - }); + new tfe.dataTfeOrganizationMembership.DataTfeOrganizationMembership( + this, + "test", + { + organization: "my-org-name", + organizationMembershipId: "ou-xxxxxxxxxxx", + } + ); } } @@ -107,4 +110,4 @@ In addition to all arguments above, the following attributes are exported: * `userId` - The ID of the user associated with the organization membership. * `username` - The username of the user associated with the organization membership. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/organization_run_task.html.markdown b/website/docs/cdktf/typescript/d/organization_run_task.html.markdown index eb3ef17ab..1ee342ef1 100644 --- a/website/docs/cdktf/typescript/d/organization_run_task.html.markdown +++ b/website/docs/cdktf/typescript/d/organization_run_task.html.markdown @@ -16,21 +16,22 @@ Use this data source to get information about an [Organization Run tasks](https: ## Example Usage ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { DataTfeOrganizationRunTask } from "./.gen/providers/tfe/data-tfe-organization-run-task"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - new DataTfeOrganizationRunTask(this, "example", { - name: "task-name", - organization: "my-org-name", - }); + new tfe.dataTfeOrganizationRunTask.DataTfeOrganizationRunTask( + this, + "example", + { + name: "task-name", + organization: "my-org-name", + } + ); } } @@ -53,4 +54,4 @@ In addition to all arguments above, the following attributes are exported: * `id` - The ID of the task. * `url` - URL to send a task payload. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/organization_tags.html.markdown b/website/docs/cdktf/typescript/d/organization_tags.html.markdown index fa7618293..d608cc1e3 100644 --- a/website/docs/cdktf/typescript/d/organization_tags.html.markdown +++ b/website/docs/cdktf/typescript/d/organization_tags.html.markdown @@ -14,18 +14,15 @@ Use this data source to get information about the workspace tags for a given org ## Example Usage ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { DataTfeOrganizationTags } from "./.gen/providers/tfe/data-tfe-organization-tags"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - new DataTfeOrganizationTags(this, "example", { + new tfe.dataTfeOrganizationTags.DataTfeOrganizationTags(this, "example", { organization: "my-org-name", }); } @@ -49,5 +46,5 @@ The `tag` block contains: * `name` - The name of the workspace tag * `id` - The ID of the workspace tag -* `workspace_count` - The number of workspaces the tag is associate with - \ No newline at end of file +* `workspaceCount` - The number of workspaces the tag is associate with + \ 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 82fbe35c5..31989059d 100644 --- a/website/docs/cdktf/typescript/d/organizations.html.markdown +++ b/website/docs/cdktf/typescript/d/organizations.html.markdown @@ -14,18 +14,15 @@ Use this data source to get a list of Organizations and a map of their IDs. ## Example Usage ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { DataTfeOrganizations } from "./.gen/providers/tfe/data-tfe-organizations"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - new DataTfeOrganizations(this, "foo", {}); + new tfe.dataTfeOrganizations.DataTfeOrganizations(this, "foo", {}); } } @@ -47,4 +44,4 @@ The following attributes are exported: * `names` - A list of names of every organization. * `ids` - A map of organization names and their IDs. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/outputs.html.markdown b/website/docs/cdktf/typescript/d/outputs.html.markdown index 2586d6d5f..9b23d1a90 100644 --- a/website/docs/cdktf/typescript/d/outputs.html.markdown +++ b/website/docs/cdktf/typescript/d/outputs.html.markdown @@ -16,32 +16,37 @@ that are known to be non-sensitive. ## Example Usage -Using the `tfe_outputs` data source, the outputs `foo` and `bar` can be used as seen below: +Using the `tfeOutputs` data source, the outputs `foo` and `bar` can be used as seen below: -In the example below, assume we have outputs defined in a `my-org/my-workspace`: +In the example below, assume we have outputs defined in a `myOrg/myWorkspace`: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { Id } from "./.gen/providers/random/id"; -import { DataTfeOutputs } from "./.gen/providers/tfe/data-tfe-outputs"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as random from "./.gen/providers/random"; +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - const foo = new DataTfeOutputs(this, "foo", { - organization: "my-org", - workspace: "my-workspace", - }); - new Id(this, "vpc_id", { - byteLength: 8, - keepers: { - bar: foo.values.bar, - }, + /*The following providers are missing schema information and might need manual adjustments to synthesize correctly: random. + For a more precise conversion please use the --provider flag in convert.*/ + const dataTfeOutputsFoo = new tfe.dataTfeOutputs.DataTfeOutputs( + this, + "foo", + { + organization: "my-org", + workspace: "my-workspace", + } + ); + new random.id.Id(this, "vpc_id", { + byte_length: 8, + keepers: [ + { + bar: dataTfeOutputsFoo.values.bar, + }, + ], }); } } @@ -62,4 +67,4 @@ The following attributes are exported: * `values` - The current output values for the specified workspace. * `nonsensitiveValues` - The current non-sensitive output values for the specified workspace, this is a subset of all output values. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/policy_set.html.markdown b/website/docs/cdktf/typescript/d/policy_set.html.markdown index 519edc03a..85028b02e 100644 --- a/website/docs/cdktf/typescript/d/policy_set.html.markdown +++ b/website/docs/cdktf/typescript/d/policy_set.html.markdown @@ -16,18 +16,15 @@ This data source is used to retrieve a policy set defined in a specified organiz For workspace policies: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { DataTfePolicySet } from "./.gen/providers/tfe/data-tfe-policy-set"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - new DataTfePolicySet(this, "test", { + new tfe.dataTfePolicySet.DataTfePolicySet(this, "test", { name: "my-policy-set-name", organization: "my-org-name", }); @@ -72,4 +69,4 @@ The `vcsRepo` block contains: * `oauthTokenId` - OAuth token ID of the configured VCS connection. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/project.html.markdown b/website/docs/cdktf/typescript/d/project.html.markdown index a6059773f..5f30b68c5 100644 --- a/website/docs/cdktf/typescript/d/project.html.markdown +++ b/website/docs/cdktf/typescript/d/project.html.markdown @@ -14,18 +14,15 @@ Use this data source to get information about a project. ## Example Usage ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { DataTfeProject } from "./.gen/providers/tfe/data-tfe-project"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - new DataTfeProject(this, "foo", { + new tfe.dataTfeProject.DataTfeProject(this, "foo", { name: "my-project-name", organization: "my-org-name", }); @@ -47,4 +44,4 @@ In addition to all arguments above, the following attributes are exported: * `id` - The project ID. * `workspaceIds` - IDs of the workspaces that are associated with the project. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/registry_gpg_key.html.markdown b/website/docs/cdktf/typescript/d/registry_gpg_key.html.markdown index f85d500f4..265d57fbc 100644 --- a/website/docs/cdktf/typescript/d/registry_gpg_key.html.markdown +++ b/website/docs/cdktf/typescript/d/registry_gpg_key.html.markdown @@ -14,18 +14,15 @@ Use this data source to get information about a private registry GPG key. ## Example Usage ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { DataTfeRegistryGpgKey } from "./.gen/providers/tfe/data-tfe-registry-gpg-key"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - new DataTfeRegistryGpgKey(this, "example", { + new tfe.dataTfeRegistryGpgKey.DataTfeRegistryGpgKey(this, "example", { id: "13DFECCA3B58CE4A", organization: "my-org-name", }); @@ -47,4 +44,4 @@ The following arguments are supported: * `createdAt` - The time when the GPG key was created. * `updatedAt` - The time when the GPG key was last updated. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/registry_gpg_keys.html.markdown b/website/docs/cdktf/typescript/d/registry_gpg_keys.html.markdown index 67edda778..83d0e0d82 100644 --- a/website/docs/cdktf/typescript/d/registry_gpg_keys.html.markdown +++ b/website/docs/cdktf/typescript/d/registry_gpg_keys.html.markdown @@ -14,18 +14,15 @@ Use this data source to get information about all private registry GPG keys of a ## Example Usage ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { DataTfeRegistryGpgKeys } from "./.gen/providers/tfe/data-tfe-registry-gpg-keys"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - new DataTfeRegistryGpgKeys(this, "all", { + new tfe.dataTfeRegistryGpgKeys.DataTfeRegistryGpgKeys(this, "all", { organization: "my-org-name", }); } @@ -48,4 +45,4 @@ The following arguments are supported: * `createdAt` - The time when the GPG key was created. * `updatedAt` - The time when the GPG key was last updated. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/registry_provider.html.markdown b/website/docs/cdktf/typescript/d/registry_provider.html.markdown index 63cf354e6..d5bd8c2c2 100644 --- a/website/docs/cdktf/typescript/d/registry_provider.html.markdown +++ b/website/docs/cdktf/typescript/d/registry_provider.html.markdown @@ -16,18 +16,15 @@ Use this data source to get information about a public or private provider in th A private provider: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { RegistryProvider } from "./.gen/providers/tfe/"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - new RegistryProvider(this, "example", { + new tfe.registryProvider.RegistryProvider(this, "example", { name: "my-provider", organization: "my-org-name", }); @@ -39,22 +36,19 @@ class MyConvertedCode extends TerraformStack { A public provider: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { RegistryProvider } from "./.gen/providers/tfe/"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - new RegistryProvider(this, "example", { + new tfe.registryProvider.RegistryProvider(this, "example", { name: "aws", namespace: "hashicorp", organization: "my-org-name", - registry_name: "public", + registryName: "public", }); } } @@ -76,4 +70,4 @@ The following arguments are supported: * `createdAt` - The time when the provider was created. * `updatedAt` - The time when the provider was last updated. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/registry_providers.html.markdown b/website/docs/cdktf/typescript/d/registry_providers.html.markdown index 9750ab164..aaf6fb892 100644 --- a/website/docs/cdktf/typescript/d/registry_providers.html.markdown +++ b/website/docs/cdktf/typescript/d/registry_providers.html.markdown @@ -16,18 +16,15 @@ Use this data source to get information about public and private providers in th All providers: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { DataTfeRegistryProviders } from "./.gen/providers/tfe/"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - new DataTfeRegistryProviders(this, "all", { + new tfe.dataTfeRegistryProviders.DataTfeRegistryProviders(this, "all", { organization: "my-org-name", }); } @@ -38,20 +35,17 @@ class MyConvertedCode extends TerraformStack { All private providers: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { DataTfeRegistryProviders } from "./.gen/providers/tfe/"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - new DataTfeRegistryProviders(this, "private", { + new tfe.dataTfeRegistryProviders.DataTfeRegistryProviders(this, "private", { organization: "my-org-name", - registry_name: "private", + registryName: "private", }); } } @@ -61,21 +55,22 @@ class MyConvertedCode extends TerraformStack { Providers with "hashicorp" in their namespace or name: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { DataTfeRegistryProviders } from "./.gen/providers/tfe/"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - new DataTfeRegistryProviders(this, "hashicorp", { - organization: "my-org-name", - search: "hashicorp", - }); + new tfe.dataTfeRegistryProviders.DataTfeRegistryProviders( + this, + "hashicorp", + { + organization: "my-org-name", + search: "hashicorp", + } + ); } } @@ -100,4 +95,4 @@ The following arguments are supported: * `createdAt` - Time when the provider was created. * `updatedAt` - Time when the provider was last updated. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/saml_settings.html.markdown b/website/docs/cdktf/typescript/d/saml_settings.html.markdown index 0f2535cb1..eac1110a0 100644 --- a/website/docs/cdktf/typescript/d/saml_settings.html.markdown +++ b/website/docs/cdktf/typescript/d/saml_settings.html.markdown @@ -16,34 +16,21 @@ Use this data source to get information about SAML Settings. It applies only to Basic usage: -```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { DataTfeSamlSettings } from "./.gen/providers/tfe/data-tfe-saml-settings"; -import { TfeProvider } from "./.gen/providers/tfe/provider"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { - super(scope, name); - new TfeProvider(this, "tfe", { - hostname: hostname.stringValue, - token: token.stringValue, - }); - const admin = new TfeProvider(this, "tfe_1", { - alias: "admin", - hostname: hostname.stringValue, - token: adminToken.stringValue, - }); - new DataTfeSamlSettings(this, "foo", { - provider: admin, - }); - } +```hcl +provider "tfe" { + hostname = var.hostname + token = var.token } +provider "tfe" { + alias = "admin" + hostname = var.hostname + token = var.admin_token +} + +data "tfe_saml_settings" "foo" { + provider = tfe.admin +} ``` ## Argument Reference @@ -77,4 +64,4 @@ The following attributes are exported: * `signatureSigningMethod` - Signature Signing Method. * `signatureDigestMethod` - Signature Digest Method. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/slug.html.markdown b/website/docs/cdktf/typescript/d/slug.html.markdown index 84a8bf12d..af7210b06 100644 --- a/website/docs/cdktf/typescript/d/slug.html.markdown +++ b/website/docs/cdktf/typescript/d/slug.html.markdown @@ -13,7 +13,7 @@ intended to be uploaded to Terraform Cloud/Enterprise, in lieu of those files be sourced from a configured VCS provider. A unique checksum is generated for the specified local directory, which allows -resources such as `tfe_policy_set` track the files and upload a new gzip compressed +resources such as `tfePolicySet` track the files and upload a new gzip compressed tar file containing configuration files (a Terraform "slug") when those files change. ## Example Usage @@ -21,25 +21,21 @@ tar file containing configuration files (a Terraform "slug") when those files ch Tracking a local directory to upload the Sentinel configuration and policies: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { Token, TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { DataTfeSlug } from "./.gen/providers/tfe/data-tfe-slug"; -import { PolicySet } from "./.gen/providers/tfe/policy-set"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - const test = new DataTfeSlug(this, "test", { + const dataTfeSlugTest = new tfe.dataTfeSlug.DataTfeSlug(this, "test", { sourcePath: "policies/my-policy-set", }); - const tfePolicySetTest = new PolicySet(this, "test_1", { + const tfePolicySetTest = new tfe.policySet.PolicySet(this, "test_1", { name: "my-policy-set", organization: "my-org-name", - slug: Token.asStringMap(test), + slug: cdktf.Token.asStringMap(dataTfeSlugTest), }); /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ tfePolicySetTest.overrideLogicalId("test"); @@ -54,4 +50,4 @@ The following arguments are supported: * `sourcePath` - (Required) The path to the directory where the files are located. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/ssh_key.html.markdown b/website/docs/cdktf/typescript/d/ssh_key.html.markdown index 0a783fac4..0d701abdd 100644 --- a/website/docs/cdktf/typescript/d/ssh_key.html.markdown +++ b/website/docs/cdktf/typescript/d/ssh_key.html.markdown @@ -14,18 +14,15 @@ Use this data source to get information about a SSH key. ## Example Usage ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { DataTfeSshKey } from "./.gen/providers/tfe/data-tfe-ssh-key"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - new DataTfeSshKey(this, "test", { + new tfe.dataTfeSshKey.DataTfeSshKey(this, "test", { name: "my-ssh-key-name", organization: "my-org-name", }); @@ -47,4 +44,4 @@ In addition to all arguments above, the following attributes are exported: * `id` - The ID of the SSH key. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/team.html.markdown b/website/docs/cdktf/typescript/d/team.html.markdown index 95b80260f..51606205e 100644 --- a/website/docs/cdktf/typescript/d/team.html.markdown +++ b/website/docs/cdktf/typescript/d/team.html.markdown @@ -14,18 +14,15 @@ Use this data source to get information about a team. ## Example Usage ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { DataTfeTeam } from "./.gen/providers/tfe/data-tfe-team"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - new DataTfeTeam(this, "test", { + new tfe.dataTfeTeam.DataTfeTeam(this, "test", { name: "my-team-name", organization: "my-org-name", }); @@ -48,4 +45,4 @@ In addition to all arguments above, the following attributes are exported: * `id` - The ID of the team. * `ssoTeamId` - (Optional) The [SSO Team ID](https://developer.hashicorp.com/terraform/cloud-docs/users-teams-organizations/single-sign-on#team-names-and-sso-team-ids) of the team, if it has been defined - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/team_access.html.markdown b/website/docs/cdktf/typescript/d/team_access.html.markdown index e74140956..8cd9aea95 100644 --- a/website/docs/cdktf/typescript/d/team_access.html.markdown +++ b/website/docs/cdktf/typescript/d/team_access.html.markdown @@ -14,18 +14,15 @@ Use this data source to get information about team permissions for a workspace. ## Example Usage ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { DataTfeTeamAccess } from "./.gen/providers/tfe/data-tfe-team-access"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - new DataTfeTeamAccess(this, "test", { + new tfe.dataTfeTeamAccess.DataTfeTeamAccess(this, "test", { teamId: "my-team-id", workspaceId: "my-workspace-id", }); @@ -53,9 +50,9 @@ The `permissions` block contains: * `runs` - The permission granted to runs. Valid values are `read`, `plan`, or `apply` * `variables` - The permissions granted to variables. Valid values are `none`, `read`, or `write` -* `stateVersions` - The permissions granted to state versions. Valid values are `none`, `read-outputs`, `read`, or `write` +* `stateVersions` - The permissions granted to state versions. Valid values are `none`, `readOutputs`, `read`, or `write` * `sentinelMocks` - The permissions granted to Sentinel mocks. Valid values are `none` or `read` * `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 b53b01c7b..65ed3def9 100644 --- a/website/docs/cdktf/typescript/d/team_project_access.html.markdown +++ b/website/docs/cdktf/typescript/d/team_project_access.html.markdown @@ -14,18 +14,15 @@ Use this data source to get information about team permissions for a project. ## Example Usage ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { DataTfeTeamProjectAccess } from "./.gen/providers/tfe/data-tfe-team-project-access"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - new DataTfeTeamProjectAccess(this, "test", { + new tfe.dataTfeTeamProjectAccess.DataTfeTeamProjectAccess(this, "test", { projectId: "my-project-id", teamId: "my-team-id", }); @@ -48,4 +45,4 @@ In addition to all arguments above, the following attributes are exported: * `id` The team project access ID. * `access` - The type of access granted to the team on the project. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/teams.html.markdown b/website/docs/cdktf/typescript/d/teams.html.markdown index a882c09e3..d19832163 100644 --- a/website/docs/cdktf/typescript/d/teams.html.markdown +++ b/website/docs/cdktf/typescript/d/teams.html.markdown @@ -14,18 +14,15 @@ Use this data source to get a list of Teams in an Organization and a map of thei ## Example Usage ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { DataTfeTeams } from "./.gen/providers/tfe/data-tfe-teams"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - new DataTfeTeams(this, "foo", { + new tfe.dataTfeTeams.DataTfeTeams(this, "foo", { organization: "my-org-name", }); } @@ -45,4 +42,4 @@ In addition to all arguments above, the following attributes are exported: * `id` - Name of the organization. * `names` - A list of team names in an organization. * `ids` - A map of team names in an organization and their IDs. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/variable_set.html.markdown b/website/docs/cdktf/typescript/d/variable_set.html.markdown index 3ff81d38e..c5bab02a4 100644 --- a/website/docs/cdktf/typescript/d/variable_set.html.markdown +++ b/website/docs/cdktf/typescript/d/variable_set.html.markdown @@ -16,18 +16,15 @@ This data source is used to retrieve a named variable set For workspace variables: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { DataTfeVariableSet } from "./.gen/providers/tfe/data-tfe-variable-set"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - new DataTfeVariableSet(this, "test", { + new tfe.dataTfeVariableSet.DataTfeVariableSet(this, "test", { name: "my-variable-set-name", organization: "my-org-name", }); @@ -55,4 +52,4 @@ The following arguments are supported: * `variableIds` - IDs of the variables attached to the variable set. * `projectIds` - IDs of the projects that use the variable set. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/variables.html.markdown b/website/docs/cdktf/typescript/d/variables.html.markdown index 09ecfabe9..93b932f9d 100644 --- a/website/docs/cdktf/typescript/d/variables.html.markdown +++ b/website/docs/cdktf/typescript/d/variables.html.markdown @@ -16,25 +16,29 @@ This data source is used to retrieve all variables defined in a specified worksp For workspace variables: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { Token, TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { DataTfeVariables } from "./.gen/providers/tfe/data-tfe-variables"; -import { DataTfeWorkspace } from "./.gen/providers/tfe/data-tfe-workspace"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - const test = new DataTfeWorkspace(this, "test", { - name: "my-workspace-name", - organization: "my-org-name", - }); - const dataTfeVariablesTest = new DataTfeVariables(this, "test_1", { - workspaceId: Token.asString(test.id), - }); + const dataTfeWorkspaceTest = new tfe.dataTfeWorkspace.DataTfeWorkspace( + this, + "test", + { + name: "my-workspace-name", + organization: "my-org-name", + } + ); + const dataTfeVariablesTest = new tfe.dataTfeVariables.DataTfeVariables( + this, + "test_1", + { + workspaceId: cdktf.Token.asString(dataTfeWorkspaceTest.id), + } + ); /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ dataTfeVariablesTest.overrideLogicalId("test"); } @@ -45,25 +49,26 @@ class MyConvertedCode extends TerraformStack { For variable set variables: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { Token, TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { DataTfeVariableSet } from "./.gen/providers/tfe/data-tfe-variable-set"; -import { DataTfeVariables } from "./.gen/providers/tfe/data-tfe-variables"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - const test = new DataTfeVariableSet(this, "test", { - name: "my-variable-set-name", - organization: "my-org-name", - }); - const dataTfeVariablesTest = new DataTfeVariables(this, "test_1", { - variableSetId: Token.asString(test.id), - }); + const dataTfeVariableSetTest = + new tfe.dataTfeVariableSet.DataTfeVariableSet(this, "test", { + name: "my-variable-set-name", + organization: "my-org-name", + }); + const dataTfeVariablesTest = new tfe.dataTfeVariables.DataTfeVariables( + this, + "test_1", + { + variableSetId: cdktf.Token.asString(dataTfeVariableSetTest.id), + } + ); /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ dataTfeVariablesTest.overrideLogicalId("test"); } @@ -93,4 +98,4 @@ The `variables, terraform and env` blocks contains: * `sensitive` - If the variable is marked as sensitive or not * `hcl` - If the variable is marked as HCL or not - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/workspace.html.markdown b/website/docs/cdktf/typescript/d/workspace.html.markdown index 5a491e8d7..99a8e55a8 100644 --- a/website/docs/cdktf/typescript/d/workspace.html.markdown +++ b/website/docs/cdktf/typescript/d/workspace.html.markdown @@ -16,18 +16,15 @@ Use this data source to get information about a workspace. ## Example Usage ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { DataTfeWorkspace } from "./.gen/providers/tfe/data-tfe-workspace"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - new DataTfeWorkspace(this, "test", { + new tfe.dataTfeWorkspace.DataTfeWorkspace(this, "test", { name: "my-workspace-name", organization: "my-org-name", }); @@ -76,7 +73,7 @@ In addition to all arguments above, the following attributes are exported: * `triggerPatterns` - List of [glob patterns](https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings/vcs#glob-patterns-for-automatic-run-triggering) that describe the files Terraform Cloud monitors for changes. Trigger patterns are always appended to the root directory of the repository. * `vcsRepo` - Settings for the workspace's VCS repository. * `workingDirectory` - A relative path that Terraform will execute within. -* `executionMode` - Indicates the [execution mode](https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings#execution-mode) of the workspace. **Note:** This value might be derived from an organization-level default or set on the workspace itself; see the [`tfe_workspace_settings` resource](tfe_workspace_settings) for details. +* `executionMode` - Indicates the [execution mode](https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings#execution-mode) of the workspace. **Note:** This value might be derived from an organization-level default or set on the workspace itself; see the [`tfeWorkspaceSettings` resource](tfe_workspace_settings) for details. * `htmlUrl` - The URL to the browsable HTML overview of the workspace @@ -91,4 +88,4 @@ The `vcsRepo` block contains: * `oauthTokenId` - OAuth token ID of the configured VCS connection. * `tagsRegex` - A regular expression used to trigger a Workspace run for matching Git tags. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/workspace_ids.html.markdown b/website/docs/cdktf/typescript/d/workspace_ids.html.markdown index 31628da96..3f83d01b9 100644 --- a/website/docs/cdktf/typescript/d/workspace_ids.html.markdown +++ b/website/docs/cdktf/typescript/d/workspace_ids.html.markdown @@ -14,30 +14,27 @@ Use this data source to get a map of workspace IDs. ## Example Usage ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { DataTfeWorkspaceIds } from "./.gen/providers/tfe/data-tfe-workspace-ids"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - new DataTfeWorkspaceIds(this, "all", { + new tfe.dataTfeWorkspaceIds.DataTfeWorkspaceIds(this, "all", { names: ["*"], organization: "my-org-name", }); - new DataTfeWorkspaceIds(this, "app-frontend", { + new tfe.dataTfeWorkspaceIds.DataTfeWorkspaceIds(this, "app-frontend", { names: ["app-frontend-prod", "app-frontend-dev1", "app-frontend-staging"], organization: "my-org-name", }); - new DataTfeWorkspaceIds(this, "prod-apps", { + new tfe.dataTfeWorkspaceIds.DataTfeWorkspaceIds(this, "prod-apps", { organization: "my-org-name", tagNames: ["prod", "app", "aws"], }); - new DataTfeWorkspaceIds(this, "prod-only", { + new tfe.dataTfeWorkspaceIds.DataTfeWorkspaceIds(this, "prod-only", { excludeTags: ["app"], organization: "my-org-name", tagNames: ["prod"], @@ -55,7 +52,7 @@ The following arguments are supported. At least one of `names` or `tagNames` mus match a valid workspace will be omitted from the results, but are not an error. To select _all_ workspaces for an organization, provide a list with a single - asterisk, like `["*"]`. The asterisk also supports partial matching on prefix and/or suffix, like `[*-prod]`, `[test-*]`, `[*dev*]`. + asterisk, like `["*"]`. The asterisk also supports partial matching on prefix and/or suffix, like `[*Prod]`, `[test-*]`, `[*dev*]`. * `tagNames` - (Optional) A list of tag names to search for. * `excludeTags` - (Optional) A list of tag names to exclude when searching. * `organization` - (Required) Name of the organization. @@ -67,4 +64,4 @@ In addition to all arguments above, the following attributes are exported: * `fullNames` - A map of workspace names and their full names, which look like `/`. * `ids` - A map of workspace names and their opaque, immutable IDs, which look like `ws-`. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/d/workspace_run_task.html.markdown b/website/docs/cdktf/typescript/d/workspace_run_task.html.markdown index 5d1a71a5b..7aa26820c 100644 --- a/website/docs/cdktf/typescript/d/workspace_run_task.html.markdown +++ b/website/docs/cdktf/typescript/d/workspace_run_task.html.markdown @@ -16,18 +16,15 @@ Use this data source to get information about a [Workspace Run tasks](https://de ## Example Usage ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { DataTfeWorkspaceRunTask } from "./.gen/providers/tfe/data-tfe-workspace-run-task"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - new DataTfeWorkspaceRunTask(this, "foobar", { + new tfe.dataTfeWorkspaceRunTask.DataTfeWorkspaceRunTask(this, "foobar", { taskId: "task-def456", workspaceId: "ws-abc123", }); @@ -51,4 +48,4 @@ In addition to all arguments above, the following attributes are exported: * `id` - The ID of the Workspace Run task. * `stage` - Which stage the task will run in. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/index.html.markdown b/website/docs/cdktf/typescript/index.html.markdown index 13c0b5f4f..f5fc97051 100644 --- a/website/docs/cdktf/typescript/index.html.markdown +++ b/website/docs/cdktf/typescript/index.html.markdown @@ -43,8 +43,8 @@ There are several ways to provide the required token: - **Set the `token` argument in the provider configuration.** You can set the `token` argument in the provider configuration. Use an input variable for the token. -- **Set the `TFE_TOKEN` environment variable:** The provider can read the -`TFE_TOKEN` environment variable and the token stored there to authenticate. +- **Set the `tfeToken` environment variable:** The provider can read the +`tfeToken` environment variable and the token stored there to authenticate. When configuring the input variable for either of these options, mark them as sensitive. @@ -62,9 +62,9 @@ Terraform on your local command line, it can automatically discover the credenti [`terraform login`](https://developer.hashicorp.com/terraform/cli/commands/login). - **Set a `credentials` block in your CLI config file (.terraformrc):** See the [CLI Configuration File documentation](/docs/commands/cli-config.html). -If you used the `TF_CLI_CONFIG_FILE` environment variable to specify a +If you used the `tfCliConfigFile` environment variable to specify a non-default location for .terraformrc, the provider will also use that location. -Using a `credentials_helper` block is not supported. +Using a `credentialsHelper` block is not supported. ## Versions @@ -73,26 +73,24 @@ For production use, you should constrain the acceptable provider versions via configuration, to ensure that new versions with breaking changes will not be automatically installed by `terraform init` in the future: -```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { - super(scope, name); +```hcl +terraform { + required_providers { + tfe = { + version = "~> 0.53.0" + } } } - ``` As this provider is still at version zero, you should constrain the acceptable provider versions on the minor version. -The above snippet using `required_providers` is for Terraform 0.13+; if you are using Terraform version 0.12, you can constrain by adding the version constraint to the `provider` block instead: +The above snippet using `requiredProviders` is for Terraform 0.13+; if you are using Terraform version 0.12, you can constrain by adding the version constraint to the `provider` block instead: ```hcl provider "tfe" { - version = "~> 0.52.0" + version = "~> 0.53.0" ... } ``` @@ -101,34 +99,17 @@ For more information on provider installation and constraining provider versions ## Example Usage -```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { Organization } from "./.gen/providers/tfe/organization"; -import { TfeProvider } from "./.gen/providers/tfe/provider"; -interface MyConfig { - email: any; - name: any; -} -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string, config: MyConfig) { - super(scope, name); - new TfeProvider(this, "tfe", { - hostname: hostname.stringValue, - token: token.stringValue, - }); - new Organization(this, "org", { - email: config.email, - name: config.name, - }); - } +```hcl +provider "tfe" { + hostname = var.hostname # Optional, defaults to Terraform Cloud `appTerraformIo` + token = var.token + version = "~> 0.53.0" } +# Create an organization +resource "tfe_organization" "org" { + # ... +} ``` ## Argument Reference @@ -137,15 +118,15 @@ 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 - `TFE_HOSTNAME` environment variable. + `tfeHostname` environment variable. * `token` - (Optional) The token used to authenticate with Terraform Cloud/Enterprise. See [Authentication](#authentication) above for more information. * `sslSkipVerify` - (Optional) Whether or not to skip certificate verifications. - Defaults to `false`. Can be overridden setting the `TFE_SSL_SKIP_VERIFY` + Defaults to `false`. Can be overridden setting the `tfeSslSkipVerify` environment variable. * `organization` - (Optional) The default organization that resources should belong to. If provided, it's usually possible to omit resource-specific `organization` arguments. Ensure that the organization already exists prior to using this argument. - This can also be specified using the `TFE_ORGANIZATION` environment variable. + This can also be specified using the `tfeOrganization` environment variable. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/admin_organization_settings.markdown b/website/docs/cdktf/typescript/r/admin_organization_settings.markdown index fbbaca18a..1aaced2ae 100644 --- a/website/docs/cdktf/typescript/r/admin_organization_settings.markdown +++ b/website/docs/cdktf/typescript/r/admin_organization_settings.markdown @@ -17,48 +17,39 @@ incorporating an admin token in your provider config. Basic usage: -```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { AdminOrganizationSettings } from "./.gen/providers/tfe/admin-organization-settings"; -import { Organization } from "./.gen/providers/tfe/organization"; -import { TfeProvider } from "./.gen/providers/tfe/provider"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { - super(scope, name); - new TfeProvider(this, "tfe", { - hostname: hostname.stringValue, - token: token.stringValue, - }); - const admin = new TfeProvider(this, "tfe_1", { - alias: "admin", - hostname: hostname.stringValue, - token: adminToken.stringValue, - }); - const aModuleConsumer = new Organization(this, "a-module-consumer", { - email: "admin@company.com", - name: "my-other-org", - }); - const aModuleProducer = new Organization(this, "a-module-producer", { - email: "admin@company.com", - name: "my-org", - }); - new AdminOrganizationSettings(this, "test-settings", { - accessBetaTools: false, - globalModuleSharing: false, - moduleSharingConsumerOrganizations: [aModuleConsumer.name], - organization: aModuleProducer.name, - provider: "${tfe.admin}", - workspaceLimit: 15, - }); - } +```hcl + +provider "tfe" { + hostname = var.hostname + token = var.token +} + +provider "tfe" { + alias = "admin" + hostname = var.hostname + token = var.admin_token +} + +resource "tfe_organization" "a-module-producer" { + name = "my-org" + email = "admin@company.com" +} + +resource "tfe_organization" "a-module-consumer" { + name = "my-other-org" + email = "admin@company.com" } +resource "tfe_admin_organization_settings" "test-settings" { + provider = tfe.admin + organization = tfe_organization.a-module-producer.name + workspace_limit = 15 + access_beta_tools = false + global_module_sharing = false + module_sharing_consumer_organizations = [ + tfe_organization.a-module-consumer.name + ] +} ``` ## Argument Reference @@ -75,4 +66,4 @@ The following arguments are supported: * `ssoEnabled` - True if SSO is enabled in this organization - \ 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 1e9d0c0f2..40f488f24 100644 --- a/website/docs/cdktf/typescript/r/agent_pool.html.markdown +++ b/website/docs/cdktf/typescript/r/agent_pool.html.markdown @@ -18,25 +18,25 @@ pools to run remote operations with isolated, private, or on-premises infrastruc Basic usage: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { AgentPool } from "./.gen/providers/tfe/agent-pool"; -import { Organization } from "./.gen/providers/tfe/organization"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - const testOrganization = new Organization(this, "test-organization", { - email: "admin@company.com", - name: "my-org-name", - }); - new AgentPool(this, "test-agent-pool", { + const tfeOrganizationTestOrganization = new tfe.organization.Organization( + this, + "test-organization", + { + email: "admin@company.com", + name: "my-org-name", + } + ); + new tfe.agentPool.AgentPool(this, "test-agent-pool", { name: "my-agent-pool-name", - organization: testOrganization.name, + organization: cdktf.Token.asString(tfeOrganizationTestOrganization.name), organizationScoped: true, }); } @@ -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 f532fa426..78e686b1f 100644 --- a/website/docs/cdktf/typescript/r/agent_pool_allowed_workspaces.html.markdown +++ b/website/docs/cdktf/typescript/r/agent_pool_allowed_workspaces.html.markdown @@ -17,53 +17,39 @@ for Business account. ## Example Usage -In this example, the agent pool and workspace are connected through other resources that manage the agent pool permissions as well as the workspace execution mode. Notice that the `tfe_workspace_settings` uses the agent pool reference found in `tfe_agent_pool_allowed_workspaces` in order to create the permission to use the agent pool before assigning it. - -```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { Fn, Token, TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { AgentPool } from "./.gen/providers/tfe/agent-pool"; -import { AgentPoolAllowedWorkspaces } from "./.gen/providers/tfe/agent-pool-allowed-workspaces"; -import { Organization } from "./.gen/providers/tfe/organization"; -import { Workspace } from "./.gen/providers/tfe/workspace"; -import { WorkspaceSettings } from "./.gen/providers/tfe/workspace-settings"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { - super(scope, name); - const testOrganization = new Organization(this, "test-organization", { - email: "admin@company.com", - name: "my-org-name", - }); - const testWorkspace = new Workspace(this, "test-workspace", { - name: "my-workspace-name", - organization: testOrganization.name, - }); - const testAgentPool = new AgentPool(this, "test-agent-pool", { - name: "my-agent-pool-name", - organization: testOrganization.name, - organizationScoped: false, - }); - const allowed = new AgentPoolAllowedWorkspaces(this, "allowed", { - agentPoolId: testAgentPool.id, - allowedWorkspaceIds: Token.asList( - "${[ for key, value in ${" + - Fn.lookupNested(test, ["*", "id"]) + - "} : value]}" - ), - }); - new WorkspaceSettings(this, "test-workspace-settings", { - agentPoolId: allowed.id, - executionMode: "agent", - workspaceId: testWorkspace.id, - }); - } +In this example, the agent pool and workspace are connected through other resources that manage the agent pool permissions as well as the workspace execution mode. Notice that the `tfeWorkspaceSettings` uses the agent pool reference found in `tfeAgentPoolAllowedWorkspaces` in order to create the permission to use the agent pool before assigning it. + +```hcl +resource "tfe_organization" "test-organization" { + name = "my-org-name" + email = "admin@company.com" +} + +// Ensure workspace and agent pool are create first +resource "tfe_workspace" "test-workspace" { + name = "my-workspace-name" + organization = tfe_organization.test-organization.name +} + +resource "tfe_agent_pool" "test-agent-pool" { + name = "my-agent-pool-name" + organization = tfe_organization.test-organization.name + organization_scoped = false +} + +// Ensure permissions are assigned second +resource "tfe_agent_pool_allowed_workspaces" "allowed" { + agent_pool_id = tfe_agent_pool.test-agent-pool.id + allowed_workspace_ids = [for key, value in tfe_workspace.test.*.id : value] } +// Lastly, ensure the workspace agent execution is assigned last by +// referencing allowed_workspaces +resource "tfe_workspace_settings" "test-workspace-settings" { + workspace_id = tfe_workspace.test-workspace.id + execution_mode = "agent" + agent_pool_id = tfe_agent_pool_allowed_workspaces.allowed.id +} ``` ## Argument Reference @@ -82,4 +68,4 @@ A resource can be imported; use `` as the import ID. For example: terraform import tfe_agent_pool_allowed_workspaces.foobar apool-rW0KoLSlnuNb5adB ``` - \ No newline at end of file + \ 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 a9b84db50..e37e6da4d 100644 --- a/website/docs/cdktf/typescript/r/agent_token.html.markdown +++ b/website/docs/cdktf/typescript/r/agent_token.html.markdown @@ -17,29 +17,32 @@ These tokens allow agents to communicate securely with Terraform Cloud. Basic usage: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { AgentPool } from "./.gen/providers/tfe/agent-pool"; -import { AgentToken } from "./.gen/providers/tfe/agent-token"; -import { Organization } from "./.gen/providers/tfe/organization"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - const testOrganization = new Organization(this, "test-organization", { - email: "admin@company.com", - name: "my-org-name", - }); - const testAgentPool = new AgentPool(this, "test-agent-pool", { - name: "my-agent-pool-name", - organization: testOrganization.id, - }); - new AgentToken(this, "test-agent-token", { - agentPoolId: testAgentPool.id, + const tfeOrganizationTestOrganization = new tfe.organization.Organization( + this, + "test-organization", + { + email: "admin@company.com", + name: "my-org-name", + } + ); + const tfeAgentPoolTestAgentPool = new tfe.agentPool.AgentPool( + this, + "test-agent-pool", + { + name: "my-agent-pool-name", + organization: cdktf.Token.asString(tfeOrganizationTestOrganization.id), + } + ); + new tfe.agentToken.AgentToken(this, "test-agent-token", { + agentPoolId: cdktf.Token.asString(tfeAgentPoolTestAgentPool.id), description: "my-agent-token-name", }); } @@ -60,4 +63,4 @@ The following arguments are supported: * `description` - The description of agent token. * `token` - The generated token. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/no_code_module.html.markdown b/website/docs/cdktf/typescript/r/no_code_module.html.markdown index 0e9040064..f740a6434 100644 --- a/website/docs/cdktf/typescript/r/no_code_module.html.markdown +++ b/website/docs/cdktf/typescript/r/no_code_module.html.markdown @@ -16,34 +16,41 @@ Creates, updates and destroys no-code module for registry modules. Basic usage: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { Token, TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { NoCodeModule } from "./.gen/providers/tfe/no-code-module"; -import { Organization } from "./.gen/providers/tfe/organization"; -import { RegistryModule } from "./.gen/providers/tfe/registry-module"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - const foobar = new Organization(this, "foobar", { - email: "admin@company.com", - name: "my-org-name", - }); - const tfeRegistryModuleFoobar = new RegistryModule(this, "foobar_1", { - moduleProvider: "my_provider", - name: "test_module", - organization: foobar.id, - }); + const tfeOrganizationFoobar = new tfe.organization.Organization( + this, + "foobar", + { + email: "admin@company.com", + name: "my-org-name", + } + ); + const tfeRegistryModuleFoobar = new tfe.registryModule.RegistryModule( + this, + "foobar_1", + { + moduleProvider: "my_provider", + name: "test_module", + organization: cdktf.Token.asString(tfeOrganizationFoobar.id), + } + ); /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ tfeRegistryModuleFoobar.overrideLogicalId("foobar"); - const tfeNoCodeModuleFoobar = new NoCodeModule(this, "foobar_2", { - organization: foobar.id, - registryModule: Token.asString(tfeRegistryModuleFoobar.id), - }); + const tfeNoCodeModuleFoobar = new tfe.noCodeModule.NoCodeModule( + this, + "foobar_2", + { + organization: cdktf.Token.asString(tfeOrganizationFoobar.id), + registryModule: cdktf.Token.asString(tfeRegistryModuleFoobar.id), + } + ); /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ tfeNoCodeModuleFoobar.overrideLogicalId("foobar"); } @@ -54,46 +61,53 @@ class MyConvertedCode extends TerraformStack { Creating a no-code module with variable options: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { Token, TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { NoCodeModule } from "./.gen/providers/tfe/no-code-module"; -import { Organization } from "./.gen/providers/tfe/organization"; -import { RegistryModule } from "./.gen/providers/tfe/registry-module"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - const foobar = new Organization(this, "foobar", { - email: "admin@company.com", - name: "my-org-name", - }); - const tfeRegistryModuleFoobar = new RegistryModule(this, "foobar_1", { - moduleProvider: "my_provider", - name: "test_module", - organization: foobar.id, - }); + const tfeOrganizationFoobar = new tfe.organization.Organization( + this, + "foobar", + { + email: "admin@company.com", + name: "my-org-name", + } + ); + const tfeRegistryModuleFoobar = new tfe.registryModule.RegistryModule( + this, + "foobar_1", + { + moduleProvider: "my_provider", + name: "test_module", + organization: cdktf.Token.asString(tfeOrganizationFoobar.id), + } + ); /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ tfeRegistryModuleFoobar.overrideLogicalId("foobar"); - const tfeNoCodeModuleFoobar = new NoCodeModule(this, "foobar_2", { - organization: foobar.id, - registryModule: Token.asString(tfeRegistryModuleFoobar.id), - variableOptions: [ - { - name: "ami", - options: ["ami-0", "ami-1", "ami-2"], - type: "string", - }, - { - name: "region", - options: ["us-east-1", "us-east-2", "us-west-1"], - type: "string", - }, - ], - }); + const tfeNoCodeModuleFoobar = new tfe.noCodeModule.NoCodeModule( + this, + "foobar_2", + { + organization: cdktf.Token.asString(tfeOrganizationFoobar.id), + registryModule: cdktf.Token.asString(tfeRegistryModuleFoobar.id), + variableOptions: [ + { + name: "ami", + options: ["ami-0", "ami-1", "ami-2"], + type: "string", + }, + { + name: "region", + options: ["us-east-1", "us-east-2", "us-west-1"], + type: "string", + }, + ], + } + ); /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ tfeNoCodeModuleFoobar.overrideLogicalId("foobar"); } @@ -127,4 +141,4 @@ No-code modules can be imported; use `` as the import ID. For terraform import tfe_no_code_module.test nocode-qV9JnKRkmtMa4zcA ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/notification_configuration.html.markdown b/website/docs/cdktf/typescript/r/notification_configuration.html.markdown index a4d382fde..81ee6208b 100644 --- a/website/docs/cdktf/typescript/r/notification_configuration.html.markdown +++ b/website/docs/cdktf/typescript/r/notification_configuration.html.markdown @@ -19,41 +19,41 @@ Each workspace can have up to 20 notification configurations, and they apply to Basic usage: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { Token, TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { NotificationConfiguration } from "./.gen/providers/tfe/notification-configuration"; -import { Organization } from "./.gen/providers/tfe/organization"; -import { Workspace } from "./.gen/providers/tfe/workspace"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - const test = new Organization(this, "test", { - email: "admin@company.com", - name: "my-org-name", - }); - const tfeWorkspaceTest = new Workspace(this, "test_1", { - name: "my-workspace-name", - organization: test.id, - }); - /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ - tfeWorkspaceTest.overrideLogicalId("test"); - const tfeNotificationConfigurationTest = new NotificationConfiguration( + const tfeOrganizationTest = new tfe.organization.Organization( this, - "test_2", + "test", { - destinationType: "generic", - enabled: true, - name: "my-test-notification-configuration", - triggers: ["run:created", "run:planning", "run:errored"], - url: "https://example.com", - workspaceId: Token.asString(tfeWorkspaceTest.id), + email: "admin@company.com", + name: "my-org-name", } ); + const tfeWorkspaceTest = new tfe.workspace.Workspace(this, "test_1", { + name: "my-workspace-name", + organization: cdktf.Token.asString(tfeOrganizationTest.id), + }); + /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ + tfeWorkspaceTest.overrideLogicalId("test"); + const tfeNotificationConfigurationTest = + new tfe.notificationConfiguration.NotificationConfiguration( + this, + "test_2", + { + destinationType: "generic", + enabled: true, + name: "my-test-notification-configuration", + triggers: ["run:created", "run:planning", "run:errored"], + url: "https://example.com", + workspaceId: cdktf.Token.asString(tfeWorkspaceTest.id), + } + ); /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ tfeNotificationConfigurationTest.overrideLogicalId("test"); } @@ -64,52 +64,50 @@ class MyConvertedCode extends TerraformStack { With `destinationType` of `email`: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { Token, TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { NotificationConfiguration } from "./.gen/providers/tfe/notification-configuration"; -import { Organization } from "./.gen/providers/tfe/organization"; -import { OrganizationMembership } from "./.gen/providers/tfe/organization-membership"; -import { Workspace } from "./.gen/providers/tfe/workspace"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - const test = new Organization(this, "test", { - email: "admin@company.com", - name: "my-org-name", - }); - const tfeOrganizationMembershipTest = new OrganizationMembership( + const tfeOrganizationTest = new tfe.organization.Organization( this, - "test_1", + "test", { - email: "test.member@company.com", - organization: "my-org-name", + email: "admin@company.com", + name: "my-org-name", } ); + const tfeOrganizationMembershipTest = + new tfe.organizationMembership.OrganizationMembership(this, "test_1", { + email: "test.member@company.com", + organization: "my-org-name", + }); /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ tfeOrganizationMembershipTest.overrideLogicalId("test"); - const tfeWorkspaceTest = new Workspace(this, "test_2", { + const tfeWorkspaceTest = new tfe.workspace.Workspace(this, "test_2", { name: "my-workspace-name", - organization: test.id, + organization: cdktf.Token.asString(tfeOrganizationTest.id), }); /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ tfeWorkspaceTest.overrideLogicalId("test"); - const tfeNotificationConfigurationTest = new NotificationConfiguration( - this, - "test_3", - { - destinationType: "email", - emailUserIds: [Token.asString(tfeOrganizationMembershipTest.userId)], - enabled: true, - name: "my-test-email-notification-configuration", - triggers: ["run:created", "run:planning", "run:errored"], - workspaceId: Token.asString(tfeWorkspaceTest.id), - } - ); + const tfeNotificationConfigurationTest = + new tfe.notificationConfiguration.NotificationConfiguration( + this, + "test_3", + { + destinationType: "email", + emailUserIds: [ + cdktf.Token.asString(tfeOrganizationMembershipTest.userId), + ], + enabled: true, + name: "my-test-email-notification-configuration", + triggers: ["run:created", "run:planning", "run:errored"], + workspaceId: cdktf.Token.asString(tfeWorkspaceTest.id), + } + ); /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ tfeNotificationConfigurationTest.overrideLogicalId("test"); } @@ -117,60 +115,58 @@ class MyConvertedCode extends TerraformStack { ``` -(**TFE only**) With `destinationType` of `email`, using `emailAddresses` list and `email_users`: +(**TFE only**) With `destinationType` of `email`, using `emailAddresses` list and `emailUsers`: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { Token, TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { NotificationConfiguration } from "./.gen/providers/tfe/notification-configuration"; -import { Organization } from "./.gen/providers/tfe/organization"; -import { OrganizationMembership } from "./.gen/providers/tfe/organization-membership"; -import { Workspace } from "./.gen/providers/tfe/workspace"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - const test = new Organization(this, "test", { - email: "admin@company.com", - name: "my-org-name", - }); - const tfeOrganizationMembershipTest = new OrganizationMembership( + const tfeOrganizationTest = new tfe.organization.Organization( this, - "test_1", + "test", { - email: "test.member@company.com", - organization: "my-org-name", + email: "admin@company.com", + name: "my-org-name", } ); + const tfeOrganizationMembershipTest = + new tfe.organizationMembership.OrganizationMembership(this, "test_1", { + email: "test.member@company.com", + organization: "my-org-name", + }); /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ tfeOrganizationMembershipTest.overrideLogicalId("test"); - const tfeWorkspaceTest = new Workspace(this, "test_2", { + const tfeWorkspaceTest = new tfe.workspace.Workspace(this, "test_2", { name: "my-workspace-name", - organization: test.id, + organization: cdktf.Token.asString(tfeOrganizationTest.id), }); /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ tfeWorkspaceTest.overrideLogicalId("test"); - const tfeNotificationConfigurationTest = new NotificationConfiguration( - this, - "test_3", - { - destinationType: "email", - emailAddresses: [ - "user1@company.com", - "user2@company.com", - "user3@company.com", - ], - emailUserIds: [Token.asString(tfeOrganizationMembershipTest.userId)], - enabled: true, - name: "my-test-email-notification-configuration", - triggers: ["run:created", "run:planning", "run:errored"], - workspaceId: Token.asString(tfeWorkspaceTest.id), - } - ); + const tfeNotificationConfigurationTest = + new tfe.notificationConfiguration.NotificationConfiguration( + this, + "test_3", + { + destinationType: "email", + emailAddresses: [ + "user1@company.com", + "user2@company.com", + "user3@company.com", + ], + emailUserIds: [ + cdktf.Token.asString(tfeOrganizationMembershipTest.userId), + ], + enabled: true, + name: "my-test-email-notification-configuration", + triggers: ["run:created", "run:planning", "run:errored"], + workspaceId: cdktf.Token.asString(tfeWorkspaceTest.id), + } + ); /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ tfeNotificationConfigurationTest.overrideLogicalId("test"); } @@ -188,22 +184,22 @@ The following arguments are supported: * `generic` * `email` available in Terraform Cloud or Terraform Enterprise v202005-1 or later * `slack` - * `microsoft-teams` available in Terraform Cloud or Terraform Enterprise v202206-1 or later + * `microsoftTeams` available in Terraform Cloud or Terraform Enterprise v202206-1 or later * `emailAddresses` - (Optional) **TFE only** A list of email addresses. This value - _must not_ be provided if `destinationType` is `generic`, `microsoft-teams`, or `slack`. + _must not_ be provided if `destinationType` is `generic`, `microsoftTeams`, or `slack`. * `emailUserIds` - (Optional) A list of user IDs. This value _must not_ be provided - if `destinationType` is `generic`, `microsoft-teams`, or `slack`. + if `destinationType` is `generic`, `microsoftTeams`, or `slack`. * `enabled` - (Optional) Whether the notification configuration should be enabled or not. Disabled configurations will not send any notifications. Defaults to `false`. * `token` - (Optional) A write-only secure token for the notification configuration, which can be used by the receiving server to verify request authenticity when configured for notification configurations with a destination type of `generic`. Defaults to `null`. - This value _must not_ be provided if `destinationType` is `email`, `microsoft-teams`, or `slack`. + This value _must not_ be provided if `destinationType` is `email`, `microsoftTeams`, or `slack`. * `triggers` - (Optional) The array of triggers for which this notification configuration will - send notifications. Valid values are `run:created`, `run:planning`, `run:needs_attention`, `run:applying` - `run:completed`, `run:errored`, `assessment:check_failure`, `assessment:drifted`, or `assessment:failed`. + send notifications. Valid values are `run:created`, `run:planning`, `run:needsAttention`, `run:applying` + `run:completed`, `run:errored`, `assessment:checkFailure`, `assessment:drifted`, or `assessment:failed`. If omitted, no notification triggers are configured. -* `url` - (Required if `destinationType` is `generic`, `microsoft-teams`, or `slack`) The HTTP or HTTPS URL of the notification +* `url` - (Required if `destinationType` is `generic`, `microsoftTeams`, or `slack`) The HTTP or HTTPS URL of the notification configuration where notification requests will be made. This value _must not_ be provided if `destinationType` is `email`. * `workspaceId` - (Required) The id of the workspace that owns the notification configuration. @@ -220,4 +216,4 @@ Notification configurations can be imported; use ` \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/oauth_client.html.markdown b/website/docs/cdktf/typescript/r/oauth_client.html.markdown index 1a3b53615..da2e6cca5 100644 --- a/website/docs/cdktf/typescript/r/oauth_client.html.markdown +++ b/website/docs/cdktf/typescript/r/oauth_client.html.markdown @@ -19,18 +19,15 @@ provider. Basic usage: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { OauthClient } from "./.gen/providers/tfe/oauth-client"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - new OauthClient(this, "test", { + new tfe.oauthClient.OauthClient(this, "test", { apiUrl: "https://api.github.com", httpUrl: "https://github.com", name: "my-github-oauth-client", @@ -50,18 +47,15 @@ See [documentation for TFC/E setup](https://developer.hashicorp.com/terraform/cl **Note:** This resource requires a private key when creating Azure DevOps Server OAuth clients. ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { OauthClient } from "./.gen/providers/tfe/oauth-client"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - new OauthClient(this, "test", { + new tfe.oauthClient.OauthClient(this, "test", { apiUrl: "https://ado.example.com", httpUrl: "https://ado.example.com", name: "my-ado-oauth-client", @@ -84,18 +78,15 @@ When using BitBucket Server, you must use three required fields: `key`, `secret` ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { OauthClient } from "./.gen/providers/tfe/oauth-client"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - new OauthClient(this, "test", { + new tfe.oauthClient.OauthClient(this, "test", { apiUrl: "https://bbs.example.com", httpUrl: "https://bss.example.com", key: "", @@ -119,27 +110,27 @@ The following arguments are supported: * `name` - (Optional) Display name for the OAuth Client. Defaults to the `serviceProvider` if not supplied. * `organization` - (Optional) Name of the organization. If omitted, organization must be defined in the provider config. * `apiUrl` - (Required) The base URL of your VCS provider's API (e.g. - `https://api.github.com` or `https://ghe.example.com/api/v3`). + `https://apiGithubCom` or `https://gheExampleCom/api/v3`). * `httpUrl` - (Required) The homepage of your VCS provider (e.g. - `https://github.com` or `https://ghe.example.com`). -* `oauthToken` - The token string you were given by your VCS provider, e.g. `ghp_xxxxxxxxxxxxxxx` for a GitHub personal access token. For more information on how to generate this token string for your VCS provider, see the [Create an OAuth Client](https://developer.hashicorp.com/terraform/cloud-docs/api-docs/oauth-clients#create-an-oauth-client) documentation. -* `privateKey` - (Required for `ado_server`) The text of the private key associated with your Azure DevOps Server account + `https://githubCom` or `https://gheExampleCom`). +* `oauthToken` - The token string you were given by your VCS provider, e.g. `ghpXxxxxxxxxxxxxxx` for a GitHub personal access token. For more information on how to generate this token string for your VCS provider, see the [Create an OAuth Client](https://developer.hashicorp.com/terraform/cloud-docs/api-docs/oauth-clients#create-an-oauth-client) documentation. +* `privateKey` - (Required for `adoServer`) The text of the private key associated with your Azure DevOps Server account * `key` - The OAuth Client key can refer to a Consumer Key, Application Key, or another type of client key for the VCS provider. -* `secret` - (Required for `bitbucket_server`) The OAuth Client secret is used for BitBucket Server, this secret is the +* `secret` - (Required for `bitbucketServer`) The OAuth Client secret is used for BitBucket Server, this secret is the the text of the SSH private key associated with your BitBucket Server Application Link. -* `rsaPublicKey` - (Required for `bitbucket_server`) Required for BitBucket +* `rsaPublicKey` - (Required for `bitbucketServer`) Required for BitBucket Server in conjunction with the secret. Not used for any other providers. The text of the SSH public key associated with your BitBucket Server Application Link. * `serviceProvider` - (Required) The VCS provider being connected with. Valid - options are `ado_server`, `ado_services`, `bitbucket_hosted`, `bitbucket_server`, `github`, `github_enterprise`, `gitlab_hosted`, - `gitlab_community_edition`, or `gitlab_enterprise_edition`. + options are `adoServer`, `adoServices`, `bitbucketHosted`, `bitbucketServer`, `github`, `githubEnterprise`, `gitlabHosted`, + `gitlabCommunityEdition`, or `gitlabEnterpriseEdition`. ## Attributes Reference * `id` - The ID of the OAuth client. * `oauthTokenId` - The ID of the OAuth token associated with the OAuth client. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/opa_version.html.markdown b/website/docs/cdktf/typescript/r/opa_version.html.markdown index e1d634b0d..1dc2735fc 100644 --- a/website/docs/cdktf/typescript/r/opa_version.html.markdown +++ b/website/docs/cdktf/typescript/r/opa_version.html.markdown @@ -16,18 +16,15 @@ Manage OPA versions available on Terraform Enterprise. Basic Usage: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { OpaVersion } from "./.gen/providers/tfe/opa-version"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - new OpaVersion(this, "test", { + new tfe.opaVersion.OpaVersion(this, "test", { sha: "e75ac73deb69a6b3aa667cb0b8b731aee79e2904", url: "https://tfe-host.com/path/to/opa", version: "0.58.0-custom", @@ -68,4 +65,4 @@ terraform import tfe_opa_version.test 0.58.0 -> **Note:** You can fetch a OPA version ID from the URL of an existing version in the 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/organization.html.markdown b/website/docs/cdktf/typescript/r/organization.html.markdown index 3ba278ef1..e8adfbb3a 100644 --- a/website/docs/cdktf/typescript/r/organization.html.markdown +++ b/website/docs/cdktf/typescript/r/organization.html.markdown @@ -16,18 +16,15 @@ Manages organizations. Basic usage: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { Organization } from "./.gen/providers/tfe/organization"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - new Organization(this, "test", { + new tfe.organization.Organization(this, "test", { email: "admin@company.com", name: "my-org-name", }); @@ -47,7 +44,7 @@ The following arguments are supported: * `sessionRememberMinutes` - (Optional) Session expiration. Defaults to `20160`. * `collaboratorAuthPolicy` - (Optional) Authentication policy (`password` - or `two_factor_mandatory`). Defaults to `password`. + or `twoFactorMandatory`). Defaults to `password`. * `ownersTeamSamlRoleId` - (Optional) The name of the "owners" team. * `costEstimationEnabled` - (Optional) Whether or not the cost estimation feature is enabled for all workspaces in the organization. Defaults to true. In a Terraform Cloud organization which does not have Teams & Governance features, this value is always false and cannot be changed. In Terraform Enterprise, Cost Estimation must also be enabled in Site Administration. * `sendPassingStatusesForUntriggeredSpeculativePlans` - (Optional) Whether or not to send VCS status updates for untriggered speculative plans. This can be useful if large numbers of untriggered workspaces are exhausting request limits for connected version control service providers like GitHub. Defaults to false. In Terraform Enterprise, this setting has no effect and cannot be changed but is also available in Site Administration. @@ -68,4 +65,4 @@ example: terraform import tfe_organization.test my-org-name ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/organization_default_settings.html.markdown b/website/docs/cdktf/typescript/r/organization_default_settings.html.markdown index cf68a6606..76da8d7fd 100644 --- a/website/docs/cdktf/typescript/r/organization_default_settings.html.markdown +++ b/website/docs/cdktf/typescript/r/organization_default_settings.html.markdown @@ -9,42 +9,49 @@ description: |- # tfe_organization_default_settings -Primarily, this is used to set the default execution mode of an organization. Settings configured here will be used as the default for all workspaces in the organization, unless they specify their own values with a [`tfe_workspace_settings` resource](workspace_settings.html) (or deprecated attributes on the workspace resource). +Primarily, this is used to set the default execution mode of an organization. Settings configured here will be used as the default for all workspaces in the organization, unless they specify their own values with a [`tfeWorkspaceSettings` resource](workspace_settings.html) (or deprecated attributes on the workspace resource). ## Example Usage Basic usage: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { AgentPool } from "./.gen/providers/tfe/agent-pool"; -import { Organization } from "./.gen/providers/tfe/organization"; -import { OrganizationDefaultSettings } from "./.gen/providers/tfe/organization-default-settings"; -import { Workspace } from "./.gen/providers/tfe/workspace"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - const test = new Organization(this, "test", { - email: "admin@company.com", - name: "my-org-name", - }); - const myAgents = new AgentPool(this, "my_agents", { - name: "agent_smiths", - organization: test.name, - }); - const orgDefault = new OrganizationDefaultSettings(this, "org_default", { - defaultAgentPoolId: myAgents.id, - defaultExecutionMode: "agent", - organization: test.name, - }); - new Workspace(this, "my_workspace", { - dependsOn: [orgDefault], + const tfeOrganizationTest = new tfe.organization.Organization( + this, + "test", + { + email: "admin@company.com", + name: "my-org-name", + } + ); + const tfeAgentPoolMyAgents = new tfe.agentPool.AgentPool( + this, + "my_agents", + { + name: "agent_smiths", + organization: cdktf.Token.asString(tfeOrganizationTest.name), + } + ); + const tfeOrganizationDefaultSettingsOrgDefault = + new tfe.organizationDefaultSettings.OrganizationDefaultSettings( + this, + "org_default", + { + defaultAgentPoolId: cdktf.Token.asString(tfeAgentPoolMyAgents.id), + defaultExecutionMode: "agent", + organization: cdktf.Token.asString(tfeOrganizationTest.name), + } + ); + new tfe.workspace.Workspace(this, "my_workspace", { + dependsOn: [tfeOrganizationDefaultSettingsOrgDefault], name: "my-workspace", }); } @@ -70,4 +77,4 @@ Organization default execution mode can be imported; use `` a terraform import tfe_organization_default_execution_mode.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 094241ddd..1ba96fccd 100644 --- a/website/docs/cdktf/typescript/r/organization_membership.html.markdown +++ b/website/docs/cdktf/typescript/r/organization_membership.html.markdown @@ -24,18 +24,15 @@ be updated manually. Basic usage: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { OrganizationMembership } from "./.gen/providers/tfe/organization-membership"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - new OrganizationMembership(this, "test", { + new tfe.organizationMembership.OrganizationMembership(this, "test", { email: "user@company.com", organization: "my-org-name", }); @@ -72,4 +69,4 @@ terraform import tfe_organization_membership.test my-org-name/user@example.com terraform import tfe_organization_membership.test ou-wAs3zYmWAhYK7peR ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/organization_module_sharing.html.markdown b/website/docs/cdktf/typescript/r/organization_module_sharing.html.markdown index 23972ab15..7a8d6f4bc 100644 --- a/website/docs/cdktf/typescript/r/organization_module_sharing.html.markdown +++ b/website/docs/cdktf/typescript/r/organization_module_sharing.html.markdown @@ -12,25 +12,22 @@ description: |- Manage module sharing for an organization. This resource requires the use of an admin token and is for Terraform Enterprise only. --> **NOTE:** `tfe_organization_module_sharing` is deprecated in favor of using `tfe_admin_organization_settings` which also allows the management of the global module sharing setting. They attempt to manage the same resource and are mutually exclusive. +-> **NOTE:** `tfeOrganizationModuleSharing` is deprecated in favor of using `tfeAdminOrganizationSettings` which also allows the management of the global module sharing setting. They attempt to manage the same resource and are mutually exclusive. ## Example Usage Basic usage: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { OrganizationModuleSharing } from "./.gen/providers/tfe/organization-module-sharing"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - new OrganizationModuleSharing(this, "test", { + new tfe.organizationModuleSharing.OrganizationModuleSharing(this, "test", { moduleConsumers: ["my-org-name-2", "my-org-name-3"], organization: "my-org-name", }); @@ -46,4 +43,4 @@ The following arguments are supported: * `organization` - (Optional) Name of the organization. If omitted, organization must be defined in the provider config. * `moduleConsumers` - (Required) Names of the organizations to consume the module registry. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/organization_run_task.html.markdown b/website/docs/cdktf/typescript/r/organization_run_task.html.markdown index a52e2e0b8..af88749b5 100644 --- a/website/docs/cdktf/typescript/r/organization_run_task.html.markdown +++ b/website/docs/cdktf/typescript/r/organization_run_task.html.markdown @@ -18,18 +18,15 @@ The tfe_organization_run_task resource creates, updates and destroys [Organizati Basic usage: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { OrganizationRunTask } from "./.gen/providers/tfe/organization-run-task"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - new OrganizationRunTask(this, "example", { + new tfe.organizationRunTask.OrganizationRunTask(this, "example", { description: "An example task", enabled: true, name: "task-name", @@ -66,4 +63,4 @@ import ID. For example: terraform import tfe_organization_run_task.test my-org-name/task-name ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/organization_token.html.markdown b/website/docs/cdktf/typescript/r/organization_token.html.markdown index 273e96979..13d4d4730 100644 --- a/website/docs/cdktf/typescript/r/organization_token.html.markdown +++ b/website/docs/cdktf/typescript/r/organization_token.html.markdown @@ -17,18 +17,15 @@ can be used to act as the organization service account. Basic usage: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { OrganizationToken } from "./.gen/providers/tfe/organization-token"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - new OrganizationToken(this, "test", { + new tfe.organizationToken.OrganizationToken(this, "test", { organization: "my-org-name", }); } @@ -52,31 +49,15 @@ never expire. When a token has an expiry: -```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { Token, TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { OrganizationToken } from "./.gen/providers/tfe/organization-token"; -import { Rotating } from "./.gen/providers/time/rotating"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { - super(scope, name); - /*The following providers are missing schema information and might need manual adjustments to synthesize correctly: time. - For a more precise conversion please use the --provider flag in convert.*/ - const example = new Rotating(this, "example", { - rotation_days: 30, - }); - new OrganizationToken(this, "test", { - expiredAt: Token.asString(example.rotationRfc3339), - organization: Token.asString(org.name), - }); - } +```hcl +resource "time_rotating" "example" { + rotation_days = 30 } +resource "tfe_organization_token" "test" { + organization = data.tfe_organization.org.name + expired_at = time_rotating.example.rotation_rfc3339 +} ``` ## Attributes Reference @@ -93,4 +74,4 @@ For example: terraform import tfe_organization_token.test my-org-name ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/policy.html.markdown b/website/docs/cdktf/typescript/r/policy.html.markdown index e9edf7291..d99b59da7 100644 --- a/website/docs/cdktf/typescript/r/policy.html.markdown +++ b/website/docs/cdktf/typescript/r/policy.html.markdown @@ -21,18 +21,15 @@ enforced during runs. Basic usage for Sentinel: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { Policy } from "./.gen/providers/tfe/policy"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - new Policy(this, "test", { + new tfe.policy.Policy(this, "test", { description: "This policy always passes", enforceMode: "hard-mandatory", kind: "sentinel", @@ -48,18 +45,15 @@ class MyConvertedCode extends TerraformStack { Basic usage for Open Policy Agent(OPA): ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { Policy } from "./.gen/providers/tfe/policy"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - new Policy(this, "test", { + new tfe.policy.Policy(this, "test", { description: "This policy always passes", enforceMode: "mandatory", kind: "opa", @@ -86,8 +80,8 @@ The following arguments are supported: needs to run within your Rego code. Required for all OPA policies. * `policy` - (Required) The actual policy itself. * `enforceMode` - (Optional) The enforcement level of the policy. Valid - values for Sentinel are `advisory`, `hard-mandatory` and `soft-mandatory`. Defaults - to `soft-mandatory`. Valid values for OPA are `advisory` and `mandatory`. Defaults + values for Sentinel are `advisory`, `hardMandatory` and `softMandatory`. Defaults + to `softMandatory`. Valid values for OPA are `advisory` and `mandatory`. Defaults to `advisory`. ## Attributes Reference @@ -103,4 +97,4 @@ import ID. For example: terraform import tfe_policy.test my-org-name/pol-wAs3zYmWAhYK7peR ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/policy_set.html.markdown b/website/docs/cdktf/typescript/r/policy_set.html.markdown index 6c3c74812..3a3a14959 100644 --- a/website/docs/cdktf/typescript/r/policy_set.html.markdown +++ b/website/docs/cdktf/typescript/r/policy_set.html.markdown @@ -21,98 +21,58 @@ for workspaces that the policy set is attached to. Basic usage (VCS-based policy set): -```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { Token, TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { PolicySet } from "./.gen/providers/tfe/policy-set"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { - super(scope, name); - new PolicySet(this, "test", { - agentEnabled: Token.asBoolean("true"), - description: "A brand new policy set", - kind: "sentinel", - name: "my-policy-set", - organization: "my-org-name", - policiesPath: "policies/my-policy-set", - policyToolVersion: "0.24.1", - vcsRepo: { - branch: "main", - identifier: "my-org-name/my-policy-set-repository", - ingressSubmodules: false, - oauthTokenId: Token.asString(tfeOauthClientTest.oauthTokenId), - }, - workspaceIds: [Token.asString(tfeWorkspaceTest.id)], - }); +```hcl +resource "tfe_policy_set" "test" { + name = "my-policy-set" + description = "A brand new policy set" + organization = "my-org-name" + kind = "sentinel" + agent_enabled = "true" + policy_tool_version = "0.24.1" + policies_path = "policies/my-policy-set" + workspace_ids = [tfe_workspace.test.id] + + vcs_repo { + identifier = "my-org-name/my-policy-set-repository" + branch = "main" + ingress_submodules = false + oauth_token_id = tfe_oauth_client.test.oauth_token_id } } - ``` Using manually-specified policies: -```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { Token, TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { PolicySet } from "./.gen/providers/tfe/policy-set"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { - super(scope, name); - new PolicySet(this, "test", { - agentEnabled: Token.asBoolean("true"), - description: "A brand new policy set", - kind: "sentinel", - name: "my-policy-set", - organization: "my-org-name", - policyIds: [Token.asString(tfeSentinelPolicyTest.id)], - policyToolVersion: "0.24.1", - workspaceIds: [Token.asString(tfeWorkspaceTest.id)], - }); - } +```hcl +resource "tfe_policy_set" "test" { + name = "my-policy-set" + description = "A brand new policy set" + organization = "my-org-name" + kind = "sentinel" + agent_enabled = "true" + policy_tool_version = "0.24.1" + policy_ids = [tfe_sentinel_policy.test.id] + workspace_ids = [tfe_workspace.test.id] } - ``` Manually uploaded policy set, in lieu of VCS: -```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { Token, TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { DataTfeSlug } from "./.gen/providers/tfe/data-tfe-slug"; -import { PolicySet } from "./.gen/providers/tfe/policy-set"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { - super(scope, name); - const test = new DataTfeSlug(this, "test", { - sourcePath: "policies/my-policy-set", - }); - const tfePolicySetTest = new PolicySet(this, "test_1", { - description: "A brand new policy set", - name: "my-policy-set", - organization: "my-org-name", - slug: Token.asStringMap(test), - workspaceIds: [Token.asString(tfeWorkspaceTest.id)], - }); - /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ - tfePolicySetTest.overrideLogicalId("test"); - } +```hcl +data "tfe_slug" "test" { + // point to the local directory where the policies are located. + source_path = "policies/my-policy-set" } +resource "tfe_policy_set" "test" { + name = "my-policy-set" + description = "A brand new policy set" + organization = "my-org-name" + workspace_ids = [tfe_workspace.test.id] + + // reference the tfe_slug data source. + slug = data.tfe_slug.test +} ``` ## Argument Reference @@ -143,10 +103,10 @@ The following arguments are supported: new resource if changed. This value _must not_ be provided if `policyIds` are provided. * `workspaceIds` - (Optional) A list of workspace IDs. This value _must not_ be provided if `global` is provided. -* `slug` - (Optional) A reference to the `tfe_slug` data source that contains +* `slug` - (Optional) A reference to the `tfeSlug` data source that contains the `sourcePath` to where the local policies are located. This is used when policies are located locally, and can only be used when there is no VCS repo or -explicit Policy IDs. This _requires_ the usage of the `tfe_slug` data source. +explicit Policy IDs. This _requires_ the usage of the `tfeSlug` data source. -> **Note:** When neither `vcsRepo` or `policyIds` is not specified, the current default is to create an empty non-VCS policy set. @@ -175,4 +135,4 @@ Policy sets can be imported; use `` as the import ID. For example terraform import tfe_policy_set.test polset-wAs3zYmWAhYK7peR ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/policy_set_parameter.html.markdown b/website/docs/cdktf/typescript/r/policy_set_parameter.html.markdown index 9acedef19..f7d672c9d 100644 --- a/website/docs/cdktf/typescript/r/policy_set_parameter.html.markdown +++ b/website/docs/cdktf/typescript/r/policy_set_parameter.html.markdown @@ -16,34 +16,34 @@ Creates, updates and destroys policy set parameters. Basic usage: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { Token, TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { Organization } from "./.gen/providers/tfe/organization"; -import { PolicySet } from "./.gen/providers/tfe/policy-set"; -import { PolicySetParameter } from "./.gen/providers/tfe/policy-set-parameter"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - const test = new Organization(this, "test", { - email: "admin@company.com", - name: "my-org-name", - }); - const tfePolicySetTest = new PolicySet(this, "test_1", { + const tfeOrganizationTest = new tfe.organization.Organization( + this, + "test", + { + email: "admin@company.com", + name: "my-org-name", + } + ); + const tfePolicySetTest = new tfe.policySet.PolicySet(this, "test_1", { name: "my-policy-set-name", - organization: test.id, + organization: cdktf.Token.asString(tfeOrganizationTest.id), }); /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ tfePolicySetTest.overrideLogicalId("test"); - const tfePolicySetParameterTest = new PolicySetParameter(this, "test_2", { - key: "my_key_name", - policySetId: Token.asString(tfePolicySetTest.id), - value: "my_value_name", - }); + const tfePolicySetParameterTest = + new tfe.policySetParameter.PolicySetParameter(this, "test_2", { + key: "my_key_name", + policySetId: cdktf.Token.asString(tfePolicySetTest.id), + value: "my_value_name", + }); /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ tfePolicySetParameterTest.overrideLogicalId("test"); } @@ -76,4 +76,4 @@ terraform import tfe_policy_set_parameter.test polset-wAs3zYmWAhYK7peR/var-5rTwn ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/project.html.markdown b/website/docs/cdktf/typescript/r/project.html.markdown index 98f69dc50..06087bc21 100644 --- a/website/docs/cdktf/typescript/r/project.html.markdown +++ b/website/docs/cdktf/typescript/r/project.html.markdown @@ -16,25 +16,25 @@ Provides a project resource. Basic usage: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { Organization } from "./.gen/providers/tfe/organization"; -import { Project } from "./.gen/providers/tfe/project"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - const testOrganization = new Organization(this, "test-organization", { - email: "admin@company.com", - name: "my-org-name", - }); - new Project(this, "test", { + const tfeOrganizationTestOrganization = new tfe.organization.Organization( + this, + "test-organization", + { + email: "admin@company.com", + name: "my-org-name", + } + ); + new tfe.project.Project(this, "test", { name: "projectname", - organization: testOrganization.name, + organization: cdktf.Token.asString(tfeOrganizationTestOrganization.name), }); } } @@ -62,4 +62,4 @@ Projects can be imported; use `` as the import ID. For example: terraform import tfe_project.test prj-niVoeESBXT8ZREhr ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/project_policy_set.html.markdown b/website/docs/cdktf/typescript/r/project_policy_set.html.markdown index 87d6f764d..596bb5179 100644 --- a/website/docs/cdktf/typescript/r/project_policy_set.html.markdown +++ b/website/docs/cdktf/typescript/r/project_policy_set.html.markdown @@ -15,47 +15,27 @@ Adds and removes policy sets from a project Basic usage: -```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { Token, TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { Organization } from "./.gen/providers/tfe/organization"; -import { PolicySet } from "./.gen/providers/tfe/policy-set"; -import { Project } from "./.gen/providers/tfe/project"; -import { ProjectPolicySet } from "./.gen/providers/tfe/project-policy-set"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { - super(scope, name); - 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: 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 Project(this, "test_2", { - name: "my-project-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 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"); - } +```hcl +resource "tfe_organization" "test" { + name = "my-org-name" + email = "admin@company.com" } +resource "tfe_project" "test" { + name = "my-project-name" + organization = tfe_organization.test.name +} + +resource "tfe_policy_set" "test" { + name = "my-policy-set" + description = "Some description." + organization = tfe_organization.test.name +} + +resource "tfe_project_policy_set" "test" { + policy_set_id = tfe_policy_set.test.id + project_id = tfe_project.test.id +} ``` ## Argument Reference @@ -77,4 +57,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 cdb622020..46d8cdd71 100644 --- a/website/docs/cdktf/typescript/r/project_variable_set.html.markdown +++ b/website/docs/cdktf/typescript/r/project_variable_set.html.markdown @@ -15,47 +15,27 @@ Adds and removes variable sets from a project Basic usage: -```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { Token, TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { Organization } from "./.gen/providers/tfe/organization"; -import { Project } from "./.gen/providers/tfe/project"; -import { ProjectVariableSet } from "./.gen/providers/tfe/project-variable-set"; -import { VariableSet } from "./.gen/providers/tfe/variable-set"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { - super(scope, name); - 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: 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 VariableSet(this, "test_2", { - description: "Some description.", - name: "Test Varset", - 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 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"); - } +```hcl +resource "tfe_organization" "test" { + name = "my-org-name" + email = "admin@company.com" } +resource "tfe_project" "test" { + name = "my-project-name" + organization = tfe_organization.test.name +} + +resource "tfe_variable_set" "test" { + name = "Test Varset" + description = "Some description." + organization = tfe_organization.test.name +} + +resource "tfe_project_variable_set" "test" { + variable_set_id = tfe_variable_set.test.id + project_id = tfe_project.test.id +} ``` ## Argument Reference @@ -77,4 +57,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_gpg_key.html.markdown b/website/docs/cdktf/typescript/r/registry_gpg_key.html.markdown index 3d4c9f943..851e98f10 100644 --- a/website/docs/cdktf/typescript/r/registry_gpg_key.html.markdown +++ b/website/docs/cdktf/typescript/r/registry_gpg_key.html.markdown @@ -16,25 +16,11 @@ The provided GPG key must be ASCII-armored, i.e. starting with: ## Example Usage -```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { Fn, Token, TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { RegistryGpgKey } from "./.gen/providers/tfe/registry-gpg-key"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { - super(scope, name); - new RegistryGpgKey(this, "example", { - asciiArmor: Token.asString(Fn.file("my-public-key.asc")), - organization: "my-org-name", - }); - } +```hcl +resource "tfe_registry_gpg_key" "example" { + organization = "my-org-name" + ascii_armor = file("my-public-key.asc") } - ``` ## Argument Reference @@ -59,4 +45,4 @@ example: terraform import tfe_registry_gpg_key.example my-org-name/34365D9472D7468F ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/registry_module.html.markdown b/website/docs/cdktf/typescript/r/registry_module.html.markdown index 1404322a4..137232711 100644 --- a/website/docs/cdktf/typescript/r/registry_module.html.markdown +++ b/website/docs/cdktf/typescript/r/registry_module.html.markdown @@ -16,35 +16,42 @@ Terraform Cloud's private module registry helps you share Terraform modules acro Basic usage with VCS: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { OauthClient } from "./.gen/providers/tfe/oauth-client"; -import { Organization } from "./.gen/providers/tfe/organization"; -import { RegistryModule } from "./.gen/providers/tfe/registry-module"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - const testOrganization = new Organization(this, "test-organization", { - email: "admin@company.com", - name: "my-org-name", - }); - const testOauthClient = new OauthClient(this, "test-oauth-client", { - apiUrl: "https://api.github.com", - httpUrl: "https://github.com", - oauthToken: "my-vcs-provider-token", - organization: testOrganization.name, - serviceProvider: "github", - }); - new RegistryModule(this, "test-registry-module", { + const tfeOrganizationTestOrganization = new tfe.organization.Organization( + this, + "test-organization", + { + email: "admin@company.com", + name: "my-org-name", + } + ); + const tfeOauthClientTestOauthClient = new tfe.oauthClient.OauthClient( + this, + "test-oauth-client", + { + apiUrl: "https://api.github.com", + httpUrl: "https://github.com", + oauthToken: "my-vcs-provider-token", + organization: cdktf.Token.asString( + tfeOrganizationTestOrganization.name + ), + serviceProvider: "github", + } + ); + new tfe.registryModule.RegistryModule(this, "test-registry-module", { vcsRepo: { displayIdentifier: "my-org-name/terraform-provider-name", identifier: "my-org-name/terraform-provider-name", - oauthTokenId: testOauthClient.oauthTokenId, + oauthTokenId: cdktf.Token.asString( + tfeOauthClientTestOauthClient.oauthTokenId + ), }, }); } @@ -55,31 +62,36 @@ class MyConvertedCode extends TerraformStack { Create private registry module with tests enabled: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { OauthClient } from "./.gen/providers/tfe/oauth-client"; -import { Organization } from "./.gen/providers/tfe/organization"; -import { RegistryModule } from "./.gen/providers/tfe/registry-module"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - const testOrganization = new Organization(this, "test-organization", { - email: "admin@company.com", - name: "my-org-name", - }); - const testOauthClient = new OauthClient(this, "test-oauth-client", { - apiUrl: "https://api.github.com", - httpUrl: "https://github.com", - oauthToken: "my-vcs-provider-token", - organization: testOrganization.name, - serviceProvider: "github", - }); - new RegistryModule(this, "test-registry-module", { + const tfeOrganizationTestOrganization = new tfe.organization.Organization( + this, + "test-organization", + { + email: "admin@company.com", + name: "my-org-name", + } + ); + const tfeOauthClientTestOauthClient = new tfe.oauthClient.OauthClient( + this, + "test-oauth-client", + { + apiUrl: "https://api.github.com", + httpUrl: "https://github.com", + oauthToken: "my-vcs-provider-token", + organization: cdktf.Token.asString( + tfeOrganizationTestOrganization.name + ), + serviceProvider: "github", + } + ); + new tfe.registryModule.RegistryModule(this, "test-registry-module", { testConfig: [ { testsEnabled: true, @@ -89,7 +101,9 @@ class MyConvertedCode extends TerraformStack { branch: "main", displayIdentifier: "my-org-name/terraform-provider-name", identifier: "my-org-name/terraform-provider-name", - oauthTokenId: testOauthClient.oauthTokenId, + oauthTokenId: cdktf.Token.asString( + tfeOauthClientTestOauthClient.oauthTokenId + ), }, }); } @@ -100,35 +114,37 @@ class MyConvertedCode extends TerraformStack { Create private registry module with GitHub App: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { Token, TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { DataTfeGithubAppInstallation } from "./.gen/providers/tfe/data-tfe-github-app-installation"; -import { Organization } from "./.gen/providers/tfe/organization"; -import { RegistryModule } from "./.gen/providers/tfe/registry-module"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - const testOrganization = new Organization(this, "test-organization", { - email: "admin@company.com", - name: "my-org-name", - }); - const ghaInstallation = new DataTfeGithubAppInstallation( + const tfeOrganizationTestOrganization = new tfe.organization.Organization( this, - "gha_installation", + "test-organization", { - name: "YOUR_GH_NAME", + email: "admin@company.com", + name: "my-org-name", } ); - new RegistryModule(this, "petstore", { - organization: testOrganization.name, + const dataTfeGithubAppInstallationGhaInstallation = + new tfe.dataTfeGithubAppInstallation.DataTfeGithubAppInstallation( + this, + "gha_installation", + { + name: "YOUR_GH_NAME", + } + ); + new tfe.registryModule.RegistryModule(this, "petstore", { + organization: cdktf.Token.asString(tfeOrganizationTestOrganization.name), vcsRepo: { displayIdentifier: "GH_NAME/REPO_NAME", - githubAppInstallationId: Token.asString(ghaInstallation.id), + githubAppInstallationId: cdktf.Token.asString( + dataTfeGithubAppInstallationGhaInstallation.id + ), identifier: "GH_NAME/REPO_NAME", }, }); @@ -140,28 +156,34 @@ class MyConvertedCode extends TerraformStack { Create private registry module without VCS: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { Organization } from "./.gen/providers/tfe/organization"; -import { RegistryModule } from "./.gen/providers/tfe/registry-module"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - const testOrganization = new Organization(this, "test-organization", { - email: "admin@company.com", - name: "my-org-name", - }); - new RegistryModule(this, "test-private-registry-module", { - moduleProvider: "my_provider", - name: "another_test_module", - organization: testOrganization.name, - registryName: "private", - }); + const tfeOrganizationTestOrganization = new tfe.organization.Organization( + this, + "test-organization", + { + email: "admin@company.com", + name: "my-org-name", + } + ); + new tfe.registryModule.RegistryModule( + this, + "test-private-registry-module", + { + moduleProvider: "my_provider", + name: "another_test_module", + organization: cdktf.Token.asString( + tfeOrganizationTestOrganization.name + ), + registryName: "private", + } + ); } } @@ -170,27 +192,27 @@ class MyConvertedCode extends TerraformStack { Create public registry module: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { Organization } from "./.gen/providers/tfe/organization"; -import { RegistryModule } from "./.gen/providers/tfe/registry-module"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - const testOrganization = new Organization(this, "test-organization", { - email: "admin@company.com", - name: "my-org-name", - }); - new RegistryModule(this, "test-public-registry-module", { + const tfeOrganizationTestOrganization = new tfe.organization.Organization( + this, + "test-organization", + { + email: "admin@company.com", + name: "my-org-name", + } + ); + new tfe.registryModule.RegistryModule(this, "test-public-registry-module", { moduleProvider: "aws", name: "vpc", namespace: "terraform-aws-modules", - organization: testOrganization.name, + organization: cdktf.Token.asString(tfeOrganizationTestOrganization.name), registryName: "public", }); } @@ -201,37 +223,41 @@ class MyConvertedCode extends TerraformStack { Create no-code provisioning registry module: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { NoCodeModule } from "./.gen/providers/tfe/no-code-module"; -import { Organization } from "./.gen/providers/tfe/organization"; -import { RegistryModule } from "./.gen/providers/tfe/registry-module"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - const testOrganization = new Organization(this, "test-organization", { - email: "admin@company.com", - name: "my-org-name", - }); - const testNoCodeProvisioningRegistryModule = new RegistryModule( + const tfeOrganizationTestOrganization = new tfe.organization.Organization( this, - "test-no-code-provisioning-registry-module", + "test-organization", { - moduleProvider: "aws", - name: "vpc", - namespace: "terraform-aws-modules", - organization: testOrganization.name, - registryName: "public", + email: "admin@company.com", + name: "my-org-name", } ); - new NoCodeModule(this, "foobar", { - organization: testOrganization.id, - registryModule: testNoCodeProvisioningRegistryModule.id, + const tfeRegistryModuleTestNoCodeProvisioningRegistryModule = + new tfe.registryModule.RegistryModule( + this, + "test-no-code-provisioning-registry-module", + { + moduleProvider: "aws", + name: "vpc", + namespace: "terraform-aws-modules", + organization: cdktf.Token.asString( + tfeOrganizationTestOrganization.name + ), + registryName: "public", + } + ); + new tfe.noCodeModule.NoCodeModule(this, "foobar", { + organization: cdktf.Token.asString(tfeOrganizationTestOrganization.id), + registryModule: cdktf.Token.asString( + tfeRegistryModuleTestNoCodeProvisioningRegistryModule.id + ), }); } } @@ -292,4 +318,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/registry_provider.html.markdown b/website/docs/cdktf/typescript/r/registry_provider.html.markdown index f295de485..3094a32f4 100644 --- a/website/docs/cdktf/typescript/r/registry_provider.html.markdown +++ b/website/docs/cdktf/typescript/r/registry_provider.html.markdown @@ -16,26 +16,27 @@ Manages public and private providers in the private registry. Create private provider: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { RegistryProvider } from "./.gen/providers/tfe/"; -import { Organization } from "./.gen/providers/tfe/organization"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - const example = new Organization(this, "example", { - email: "admin@company.com", - name: "my-org-name", - }); - const tfeRegistryProviderExample = new RegistryProvider(this, "example_1", { - name: "my-provider", - organization: example.name, - }); + const tfeOrganizationExample = new tfe.organization.Organization( + this, + "example", + { + email: "admin@company.com", + name: "my-org-name", + } + ); + const tfeRegistryProviderExample = + new tfe.registryProvider.RegistryProvider(this, "example_1", { + name: "my-provider", + organization: cdktf.Token.asString(tfeOrganizationExample.name), + }); /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ tfeRegistryProviderExample.overrideLogicalId("example"); } @@ -46,28 +47,29 @@ class MyConvertedCode extends TerraformStack { Create public provider: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { RegistryProvider } from "./.gen/providers/tfe/"; -import { Organization } from "./.gen/providers/tfe/organization"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - const example = new Organization(this, "example", { - email: "admin@company.com", - name: "my-org-name", - }); - const tfeRegistryProviderExample = new RegistryProvider(this, "example_1", { - name: "aws", - namespace: "hashicorp", - organization: example.name, - registry_name: "public", - }); + const tfeOrganizationExample = new tfe.organization.Organization( + this, + "example", + { + email: "admin@company.com", + name: "my-org-name", + } + ); + const tfeRegistryProviderExample = + new tfe.registryProvider.RegistryProvider(this, "example_1", { + name: "aws", + namespace: "hashicorp", + organization: cdktf.Token.asString(tfeOrganizationExample.name), + registryName: "public", + }); /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ tfeRegistryProviderExample.overrideLogicalId("example"); } @@ -106,4 +108,4 @@ Or a public provider: terraform import tfe_registry_provider.example my-org-name/public/hashicorp/aws ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/run_trigger.html.markdown b/website/docs/cdktf/typescript/r/run_trigger.html.markdown index 24f65857b..dcfe00943 100644 --- a/website/docs/cdktf/typescript/r/run_trigger.html.markdown +++ b/website/docs/cdktf/typescript/r/run_trigger.html.markdown @@ -19,34 +19,41 @@ to up to 20 source workspaces. Basic usage: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { Organization } from "./.gen/providers/tfe/organization"; -import { RunTrigger } from "./.gen/providers/tfe/run-trigger"; -import { Workspace } from "./.gen/providers/tfe/workspace"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - const testOrganization = new Organization(this, "test-organization", { - email: "admin@company.com", - name: "my-org-name", - }); - const testSourceable = new Workspace(this, "test-sourceable", { - name: "my-sourceable-workspace-name", - organization: testOrganization.id, - }); - const testWorkspace = new Workspace(this, "test-workspace", { - name: "my-workspace-name", - organization: testOrganization.id, - }); - new RunTrigger(this, "test", { - sourceableId: testSourceable.id, - workspaceId: testWorkspace.id, + const tfeOrganizationTestOrganization = new tfe.organization.Organization( + this, + "test-organization", + { + email: "admin@company.com", + name: "my-org-name", + } + ); + const tfeWorkspaceTestSourceable = new tfe.workspace.Workspace( + this, + "test-sourceable", + { + name: "my-sourceable-workspace-name", + organization: cdktf.Token.asString(tfeOrganizationTestOrganization.id), + } + ); + const tfeWorkspaceTestWorkspace = new tfe.workspace.Workspace( + this, + "test-workspace", + { + name: "my-workspace-name", + organization: cdktf.Token.asString(tfeOrganizationTestOrganization.id), + } + ); + new tfe.runTrigger.RunTrigger(this, "test", { + sourceableId: cdktf.Token.asString(tfeWorkspaceTestSourceable.id), + workspaceId: cdktf.Token.asString(tfeWorkspaceTestWorkspace.id), }); } } @@ -73,4 +80,4 @@ Run triggers can be imported; use `` as the import ID. For examp terraform import tfe_run_trigger.test rt-qV9JnKRkmtMa4zcA ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/saml_settings.html.markdown b/website/docs/cdktf/typescript/r/saml_settings.html.markdown index 78e016f2f..430a810e7 100644 --- a/website/docs/cdktf/typescript/r/saml_settings.html.markdown +++ b/website/docs/cdktf/typescript/r/saml_settings.html.markdown @@ -15,31 +15,17 @@ Use this resource to create, update and destroy SAML Settings. It applies only t Basic usage for SAML Settings: -```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { TfeProvider } from "./.gen/providers/tfe/provider"; -import { SamlSettings } from "./.gen/providers/tfe/saml-settings"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { - super(scope, name); - new TfeProvider(this, "tfe", { - hostname: hostname.stringValue, - token: adminToken.stringValue, - }); - new SamlSettings(this, "this", { - idpCert: "foobarCertificate", - sloEndpointUrl: "https://example.com/slo_endpoint_url", - ssoEndpointUrl: "https://example.com/sso_endpoint_url", - }); - } +```hcl +provider "tfe" { + hostname = var.hostname + token = var.admin_token } +resource "tfe_saml_settings" "this" { + idp_cert = "foobarCertificate" + slo_endpoint_url = "https://example.com/slo_endpoint_url" + sso_endpoint_url = "https://example.com/sso_endpoint_url" + } ``` ## Argument Reference @@ -60,8 +46,8 @@ The following arguments are supported: * `ssoApiTokenSessionTimeout` - (Optional) Specifies the Single Sign On session timeout in seconds. Defaults to 14 days. * `certificate` - (Optional) The certificate used for request and assertion signing. * `privateKey` - (Optional) The private key used for request and assertion signing. -* `signatureSigningMethod` - (Optional) Signature Signing Method. Must be either `SHA1` or `SHA256`. Defaults to `SHA256`. -* `signatureDigestMethod` - (Optional) Signature Digest Method. Must be either `SHA1` or `SHA256`. Defaults to `SHA256`. +* `signatureSigningMethod` - (Optional) Signature Signing Method. Must be either `sha1` or `sha256`. Defaults to `sha256`. +* `signatureDigestMethod` - (Optional) Signature Digest Method. Must be either `sha1` or `sha256`. Defaults to `sha256`. ## Attributes Reference @@ -78,4 +64,4 @@ SAML Settings can be imported. terraform import tfe_saml_settings.this saml ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/sentinel_policy.html.markdown b/website/docs/cdktf/typescript/r/sentinel_policy.html.markdown index 0c1b07cf4..206276ff4 100644 --- a/website/docs/cdktf/typescript/r/sentinel_policy.html.markdown +++ b/website/docs/cdktf/typescript/r/sentinel_policy.html.markdown @@ -21,18 +21,15 @@ enforced during runs. Basic usage: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { SentinelPolicy } from "./.gen/providers/tfe/sentinel-policy"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - new SentinelPolicy(this, "test", { + new tfe.sentinelPolicy.SentinelPolicy(this, "test", { description: "This policy always passes", enforceMode: "hard-mandatory", name: "my-policy-name", @@ -53,8 +50,8 @@ The following arguments are supported: * `organization` - (Optional) Name of the organization. If omitted, organization must be defined in the provider config. * `policy` - (Required) The actual policy itself. * `enforceMode` - (Optional) The enforcement level of the policy. Valid - values are `advisory`, `hard-mandatory` and `soft-mandatory`. Defaults - to `soft-mandatory`. + values are `advisory`, `hardMandatory` and `softMandatory`. Defaults + to `softMandatory`. ## Attributes Reference @@ -69,4 +66,4 @@ import ID. For example: terraform import tfe_sentinel_policy.test my-org-name/pol-wAs3zYmWAhYK7peR ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/sentinel_version.html.markdown b/website/docs/cdktf/typescript/r/sentinel_version.html.markdown index c11688de7..e1ac09ade 100644 --- a/website/docs/cdktf/typescript/r/sentinel_version.html.markdown +++ b/website/docs/cdktf/typescript/r/sentinel_version.html.markdown @@ -16,18 +16,15 @@ Manage Sentinel versions available on Terraform Cloud/Enterprise. Basic Usage: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { SentinelVersion } from "./.gen/providers/tfe/sentinel-version"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - new SentinelVersion(this, "test", { + new tfe.sentinelVersion.SentinelVersion(this, "test", { sha: "e75ac73deb69a6b3aa667cb0b8b731aee79e2904", url: "https://tfe-host.com/path/to/sentinel.zip", version: "0.24.0-custom", @@ -68,4 +65,4 @@ terraform import tfe_sentinel_version.test 0.24.0 -> **Note:** You can fetch a Sentinel version ID from the URL of an existing version in the 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/ssh_key.html.markdown b/website/docs/cdktf/typescript/r/ssh_key.html.markdown index 5005e86a3..90680d24c 100644 --- a/website/docs/cdktf/typescript/r/ssh_key.html.markdown +++ b/website/docs/cdktf/typescript/r/ssh_key.html.markdown @@ -17,18 +17,15 @@ key. An organization can have multiple SSH keys available. Basic usage: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { SshKey } from "./.gen/providers/tfe/ssh-key"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - new SshKey(this, "test", { + new tfe.sshKey.SshKey(this, "test", { key: "private-ssh-key", name: "my-ssh-key-name", organization: "my-org-name", @@ -55,4 +52,4 @@ The following arguments are supported: Because the Terraform Enterprise API does not return the private SSH key content, this resource cannot be imported. - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/team.html.markdown b/website/docs/cdktf/typescript/r/team.html.markdown index 723937553..b793d408b 100644 --- a/website/docs/cdktf/typescript/r/team.html.markdown +++ b/website/docs/cdktf/typescript/r/team.html.markdown @@ -16,18 +16,15 @@ Manages teams. Basic usage: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { Team } from "./.gen/providers/tfe/team"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - new Team(this, "test", { + new tfe.team.Team(this, "test", { name: "my-team-name", organization: "my-org-name", }); @@ -39,18 +36,15 @@ class MyConvertedCode extends TerraformStack { Organization Permission usage: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { Team } from "./.gen/providers/tfe/team"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - new Team(this, "test", { + new tfe.team.Team(this, "test", { name: "my-team-name", organization: "my-org-name", organizationAccess: { @@ -103,4 +97,4 @@ or terraform import tfe_team.test my-org-name/my-team-name ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/team_access.html.markdown b/website/docs/cdktf/typescript/r/team_access.html.markdown index 79dcd1795..8af746faa 100644 --- a/website/docs/cdktf/typescript/r/team_access.html.markdown +++ b/website/docs/cdktf/typescript/r/team_access.html.markdown @@ -16,33 +16,28 @@ Associate a team to permissions on a workspace. Basic usage: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { Token, TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { Team } from "./.gen/providers/tfe/team"; -import { TeamAccess } from "./.gen/providers/tfe/team-access"; -import { Workspace } from "./.gen/providers/tfe/workspace"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - const test = new Team(this, "test", { + const tfeTeamTest = new tfe.team.Team(this, "test", { name: "my-team-name", organization: "my-org-name", }); - const tfeWorkspaceTest = new Workspace(this, "test_1", { + const tfeWorkspaceTest = new tfe.workspace.Workspace(this, "test_1", { name: "my-workspace-name", organization: "my-org-name", }); /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ tfeWorkspaceTest.overrideLogicalId("test"); - const tfeTeamAccessTest = new TeamAccess(this, "test_2", { + const tfeTeamAccessTest = new tfe.teamAccess.TeamAccess(this, "test_2", { access: "read", - teamId: test.id, - workspaceId: Token.asString(tfeWorkspaceTest.id), + teamId: cdktf.Token.asString(tfeTeamTest.id), + workspaceId: cdktf.Token.asString(tfeWorkspaceTest.id), }); /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ tfeTeamAccessTest.overrideLogicalId("test"); @@ -64,7 +59,7 @@ The `permissions` block supports: * `runs` - (Required) The permission to grant the team on the workspace's runs. Valid values are `read`, `plan`, or `apply`. * `variables` - (Required) The permission to grant the team on the workspace's variables. Valid values are `none`, `read`, or `write`. -* `stateVersions` - (Required) The permission to grant the team on the workspace's state versions. Valid values are `none`, `read`, `read-outputs`, or `write`. +* `stateVersions` - (Required) The permission to grant the team on the workspace's state versions. Valid values are `none`, `read`, `readOutputs`, or `write`. * `sentinelMocks` - (Required) The permission to grant the team on the workspace's generated Sentinel mocks, Valid values are `none` or `read`. * `workspaceLocking` - (Required) Boolean determining whether or not to grant the team permission to manually lock/unlock the workspace. * `runTasks` - (Required) Boolean determining whether or not to grant the team permission to manage workspace run tasks. @@ -85,4 +80,4 @@ example: terraform import tfe_team_access.test my-org-name/my-workspace-name/tws-8S5wnRbRpogw6apb ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/team_member.html.markdown b/website/docs/cdktf/typescript/r/team_member.html.markdown index d04d60adb..eb7cf719c 100644 --- a/website/docs/cdktf/typescript/r/team_member.html.markdown +++ b/website/docs/cdktf/typescript/r/team_member.html.markdown @@ -25,24 +25,20 @@ used once. All four resources cannot be used for the same team simultaneously. Basic usage: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { Team } from "./.gen/providers/tfe/team"; -import { TeamMember } from "./.gen/providers/tfe/team-member"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - const test = new Team(this, "test", { + const tfeTeamTest = new tfe.team.Team(this, "test", { name: "my-team-name", organization: "my-org-name", }); - const tfeTeamMemberTest = new TeamMember(this, "test_1", { - teamId: test.id, + const tfeTeamMemberTest = new tfe.teamMember.TeamMember(this, "test_1", { + teamId: cdktf.Token.asString(tfeTeamTest.id), username: "sander", }); /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ @@ -68,4 +64,4 @@ example: terraform import tfe_team_member.test team-47qC3LmA47piVan7/sander ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/team_members.html.markdown b/website/docs/cdktf/typescript/r/team_members.html.markdown index 385531b7e..d47aa77bf 100644 --- a/website/docs/cdktf/typescript/r/team_members.html.markdown +++ b/website/docs/cdktf/typescript/r/team_members.html.markdown @@ -25,24 +25,20 @@ used once. All four resources cannot be used for the same team simultaneously. Basic usage: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { Team } from "./.gen/providers/tfe/team"; -import { TeamMembers } from "./.gen/providers/tfe/team-members"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - const test = new Team(this, "test", { + const tfeTeamTest = new tfe.team.Team(this, "test", { name: "my-team-name", organization: "my-org-name", }); - const tfeTeamMembersTest = new TeamMembers(this, "test_1", { - teamId: test.id, + const tfeTeamMembersTest = new tfe.teamMembers.TeamMembers(this, "test_1", { + teamId: cdktf.Token.asString(tfeTeamTest.id), usernames: ["admin", "sander"], }); /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ @@ -54,35 +50,23 @@ class MyConvertedCode extends TerraformStack { With a set of usernames: -```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { Fn, Token, TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { Team } from "./.gen/providers/tfe/team"; -import { TeamMembers } from "./.gen/providers/tfe/team-members"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { - super(scope, name); - const allUsernames = Fn.toset(["user1", "user2"]); - const test = new Team(this, "test", { - name: "my-team-name", - organization: "my-org-name", - }); - const tfeTeamMembersTest = new TeamMembers(this, "test_1", { - teamId: test.id, - usernames: Token.asList( - "${[ for user in ${" + allUsernames + "} : 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.*/ - tfeTeamMembersTest.overrideLogicalId("test"); - } +```hcl +locals { + all_usernames = toset([ + "user1", + "user2", + ]) } +resource "tfe_team" "test" { + name = "my-team-name" + organization = "my-org-name" +} + +resource "tfe_team_members" "test" { + team_id = tfe_team.test.id + usernames = [for user in local.all_usernames : user] +} ``` ## Argument Reference @@ -104,4 +88,4 @@ Team members can be imported; use `` as the import ID. For example: terraform import tfe_team_members.test team-47qC3LmA47piVan7 ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/team_organization_member.html.markdown b/website/docs/cdktf/typescript/r/team_organization_member.html.markdown index 9c60fbb77..1eec91879 100644 --- a/website/docs/cdktf/typescript/r/team_organization_member.html.markdown +++ b/website/docs/cdktf/typescript/r/team_organization_member.html.markdown @@ -24,37 +24,32 @@ an instance of Terraform Enterprise at least as recent as v202004-1. Basic usage: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { Token, TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { OrganizationMembership } from "./.gen/providers/tfe/organization-membership"; -import { Team } from "./.gen/providers/tfe/team"; -import { TeamOrganizationMember } from "./.gen/providers/tfe/team-organization-member"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - const test = new OrganizationMembership(this, "test", { - email: "example@hashicorp.com", - organization: "my-org-name", - }); - const tfeTeamTest = new Team(this, "test_1", { + const tfeOrganizationMembershipTest = + new tfe.organizationMembership.OrganizationMembership(this, "test", { + email: "example@hashicorp.com", + organization: "my-org-name", + }); + const tfeTeamTest = new tfe.team.Team(this, "test_1", { name: "my-team-name", organization: "my-org-name", }); /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ tfeTeamTest.overrideLogicalId("test"); - const tfeTeamOrganizationMemberTest = new TeamOrganizationMember( - this, - "test_2", - { - organizationMembershipId: test.id, - teamId: Token.asString(tfeTeamTest.id), - } - ); + const tfeTeamOrganizationMemberTest = + new tfe.teamOrganizationMember.TeamOrganizationMember(this, "test_2", { + organizationMembershipId: cdktf.Token.asString( + tfeOrganizationMembershipTest.id + ), + teamId: cdktf.Token.asString(tfeTeamTest.id), + }); /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ tfeTeamOrganizationMemberTest.overrideLogicalId("test"); } @@ -82,4 +77,4 @@ or terraform import tfe_team_organization_member.test my-org-name/user@company.com/my-team-name ``` ~> **NOTE:** The `//` import ID format cannot be used if there are `/` characters in the user's email. These users must be imported with the `/` format instead - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/team_organization_members.html.markdown b/website/docs/cdktf/typescript/r/team_organization_members.html.markdown index 7dda75e25..ba1476eec 100644 --- a/website/docs/cdktf/typescript/r/team_organization_members.html.markdown +++ b/website/docs/cdktf/typescript/r/team_organization_members.html.markdown @@ -24,41 +24,38 @@ an instance of Terraform Enterprise at least as recent as v202004-1. Basic usage: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { Token, TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { OrganizationMembership } from "./.gen/providers/tfe/organization-membership"; -import { Team } from "./.gen/providers/tfe/team"; -import { TeamOrganizationMembers } from "./.gen/providers/tfe/team-organization-members"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - const sample = new OrganizationMembership(this, "sample", { - email: "sample@hashicorp.com", - organization: "my-org-name", - }); - const test = new OrganizationMembership(this, "test", { - email: "example@hashicorp.com", - organization: "my-org-name", - }); - const tfeTeamTest = new Team(this, "test_2", { + const tfeOrganizationMembershipSample = + new tfe.organizationMembership.OrganizationMembership(this, "sample", { + email: "sample@hashicorp.com", + organization: "my-org-name", + }); + const tfeOrganizationMembershipTest = + new tfe.organizationMembership.OrganizationMembership(this, "test", { + email: "example@hashicorp.com", + organization: "my-org-name", + }); + const tfeTeamTest = new tfe.team.Team(this, "test_2", { name: "my-team-name", organization: "my-org-name", }); /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ tfeTeamTest.overrideLogicalId("test"); - const tfeTeamOrganizationMembersTest = new TeamOrganizationMembers( - this, - "test_3", - { - organizationMembershipIds: [test.id, sample.id], - teamId: Token.asString(tfeTeamTest.id), - } - ); + const tfeTeamOrganizationMembersTest = + new tfe.teamOrganizationMembers.TeamOrganizationMembers(this, "test_3", { + organizationMembershipIds: [ + cdktf.Token.asString(tfeOrganizationMembershipTest.id), + cdktf.Token.asString(tfeOrganizationMembershipSample.id), + ], + teamId: cdktf.Token.asString(tfeTeamTest.id), + }); /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ tfeTeamOrganizationMembersTest.overrideLogicalId("test"); } @@ -69,48 +66,48 @@ class MyConvertedCode extends TerraformStack { With a set of organization members: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { Fn, Token, TerraformIterator, TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { OrganizationMembership } from "./.gen/providers/tfe/organization-membership"; -import { Team } from "./.gen/providers/tfe/team"; -import { TeamOrganizationMembers } from "./.gen/providers/tfe/team-organization-members"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - const allUsers = Fn.toset(["user1@hashicorp.com", "user2@hashicorp.com"]); + const allUsers = cdktf.Fn.toset([ + "user1@hashicorp.com", + "user2@hashicorp.com", + ]); /*In most cases loops should be handled in the programming language context and not inside of the Terraform context. If you are looping over something external, e.g. a variable or a file input you should consider using a for loop. If you are looping over something only known to Terraform, e.g. a result of a data source you need to keep this like it is.*/ - const allMembershipForEachIterator = TerraformIterator.fromList( - Token.asAny(allUsers) + const tfeOrganizationMembershipAllMembershipForEachIterator = + cdktf.TerraformIterator.fromList(cdktf.Token.asAny(allUsers)); + new tfe.organizationMembership.OrganizationMembership( + this, + "all_membership", + { + email: cdktf.Token.asString( + tfeOrganizationMembershipAllMembershipForEachIterator.key + ), + organization: "my-org-name", + forEach: tfeOrganizationMembershipAllMembershipForEachIterator, + } ); - new OrganizationMembership(this, "all_membership", { - email: Token.asString(allMembershipForEachIterator.key), - organization: "my-org-name", - forEach: allMembershipForEachIterator, - }); - const test = new Team(this, "test", { + const tfeTeamTest = new tfe.team.Team(this, "test", { name: "my-team-name", organization: "my-org-name", }); - const tfeTeamOrganizationMembersTest = new TeamOrganizationMembers( - this, - "test_2", - { - organizationMembershipIds: Token.asList( + const tfeTeamOrganizationMembersTest = + new tfe.teamOrganizationMembers.TeamOrganizationMembers(this, "test_2", { + organizationMembershipIds: cdktf.Token.asList( "${[ for member in ${" + allUsers + "} : tfe_organization_membership.all_membership[member].id]}" ), - teamId: test.id, - } - ); + teamId: cdktf.Token.asString(tfeTeamTest.id), + }); /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ tfeTeamOrganizationMembersTest.overrideLogicalId("test"); } @@ -134,4 +131,4 @@ as the import ID. For example: terraform import tfe_team_organization_members.test team-47qC3LmA47piVan7 ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/team_project_access.html.markdown b/website/docs/cdktf/typescript/r/team_project_access.html.markdown index f85ec64cc..10eccae74 100644 --- a/website/docs/cdktf/typescript/r/team_project_access.html.markdown +++ b/website/docs/cdktf/typescript/r/team_project_access.html.markdown @@ -16,32 +16,28 @@ Associate a team to permissions on a project. Basic usage: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { Project } from "./.gen/providers/tfe/project"; -import { Team } from "./.gen/providers/tfe/team"; -import { TeamProjectAccess } from "./.gen/providers/tfe/team-project-access"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - const test = new Project(this, "test", { + const tfeProjectTest = new tfe.project.Project(this, "test", { name: "myproject", organization: "my-org-name", }); - const admin = new Team(this, "admin", { + const tfeTeamAdmin = new tfe.team.Team(this, "admin", { name: "my-admin-team", organization: "my-org-name", }); - const tfeTeamProjectAccessAdmin = new TeamProjectAccess(this, "admin_2", { - access: "admin", - projectId: test.id, - teamId: admin.id, - }); + const tfeTeamProjectAccessAdmin = + new tfe.teamProjectAccess.TeamProjectAccess(this, "admin_2", { + access: "admin", + projectId: cdktf.Token.asString(tfeProjectTest.id), + teamId: cdktf.Token.asString(tfeTeamAdmin.id), + }); /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ tfeTeamProjectAccessAdmin.overrideLogicalId("admin"); } @@ -79,7 +75,7 @@ The following permissions apply to all workspaces (and future workspaces) in the |----------------------|-------------------------------------------------------| | `runs` | The permission to grant project's workspaces' runs. Default: `read`. Valid strings: `read`, `plan`, or `apply`. | | `sentinelMocks` | The permission to grant project's workspaces' Sentinel mocks. Default: `none`. Valid strings: `none`, or `read`. | -| `stateVersions` | The permission to grant project's workspaces' state versions. Default: `none` Valid strings: `none`, `read-outputs`, `read`, or `write`.| +| `stateVersions` | The permission to grant project's workspaces' state versions. Default: `none` Valid strings: `none`, `readOutputs`, `read`, or `write`.| | `variables` | The permission to grant project's workspaces' variables. Default `none`. Valid strings: `none`, `read`, or `write`. | | `create` | The permission to create project's workspaces in the project. Default: `false`. Valid booleans `true`, `false` | | `locking` | The permission to manually lock or unlock the project's workspaces. Default `false`. Valid booleans `true`, `false` | @@ -91,28 +87,23 @@ The following permissions apply to all workspaces (and future workspaces) in the ## Example Usage with Custom Project Permissions ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { Project } from "./.gen/providers/tfe/project"; -import { Team } from "./.gen/providers/tfe/team"; -import { TeamProjectAccess } from "./.gen/providers/tfe/team-project-access"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - const test = new Project(this, "test", { + const tfeProjectTest = new tfe.project.Project(this, "test", { name: "myproject", organization: "my-org-name", }); - const dev = new Team(this, "dev", { + const tfeTeamDev = new tfe.team.Team(this, "dev", { name: "my-dev-team", organization: "my-org-name", }); - new TeamProjectAccess(this, "custom", { + new tfe.teamProjectAccess.TeamProjectAccess(this, "custom", { access: "custom", projectAccess: [ { @@ -120,8 +111,8 @@ class MyConvertedCode extends TerraformStack { teams: "none", }, ], - projectId: test.id, - teamId: dev.id, + projectId: cdktf.Token.asString(tfeProjectTest.id), + teamId: cdktf.Token.asString(tfeTeamDev.id), workspaceAccess: [ { create: true, @@ -154,4 +145,4 @@ example: terraform import tfe_team_project_access.admin tprj-2pmtXpZa4YzVMTPi ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/team_token.html.markdown b/website/docs/cdktf/typescript/r/team_token.html.markdown index 702ea826e..f450192af 100644 --- a/website/docs/cdktf/typescript/r/team_token.html.markdown +++ b/website/docs/cdktf/typescript/r/team_token.html.markdown @@ -16,24 +16,20 @@ Generates a new team token and overrides existing token if one exists. Basic usage: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { Team } from "./.gen/providers/tfe/team"; -import { TeamToken } from "./.gen/providers/tfe/team-token"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - const test = new Team(this, "test", { + const tfeTeamTest = new tfe.team.Team(this, "test", { name: "my-team-name", organization: "my-org-name", }); - const tfeTeamTokenTest = new TeamToken(this, "test_1", { - teamId: test.id, + const tfeTeamTokenTest = new tfe.teamToken.TeamToken(this, "test_1", { + teamId: cdktf.Token.asString(tfeTeamTest.id), }); /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ tfeTeamTokenTest.overrideLogicalId("test"); @@ -59,31 +55,27 @@ never expire. When a token has an expiry: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { Token, TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { Team } from "./.gen/providers/tfe/team"; -import { TeamToken } from "./.gen/providers/tfe/team-token"; -import { Rotating } from "./.gen/providers/time/rotating"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +import * as time from "./.gen/providers/time"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); /*The following providers are missing schema information and might need manual adjustments to synthesize correctly: time. For a more precise conversion please use the --provider flag in convert.*/ - const test = new Team(this, "test", { + const tfeTeamTest = new tfe.team.Team(this, "test", { name: "my-team-name", organization: "my-org-name", }); - const example = new Rotating(this, "example", { + const timeRotatingExample = new time.rotating.Rotating(this, "example", { rotation_days: 30, }); - const tfeTeamTokenTest = new TeamToken(this, "test_2", { - expiredAt: Token.asString(example.rotationRfc3339), - teamId: test.id, + const tfeTeamTokenTest = new tfe.teamToken.TeamToken(this, "test_2", { + expiredAt: cdktf.Token.asString(timeRotatingExample.rotationRfc3339), + teamId: cdktf.Token.asString(tfeTeamTest.id), }); /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ tfeTeamTokenTest.overrideLogicalId("test"); @@ -105,4 +97,4 @@ Team tokens can be imported; use `` as the import ID. For example: terraform import tfe_team_token.test team-47qC3LmA47piVan7 ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/terraform_version.html.markdown b/website/docs/cdktf/typescript/r/terraform_version.html.markdown index 498537295..f122ae910 100644 --- a/website/docs/cdktf/typescript/r/terraform_version.html.markdown +++ b/website/docs/cdktf/typescript/r/terraform_version.html.markdown @@ -16,18 +16,15 @@ Manage Terraform versions available on Terraform Cloud/Enterprise. Basic Usage: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { TerraformVersion } from "./.gen/providers/tfe/terraform-version"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - new TerraformVersion(this, "test", { + new tfe.terraformVersion.TerraformVersion(this, "test", { sha: "e75ac73deb69a6b3aa667cb0b8b731aee79e2904", url: "https://tfe-host.com/path/to/terraform.zip", version: "1.1.2-custom", @@ -68,4 +65,4 @@ terraform import tfe_terraform_version.test 1.1.2 -> **Note:** You can fetch a Terraform version ID from the URL of an existing version in the Terraform Cloud UI. The ID is in the format `tool-` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/variable.html.markdown b/website/docs/cdktf/typescript/r/variable.html.markdown index 329aa0a2d..1d442d61a 100644 --- a/website/docs/cdktf/typescript/r/variable.html.markdown +++ b/website/docs/cdktf/typescript/r/variable.html.markdown @@ -16,35 +16,34 @@ Creates, updates and destroys variables. Basic usage for workspaces: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { Token, TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { Organization } from "./.gen/providers/tfe/organization"; -import { Variable } from "./.gen/providers/tfe/variable"; -import { Workspace } from "./.gen/providers/tfe/workspace"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - const test = new Organization(this, "test", { - email: "admin@company.com", - name: "my-org-name", - }); - const tfeWorkspaceTest = new Workspace(this, "test_1", { + const tfeOrganizationTest = new tfe.organization.Organization( + this, + "test", + { + email: "admin@company.com", + name: "my-org-name", + } + ); + const tfeWorkspaceTest = new tfe.workspace.Workspace(this, "test_1", { name: "my-workspace-name", - organization: test.name, + organization: cdktf.Token.asString(tfeOrganizationTest.name), }); /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ tfeWorkspaceTest.overrideLogicalId("test"); - const tfeVariableTest = new Variable(this, "test_2", { + const tfeVariableTest = new tfe.variable.Variable(this, "test_2", { category: "terraform", description: "a useful description", key: "my_key_name", value: "my_value_name", - workspaceId: Token.asString(tfeWorkspaceTest.id), + workspaceId: cdktf.Token.asString(tfeWorkspaceTest.id), }); /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ tfeVariableTest.overrideLogicalId("test"); @@ -56,44 +55,43 @@ class MyConvertedCode extends TerraformStack { Basic usage for variable sets: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { Token, TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { Organization } from "./.gen/providers/tfe/organization"; -import { Variable } from "./.gen/providers/tfe/variable"; -import { VariableSet } from "./.gen/providers/tfe/variable-set"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - const test = new Organization(this, "test", { - email: "admin@company.com", - name: "my-org-name", - }); - const tfeVariableSetTest = new VariableSet(this, "test_1", { + const tfeOrganizationTest = new tfe.organization.Organization( + this, + "test", + { + email: "admin@company.com", + name: "my-org-name", + } + ); + const tfeVariableSetTest = new tfe.variableSet.VariableSet(this, "test_1", { description: "Some description.", global: false, name: "Test Varset", - organization: test.name, + organization: cdktf.Token.asString(tfeOrganizationTest.name), }); /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ tfeVariableSetTest.overrideLogicalId("test"); - new Variable(this, "test-a", { + new tfe.variable.Variable(this, "test-a", { category: "terraform", description: "a useful description", key: "seperate_variable", value: "my_value_name", - variableSetId: Token.asString(tfeVariableSetTest.id), + variableSetId: cdktf.Token.asString(tfeVariableSetTest.id), }); - new Variable(this, "test-b", { + new tfe.variable.Variable(this, "test-b", { category: "env", description: "an environment variable", key: "another_variable", value: "my_value_name", - variableSetId: Token.asString(tfeVariableSetTest.id), + variableSetId: cdktf.Token.asString(tfeVariableSetTest.id), }); } } @@ -135,42 +133,31 @@ While the `value` field may be referenced in other resources, for safety it is a The `readableValue` attribute is not sensitive, and will not be redacted; instead, it will be null if the variable is sensitive. This allows other resources to reference it, while keeping their plan outputs readable. For example: -```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { Variable } from "./.gen/providers/tfe/variable"; -import { Workspace } from "./.gen/providers/tfe/workspace"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { - super(scope, name); - const sensitiveVar = new Variable(this, "sensitive_var", { - category: "terraform", - key: "sensitive_key", - sensitive: true, - value: "sensitive_value", - workspaceId: workspace.id, - }); - const visibleVar = new Variable(this, "visible_var", { - category: "terraform", - key: "visible_key", - sensitive: false, - value: "visible_value", - workspaceId: workspace.id, - }); - new Workspace(this, "sensitive_workspace", { - name: "workspace-${" + sensitiveVar.value + "}", - organization: "organization name", - }); - new Workspace(this, "visible_workspace", { - name: "workspace-${" + visibleVar.readableValue + "}", - organization: "organization name", - }); - } +``` +resource "tfe_variable" "sensitive_var" { + key = "sensitive_key" + value = "sensitive_value" // this will be redacted from plan outputs + category = "terraform" + workspace_id = tfe_workspace.workspace.id + sensitive = true +} + +resource "tfe_variable" "visible_var" { + key = "visible_key" + value = "visible_value" // this will be redacted from plan outputs + category = "terraform" + workspace_id = tfe_workspace.workspace.id + sensitive = false +} + +resource "tfe_workspace" "sensitive_workspace" { + name = "workspace-${tfe_variable.sensitive_var.value}" // this will be redacted from plan outputs + organization = "organization name" +} + +resource "tfe_workspace" "visible_workspace" { + name = "workspace-${tfe_variable.visible_var.readable_value}" // this will not be redacted from plan outputs + organization = "organization name" } ``` @@ -198,4 +185,4 @@ example: terraform import tfe_variable.test my-org-name/varset-47qC3LmA47piVan7/var-5rTwnSaRPogw6apb ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/variable_set.html.markdown b/website/docs/cdktf/typescript/r/variable_set.html.markdown index f4e66379a..ceb0d3f23 100644 --- a/website/docs/cdktf/typescript/r/variable_set.html.markdown +++ b/website/docs/cdktf/typescript/r/variable_set.html.markdown @@ -16,75 +16,68 @@ Creates, updates and destroys variable sets. Basic usage: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { Token, TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { Organization } from "./.gen/providers/tfe/organization"; -import { Project } from "./.gen/providers/tfe/project"; -import { ProjectVariableSet } from "./.gen/providers/tfe/project-variable-set"; -import { Variable } from "./.gen/providers/tfe/variable"; -import { VariableSet } from "./.gen/providers/tfe/variable-set"; -import { Workspace } from "./.gen/providers/tfe/workspace"; -import { WorkspaceVariableSet } from "./.gen/providers/tfe/workspace-variable-set"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - const test = new Organization(this, "test", { - email: "admin@company.com", - name: "my-org-name", - }); - const tfeProjectTest = new Project(this, "test_1", { + const tfeOrganizationTest = new tfe.organization.Organization( + this, + "test", + { + email: "admin@company.com", + name: "my-org-name", + } + ); + const tfeProjectTest = new tfe.project.Project(this, "test_1", { name: "projectname", - organization: test.name, + organization: cdktf.Token.asString(tfeOrganizationTest.name), }); /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ tfeProjectTest.overrideLogicalId("test"); - const tfeVariableSetTest = new VariableSet(this, "test_2", { + const tfeVariableSetTest = new tfe.variableSet.VariableSet(this, "test_2", { description: "Some description.", name: "Test Varset", - organization: test.name, + organization: cdktf.Token.asString(tfeOrganizationTest.name), }); /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ tfeVariableSetTest.overrideLogicalId("test"); - const tfeWorkspaceTest = new Workspace(this, "test_3", { + const tfeWorkspaceTest = new tfe.workspace.Workspace(this, "test_3", { name: "my-workspace-name", - organization: test.name, + organization: cdktf.Token.asString(tfeOrganizationTest.name), }); /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ tfeWorkspaceTest.overrideLogicalId("test"); - const tfeWorkspaceVariableSetTest = new WorkspaceVariableSet( - this, - "test_4", - { - variableSetId: Token.asString(tfeVariableSetTest.id), - workspaceId: Token.asString(tfeWorkspaceTest.id), - } - ); + const tfeWorkspaceVariableSetTest = + new tfe.workspaceVariableSet.WorkspaceVariableSet(this, "test_4", { + variableSetId: cdktf.Token.asString(tfeVariableSetTest.id), + workspaceId: cdktf.Token.asString(tfeWorkspaceTest.id), + }); /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ tfeWorkspaceVariableSetTest.overrideLogicalId("test"); - const tfeProjectVariableSetTest = new ProjectVariableSet(this, "test_5", { - projectId: Token.asString(tfeProjectTest.id), - variableSetId: Token.asString(tfeVariableSetTest.id), - }); + const tfeProjectVariableSetTest = + new tfe.projectVariableSet.ProjectVariableSet(this, "test_5", { + projectId: cdktf.Token.asString(tfeProjectTest.id), + variableSetId: cdktf.Token.asString(tfeVariableSetTest.id), + }); /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ tfeProjectVariableSetTest.overrideLogicalId("test"); - new Variable(this, "test-a", { + new tfe.variable.Variable(this, "test-a", { category: "terraform", description: "a useful description", key: "seperate_variable", value: "my_value_name", - variableSetId: Token.asString(tfeVariableSetTest.id), + variableSetId: cdktf.Token.asString(tfeVariableSetTest.id), }); - new Variable(this, "test-b", { + new tfe.variable.Variable(this, "test-b", { category: "env", description: "an environment variable", key: "another_variable", value: "my_value_name", - variableSetId: Token.asString(tfeVariableSetTest.id), + variableSetId: cdktf.Token.asString(tfeVariableSetTest.id), }); } } @@ -94,44 +87,43 @@ class MyConvertedCode extends TerraformStack { Creating a global variable set: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { Token, TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { Organization } from "./.gen/providers/tfe/organization"; -import { Variable } from "./.gen/providers/tfe/variable"; -import { VariableSet } from "./.gen/providers/tfe/variable-set"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - const test = new Organization(this, "test", { - email: "admin@company.com", - name: "my-org-name", - }); - const tfeVariableSetTest = new VariableSet(this, "test_1", { + const tfeOrganizationTest = new tfe.organization.Organization( + this, + "test", + { + email: "admin@company.com", + name: "my-org-name", + } + ); + const tfeVariableSetTest = new tfe.variableSet.VariableSet(this, "test_1", { description: "Variable set applied to all workspaces.", global: true, name: "Global Varset", - organization: test.name, + organization: cdktf.Token.asString(tfeOrganizationTest.name), }); /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ tfeVariableSetTest.overrideLogicalId("test"); - new Variable(this, "test-a", { + new tfe.variable.Variable(this, "test-a", { category: "terraform", description: "a useful description", key: "seperate_variable", value: "my_value_name", - variableSetId: Token.asString(tfeVariableSetTest.id), + variableSetId: cdktf.Token.asString(tfeVariableSetTest.id), }); - new Variable(this, "test-b", { + new tfe.variable.Variable(this, "test-b", { category: "env", description: "an environment variable", key: "another_variable", value: "my_value_name", - variableSetId: Token.asString(tfeVariableSetTest.id), + variableSetId: cdktf.Token.asString(tfeVariableSetTest.id), }); } } @@ -141,44 +133,43 @@ class MyConvertedCode extends TerraformStack { Create a priority variable set: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { Token, TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { Organization } from "./.gen/providers/tfe/organization"; -import { Variable } from "./.gen/providers/tfe/variable"; -import { VariableSet } from "./.gen/providers/tfe/variable-set"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - const test = new Organization(this, "test", { - email: "admin@company.com", - name: "my-org-name", - }); - const tfeVariableSetTest = new VariableSet(this, "test_1", { + const tfeOrganizationTest = new tfe.organization.Organization( + this, + "test", + { + email: "admin@company.com", + name: "my-org-name", + } + ); + const tfeVariableSetTest = new tfe.variableSet.VariableSet(this, "test_1", { description: "Variable set applied to all workspaces.", name: "Global Varset", - organization: test.name, + organization: cdktf.Token.asString(tfeOrganizationTest.name), priority: true, }); /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ tfeVariableSetTest.overrideLogicalId("test"); - new Variable(this, "test-a", { + new tfe.variable.Variable(this, "test-a", { category: "terraform", description: "a useful description", key: "seperate_variable", value: "my_value_name", - variableSetId: Token.asString(tfeVariableSetTest.id), + variableSetId: cdktf.Token.asString(tfeVariableSetTest.id), }); - new Variable(this, "test-b", { + new tfe.variable.Variable(this, "test-b", { category: "env", description: "an environment variable", key: "another_variable", value: "my_value_name", - variableSetId: Token.asString(tfeVariableSetTest.id), + variableSetId: cdktf.Token.asString(tfeVariableSetTest.id), }); } } @@ -211,4 +202,4 @@ Variable sets can be imported; use `` as the import ID. For exa terraform import tfe_variable_set.test varset-5rTwnSaRPogw6apb ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/workspace.html.markdown b/website/docs/cdktf/typescript/r/workspace.html.markdown index 20f9ea001..1190e3e79 100644 --- a/website/docs/cdktf/typescript/r/workspace.html.markdown +++ b/website/docs/cdktf/typescript/r/workspace.html.markdown @@ -20,25 +20,25 @@ Provides a workspace resource. Basic usage: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { Organization } from "./.gen/providers/tfe/organization"; -import { Workspace } from "./.gen/providers/tfe/workspace"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - const testOrganization = new Organization(this, "test-organization", { - email: "admin@company.com", - name: "my-org-name", - }); - new Workspace(this, "test", { + const tfeOrganizationTestOrganization = new tfe.organization.Organization( + this, + "test-organization", + { + email: "admin@company.com", + name: "my-org-name", + } + ); + new tfe.workspace.Workspace(this, "test", { name: "my-workspace-name", - organization: testOrganization.name, + organization: cdktf.Token.asString(tfeOrganizationTestOrganization.name), tagNames: ["test", "app"], }); } @@ -49,38 +49,37 @@ class MyConvertedCode extends TerraformStack { Usage with vcs_repo: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { OauthClient } from "./.gen/providers/tfe/oauth-client"; -import { Organization } from "./.gen/providers/tfe/organization"; -import { Workspace } from "./.gen/providers/tfe/workspace"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - const testOrganization = new Organization(this, "test-organization", { - email: "admin@company.com", - name: "my-org-name", - }); - const test = new OauthClient(this, "test", { + const tfeOrganizationTestOrganization = new tfe.organization.Organization( + this, + "test-organization", + { + email: "admin@company.com", + name: "my-org-name", + } + ); + const tfeOauthClientTest = new tfe.oauthClient.OauthClient(this, "test", { apiUrl: "https://api.github.com", httpUrl: "https://github.com", oauthToken: "oauth_token_id", - organization: testOrganization, + organization: tfeOrganizationTestOrganization, serviceProvider: "github", }); - new Workspace(this, "parent", { + new tfe.workspace.Workspace(this, "parent", { name: "parent-ws", - organization: testOrganization, + organization: tfeOrganizationTestOrganization, queueAllRuns: false, vcsRepo: { branch: "main", identifier: "my-org-name/vcs-repository", - oauthTokenId: test.oauthTokenId, + oauthTokenId: cdktf.Token.asString(tfeOauthClientTest.oauthTokenId), }, }); } @@ -143,7 +142,7 @@ The following arguments are supported: workspace will display their output as text logs. * `sshKeyId` - (Optional) The ID of an SSH key to assign to the workspace. * `tagNames` - (Optional) A list of tag names for this workspace. Note that tags must only contain lowercase letters, numbers, colons, or hyphens. -* `ignore_additional_tag_names` - (Optional) Explicitly ignores `tagNames` +* `ignoreAdditionalTagNames` - (Optional) Explicitly ignores `tagNames` _not_ defined by config so they will not be overwritten by the configured tags. This creates exceptional behavior in terraform with respect to `tagNames` and is not recommended. This value must be applied before it @@ -154,7 +153,7 @@ will be used. (like `~> 1.0.0`); if you specify a constraint, the workspace will always use the newest release that meets that constraint. Defaults to the latest available version. -* `triggerPatterns` - (Optional) List of [glob patterns](https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings/vcs#glob-patterns-for-automatic-run-triggering) that describe the files Terraform Cloud monitors for changes. Trigger patterns are always appended to the root directory of the repository. Mutually exclusive with `trigger-prefixes`. +* `triggerPatterns` - (Optional) List of [glob patterns](https://developer.hashicorp.com/terraform/cloud-docs/workspaces/settings/vcs#glob-patterns-for-automatic-run-triggering) that describe the files Terraform Cloud monitors for changes. Trigger patterns are always appended to the root directory of the repository. Mutually exclusive with `triggerPrefixes`. * `triggerPrefixes` - (Optional) List of repository-root-relative paths which describe all locations to be tracked for changes. * `vcsRepo` - (Optional) Settings for the workspace's VCS repository, enabling the [UI/VCS-driven run workflow](https://developer.hashicorp.com/terraform/cloud-docs/run/ui). @@ -173,7 +172,7 @@ The `vcsRepo` block supports: * `ingressSubmodules` - (Optional) Whether submodules should be fetched when cloning the VCS repository. Defaults to `false`. * `oauthTokenId` - (Optional) The VCS Connection (OAuth Connection + Token) to use. - This ID can be obtained from a `tfe_oauth_client` resource. This conflicts with `githubAppInstallationId` and can only be used if `githubAppInstallationId` is not used. + This ID can be obtained from a `tfeOauthClient` resource. This conflicts with `githubAppInstallationId` and can only be used if `githubAppInstallationId` is not used. * `tagsRegex` - (Optional) A regular expression used to trigger a Workspace run for matching Git tags. This option conflicts with `triggerPatterns` and `triggerPrefixes`. Should only set this value if the former is not being used. ## Attributes Reference @@ -197,4 +196,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 eb29e7b08..08afbc792 100644 --- a/website/docs/cdktf/typescript/r/workspace_policy_set.html.markdown +++ b/website/docs/cdktf/typescript/r/workspace_policy_set.html.markdown @@ -11,48 +11,47 @@ description: |- Adds and removes policy sets from a workspace --> **Note:** `tfe_policy_set` has an argument `workspaceIds` that should not be used alongside this resource. They attempt to manage the same attachments. +-> **Note:** `tfePolicySet` has an argument `workspaceIds` that should not be used alongside this resource. They attempt to manage the same attachments. ## Example Usage Basic usage: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { Token, TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { Organization } from "./.gen/providers/tfe/organization"; -import { PolicySet } from "./.gen/providers/tfe/policy-set"; -import { Workspace } from "./.gen/providers/tfe/workspace"; -import { WorkspacePolicySet } from "./.gen/providers/tfe/workspace-policy-set"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - const test = new Organization(this, "test", { - email: "admin@company.com", - name: "my-org-name", - }); - const tfePolicySetTest = new PolicySet(this, "test_1", { + const tfeOrganizationTest = new tfe.organization.Organization( + this, + "test", + { + email: "admin@company.com", + name: "my-org-name", + } + ); + const tfePolicySetTest = new tfe.policySet.PolicySet(this, "test_1", { description: "Some description.", name: "my-policy-set", - organization: test.name, + organization: cdktf.Token.asString(tfeOrganizationTest.name), }); /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ tfePolicySetTest.overrideLogicalId("test"); - const tfeWorkspaceTest = new Workspace(this, "test_2", { + const tfeWorkspaceTest = new tfe.workspace.Workspace(this, "test_2", { name: "my-workspace-name", - organization: test.name, + organization: cdktf.Token.asString(tfeOrganizationTest.name), }); /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ tfeWorkspaceTest.overrideLogicalId("test"); - const tfeWorkspacePolicySetTest = new WorkspacePolicySet(this, "test_3", { - policySetId: Token.asString(tfePolicySetTest.id), - workspaceId: Token.asString(tfeWorkspaceTest.id), - }); + const tfeWorkspacePolicySetTest = + new tfe.workspacePolicySet.WorkspacePolicySet(this, "test_3", { + policySetId: cdktf.Token.asString(tfePolicySetTest.id), + workspaceId: cdktf.Token.asString(tfeWorkspaceTest.id), + }); /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ tfeWorkspacePolicySetTest.overrideLogicalId("test"); } @@ -79,4 +78,4 @@ Workspace Policy Sets can be imported; use `// \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/workspace_policy_set_exclusion.html.markdown b/website/docs/cdktf/typescript/r/workspace_policy_set_exclusion.html.markdown index e76d7a91a..2bca759b3 100644 --- a/website/docs/cdktf/typescript/r/workspace_policy_set_exclusion.html.markdown +++ b/website/docs/cdktf/typescript/r/workspace_policy_set_exclusion.html.markdown @@ -11,52 +11,51 @@ description: |- Adds and removes policy sets from an excluded workspace --> **Note:** `tfe_policy_set` has an argument `workspaceIds` that should not be used alongside this resource. They attempt to manage the same attachments. +-> **Note:** `tfePolicySet` has an argument `workspaceIds` that should not be used alongside this resource. They attempt to manage the same attachments. ## Example Usage Basic usage: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { Token, TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { Organization } from "./.gen/providers/tfe/organization"; -import { PolicySet } from "./.gen/providers/tfe/policy-set"; -import { Workspace } from "./.gen/providers/tfe/workspace"; -import { WorkspacePolicySetExclusion } from "./.gen/providers/tfe/workspace-policy-set-exclusion"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - const test = new Organization(this, "test", { - email: "admin@company.com", - name: "my-org-name", - }); - const tfePolicySetTest = new PolicySet(this, "test_1", { + const tfeOrganizationTest = new tfe.organization.Organization( + this, + "test", + { + email: "admin@company.com", + name: "my-org-name", + } + ); + const tfePolicySetTest = new tfe.policySet.PolicySet(this, "test_1", { description: "Some description.", name: "my-policy-set", - organization: test.name, + organization: cdktf.Token.asString(tfeOrganizationTest.name), }); /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ tfePolicySetTest.overrideLogicalId("test"); - const tfeWorkspaceTest = new Workspace(this, "test_2", { + const tfeWorkspaceTest = new tfe.workspace.Workspace(this, "test_2", { name: "my-workspace-name", - organization: test.name, + organization: cdktf.Token.asString(tfeOrganizationTest.name), }); /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ tfeWorkspaceTest.overrideLogicalId("test"); - const tfeWorkspacePolicySetExclusionTest = new WorkspacePolicySetExclusion( - this, - "test_3", - { - policySetId: Token.asString(tfePolicySetTest.id), - workspaceId: Token.asString(tfeWorkspaceTest.id), - } - ); + const tfeWorkspacePolicySetExclusionTest = + new tfe.workspacePolicySetExclusion.WorkspacePolicySetExclusion( + this, + "test_3", + { + policySetId: cdktf.Token.asString(tfePolicySetTest.id), + workspaceId: cdktf.Token.asString(tfeWorkspaceTest.id), + } + ); /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ tfeWorkspacePolicySetExclusionTest.overrideLogicalId("test"); } @@ -83,4 +82,4 @@ Excluded Workspace Policy Sets can be imported; use `/ \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/workspace_run.html.markdown b/website/docs/cdktf/typescript/r/workspace_run.html.markdown index 388a6fded..f1875dbe2 100644 --- a/website/docs/cdktf/typescript/r/workspace_run.html.markdown +++ b/website/docs/cdktf/typescript/r/workspace_run.html.markdown @@ -14,90 +14,92 @@ Provides a resource to manage the _initial_ and/or _final_ Terraform run in a gi There are a few main use cases this resource was designed for: - **Workspaces that depend on other workspaces.** If a workspace will create infrastructure that other workspaces rely on (for example, a Kubernetes cluster to deploy resources into), those downstream workspaces can depend on an initial `apply` with `wait_for_run = true`, so they aren't created before their infrastructure dependencies. -- **A more reliable `queue_all_runs = true`.** The `queueAllRuns` argument on `tfe_workspace` requests an initial run, which can complete asynchronously outside of the Terraform run that creates the workspace. Unfortunately, it can't be used with workspaces that require variables to be set, because the `tfe_variable` resources themselves depend on the `tfe_workspace`. By managing an initial `apply` with `wait_for_run = false` that depends on your `tfe_variables`, you can accomplish the same goal without a circular dependency. -- **Safe workspace destruction.** To ensure a workspace's managed resources are destroyed before deleting it, manage a `destroy` with `wait_for_run = true`. When you destroy the whole configuration, Terraform will wait for the destroy run to complete before deleting the workspace. This pattern is compatible with the `tfe_workspace` resource's default safe deletion behavior. +- **A more reliable `queue_all_runs = true`.** The `queueAllRuns` argument on `tfeWorkspace` requests an initial run, which can complete asynchronously outside of the Terraform run that creates the workspace. Unfortunately, it can't be used with workspaces that require variables to be set, because the `tfeVariable` resources themselves depend on the `tfeWorkspace`. By managing an initial `apply` with `wait_for_run = false` that depends on your `tfeVariables`, you can accomplish the same goal without a circular dependency. +- **Safe workspace destruction.** To ensure a workspace's managed resources are destroyed before deleting it, manage a `destroy` with `wait_for_run = true`. When you destroy the whole configuration, Terraform will wait for the destroy run to complete before deleting the workspace. This pattern is compatible with the `tfeWorkspace` resource's default safe deletion behavior. -The `tfe_workspace_run` expects to own exactly one apply during a creation and/or one destroy during a destruction. This implies that even if previous successful applies exist in the workspace, a `tfe_workspace_run` resource that includes an `apply` block will queue a new apply when added to a config. +The `tfeWorkspaceRun` expects to own exactly one apply during a creation and/or one destroy during a destruction. This implies that even if previous successful applies exist in the workspace, a `tfeWorkspaceRun` resource that includes an `apply` block will queue a new apply when added to a config. ## Example Usage Basic usage with multiple workspaces: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { OauthClient } from "./.gen/providers/tfe/oauth-client"; -import { Organization } from "./.gen/providers/tfe/organization"; -import { Workspace } from "./.gen/providers/tfe/workspace"; -import { WorkspaceRun } from "./.gen/providers/tfe/workspace-run"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - const testOrganization = new Organization(this, "test-organization", { - email: "admin@company.com", - name: "my-org-name", - }); - const test = new OauthClient(this, "test", { + const tfeOrganizationTestOrganization = new tfe.organization.Organization( + this, + "test-organization", + { + email: "admin@company.com", + name: "my-org-name", + } + ); + const tfeOauthClientTest = new tfe.oauthClient.OauthClient(this, "test", { apiUrl: "https://api.github.com", httpUrl: "https://github.com", oauthToken: "oauth_token_id", - organization: testOrganization, + organization: tfeOrganizationTestOrganization, serviceProvider: "github", }); - const child = new Workspace(this, "child", { + const tfeWorkspaceChild = new tfe.workspace.Workspace(this, "child", { name: "child-ws", - organization: testOrganization, + organization: tfeOrganizationTestOrganization, queueAllRuns: false, vcsRepo: { branch: "main", identifier: "my-org-name/vcs-repository", - oauthTokenId: test.oauthTokenId, + oauthTokenId: cdktf.Token.asString(tfeOauthClientTest.oauthTokenId), }, }); - const parent = new Workspace(this, "parent", { + const tfeWorkspaceParent = new tfe.workspace.Workspace(this, "parent", { name: "parent-ws", - organization: testOrganization, + organization: tfeOrganizationTestOrganization, queueAllRuns: false, vcsRepo: { branch: "main", identifier: "my-org-name/vcs-repository", - oauthTokenId: test.oauthTokenId, - }, - }); - const wsRunParent = new WorkspaceRun(this, "ws_run_parent", { - apply: { - manualConfirm: false, - retryAttempts: 5, - retryBackoffMin: 5, - waitForRun: true, + oauthTokenId: cdktf.Token.asString(tfeOauthClientTest.oauthTokenId), }, - destroy: { - manualConfirm: false, - retryAttempts: 3, - retryBackoffMin: 10, - waitForRun: true, - }, - workspaceId: parent.id, }); - new WorkspaceRun(this, "ws_run_child", { + const tfeWorkspaceRunWsRunParent = new tfe.workspaceRun.WorkspaceRun( + this, + "ws_run_parent", + { + apply: { + manualConfirm: false, + retryAttempts: 5, + retryBackoffMin: 5, + waitForRun: true, + }, + destroy: { + manualConfirm: false, + retryAttempts: 3, + retryBackoffMin: 10, + waitForRun: true, + }, + workspaceId: cdktf.Token.asString(tfeWorkspaceParent.id), + } + ); + new tfe.workspaceRun.WorkspaceRun(this, "ws_run_child", { apply: { manualConfirm: false, retryAttempts: 5, retryBackoffMin: 5, }, - dependsOn: [wsRunParent], + dependsOn: [tfeWorkspaceRunWsRunParent], destroy: { manualConfirm: false, retryAttempts: 3, retryBackoffMin: 10, waitForRun: true, }, - workspaceId: child.id, + workspaceId: cdktf.Token.asString(tfeWorkspaceChild.id), }); } } @@ -107,42 +109,40 @@ class MyConvertedCode extends TerraformStack { With manual confirmation: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { OauthClient } from "./.gen/providers/tfe/oauth-client"; -import { Organization } from "./.gen/providers/tfe/organization"; -import { Workspace } from "./.gen/providers/tfe/workspace"; -import { WorkspaceRun } from "./.gen/providers/tfe/workspace-run"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - const testOrganization = new Organization(this, "test-organization", { - email: "admin@company.com", - name: "my-org-name", - }); - const test = new OauthClient(this, "test", { + const tfeOrganizationTestOrganization = new tfe.organization.Organization( + this, + "test-organization", + { + email: "admin@company.com", + name: "my-org-name", + } + ); + const tfeOauthClientTest = new tfe.oauthClient.OauthClient(this, "test", { apiUrl: "https://api.github.com", httpUrl: "https://github.com", oauthToken: "oauth_token_id", - organization: testOrganization, + organization: tfeOrganizationTestOrganization, serviceProvider: "github", }); - const parent = new Workspace(this, "parent", { + const tfeWorkspaceParent = new tfe.workspace.Workspace(this, "parent", { name: "parent-ws", - organization: testOrganization, + organization: tfeOrganizationTestOrganization, queueAllRuns: false, vcsRepo: { branch: "main", identifier: "my-org-name/vcs-repository", - oauthTokenId: test.oauthTokenId, + oauthTokenId: cdktf.Token.asString(tfeOauthClientTest.oauthTokenId), }, }); - new WorkspaceRun(this, "ws_run_parent", { + new tfe.workspaceRun.WorkspaceRun(this, "ws_run_parent", { apply: { manualConfirm: true, }, @@ -150,7 +150,7 @@ class MyConvertedCode extends TerraformStack { manualConfirm: true, waitForRun: true, }, - workspaceId: parent.id, + workspaceId: cdktf.Token.asString(tfeWorkspaceParent.id), }); } } @@ -160,42 +160,40 @@ class MyConvertedCode extends TerraformStack { With no retries: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { OauthClient } from "./.gen/providers/tfe/oauth-client"; -import { Organization } from "./.gen/providers/tfe/organization"; -import { Workspace } from "./.gen/providers/tfe/workspace"; -import { WorkspaceRun } from "./.gen/providers/tfe/workspace-run"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - const testOrganization = new Organization(this, "test-organization", { - email: "admin@company.com", - name: "my-org-name", - }); - const test = new OauthClient(this, "test", { + const tfeOrganizationTestOrganization = new tfe.organization.Organization( + this, + "test-organization", + { + email: "admin@company.com", + name: "my-org-name", + } + ); + const tfeOauthClientTest = new tfe.oauthClient.OauthClient(this, "test", { apiUrl: "https://api.github.com", httpUrl: "https://github.com", oauthToken: "oauth_token_id", - organization: testOrganization, + organization: tfeOrganizationTestOrganization, serviceProvider: "github", }); - const parent = new Workspace(this, "parent", { + const tfeWorkspaceParent = new tfe.workspace.Workspace(this, "parent", { name: "parent-ws", - organization: testOrganization, + organization: tfeOrganizationTestOrganization, queueAllRuns: false, vcsRepo: { branch: "main", identifier: "my-org-name/vcs-repository", - oauthTokenId: test.oauthTokenId, + oauthTokenId: cdktf.Token.asString(tfeOauthClientTest.oauthTokenId), }, }); - new WorkspaceRun(this, "ws_run_parent", { + new tfe.workspaceRun.WorkspaceRun(this, "ws_run_parent", { apply: { manualConfirm: false, retry: false, @@ -205,7 +203,7 @@ class MyConvertedCode extends TerraformStack { retry: false, waitForRun: true, }, - workspaceId: parent.id, + workspaceId: cdktf.Token.asString(tfeWorkspaceParent.id), }); } } @@ -225,16 +223,16 @@ Both `apply` and `destroy` block supports: * `manualConfirm` - (Required) If set to true a human will have to manually confirm a plan in Terraform Cloud's UI to start an apply. If set to false, this resource will be automatically applied. Defaults to `false`. * If `waitForRun` is set to `false`, this auto-apply will be done by Terraform Cloud. * If `waitForRun` is set to `true`, the apply will be confirmed by the provider. The exception is the case of policy check soft-failed where a human has to perform an override by manually confirming the plan even though `manualConfirm` is set to false. - * Note that this setting will override the workspace's default apply mode. To use the workspace default apply mode, look up the setting for `autoApply` with the `tfe_workspace` data source. + * Note that this setting will override the workspace's default apply mode. To use the workspace default apply mode, look up the setting for `autoApply` with the `tfeWorkspace` data source. * `retry` - (Optional) Whether or not to retry on plan or apply errors. When set to true, `retryAttempts` must also be greater than zero inorder for retries to happen. Defaults to `true`. * `retryAttempts` - (Optional) The number to retry attempts made after an initial error. Defaults to `3`. * `retryBackoffMin` - (Optional) The minimum time in seconds to backoff before attempting a retry. Defaults to `1`. * `retryBackoffMax` - (Optional) The maximum time in seconds to backoff before attempting a retry. Defaults to `30`. -* `waitForRun` - (Optional) Whether or not to wait for a run to reach completion before considering this a success. When set to `false`, the provider considers the `tfe_workspace_run` resource to have been created immediately after the run has been queued. When set to `true`, the provider waits for a successful apply on the target workspace to have applied successfully (or if it resulted in a no-change plan). Defaults to `true`. +* `waitForRun` - (Optional) Whether or not to wait for a run to reach completion before considering this a success. When set to `false`, the provider considers the `tfeWorkspaceRun` resource to have been created immediately after the run has been queued. When set to `true`, the provider waits for a successful apply on the target workspace to have applied successfully (or if it resulted in a no-change plan). Defaults to `true`. ## Attributes Reference In addition to all arguments above, the following attributes are exported: * `id` - The ID of the run created by this resource. Note, if the resource was created without an `apply{}` configuration block, then this ID will not refer to a real run in 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 b45d66f2a..2af33a4b9 100644 --- a/website/docs/cdktf/typescript/r/workspace_run_task.html.markdown +++ b/website/docs/cdktf/typescript/r/workspace_run_task.html.markdown @@ -17,26 +17,12 @@ The tfe_workspace_run_task resource associates, updates and removes [Workspace R Basic usage: -```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { WorkspaceRunTask } from "./.gen/providers/tfe/workspace-run-task"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { - super(scope, name); - new WorkspaceRunTask(this, "example", { - enforcementLevel: "advisory", - taskId: tfeOrganizationRunTask.example.id, - workspaceId: tfeWorkspace.example.id, - }); - } +```hcl +resource "tfe_workspace_run_task" "example" { + workspace_id = resource.tfe_workspace.example.id + task_id = resource.tfe_organization_run_task.example.id + enforcement_level = "advisory" } - ``` ## Argument Reference @@ -46,7 +32,7 @@ The following arguments are supported: * `enforcementLevel` - (Required) The enforcement level of the task. Valid values are `advisory` and `mandatory`. * `taskId` - (Required) The id of the Run task to associate to the Workspace. * `workspaceId` - (Required) The id of the workspace to associate the Run task to. -* `stage` - (Optional) The stage to run the task in. Valid values are `pre_plan`, `post_plan`, and `pre_apply`. +* `stage` - (Optional) The stage to run the task in. Valid values are `prePlan`, `postPlan`, and `preApply`. ## Attributes Reference @@ -61,4 +47,4 @@ import ID. For example: terraform import tfe_workspace_run_task.test my-org-name/workspace/task-name ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/workspace_settings.markdown b/website/docs/cdktf/typescript/r/workspace_settings.markdown index 26cba38c8..04f080251 100644 --- a/website/docs/cdktf/typescript/r/workspace_settings.markdown +++ b/website/docs/cdktf/typescript/r/workspace_settings.markdown @@ -16,30 +16,29 @@ Manages or reads execution mode and agent pool settings for a workspace. This al Basic usage: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { Organization } from "./.gen/providers/tfe/organization"; -import { Workspace } from "./.gen/providers/tfe/workspace"; -import { WorkspaceSettings } from "./.gen/providers/tfe/workspace-settings"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - const testOrganization = new Organization(this, "test-organization", { - email: "admin@company.com", - name: "my-org-name", - }); - const test = new Workspace(this, "test", { + const tfeOrganizationTestOrganization = new tfe.organization.Organization( + this, + "test-organization", + { + email: "admin@company.com", + name: "my-org-name", + } + ); + const tfeWorkspaceTest = new tfe.workspace.Workspace(this, "test", { name: "my-workspace-name", - organization: testOrganization.name, + organization: cdktf.Token.asString(tfeOrganizationTestOrganization.name), }); - new WorkspaceSettings(this, "test-settings", { + new tfe.workspaceSettings.WorkspaceSettings(this, "test-settings", { executionMode: "local", - workspaceId: test.id, + workspaceId: cdktf.Token.asString(tfeWorkspaceTest.id), }); } } @@ -49,49 +48,53 @@ class MyConvertedCode extends TerraformStack { With `executionMode` of `agent`: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { Token, TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { AgentPool } from "./.gen/providers/tfe/agent-pool"; -import { AgentPoolAllowedWorkspaces } from "./.gen/providers/tfe/agent-pool-allowed-workspaces"; -import { Organization } from "./.gen/providers/tfe/organization"; -import { Workspace } from "./.gen/providers/tfe/workspace"; -import { WorkspaceSettings } from "./.gen/providers/tfe/workspace-settings"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - const testOrganization = new Organization(this, "test-organization", { - email: "admin@company.com", - name: "my-org-name", - }); - const test = new Workspace(this, "test", { + const tfeOrganizationTestOrganization = new tfe.organization.Organization( + this, + "test-organization", + { + email: "admin@company.com", + name: "my-org-name", + } + ); + const tfeWorkspaceTest = new tfe.workspace.Workspace(this, "test", { name: "my-workspace-name", - organization: testOrganization.name, - }); - const testAgentPool = new AgentPool(this, "test-agent-pool", { - name: "my-agent-pool-name", - organization: testOrganization.name, + organization: cdktf.Token.asString(tfeOrganizationTestOrganization.name), }); - const tfeAgentPoolAllowedWorkspacesTest = new AgentPoolAllowedWorkspaces( + const tfeAgentPoolTestAgentPool = new tfe.agentPool.AgentPool( this, - "test_3", + "test-agent-pool", { - agentPoolId: testAgentPool.id, - allowedWorkspaceIds: [test.id], + name: "my-agent-pool-name", + organization: cdktf.Token.asString( + tfeOrganizationTestOrganization.name + ), } ); + const tfeAgentPoolAllowedWorkspacesTest = + new tfe.agentPoolAllowedWorkspaces.AgentPoolAllowedWorkspaces( + this, + "test_3", + { + agentPoolId: cdktf.Token.asString(tfeAgentPoolTestAgentPool.id), + allowedWorkspaceIds: [cdktf.Token.asString(tfeWorkspaceTest.id)], + } + ); /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ tfeAgentPoolAllowedWorkspacesTest.overrideLogicalId("test"); - new WorkspaceSettings(this, "test-settings", { - agentPoolId: Token.asString( + new tfe.workspaceSettings.WorkspaceSettings(this, "test-settings", { + agentPoolId: cdktf.Token.asString( tfeAgentPoolAllowedWorkspacesTest.agentPoolId ), executionMode: "agent", - workspaceId: test.id, + workspaceId: cdktf.Token.asString(tfeWorkspaceTest.id), }); } } @@ -101,32 +104,33 @@ class MyConvertedCode extends TerraformStack { This resource may be used as a data source when no optional arguments are defined: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { Token, TerraformOutput, Op, Fn, TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { DataTfeWorkspace } from "./.gen/providers/tfe/data-tfe-workspace"; -import { WorkspaceSettings } from "./.gen/providers/tfe/workspace-settings"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - const test = new DataTfeWorkspace(this, "test", { - name: "my-workspace-name", - organization: "my-org-name", - }); - const tfeWorkspaceSettingsTest = new WorkspaceSettings(this, "test_1", { - workspaceId: Token.asString(test.id), - }); + const dataTfeWorkspaceTest = new tfe.dataTfeWorkspace.DataTfeWorkspace( + this, + "test", + { + name: "my-workspace-name", + organization: "my-org-name", + } + ); + const tfeWorkspaceSettingsTest = + new tfe.workspaceSettings.WorkspaceSettings(this, "test_1", { + workspaceId: cdktf.Token.asString(dataTfeWorkspaceTest.id), + }); /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ tfeWorkspaceSettingsTest.overrideLogicalId("test"); - new TerraformOutput(this, "workspace-explicit-local-execution", { - value: Fn.alltrue( - Token.asAny([ - Op.eq(tfeWorkspaceSettingsTest.executionMode, "local"), - Fn.lookupNested(tfeWorkspaceSettingsTest.overwrites, [ + new cdktf.TerraformOutput(this, "workspace-explicit-local-execution", { + value: cdktf.Fn.alltrue( + cdktf.Token.asAny([ + cdktf.Op.eq(tfeWorkspaceSettingsTest.executionMode, "local"), + cdktf.propertyAccess(tfeWorkspaceSettingsTest.overwrites, [ "0", '"execution_mode"', ]), @@ -155,7 +159,7 @@ In addition to all arguments above, the following attributes are exported: * `id` - The workspace ID. * `overwrites` - Can be used to check whether a setting is currently inheriting its value from another resource. - `executionMode` - Set to `true` if the execution mode of the workspace is being determined by the setting on the workspace itself. It will be `false` if the execution mode is inherited from another resource (e.g. the organization's default execution mode) - - `agent_pool` - Set to `true` if the agent pool of the workspace is being determined by the setting on the workspace itself. It will be `false` if the agent pool is inherited from another resource (e.g. the organization's default agent pool) + - `agentPool` - Set to `true` if the agent pool of the workspace is being determined by the setting on the workspace itself. It will be `false` if the agent pool is inherited from another resource (e.g. the organization's default agent pool) ## Import @@ -170,4 +174,4 @@ terraform import tfe_workspace_settings.test ws-CH5in3chf8RJjrVd terraform import tfe_workspace_settings.test my-org-name/my-wkspace-name ``` - \ No newline at end of file + \ No newline at end of file diff --git a/website/docs/cdktf/typescript/r/workspace_variable_set.html.markdown b/website/docs/cdktf/typescript/r/workspace_variable_set.html.markdown index 89747f9cf..946d0f324 100644 --- a/website/docs/cdktf/typescript/r/workspace_variable_set.html.markdown +++ b/website/docs/cdktf/typescript/r/workspace_variable_set.html.markdown @@ -11,52 +11,47 @@ description: |- Adds and removes variable sets from a workspace --> **Note:** `tfe_variable_set` has a deprecated argument `workspaceIds` that should not be used alongside this resource. They attempt to manage the same attachments and are mutually exclusive. +-> **Note:** `tfeVariableSet` has a deprecated argument `workspaceIds` that should not be used alongside this resource. They attempt to manage the same attachments and are mutually exclusive. ## Example Usage Basic usage: ```typescript -// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug -import { Construct } from "constructs"; -import { Token, TerraformStack } from "cdktf"; -/* - * Provider bindings are generated by running `cdktf get`. - * See https://cdk.tf/provider-generation for more details. - */ -import { Organization } from "./.gen/providers/tfe/organization"; -import { VariableSet } from "./.gen/providers/tfe/variable-set"; -import { Workspace } from "./.gen/providers/tfe/workspace"; -import { WorkspaceVariableSet } from "./.gen/providers/tfe/workspace-variable-set"; -class MyConvertedCode extends TerraformStack { - constructor(scope: Construct, name: string) { +import * as constructs from "constructs"; +import * as cdktf from "cdktf"; +/*Provider bindings are generated by running cdktf get. +See https://cdk.tf/provider-generation for more details.*/ +import * as tfe from "./.gen/providers/tfe"; +class MyConvertedCode extends cdktf.TerraformStack { + constructor(scope: constructs.Construct, name: string) { super(scope, name); - const test = new Organization(this, "test", { - email: "admin@company.com", - name: "my-org-name", - }); - const tfeVariableSetTest = new VariableSet(this, "test_1", { + const tfeOrganizationTest = new tfe.organization.Organization( + this, + "test", + { + email: "admin@company.com", + name: "my-org-name", + } + ); + const tfeVariableSetTest = new tfe.variableSet.VariableSet(this, "test_1", { description: "Some description.", name: "Test Varset", - organization: test.name, + organization: cdktf.Token.asString(tfeOrganizationTest.name), }); /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ tfeVariableSetTest.overrideLogicalId("test"); - const tfeWorkspaceTest = new Workspace(this, "test_2", { + const tfeWorkspaceTest = new tfe.workspace.Workspace(this, "test_2", { name: "my-workspace-name", - organization: test.name, + organization: cdktf.Token.asString(tfeOrganizationTest.name), }); /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ tfeWorkspaceTest.overrideLogicalId("test"); - const tfeWorkspaceVariableSetTest = new WorkspaceVariableSet( - this, - "test_3", - { - variableSetId: Token.asString(tfeVariableSetTest.id), - workspaceId: Token.asString(tfeWorkspaceTest.id), - } - ); + const tfeWorkspaceVariableSetTest = + new tfe.workspaceVariableSet.WorkspaceVariableSet(this, "test_3", { + variableSetId: cdktf.Token.asString(tfeVariableSetTest.id), + workspaceId: cdktf.Token.asString(tfeWorkspaceTest.id), + }); /*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/ tfeWorkspaceVariableSetTest.overrideLogicalId("test"); } @@ -83,4 +78,4 @@ Workspace Variable Sets can be imported; use `// \ No newline at end of file + \ No newline at end of file