Skip to content

Commit

Permalink
cdktf: update r/saml_settings.html.markdown,r/run_trigger.html.markdo…
Browse files Browse the repository at this point in the history
…wn,r/registry_module.html.markdown,r/project_variable_set.html.markdown,r/project_policy_set.html.markdown,r/project.html.markdown,r/policy_set_parameter.html.markdown,r/policy_set.html.markdown,r/policy.html.markdown,r/organization_token.html.markdown
  • Loading branch information
team-tf-cdk committed Nov 13, 2023
1 parent 0dfb6a3 commit c25f4dd
Show file tree
Hide file tree
Showing 20 changed files with 718 additions and 557 deletions.
48 changes: 32 additions & 16 deletions website/docs/cdktf/python/r/organization_token.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,18 @@ can be used to act as the organization service account.
Basic 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.organization_token import OrganizationToken
class MyConvertedCode(TerraformStack):
def __init__(self, scope, name):
super().__init__(scope, name)
tfe.organization_token.OrganizationToken(self, "test",
OrganizationToken(self, "test",
organization="my-org-name"
)
```
Expand All @@ -46,15 +49,28 @@ never expire.

When a token has an expiry:

```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
}
```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)
)
```

## Attributes Reference
Expand All @@ -71,4 +87,4 @@ For example:
terraform import tfe_organization_token.test my-org-name
```

<!-- cache-key: cdktf-0.17.0-pre.15 input-5b9e020334a13d0577c4e9e4346975577380e0411aedc8378ee9dd8564dceb66 -->
<!-- cache-key: cdktf-0.19.0 input-5b9e020334a13d0577c4e9e4346975577380e0411aedc8378ee9dd8564dceb66 -->
32 changes: 19 additions & 13 deletions website/docs/cdktf/python/r/policy.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,18 @@ enforced during runs.
Basic usage for Sentinel:

```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.policy import Policy
class MyConvertedCode(TerraformStack):
def __init__(self, scope, name):
super().__init__(scope, name)
tfe.policy.Policy(self, "test",
Policy(self, "test",
description="This policy always passes",
enforce_mode="hard-mandatory",
kind="sentinel",
Expand All @@ -42,15 +45,18 @@ class MyConvertedCode(cdktf.TerraformStack):
Basic usage for Open Policy Agent(OPA):

```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.policy import Policy
class MyConvertedCode(TerraformStack):
def __init__(self, scope, name):
super().__init__(scope, name)
tfe.policy.Policy(self, "test",
Policy(self, "test",
description="This policy always passes",
enforce_mode="mandatory",
kind="opa",
Expand Down Expand Up @@ -91,4 +97,4 @@ import ID. For example:
terraform import tfe_policy.test my-org-name/pol-wAs3zYmWAhYK7peR
```

<!-- cache-key: cdktf-0.17.0-pre.15 input-ea229695faa93801409757c25356cacdfc7085cbdb339121ab75a922171703db -->
<!-- cache-key: cdktf-0.19.0 input-ea229695faa93801409757c25356cacdfc7085cbdb339121ab75a922171703db -->
113 changes: 72 additions & 41 deletions website/docs/cdktf/python/r/policy_set.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -21,54 +21,85 @@ for workspaces that the policy set is attached to.

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]
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
}
}
```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",
description="A brand new policy set",
kind="sentinel",
name="my-policy-set",
organization="my-org-name",
policies_path="policies/my-policy-set",
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)]
)
```

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]
}
```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",
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)],
workspace_ids=[Token.as_string(tfe_workspace_test.id)]
)
```

Manually uploaded policy set, in lieu of VCS:

```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
}
```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")
```

## Argument Reference
Expand Down Expand Up @@ -128,4 +159,4 @@ Policy sets can be imported; use `<POLICY SET ID>` as the import ID. For example
terraform import tfe_policy_set.test polset-wAs3zYmWAhYK7peR
```

<!-- cache-key: cdktf-0.17.0-pre.15 input-87dbe1491f5d0ac7c103cc9c7efc59a2174d7dcb1ad313a0a80615bf40216578 -->
<!-- cache-key: cdktf-0.19.0 input-87dbe1491f5d0ac7c103cc9c7efc59a2174d7dcb1ad313a0a80615bf40216578 -->
28 changes: 16 additions & 12 deletions website/docs/cdktf/python/r/policy_set_parameter.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,32 @@ Creates, updates and destroys policy set parameters.
Basic 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 Token, 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.organization import Organization
from imports.tfe.policy_set import PolicySet
from imports.tfe.policy_set_parameter import PolicySetParameter
class MyConvertedCode(TerraformStack):
def __init__(self, scope, name):
super().__init__(scope, name)
tfe_organization_test = tfe.organization.Organization(self, "test",
test = Organization(self, "test",
email="[email protected]",
name="my-org-name"
)
tfe_policy_set_test = tfe.policy_set.PolicySet(self, "test_1",
tfe_policy_set_test = PolicySet(self, "test_1",
name="my-policy-set-name",
organization=cdktf.Token.as_string(tfe_organization_test.id)
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 =
tfe.policy_set_parameter.PolicySetParameter(self, "test_2",
tfe_policy_set_parameter_test = PolicySetParameter(self, "test_2",
key="my_key_name",
policy_set_id=cdktf.Token.as_string(tfe_policy_set_test.id),
policy_set_id=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.
Expand Down Expand Up @@ -69,4 +73,4 @@ terraform import tfe_policy_set_parameter.test polset-wAs3zYmWAhYK7peR/var-5rTwn
```


<!-- cache-key: cdktf-0.17.0-pre.15 input-3d439f538435c91fac393d64ba8c1ac4db8481770f20e794bdb2cde671211a74 -->
<!-- cache-key: cdktf-0.19.0 input-3d439f538435c91fac393d64ba8c1ac4db8481770f20e794bdb2cde671211a74 -->
22 changes: 13 additions & 9 deletions website/docs/cdktf/python/r/project.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,25 @@ Provides a project resource.
Basic 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.organization import Organization
from imports.tfe.project import Project
class MyConvertedCode(TerraformStack):
def __init__(self, scope, name):
super().__init__(scope, name)
tfe_organization_test_organization = tfe.organization.Organization(self, "test-organization",
test_organization = Organization(self, "test-organization",
email="[email protected]",
name="my-org-name"
)
tfe.project.Project(self, "test",
Project(self, "test",
name="projectname",
organization=cdktf.Token.as_string(tfe_organization_test_organization.name)
organization=test_organization.name
)
```

Expand All @@ -55,4 +59,4 @@ Projects can be imported; use `<PROJECT ID>` as the import ID. For example:
terraform import tfe_project.test prj-niVoeESBXT8ZREhr
```

<!-- cache-key: cdktf-0.17.0-pre.15 input-1474b825c9c589412c43de4a18e1a76520a956d36d14e4f1d48fea36baf71f3c -->
<!-- cache-key: cdktf-0.19.0 input-1474b825c9c589412c43de4a18e1a76520a956d36d14e4f1d48fea36baf71f3c -->
Loading

0 comments on commit c25f4dd

Please sign in to comment.