From ee82048e4c54cf8afe69bd6005e4db39f9cb84dc Mon Sep 17 00:00:00 2001 From: team-tf-cdk <84392119+team-tf-cdk@users.noreply.github.com> Date: Mon, 4 Dec 2023 08:34:26 +0100 Subject: [PATCH] cdktf: update index.md,resources/static.md,resources/sleep.md,resources/rotating.md,resources/offset.md (#267) --- docs/cdktf/python/resources/offset.md | 25 +++++++++++++++++++- docs/cdktf/typescript/resources/offset.md | 28 ++++++++++++++++++++++- 2 files changed, 51 insertions(+), 2 deletions(-) diff --git a/docs/cdktf/python/resources/offset.md b/docs/cdktf/python/resources/offset.md index 453a04b0..437f0508 100644 --- a/docs/cdktf/python/resources/offset.md +++ b/docs/cdktf/python/resources/offset.md @@ -37,6 +37,29 @@ class MyConvertedCode(TerraformStack): ) ``` +### Multiple Offsets Usage + +```python +# 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. +# +from imports.time.offset import Offset +class MyConvertedCode(TerraformStack): + def __init__(self, scope, name): + super().__init__(scope, name) + example = Offset(self, "example", + offset_months=1, + offset_years=1 + ) + TerraformOutput(self, "one_year_and_month_from_now", + value=example.rfc3339 + ) +``` + ### Triggers Usage ```python @@ -101,4 +124,4 @@ terraform import time_offset.example 2020-02-12T06:36:13Z,0,0,7,0,0,0 ``` The `triggers` argument cannot be imported. - \ No newline at end of file + \ No newline at end of file diff --git a/docs/cdktf/typescript/resources/offset.md b/docs/cdktf/typescript/resources/offset.md index 548653b1..694f33d3 100644 --- a/docs/cdktf/typescript/resources/offset.md +++ b/docs/cdktf/typescript/resources/offset.md @@ -40,6 +40,32 @@ class MyConvertedCode extends TerraformStack { ``` +### Multiple Offsets Usage + +```typescript +// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug +import { Construct } from "constructs"; +import { TerraformOutput, TerraformStack } from "cdktf"; +/* + * Provider bindings are generated by running `cdktf get`. + * See https://cdk.tf/provider-generation for more details. + */ +import { Offset } from "./.gen/providers/time/offset"; +class MyConvertedCode extends TerraformStack { + constructor(scope: Construct, name: string) { + super(scope, name); + const example = new Offset(this, "example", { + offsetMonths: 1, + offsetYears: 1, + }); + new TerraformOutput(this, "one_year_and_month_from_now", { + value: example.rfc3339, + }); + } +} + +``` + ### Triggers Usage ```typescript @@ -107,4 +133,4 @@ terraform import time_offset.example 2020-02-12T06:36:13Z,0,0,7,0,0,0 ``` The `triggers` argument cannot be imported. - \ No newline at end of file + \ No newline at end of file