Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cdktf: update documentation #1619

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.8 input-b223e1934ef43efb927b0566eadbb97c45112079ed23b335806e0098961b16f3 -->
32 changes: 19 additions & 13 deletions website/docs/cdktf/python/d/github_app_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.8 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 HCP Terraform's IP ranges. For more i
## 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-987ff1291f7652480885c8426decd8b28172ee0aede7d6f52322a9845caec7e4 -->
<!-- cache-key: cdktf-0.20.8 input-987ff1291f7652480885c8426decd8b28172ee0aede7d6f52322a9845caec7e4 -->
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.8 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 @@ -94,4 +103,4 @@ In addition to all arguments above, the following attributes are exported:
* `service_provider_display_name` - The display name of the OAuth service provider.
* `organization_scoped` - Whether or not the agent pool can be used by all workspaces and projects in the organization.
* `project_ids` - IDs of the projects that use the oauth client.
<!-- cache-key: cdktf-0.17.0-pre.15 input-001f05442f17fd9a94d45188c279515be0f5fbe96f6057ed44a16f3e9be03580 -->
<!-- cache-key: cdktf-0.20.8 input-001f05442f17fd9a94d45188c279515be0f5fbe96f6057ed44a16f3e9be03580 -->
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 @@ -47,4 +50,4 @@ In addition to all arguments above, the following attributes are exported:
* `speculative_plan_management_enabled` - Whether or not to enable Speculative Plan Management. If true, pending VCS-triggered speculative plans from outdated commits will be cancelled if a newer commit is pushed to the same branch.
* `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-9b73f546422e0ab13be41c89f26de4669725b44bfaf8e4720bbd31f838e37f2f -->
<!-- cache-key: cdktf-0.20.8 input-9b73f546422e0ab13be41c89f26de4669725b44bfaf8e4720bbd31f838e37f2f -->
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="[email protected]",
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.8 input-4c032c533c9de727b2406429de451318455dd383062b352da22d3b516529bb5b -->
Loading