Skip to content

Commit

Permalink
Merge pull request #1153 from hashicorp/d-cdktf-docs-6998888439-46
Browse files Browse the repository at this point in the history
cdktf: update documentation
  • Loading branch information
brandonc authored Nov 27, 2023
2 parents 81ad5a2 + d3a3bce commit 39efeca
Show file tree
Hide file tree
Showing 4 changed files with 104 additions and 8 deletions.
5 changes: 2 additions & 3 deletions website/docs/cdktf/python/d/organization.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -33,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.
* `external_id` - An identifier for the organization.
* `assessments_enforced` - (Available only in Terraform Cloud) Whether to force health assessments (drift detection) on all eligible workspaces or allow workspaces to set thier own preferences.
Expand All @@ -48,4 +47,4 @@ In addition to all arguments above, the following attributes are exported:
* `owners_team_saml_role_id` - The name of the "owners" team.
* `send_passing_statuses_for_untriggered_speculative_plans` - Whether or not to send VCS status updates for untriggered speculative plans. This can be useful if large numbers of untriggered workspaces are exhausting request limits for connected version control service providers like GitHub. Defaults to true. In Terraform Enterprise, this setting has no effect and cannot be changed but is also available in Site Administration.
* `default_project_id` - ID of the organization's default project. All workspaces created without specifying a project ID are created in this project.
<!-- cache-key: cdktf-0.19.0 input-73ec7085b3dbf61a45984fb7c74bac9c042ca20c175259f0650faf7acfa99133 -->
<!-- cache-key: cdktf-0.19.0 input-8846c33fbd01c623b80272d126fa694263f6e0fb3286ff1830ae6d051a5ae2a2 -->
49 changes: 48 additions & 1 deletion website/docs/cdktf/python/r/registry_module.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,47 @@ 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`.
# 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):
def __init__(self, scope, name):
super().__init__(scope, name)
test_organization = Organization(self, "test-organization",
email="[email protected]",
name="my-org-name"
)
test_oauth_client = OauthClient(self, "test-oauth-client",
api_url="https://api.github.com",
http_url="https://github.com",
oauth_token="my-vcs-provider-token",
organization=test_organization.name,
service_provider="github"
)
RegistryModule(self, "test-registry-module",
test_config=[{
"tests_enabled": True
}
],
vcs_repo=RegistryModuleVcsRepo(
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
)
)
```

Create private registry module with GitHub App:

```python
Expand Down Expand Up @@ -182,6 +223,9 @@ The following arguments are supported:
* `namespace` - (Optional) The namespace of a public registry module. It can be used if `module_provider` is set and `registry_name` is public.
* `registry_name` - (Optional) Whether the registry module is private or public. It can be used if `module_provider` is set.

The `test_config` block supports
* `tests_enabled` - (Optional) Specifies whether tests run for the registry module. Tests are only supported for branch-based publishing.

The `vcs_repo` block supports:

* `display_identifier` - (Required) The display identifier for your VCS repository.
Expand All @@ -192,6 +236,8 @@ The `vcs_repo` block supports:
and repository in your VCS provider. The format for Azure DevOps is `<ado organization>/<ado project>/_git/<ado repository>`.
* `oauth_token_id` - (Optional) Token ID of the VCS Connection (OAuth Connection Token) to use. This conflicts with `github_app_installation_id` and can only be used if `github_app_installation_id` is not used.
* `github_app_installation_id` - (Optional) The installation id of the Github App. This conflicts with `oauth_token_id` and can only be used if `oauth_token_id` 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

Expand All @@ -200,6 +246,7 @@ The `vcs_repo` 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.
* `publishing_mechanism` - The publishing mechanism used when releasing new versions of the module.
* `registry_name` - The registry name of the registry module depicting whether the registry module is private or public.
* `no_code` - **Deprecated** The property that will enable or disable a module as no-code provisioning ready.
Use the tfe_no_code_module resource instead.
Expand All @@ -218,4 +265,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
```

<!-- cache-key: cdktf-0.19.0 input-d0184f94e79f432f50dea11aef3a9b7449006807fb197c05220e48a2f1f3f71e -->
<!-- cache-key: cdktf-0.19.0 input-456a79854887a1ea146b73701b97c25121ac10198e434b748c3268fc7de9d53f -->
5 changes: 2 additions & 3 deletions website/docs/cdktf/typescript/d/organization.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,12 @@ 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.
Expand All @@ -51,4 +50,4 @@ In addition to all arguments above, the following attributes are exported:
* `ownersTeamSamlRoleId` - The name of the "owners" team.
* `sendPassingStatusesForUntriggeredSpeculativePlans` - Whether or not to send VCS status updates for untriggered speculative plans. This can be useful if large numbers of untriggered workspaces are exhausting request limits for connected version control service providers like GitHub. Defaults to true. In Terraform Enterprise, this setting has no effect and cannot be changed but is also available in Site Administration.
* `defaultProjectId` - ID of the organization's default project. All workspaces created without specifying a project ID are created in this project.
<!-- cache-key: cdktf-0.19.0 input-73ec7085b3dbf61a45984fb7c74bac9c042ca20c175259f0650faf7acfa99133 -->
<!-- cache-key: cdktf-0.19.0 input-8846c33fbd01c623b80272d126fa694263f6e0fb3286ff1830ae6d051a5ae2a2 -->
53 changes: 52 additions & 1 deletion website/docs/cdktf/typescript/r/registry_module.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,51 @@ 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) {
super(scope, name);
const testOrganization = new Organization(this, "test-organization", {
email: "[email protected]",
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", {
test_config: [
{
tests_enabled: true,
},
],
vcsRepo: {
branch: "main",
displayIdentifier: "my-org-name/terraform-provider-name",
identifier: "my-org-name/terraform-provider-name",
oauthTokenId: testOauthClient.oauthTokenId,
},
});
}
}

```

Create private registry module with GitHub App:

```typescript
Expand Down Expand Up @@ -205,6 +250,9 @@ The following arguments are supported:
* `namespace` - (Optional) The namespace of a public registry module. It can be used if `module_provider` is set and `registry_name` is public.
* `registryName` - (Optional) Whether the registry module is private or public. It can be used if `module_provider` 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.
Expand All @@ -215,6 +263,8 @@ The `vcsRepo` block supports:
and repository in your VCS provider. The format for Azure DevOps is `<ado organization>/<ado project>/_git/<ado repository>`.
* `oauthTokenId` - (Optional) Token ID of the VCS Connection (OAuth Connection Token) to use. This conflicts with `github_app_installation_id` and can only be used if `github_app_installation_id` is not used.
* `githubAppInstallationId` - (Optional) The installation id of the Github App. This conflicts with `oauth_token_id` and can only be used if `oauth_token_id` 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

Expand All @@ -223,6 +273,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.
Expand All @@ -241,4 +292,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
```

<!-- cache-key: cdktf-0.19.0 input-d0184f94e79f432f50dea11aef3a9b7449006807fb197c05220e48a2f1f3f71e -->
<!-- cache-key: cdktf-0.19.0 input-456a79854887a1ea146b73701b97c25121ac10198e434b748c3268fc7de9d53f -->

0 comments on commit 39efeca

Please sign in to comment.