Skip to content

Commit

Permalink
Merge pull request #1300 from hashicorp/d-cdktf-docs-8501853509-84
Browse files Browse the repository at this point in the history
cdktf: update documentation
  • Loading branch information
brandonc committed Apr 1, 2024
2 parents 1587ab3 + d2855a6 commit bbc1ed3
Show file tree
Hide file tree
Showing 154 changed files with 4,105 additions and 3,219 deletions.
17 changes: 10 additions & 7 deletions website/docs/cdktf/python/d/agent_pool.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,18 @@ Use this data source to get information about an agent pool.
## Example Usage

```python
import constructs as constructs
import cdktf as cdktf
# Provider bindings are generated by running cdktf get.
# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug
from constructs import Construct
from cdktf import TerraformStack
#
# Provider bindings are generated by running `cdktf get`.
# See https://cdk.tf/provider-generation for more details.
import ...gen.providers.tfe as tfe
class MyConvertedCode(cdktf.TerraformStack):
#
from imports.tfe.data_tfe_agent_pool import DataTfeAgentPool
class MyConvertedCode(TerraformStack):
def __init__(self, scope, name):
super().__init__(scope, name)
tfe.data_tfe_agent_pool.DataTfeAgentPool(self, "test",
DataTfeAgentPool(self, "test",
name="my-agent-pool-name",
organization="my-org-name"
)
Expand All @@ -42,4 +45,4 @@ In addition to all arguments above, the following attributes are exported:
* `id` - The agent pool ID.
* `organization_scoped` - Whether or not the agent pool can be used by all workspaces in the organization.

<!-- cache-key: cdktf-0.17.0-pre.15 input-b223e1934ef43efb927b0566eadbb97c45112079ed23b335806e0098961b16f3 -->
<!-- cache-key: cdktf-0.20.1 input-b223e1934ef43efb927b0566eadbb97c45112079ed23b335806e0098961b16f3 -->
32 changes: 19 additions & 13 deletions website/docs/cdktf/python/d/github_installation.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -16,31 +16,37 @@ Use this data source to get information about the Github App Installation.
### Finding a Github App Installation by its installation ID

```python
import constructs as constructs
import cdktf as cdktf
# Provider bindings are generated by running cdktf get.
# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug
from constructs import Construct
from cdktf import TerraformStack
#
# Provider bindings are generated by running `cdktf get`.
# See https://cdk.tf/provider-generation for more details.
import ...gen.providers.tfe as tfe
class MyConvertedCode(cdktf.TerraformStack):
#
from imports.tfe.data_tfe_github_app_installation import DataTfeGithubAppInstallation
class MyConvertedCode(TerraformStack):
def __init__(self, scope, name):
super().__init__(scope, name)
tfe.data_tfe_github_app_installation.DataTfeGithubAppInstallation(self, "gha_installation",
DataTfeGithubAppInstallation(self, "gha_installation",
installation_id=12345678
)
```

### Finding a Github App Installation by its name

```python
import constructs as constructs
import cdktf as cdktf
# Provider bindings are generated by running cdktf get.
# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug
from constructs import Construct
from cdktf import TerraformStack
#
# Provider bindings are generated by running `cdktf get`.
# See https://cdk.tf/provider-generation for more details.
import ...gen.providers.tfe as tfe
class MyConvertedCode(cdktf.TerraformStack):
#
from imports.tfe.data_tfe_github_app_installation import DataTfeGithubAppInstallation
class MyConvertedCode(TerraformStack):
def __init__(self, scope, name):
super().__init__(scope, name)
tfe.data_tfe_github_app_installation.DataTfeGithubAppInstallation(self, "gha_installation",
DataTfeGithubAppInstallation(self, "gha_installation",
name="github_username_or_organization"
)
```
Expand All @@ -60,4 +66,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`.

<!-- cache-key: cdktf-0.17.0-pre.15 input-5d439ec2ae1e837495b8cb500e2fcfe96d47a32f9fce3a10ffac876fe18a89dc -->
<!-- cache-key: cdktf-0.20.1 input-5d439ec2ae1e837495b8cb500e2fcfe96d47a32f9fce3a10ffac876fe18a89dc -->
21 changes: 12 additions & 9 deletions website/docs/cdktf/python/d/ip_ranges.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,20 @@ Use this data source to retrieve a list of Terraform Cloud's IP ranges. For more
## Example Usage

```python
import constructs as constructs
import cdktf as cdktf
# Provider bindings are generated by running cdktf get.
# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug
from constructs import Construct
from cdktf import TerraformOutput, TerraformStack
#
# Provider bindings are generated by running `cdktf get`.
# See https://cdk.tf/provider-generation for more details.
import ...gen.providers.tfe as tfe
class MyConvertedCode(cdktf.TerraformStack):
#
from imports.tfe.data_tfe_ip_ranges import DataTfeIpRanges
class MyConvertedCode(TerraformStack):
def __init__(self, scope, name):
super().__init__(scope, name)
data_tfe_ip_ranges_addresses = tfe.data_tfe_ip_ranges.DataTfeIpRanges(self, "addresses")
cdktf.TerraformOutput(self, "notifications_ips",
value=data_tfe_ip_ranges_addresses.notifications
addresses = DataTfeIpRanges(self, "addresses")
TerraformOutput(self, "notifications_ips",
value=addresses.notifications
)
```

Expand All @@ -42,4 +45,4 @@ The following attributes are exported:
* `vcs` - The list of IP ranges in CIDR notation used for connecting to VCS providers.


<!-- cache-key: cdktf-0.17.0-pre.15 input-a34895b98b3769147c0512ab50d1c1788daf43f5ff3206286266831c516fc66b -->
<!-- cache-key: cdktf-0.20.1 input-a34895b98b3769147c0512ab50d1c1788daf43f5ff3206286266831c516fc66b -->
33 changes: 23 additions & 10 deletions website/docs/cdktf/python/d/no_code_module.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,28 @@ 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
}
```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")
```

## Argument Reference
Expand All @@ -39,4 +52,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

<!-- cache-key: cdktf-0.17.0-pre.15 input-575fd9c85b909c532a6abcfecdf6262d4ba6675f544b4a4a3a15b6c519eab693 -->
<!-- cache-key: cdktf-0.20.1 input-575fd9c85b909c532a6abcfecdf6262d4ba6675f544b4a4a3a15b6c519eab693 -->
47 changes: 28 additions & 19 deletions website/docs/cdktf/python/d/oauth_client.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -16,31 +16,37 @@ Use this data source to get information about an OAuth client.
### Finding an OAuth client by its ID

```python
import constructs as constructs
import cdktf as cdktf
# Provider bindings are generated by running cdktf get.
# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug
from constructs import Construct
from cdktf import TerraformStack
#
# Provider bindings are generated by running `cdktf get`.
# See https://cdk.tf/provider-generation for more details.
import ...gen.providers.tfe as tfe
class MyConvertedCode(cdktf.TerraformStack):
#
from imports.tfe.data_tfe_oauth_client import DataTfeOauthClient
class MyConvertedCode(TerraformStack):
def __init__(self, scope, name):
super().__init__(scope, name)
tfe.data_tfe_oauth_client.DataTfeOauthClient(self, "client",
DataTfeOauthClient(self, "client",
oauth_client_id="oc-XXXXXXX"
)
```

### Finding an OAuth client by its name

```python
import constructs as constructs
import cdktf as cdktf
# Provider bindings are generated by running cdktf get.
# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug
from constructs import Construct
from cdktf import TerraformStack
#
# Provider bindings are generated by running `cdktf get`.
# See https://cdk.tf/provider-generation for more details.
import ...gen.providers.tfe as tfe
class MyConvertedCode(cdktf.TerraformStack):
#
from imports.tfe.data_tfe_oauth_client import DataTfeOauthClient
class MyConvertedCode(TerraformStack):
def __init__(self, scope, name):
super().__init__(scope, name)
tfe.data_tfe_oauth_client.DataTfeOauthClient(self, "client",
DataTfeOauthClient(self, "client",
name="my-oauth-client",
organization="my-org"
)
Expand All @@ -49,15 +55,18 @@ class MyConvertedCode(cdktf.TerraformStack):
### Finding an OAuth client by its service provider

```python
import constructs as constructs
import cdktf as cdktf
# Provider bindings are generated by running cdktf get.
# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug
from constructs import Construct
from cdktf import TerraformStack
#
# Provider bindings are generated by running `cdktf get`.
# See https://cdk.tf/provider-generation for more details.
import ...gen.providers.tfe as tfe
class MyConvertedCode(cdktf.TerraformStack):
#
from imports.tfe.data_tfe_oauth_client import DataTfeOauthClient
class MyConvertedCode(TerraformStack):
def __init__(self, scope, name):
super().__init__(scope, name)
tfe.data_tfe_oauth_client.DataTfeOauthClient(self, "client",
DataTfeOauthClient(self, "client",
organization="my-org",
service_provider="github"
)
Expand Down Expand Up @@ -93,4 +102,4 @@ In addition to all arguments above, the following attributes are exported:
* `service_provider` - The API identifier of the OAuth service provider.
* `service_provider_display_name` - The display name of the OAuth service provider.

<!-- cache-key: cdktf-0.17.0-pre.15 input-59b4bcbbb310e7ee913a245f3c751829442542dbcf1bbb4c87ac286043b69348 -->
<!-- cache-key: cdktf-0.20.1 input-59b4bcbbb310e7ee913a245f3c751829442542dbcf1bbb4c87ac286043b69348 -->
17 changes: 10 additions & 7 deletions website/docs/cdktf/python/d/organization.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,18 @@ Use this data source to get information about an organization.
## Example Usage

```python
import constructs as constructs
import cdktf as cdktf
# Provider bindings are generated by running cdktf get.
# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug
from constructs import Construct
from cdktf import TerraformStack
#
# Provider bindings are generated by running `cdktf get`.
# See https://cdk.tf/provider-generation for more details.
import ...gen.providers.tfe as tfe
class MyConvertedCode(cdktf.TerraformStack):
#
from imports.tfe.data_tfe_organization import DataTfeOrganization
class MyConvertedCode(TerraformStack):
def __init__(self, scope, name):
super().__init__(scope, name)
tfe.data_tfe_organization.DataTfeOrganization(self, "foo",
DataTfeOrganization(self, "foo",
name="organization-name"
)
```
Expand All @@ -46,4 +49,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.

<!-- cache-key: cdktf-0.17.0-pre.15 input-944effb44f4d14fb4476a9f26014b95ea0376bb130076243476598735562f471 -->
<!-- cache-key: cdktf-0.20.1 input-944effb44f4d14fb4476a9f26014b95ea0376bb130076243476598735562f471 -->
22 changes: 13 additions & 9 deletions website/docs/cdktf/python/d/organization_members.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,24 @@ Use this data source to get information about members of an organization.
## Example Usage

```python
import constructs as constructs
import cdktf as cdktf
# Provider bindings are generated by running cdktf get.
# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug
from constructs import Construct
from cdktf import TerraformStack
#
# Provider bindings are generated by running `cdktf get`.
# See https://cdk.tf/provider-generation for more details.
import ...gen.providers.tfe as tfe
class MyConvertedCode(cdktf.TerraformStack):
#
from imports.tfe.data_tfe_organization_members import DataTfeOrganizationMembers
from imports.tfe.organization import Organization
class MyConvertedCode(TerraformStack):
def __init__(self, scope, name):
super().__init__(scope, name)
tfe_organization_bar = tfe.organization.Organization(self, "bar",
bar = Organization(self, "bar",
email="user@hashicorp.com",
name="org-bar"
)
tfe.data_tfe_organization_members.DataTfeOrganizationMembers(self, "foo",
organization=cdktf.Token.as_string(tfe_organization_bar.name)
DataTfeOrganizationMembers(self, "foo",
organization=bar.name
)
```

Expand All @@ -48,4 +52,4 @@ The `member` block contains:

* `user_id` - The ID of the user.
* `organization_membership_id` - The ID of the organization membership.
<!-- cache-key: cdktf-0.17.0-pre.15 input-4c032c533c9de727b2406429de451318455dd383062b352da22d3b516529bb5b -->
<!-- cache-key: cdktf-0.20.1 input-4c032c533c9de727b2406429de451318455dd383062b352da22d3b516529bb5b -->
Loading

0 comments on commit bbc1ed3

Please sign in to comment.