Skip to content

Commit 47b5416

Browse files
committed
cdktf: update index.html.markdown,r/workspace_variable_set.html.markdown,r/workspace_run_task.html.markdown,r/workspace_run.html.markdown,r/workspace_policy_set.html.markdown,r/workspace.html.markdown,r/variable_set.html.markdown,r/variable.html.markdown,r/terraform_version.html.markdown,r/team_token.html.markdown
1 parent 89a46e9 commit 47b5416

20 files changed

+796
-602
lines changed

website/docs/cdktf/python/index.html.markdown

Lines changed: 29 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,13 @@ For production use, you should constrain the acceptable provider versions via
7373
configuration, to ensure that new versions with breaking changes will not be
7474
automatically installed by `terraform init` in the future:
7575

76-
```hcl
77-
terraform {
78-
required_providers {
79-
tfe = {
80-
version = "~> 0.48.0"
81-
}
82-
}
83-
}
76+
```python
77+
# Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug
78+
from constructs import Construct
79+
from cdktf import TerraformStack
80+
class MyConvertedCode(TerraformStack):
81+
def __init__(self, scope, name):
82+
super().__init__(scope, name)
8483
```
8584

8685
As this provider is still at version zero, you should constrain the acceptable
@@ -99,17 +98,27 @@ For more information on provider installation and constraining provider versions
9998

10099
## Example Usage
101100

102-
```hcl
103-
provider "tfe" {
104-
hostname = var.hostname # Optional, defaults to Terraform Cloud `app.terraform.io`
105-
token = var.token
106-
version = "~> 0.48.0"
107-
}
108-
109-
# Create an organization
110-
resource "tfe_organization" "org" {
111-
# ...
112-
}
101+
```python
102+
# Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug
103+
from constructs import Construct
104+
from cdktf import TerraformStack
105+
#
106+
# Provider bindings are generated by running `cdktf get`.
107+
# See https://cdk.tf/provider-generation for more details.
108+
#
109+
from imports.tfe.organization import Organization
110+
from imports.tfe.provider import TfeProvider
111+
class MyConvertedCode(TerraformStack):
112+
def __init__(self, scope, name, *, email, name):
113+
super().__init__(scope, name)
114+
TfeProvider(self, "tfe",
115+
hostname=hostname.string_value,
116+
token=token.string_value
117+
)
118+
Organization(self, "org",
119+
email=email,
120+
name=name
121+
)
113122
```
114123

115124
## Argument Reference
@@ -129,4 +138,4 @@ The following arguments are supported:
129138
arguments. Ensure that the organization already exists prior to using this argument.
130139
This can also be specified using the `TFE_ORGANIZATION` environment variable.
131140

132-
<!-- cache-key: cdktf-0.17.0-pre.15 input-a5e1d5b687ea945c66490b8d5558c062336d41c52db56dadeb96156a725efed6 -->
141+
<!-- cache-key: cdktf-0.17.1 input-a5e1d5b687ea945c66490b8d5558c062336d41c52db56dadeb96156a725efed6 -->

website/docs/cdktf/python/r/team_token.html.markdown

Lines changed: 28 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,24 @@ Generates a new team token and overrides existing token if one exists.
1616
Basic usage:
1717

1818
```python
19-
import constructs as constructs
20-
import cdktf as cdktf
21-
# Provider bindings are generated by running cdktf get.
19+
# Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug
20+
from constructs import Construct
21+
from cdktf import TerraformStack
22+
#
23+
# Provider bindings are generated by running `cdktf get`.
2224
# See https://cdk.tf/provider-generation for more details.
23-
import ...gen.providers.tfe as tfe
24-
class MyConvertedCode(cdktf.TerraformStack):
25+
#
26+
from imports.tfe.team import Team
27+
from imports.tfe.team_token import TeamToken
28+
class MyConvertedCode(TerraformStack):
2529
def __init__(self, scope, name):
2630
super().__init__(scope, name)
27-
tfe_team_test = tfe.team.Team(self, "test",
31+
test = Team(self, "test",
2832
name="my-team-name",
2933
organization="my-org-name"
3034
)
31-
tfe_team_token_test = tfe.team_token.TeamToken(self, "test_1",
32-
team_id=cdktf.Token.as_string(tfe_team_test.id)
35+
tfe_team_token_test = TeamToken(self, "test_1",
36+
team_id=test.id
3337
)
3438
# This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.
3539
tfe_team_token_test.override_logical_id("test")
@@ -52,27 +56,31 @@ never expire.
5256
When a token has an expiry:
5357

5458
```python
55-
import constructs as constructs
56-
import cdktf as cdktf
57-
# Provider bindings are generated by running cdktf get.
59+
# Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug
60+
from constructs import Construct
61+
from cdktf import Token, TerraformStack
62+
#
63+
# Provider bindings are generated by running `cdktf get`.
5864
# See https://cdk.tf/provider-generation for more details.
59-
import ...gen.providers.tfe as tfe
60-
import ...gen.providers.time as time
61-
class MyConvertedCode(cdktf.TerraformStack):
65+
#
66+
from imports.tfe.team import Team
67+
from imports.tfe.team_token import TeamToken
68+
from imports.time.rotating import Rotating
69+
class MyConvertedCode(TerraformStack):
6270
def __init__(self, scope, name):
6371
super().__init__(scope, name)
6472
# The following providers are missing schema information and might need manual adjustments to synthesize correctly: time.
6573
# For a more precise conversion please use the --provider flag in convert.
66-
tfe_team_test = tfe.team.Team(self, "test",
74+
test = Team(self, "test",
6775
name="my-team-name",
6876
organization="my-org-name"
6977
)
70-
time_rotating_example = time.rotating.Rotating(self, "example",
78+
example = Rotating(self, "example",
7179
rotation_days=30
7280
)
73-
tfe_team_token_test = tfe.team_token.TeamToken(self, "test_2",
74-
expired_at=cdktf.Token.as_string(time_rotating_example.rotation_rfc3339),
75-
team_id=cdktf.Token.as_string(tfe_team_test.id)
81+
tfe_team_token_test = TeamToken(self, "test_2",
82+
expired_at=Token.as_string(example.rotation_rfc3339),
83+
team_id=test.id
7684
)
7785
# This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.
7886
tfe_team_token_test.override_logical_id("test")
@@ -91,4 +99,4 @@ Team tokens can be imported; use `<TEAM ID>` as the import ID. For example:
9199
terraform import tfe_team_token.test team-47qC3LmA47piVan7
92100
```
93101

94-
<!-- cache-key: cdktf-0.17.0-pre.15 input-81ad21e38f7d39a442070952309741b9fc85572d00ada484fd6850ada6613dff -->
102+
<!-- cache-key: cdktf-0.17.1 input-81ad21e38f7d39a442070952309741b9fc85572d00ada484fd6850ada6613dff -->

website/docs/cdktf/python/r/terraform_version.html.markdown

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ description: |-
55
Manages Terraform versions
66
---
77

8+
9+
<!-- Please do not edit this file, it is generated. -->
810
# tfe_terraform_version
911

1012
Manage Terraform versions available on Terraform Cloud/Enterprise.
@@ -14,15 +16,18 @@ Manage Terraform versions available on Terraform Cloud/Enterprise.
1416
Basic Usage:
1517

1618
```python
17-
import constructs as constructs
18-
import cdktf as cdktf
19-
# Provider bindings are generated by running cdktf get.
19+
# Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug
20+
from constructs import Construct
21+
from cdktf import TerraformStack
22+
#
23+
# Provider bindings are generated by running `cdktf get`.
2024
# See https://cdk.tf/provider-generation for more details.
21-
import ...gen.providers.tfe as tfe
22-
class MyConvertedCode(cdktf.TerraformStack):
25+
#
26+
from imports.tfe.terraform_version import TerraformVersion
27+
class MyConvertedCode(TerraformStack):
2328
def __init__(self, scope, name):
2429
super().__init__(scope, name)
25-
tfe.terraform_version.TerraformVersion(self, "test",
30+
TerraformVersion(self, "test",
2631
sha="e75ac73deb69a6b3aa667cb0b8b731aee79e2904",
2732
url="https://tfe-host.com/path/to/terraform.zip",
2833
version="1.1.2-custom"
@@ -60,4 +65,4 @@ terraform import tfe_terraform_version.test 1.1.2
6065

6166
-> **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-<RANDOM STRING>`
6267

63-
<!-- cache-key: cdktf-0.17.0-pre.15 input-432c6fecfa9af93e492bead8b0ced7287250b8cd14070d2af0bbbadc42927b88 -->
68+
<!-- cache-key: cdktf-0.17.1 input-432c6fecfa9af93e492bead8b0ced7287250b8cd14070d2af0bbbadc42927b88 -->

website/docs/cdktf/python/r/variable.html.markdown

Lines changed: 70 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ description: |-
55
Manages variables.
66
---
77

8+
9+
<!-- Please do not edit this file, it is generated. -->
810
# tfe_variable
911

1012
Creates, updates and destroys variables.
@@ -14,30 +16,35 @@ Creates, updates and destroys variables.
1416
Basic usage for workspaces:
1517

1618
```python
17-
import constructs as constructs
18-
import cdktf as cdktf
19-
# Provider bindings are generated by running cdktf get.
19+
# Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug
20+
from constructs import Construct
21+
from cdktf import Token, TerraformStack
22+
#
23+
# Provider bindings are generated by running `cdktf get`.
2024
# See https://cdk.tf/provider-generation for more details.
21-
import ...gen.providers.tfe as tfe
22-
class MyConvertedCode(cdktf.TerraformStack):
25+
#
26+
from imports.tfe.organization import Organization
27+
from imports.tfe.variable import Variable
28+
from imports.tfe.workspace import Workspace
29+
class MyConvertedCode(TerraformStack):
2330
def __init__(self, scope, name):
2431
super().__init__(scope, name)
25-
tfe_organization_test = tfe.organization.Organization(self, "test",
32+
test = Organization(self, "test",
2633
2734
name="my-org-name"
2835
)
29-
tfe_workspace_test = tfe.workspace.Workspace(self, "test_1",
36+
tfe_workspace_test = Workspace(self, "test_1",
3037
name="my-workspace-name",
31-
organization=cdktf.Token.as_string(tfe_organization_test.name)
38+
organization=test.name
3239
)
3340
# This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.
3441
tfe_workspace_test.override_logical_id("test")
35-
tfe_variable_test = tfe.variable.Variable(self, "test_2",
42+
tfe_variable_test = Variable(self, "test_2",
3643
category="terraform",
3744
description="a useful description",
3845
key="my_key_name",
3946
value="my_value_name",
40-
workspace_id=cdktf.Token.as_string(tfe_workspace_test.id)
47+
workspace_id=Token.as_string(tfe_workspace_test.id)
4148
)
4249
# This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.
4350
tfe_variable_test.override_logical_id("test")
@@ -46,39 +53,44 @@ class MyConvertedCode(cdktf.TerraformStack):
4653
Basic usage for variable sets:
4754

4855
```python
49-
import constructs as constructs
50-
import cdktf as cdktf
51-
# Provider bindings are generated by running cdktf get.
56+
# Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug
57+
from constructs import Construct
58+
from cdktf import Token, TerraformStack
59+
#
60+
# Provider bindings are generated by running `cdktf get`.
5261
# See https://cdk.tf/provider-generation for more details.
53-
import ...gen.providers.tfe as tfe
54-
class MyConvertedCode(cdktf.TerraformStack):
62+
#
63+
from imports.tfe.organization import Organization
64+
from imports.tfe.variable import Variable
65+
from imports.tfe.variable_set import VariableSet
66+
class MyConvertedCode(TerraformStack):
5567
def __init__(self, scope, name):
5668
super().__init__(scope, name)
57-
tfe_organization_test = tfe.organization.Organization(self, "test",
69+
test = Organization(self, "test",
5870
5971
name="my-org-name"
6072
)
61-
tfe_variable_set_test = tfe.variable_set.VariableSet(self, "test_1",
73+
tfe_variable_set_test = VariableSet(self, "test_1",
6274
description="Some description.",
6375
global=False,
6476
name="Test Varset",
65-
organization=cdktf.Token.as_string(tfe_organization_test.name)
77+
organization=test.name
6678
)
6779
# This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.
6880
tfe_variable_set_test.override_logical_id("test")
69-
tfe.variable.Variable(self, "test-a",
81+
Variable(self, "test-a",
7082
category="terraform",
7183
description="a useful description",
7284
key="seperate_variable",
7385
value="my_value_name",
74-
variable_set_id=cdktf.Token.as_string(tfe_variable_set_test.id)
86+
variable_set_id=Token.as_string(tfe_variable_set_test.id)
7587
)
76-
tfe.variable.Variable(self, "test-b",
88+
Variable(self, "test-b",
7789
category="env",
7890
description="an environment variable",
7991
key="another_variable",
8092
value="my_value_name",
81-
variable_set_id=cdktf.Token.as_string(tfe_variable_set_test.id)
93+
variable_set_id=Token.as_string(tfe_variable_set_test.id)
8294
)
8395
```
8496

@@ -117,33 +129,41 @@ While the `value` field may be referenced in other resources, for safety it is a
117129
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.
118130

119131
For example:
120-
```
121-
resource "tfe_variable" "sensitive_var" {
122-
key = "sensitive_key"
123-
value = "sensitive_value" // this will be redacted from plan outputs
124-
category = "terraform"
125-
workspace_id = tfe_workspace.workspace.id
126-
sensitive = true
127-
}
128-
129-
resource "tfe_variable" "visible_var" {
130-
key = "visible_key"
131-
value = "visible_value" // this will be redacted from plan outputs
132-
category = "terraform"
133-
workspace_id = tfe_workspace.workspace.id
134-
sensitive = false
135-
}
136-
137-
resource "tfe_workspace" "sensitive_workspace" {
138-
name = "workspace-${tfe_variable.sensitive_var.value}" // this will be redacted from plan outputs
139-
organization = "organization name"
140-
}
141-
142-
resource "tfe_workspace" "visible_workspace" {
143-
name = "workspace-${tfe_variable.visible_var.readable_value}" // this will not be redacted from plan outputs
144-
organization = "organization name"
145-
}
146-
132+
```python
133+
# Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug
134+
from constructs import Construct
135+
from cdktf import TerraformStack
136+
#
137+
# Provider bindings are generated by running `cdktf get`.
138+
# See https://cdk.tf/provider-generation for more details.
139+
#
140+
from imports.tfe.variable import Variable
141+
from imports.tfe.workspace import Workspace
142+
class MyConvertedCode(TerraformStack):
143+
def __init__(self, scope, name):
144+
super().__init__(scope, name)
145+
sensitive_var = Variable(self, "sensitive_var",
146+
category="terraform",
147+
key="sensitive_key",
148+
sensitive=True,
149+
value="sensitive_value",
150+
workspace_id=workspace.id
151+
)
152+
visible_var = Variable(self, "visible_var",
153+
category="terraform",
154+
key="visible_key",
155+
sensitive=False,
156+
value="visible_value",
157+
workspace_id=workspace.id
158+
)
159+
Workspace(self, "sensitive_workspace",
160+
name="workspace-${" + sensitive_var.value + "}",
161+
organization="organization name"
162+
)
163+
Workspace(self, "visible_workspace",
164+
name="workspace-${" + visible_var.readable_value + "}",
165+
organization="organization name"
166+
)
147167
```
148168

149169
`readable_value` will be null if the variable is sensitive. `readable_value` may not be set explicitly in the resource configuration.
@@ -169,4 +189,4 @@ example:
169189
terraform import tfe_variable.test my-org-name/varset-47qC3LmA47piVan7/var-5rTwnSaRPogw6apb
170190
```
171191

172-
<!-- cache-key: cdktf-0.17.0-pre.15 input-c3bad9baf89e2964d9e69299417eec51d0597f0fb81bde0ba7db8d5ce2d6617e -->
192+
<!-- cache-key: cdktf-0.17.1 input-c3bad9baf89e2964d9e69299417eec51d0597f0fb81bde0ba7db8d5ce2d6617e -->

0 commit comments

Comments
 (0)