diff --git a/CHANGELOG.md b/CHANGELOG.md index 275f2ebe69..cf0c0d7f09 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## 0.12.0 (unreleased) +## 0.12.0 **Breaking Changes** @@ -10,6 +10,46 @@ Previously we would throw an error and exit with 1 if there were no provider or The Terraform `merge` function can merge both lists and maps, but this can cause [issues](https://github.com/hashicorp/terraform-cdk/issues/1653) when using the result in a typed language. Therefore we split it into `Fn.mergeLists` and `Fn.mergeMaps`, this means you need to change your cdktf programs code. +### Simplified interfaces of recursive attributes + +The generated provider bindings are based on the Terraform schema which does not support recursion and hence uses a large, explicit structure instead. Previously this resulted in long names such as e.g. `Wafv2WebAclRuleStatementAndStatementStatementOrStatementStatementLabelMatchStatement`. In 0.12 we implemented a first rough detection for this underlying recursion which drastically reduced the amount of generated interfaces as they now are converted to recursive data structures themselves. +If you are currently using those types e.g. in a language like Java, you will need to change them to the new shorter names. + +### feat + +- feat(lib): Introduce Iterator and `for_each` to implement apply time iteration [\#1830](https://github.com/hashicorp/terraform-cdk/pull/1830) +- feat(lib): Introduce TerraformDynamicBlock to enable iterator usage on blocks [\#1882](https://github.com/hashicorp/terraform-cdk/pull/1882) +- feat(cli): support refresh only option for diff and deploy [\#1851](https://github.com/hashicorp/terraform-cdk/pull/1851) +- feat(docs): Add iterator docs page [\#1840](https://github.com/hashicorp/terraform-cdk/pull/1840) +- feat(docs): document FORCE_COLOR env var that allows disabling colored output [\#1917](https://github.com/hashicorp/terraform-cdk/pull/1917) +- feat(cli): plug provider add command in help printed after initializing a new cdktf project [\#1833](https://github.com/hashicorp/terraform-cdk/pull/1833) +- feat(lib): exposed testing matchers for other languages properly [\#1935](https://github.com/hashicorp/terraform-cdk/pull/1935) + +### fix + +- fix: Allow "all" as ignoreChanges lifecycle value [\#1848](https://github.com/hashicorp/terraform-cdk/pull/1848) +- fix: Fixed naming collision between resources of different providers [\#1870](https://github.com/hashicorp/terraform-cdk/pull/1870) +- fix: Small fix to the CONTRIBUTING.md [\#1887](https://github.com/hashicorp/terraform-cdk/pull/1887) +- fix(cli): increase default max memory for node process when running app command for synth [\#1915](https://github.com/hashicorp/terraform-cdk/pull/1915) +- fix(provider-generator): Meta arguments available for generated modules [\#1880](https://github.com/hashicorp/terraform-cdk/pull/1880) +- fix(provider-generator): replace dashes with underscores in module names for Go when generating bindings for Terraform modules [\#1928](https://github.com/hashicorp/terraform-cdk/pull/1928) +- fix(hcl2json): bundle wasm_exec used for building Go instead of looking for it at runtime [\#1954](https://github.com/hashicorp/terraform-cdk/pull/1954) +- fix(hcl2cdk): use the same attribute renaming function as in the provider generation [\#1842](https://github.com/hashicorp/terraform-cdk/pull/1842) +- fix(hcl2cdk): maps should not be wrapped in arrays [\#1838](https://github.com/hashicorp/terraform-cdk/pull/1838) + +### chore + +- chore: document CI flag [\#1888](https://github.com/hashicorp/terraform-cdk/pull/1888) +- chore: modernize example output [\#1914](https://github.com/hashicorp/terraform-cdk/pull/1914) +- chore: pin provider version [\#1896](https://github.com/hashicorp/terraform-cdk/pull/1896) +- chore: update prerequisites [\#1894](https://github.com/hashicorp/terraform-cdk/pull/1894) +- chore(tests): Re-enable Windows Provider Add C# Test [\#1879](https://github.com/hashicorp/terraform-cdk/pull/1879) +- chore: add tfe test as pre-step to releasing [\#1872](https://github.com/hashicorp/terraform-cdk/pull/1872) +- chore: split provider tests into one test per provider [\#1862](https://github.com/hashicorp/terraform-cdk/pull/1862) +- chore: reuse integration test definition for releases [\#1859](https://github.com/hashicorp/terraform-cdk/pull/1859) +- chore: fix broken link in readme [\#1845](https://github.com/hashicorp/terraform-cdk/pull/1845) +- chore: npm-check-updates && yarn upgrade [\#1706](https://github.com/hashicorp/terraform-cdk/pull/1706) + ## 0.11.2 ### feat diff --git a/package.json b/package.json index 6f421b8675..84509737e8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "root", - "version": "0.11.2", + "version": "0.12.0", "private": true, "scripts": { "build": "lerna run --scope 'cdktf*' --scope @cdktf/* build", diff --git a/website/data/cdktf-nav-data.json b/website/data/cdktf-nav-data.json index 747ffd6f53..1cee633ca7 100644 --- a/website/data/cdktf-nav-data.json +++ b/website/data/cdktf-nav-data.json @@ -152,6 +152,7 @@ "title": "Overview", "path": "release" }, + { "title": "Upgrading to Version 0.12", "path": "release/upgrade-guide-v0-12" }, { "title": "Upgrading to Version 0.11", "path": "release/upgrade-guide-v0-11" }, { "title": "Upgrading to Version 0.10", "path": "release/upgrade-guide-v0-10" }, { "title": "Upgrading to Version 0.9", "path": "release/upgrade-guide-v0-9" }, diff --git a/website/docs/cdktf/api-reference/csharp.mdx b/website/docs/cdktf/api-reference/csharp.mdx index 2fe6a9902b..9d1d98729c 100644 --- a/website/docs/cdktf/api-reference/csharp.mdx +++ b/website/docs/cdktf/api-reference/csharp.mdx @@ -9616,18 +9616,19 @@ Any object. #### Properties -| **Name** | **Type** | **Description** | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------- | -| Node | Constructs.Node | The tree node. | -| CdktfStack | TerraformStack | _No description._ | -| Fqn | string | _No description._ | -| FriendlyUniqueId | string | _No description._ | -| Source | string | _No description._ | -| Providers | object[] | _No description._ | -| Version | string | _No description._ | -| DependsOn | string[] | _No description._ | -| ForEach | ITerraformIterator | _No description._ | -| Variables | System.Collections.Generic.IDictionary< string, object > | _No description._ | +| **Name** | **Type** | **Description** | +| --------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------- | +| Node | Constructs.Node | The tree node. | +| CdktfStack | TerraformStack | _No description._ | +| Fqn | string | _No description._ | +| FriendlyUniqueId | string | _No description._ | +| Source | string | _No description._ | +| Providers | object[] | _No description._ | +| SkipAssetCreationFromLocalModules | bool | _No description._ | +| Version | string | _No description._ | +| DependsOn | string[] | _No description._ | +| ForEach | ITerraformIterator | _No description._ | +| Variables | System.Collections.Generic.IDictionary< string, object > | _No description._ | --- @@ -9693,6 +9694,16 @@ public object[] Providers { get; } --- +##### `SkipAssetCreationFromLocalModules`Optional + +```csharp +public bool SkipAssetCreationFromLocalModules { get; } +``` + +- _Type:_ bool + +--- + ##### `Version`Optional ```csharp @@ -10188,17 +10199,18 @@ Any object. #### Properties -| **Name** | **Type** | **Description** | -| -------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------- | -| Node | Constructs.Node | The tree node. | -| CdktfStack | TerraformStack | _No description._ | -| Fqn | string | _No description._ | -| FriendlyUniqueId | string | _No description._ | -| Source | string | _No description._ | -| Providers | object[] | _No description._ | -| Version | string | _No description._ | -| DependsOn | string[] | _No description._ | -| ForEach | ITerraformIterator | _No description._ | +| **Name** | **Type** | **Description** | +| ------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------- | ----------------- | +| Node | Constructs.Node | The tree node. | +| CdktfStack | TerraformStack | _No description._ | +| Fqn | string | _No description._ | +| FriendlyUniqueId | string | _No description._ | +| Source | string | _No description._ | +| Providers | object[] | _No description._ | +| SkipAssetCreationFromLocalModules | bool | _No description._ | +| Version | string | _No description._ | +| DependsOn | string[] | _No description._ | +| ForEach | ITerraformIterator | _No description._ | --- @@ -10264,6 +10276,16 @@ public object[] Providers { get; } --- +##### `SkipAssetCreationFromLocalModules`Optional + +```csharp +public bool SkipAssetCreationFromLocalModules { get; } +``` + +- _Type:_ bool + +--- + ##### `Version`Optional ```csharp @@ -11892,6 +11914,7 @@ new TerraformVariable(Construct Scope, string Id, TerraformVariableConfig Config | ResetOverrideLogicalId | Resets a previously passed logical Id to use the auto-generated logical id again. | | ToMetadata | _No description._ | | ToTerraform | _No description._ | +| AddValidation | _No description._ | | SynthesizeAttributes | _No description._ | --- @@ -11958,6 +11981,18 @@ private object ToMetadata() private object ToTerraform() ``` +##### `AddValidation` + +```csharp +private void AddValidation(TerraformVariableValidationConfig Validation) +``` + +###### `Validation`Required + +- _Type:_ TerraformVariableValidationConfig + +--- + ##### `SynthesizeAttributes` ```csharp @@ -12006,22 +12041,23 @@ Any object. #### Properties -| **Name** | **Type** | **Description** | -| ---------------------------------------------------------------------------------------------- | --------------------------------------------------------------- | ----------------- | -| Node | Constructs.Node | The tree node. | -| CdktfStack | TerraformStack | _No description._ | -| Fqn | string | _No description._ | -| FriendlyUniqueId | string | _No description._ | -| BooleanValue | IResolvable | _No description._ | -| ListValue | string[] | _No description._ | -| NumberValue | double | _No description._ | -| StringValue | string | _No description._ | -| Value | object | _No description._ | -| Default | object | _No description._ | -| Description | string | _No description._ | -| Nullable | bool | _No description._ | -| Sensitive | bool | _No description._ | -| Type | string | _No description._ | +| **Name** | **Type** | **Description** | +| ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ----------------- | +| Node | Constructs.Node | The tree node. | +| CdktfStack | TerraformStack | _No description._ | +| Fqn | string | _No description._ | +| FriendlyUniqueId | string | _No description._ | +| BooleanValue | IResolvable | _No description._ | +| ListValue | string[] | _No description._ | +| NumberValue | double | _No description._ | +| StringValue | string | _No description._ | +| Value | object | _No description._ | +| Default | object | _No description._ | +| Description | string | _No description._ | +| Nullable | bool | _No description._ | +| Sensitive | bool | _No description._ | +| Type | string | _No description._ | +| Validation | TerraformVariableValidationConfig[] | _No description._ | --- @@ -12167,6 +12203,16 @@ public string Type { get; } --- +##### `Validation`Optional + +```csharp +public TerraformVariableValidationConfig[] Validation { get; } +``` + +- _Type:_ TerraformVariableValidationConfig[] + +--- + ## Structs ### AppOptions @@ -18272,6 +18318,7 @@ new TerraformHclModuleOptions { ITerraformDependable[] DependsOn = null, ITerraformIterator ForEach = null, object[] Providers = null, + bool SkipAssetCreationFromLocalModules = null, string Source, string Version = null, System.Collections.Generic.IDictionary< string, object > Variables = null @@ -18280,14 +18327,15 @@ new TerraformHclModuleOptions { #### Properties -| **Name** | **Type** | **Description** | -| ---------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------- | -| DependsOn | ITerraformDependable[] | _No description._ | -| ForEach | ITerraformIterator | _No description._ | -| Providers | object[] | _No description._ | -| Source | string | _No description._ | -| Version | string | _No description._ | -| Variables | System.Collections.Generic.IDictionary< string, object > | _No description._ | +| **Name** | **Type** | **Description** | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------- | +| DependsOn | ITerraformDependable[] | _No description._ | +| ForEach | ITerraformIterator | _No description._ | +| Providers | object[] | _No description._ | +| SkipAssetCreationFromLocalModules | bool | _No description._ | +| Source | string | _No description._ | +| Version | string | _No description._ | +| Variables | System.Collections.Generic.IDictionary< string, object > | _No description._ | --- @@ -18321,6 +18369,16 @@ public object[] Providers { get; set; } --- +##### `SkipAssetCreationFromLocalModules`Optional + +```csharp +public bool SkipAssetCreationFromLocalModules { get; set; } +``` + +- _Type:_ bool + +--- + ##### `Source`Required ```csharp @@ -18464,6 +18522,7 @@ new TerraformModuleOptions { ITerraformDependable[] DependsOn = null, ITerraformIterator ForEach = null, object[] Providers = null, + bool SkipAssetCreationFromLocalModules = null, string Source, string Version = null }; @@ -18471,13 +18530,14 @@ new TerraformModuleOptions { #### Properties -| **Name** | **Type** | **Description** | -| ------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------- | -| DependsOn | ITerraformDependable[] | _No description._ | -| ForEach | ITerraformIterator | _No description._ | -| Providers | object[] | _No description._ | -| Source | string | _No description._ | -| Version | string | _No description._ | +| **Name** | **Type** | **Description** | +| ------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------- | +| DependsOn | ITerraformDependable[] | _No description._ | +| ForEach | ITerraformIterator | _No description._ | +| Providers | object[] | _No description._ | +| SkipAssetCreationFromLocalModules | bool | _No description._ | +| Source | string | _No description._ | +| Version | string | _No description._ | --- @@ -18511,6 +18571,16 @@ public object[] Providers { get; set; } --- +##### `SkipAssetCreationFromLocalModules`Optional + +```csharp +public bool SkipAssetCreationFromLocalModules { get; set; } +``` + +- _Type:_ bool + +--- + ##### `Source`Required ```csharp @@ -18583,17 +18653,19 @@ using HashiCorp.Cdktf; new TerraformModuleUserOptions { ITerraformDependable[] DependsOn = null, ITerraformIterator ForEach = null, - object[] Providers = null + object[] Providers = null, + bool SkipAssetCreationFromLocalModules = null }; ``` #### Properties -| **Name** | **Type** | **Description** | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------- | -| DependsOn | ITerraformDependable[] | _No description._ | -| ForEach | ITerraformIterator | _No description._ | -| Providers | object[] | _No description._ | +| **Name** | **Type** | **Description** | +| ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------- | +| DependsOn | ITerraformDependable[] | _No description._ | +| ForEach | ITerraformIterator | _No description._ | +| Providers | object[] | _No description._ | +| SkipAssetCreationFromLocalModules | bool | _No description._ | --- @@ -18627,6 +18699,16 @@ public object[] Providers { get; set; } --- +##### `SkipAssetCreationFromLocalModules`Optional + +```csharp +public bool SkipAssetCreationFromLocalModules { get; set; } +``` + +- _Type:_ bool + +--- + ### TerraformOutputConfig #### Initializer @@ -19062,19 +19144,21 @@ new TerraformVariableConfig { string Description = null, bool Nullable = null, bool Sensitive = null, - string Type = null + string Type = null, + TerraformVariableValidationConfig[] Validation = null }; ``` #### Properties -| **Name** | **Type** | **Description** | -| ------------------------------------------------------------------------------------------ | ------------------- | --------------------------------------------------------------------------------------------------------------------------------- | -| Default | object | _No description._ | -| Description | string | _No description._ | -| Nullable | bool | _No description._ | -| Sensitive | bool | _No description._ | -| Type | string | The type argument in a variable block allows you to restrict the type of value that will be accepted as the value for a variable. | +| **Name** | **Type** | **Description** | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | +| Default | object | _No description._ | +| Description | string | _No description._ | +| Nullable | bool | _No description._ | +| Sensitive | bool | _No description._ | +| Type | string | The type argument in a variable block allows you to restrict the type of value that will be accepted as the value for a variable. | +| Validation | TerraformVariableValidationConfig[] | Specify arbitrary custom validation rules for a particular variable using a validation block nested within the corresponding variable block. | --- @@ -19152,6 +19236,60 @@ If both the type and default arguments are specified, the given default value mu --- +##### `Validation`Optional + +```csharp +public TerraformVariableValidationConfig[] Validation { get; set; } +``` + +- _Type:_ TerraformVariableValidationConfig[] + +Specify arbitrary custom validation rules for a particular variable using a validation block nested within the corresponding variable block. + +--- + +### TerraformVariableValidationConfig + +#### Initializer + +```csharp +using HashiCorp.Cdktf; + +new TerraformVariableValidationConfig { + object Condition, + string ErrorMessage +}; +``` + +#### Properties + +| **Name** | **Type** | **Description** | +| ------------------------------------------------------------------------------------------------------ | ------------------- | ----------------- | +| Condition | object | _No description._ | +| ErrorMessage | string | _No description._ | + +--- + +##### `Condition`Required + +```csharp +public object Condition { get; set; } +``` + +- _Type:_ object + +--- + +##### `ErrorMessage`Required + +```csharp +public string ErrorMessage { get; set; } +``` + +- _Type:_ string + +--- + ### TestingAppOptions #### Initializer @@ -19656,6 +19794,64 @@ The list of aspects which were directly applied on this scope. --- +### AssertionReturn + +#### Initializers + +```csharp +using HashiCorp.Cdktf; + +new AssertionReturn(string Message, bool Pass); +``` + +| **Name** | **Type** | **Description** | +| ------------------------------------------------------------------------------------------------------- | ------------------- | ----------------- | +| Message | string | _No description._ | +| Pass | bool | _No description._ | + +--- + +##### `Message`Required + +- _Type:_ string + +--- + +##### `Pass`Required + +- _Type:_ bool + +--- + +#### Properties + +| **Name** | **Type** | **Description** | +| ------------------------------------------------------------------------------------------ | ------------------- | ----------------- | +| Message | string | _No description._ | +| Pass | bool | _No description._ | + +--- + +##### `Message`Required + +```csharp +public string Message { get; } +``` + +- _Type:_ string + +--- + +##### `Pass`Required + +```csharp +public bool Pass { get; } +``` + +- _Type:_ bool + +--- + ### BooleanMap - _Implements:_ ITerraformAddressable, IResolvable @@ -23215,6 +23411,7 @@ new ListTerraformIterator(object List); | **Name** | **Description** | | ----------------------------------------------------------------------------------- | ----------------- | +| Dynamic | _No description._ | | GetAny | _No description._ | | GetAnyMap | _No description._ | | GetBoolean | _No description._ | @@ -23229,6 +23426,18 @@ new ListTerraformIterator(object List); --- +##### `Dynamic` + +```csharp +private IResolvable Dynamic(System.Collections.Generic.IDictionary< string, object > Attributes) +``` + +###### `Attributes`Required + +- _Type:_ System.Collections.Generic.IDictionary< string, object > + +--- + ##### `GetAny` ```csharp @@ -23632,6 +23841,7 @@ new MapTerraformIterator(object Map); | **Name** | **Description** | | ---------------------------------------------------------------------------------- | ----------------- | +| Dynamic | _No description._ | | GetAny | _No description._ | | GetAnyMap | _No description._ | | GetBoolean | _No description._ | @@ -23646,6 +23856,18 @@ new MapTerraformIterator(object Map); --- +##### `Dynamic` + +```csharp +private IResolvable Dynamic(System.Collections.Generic.IDictionary< string, object > Attributes) +``` + +###### `Attributes`Required + +- _Type:_ System.Collections.Generic.IDictionary< string, object > + +--- + ##### `GetAny` ```csharp @@ -24536,6 +24758,7 @@ new TerraformIterator(); | **Name** | **Description** | | ------------------------------------------------------------------------------- | ----------------- | +| Dynamic | _No description._ | | GetAny | _No description._ | | GetAnyMap | _No description._ | | GetBoolean | _No description._ | @@ -24550,6 +24773,18 @@ new TerraformIterator(); --- +##### `Dynamic` + +```csharp +private IResolvable Dynamic(System.Collections.Generic.IDictionary< string, object > Attributes) +``` + +###### `Attributes`Required + +- _Type:_ System.Collections.Generic.IDictionary< string, object > + +--- + ##### `GetAny` ```csharp @@ -24834,19 +25069,37 @@ Access a property on the resource like this: `getString("publicIp")` Testing utilities for cdktf applications. +#### Initializers + +```csharp +using HashiCorp.Cdktf; + +new Testing(); +``` + +| **Name** | **Type** | **Description** | +| -------- | -------- | --------------- | + +--- + #### Static Functions -| **Name** | **Description** | -| --------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | -| App | Returns an app for testing with the following properties: - Output directory is a temp dir. | -| EnableFutureFlags | _No description._ | -| FakeCdktfJsonPath | _No description._ | -| FullSynth | _No description._ | -| RenderConstructTree | _No description._ | -| SetupJest | _No description._ | -| StubVersion | _No description._ | -| Synth | Returns the Terraform synthesized JSON. | -| SynthScope | _No description._ | +| **Name** | **Description** | +| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| App | Returns an app for testing with the following properties: - Output directory is a temp dir. | +| EnableFutureFlags | _No description._ | +| FakeCdktfJsonPath | _No description._ | +| FullSynth | _No description._ | +| RenderConstructTree | _No description._ | +| SetupJest | _No description._ | +| StubVersion | _No description._ | +| Synth | Returns the Terraform synthesized JSON. | +| SynthScope | _No description._ | +| ToBeValidTerraform | _No description._ | +| ToHaveDataSource | _No description._ | +| ToHaveDataSourceWithProperties | _No description._ | +| ToHaveResource | _No description._ | +| ToHaveResourceWithProperties | _No description._ | --- @@ -24974,6 +25227,112 @@ Testing.SynthScope(IScopeCallback Fn); --- +##### `ToBeValidTerraform` + +```csharp +using HashiCorp.Cdktf; + +Testing.ToBeValidTerraform(string Received); +``` + +###### `Received`Required + +- _Type:_ string + +--- + +##### `ToHaveDataSource` + +```csharp +using HashiCorp.Cdktf; + +Testing.ToHaveDataSource(string Received, string ResourceType); +``` + +###### `Received`Required + +- _Type:_ string + +--- + +###### `ResourceType`Required + +- _Type:_ string + +--- + +##### `ToHaveDataSourceWithProperties` + +```csharp +using HashiCorp.Cdktf; + +Testing.ToHaveDataSourceWithProperties(string Received, string ResourceType, System.Collections.Generic.IDictionary< string, object > Properties = null); +``` + +###### `Received`Required + +- _Type:_ string + +--- + +###### `ResourceType`Required + +- _Type:_ string + +--- + +###### `Properties`Optional + +- _Type:_ System.Collections.Generic.IDictionary< string, object > + +--- + +##### `ToHaveResource` + +```csharp +using HashiCorp.Cdktf; + +Testing.ToHaveResource(string Received, string ResourceType); +``` + +###### `Received`Required + +- _Type:_ string + +--- + +###### `ResourceType`Required + +- _Type:_ string + +--- + +##### `ToHaveResourceWithProperties` + +```csharp +using HashiCorp.Cdktf; + +Testing.ToHaveResourceWithProperties(string Received, string ResourceType, System.Collections.Generic.IDictionary< string, object > Properties = null); +``` + +###### `Received`Required + +- _Type:_ string + +--- + +###### `ResourceType`Required + +- _Type:_ string + +--- + +###### `Properties`Optional + +- _Type:_ System.Collections.Generic.IDictionary< string, object > + +--- + ### Token Represents a special or lazily-evaluated value. @@ -26609,11 +26968,12 @@ Resolve an inner object. #### Properties -| **Name** | **Type** | **Description** | -| ---------------------------------------------------------------------------------------- | ---------------------------------- | -------------------------------------------------------------------------------- | -| Preparing | bool | True when we are still preparing, false if we're rendering the final output. | -| Scope | Constructs.IConstruct | The scope from which resolution has been initiated. | -| SuppressBraces | bool | True when ${} should be ommitted (because already inside them), false otherwise. | +| **Name** | **Type** | **Description** | +| ------------------------------------------------------------------------------------------ | ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Preparing | bool | True when we are still preparing, false if we're rendering the final output. | +| Scope | Constructs.IConstruct | The scope from which resolution has been initiated. | +| IteratorContext | string | TerraformIterators can be passed for block attributes and normal list attributes both require different handling when the iterable variable is accessed e.g. a dynamic block needs each.key while a for expression just needs key. | +| SuppressBraces | bool | True when ${} should be ommitted (because already inside them), false otherwise. | --- @@ -26641,6 +27001,18 @@ The scope from which resolution has been initiated. --- +##### `IteratorContext`Optional + +```csharp +public string IteratorContext { get; set; } +``` + +- _Type:_ string + +TerraformIterators can be passed for block attributes and normal list attributes both require different handling when the iterable variable is accessed e.g. a dynamic block needs each.key while a for expression just needs key. + +--- + ##### `SuppressBraces`Optional ```csharp diff --git a/website/docs/cdktf/api-reference/go.mdx b/website/docs/cdktf/api-reference/go.mdx index 2ba49a2489..8e90215829 100644 --- a/website/docs/cdktf/api-reference/go.mdx +++ b/website/docs/cdktf/api-reference/go.mdx @@ -9616,18 +9616,19 @@ Any object. #### Properties -| **Name** | **Type** | **Description** | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------- | -| Node | github.com/aws/constructs-go/constructs/v10.Node | The tree node. | -| CdktfStack | TerraformStack | _No description._ | -| Fqn | \*string | _No description._ | -| FriendlyUniqueId | \*string | _No description._ | -| Source | \*string | _No description._ | -| Providers | \*[]interface{} | _No description._ | -| Version | \*string | _No description._ | -| DependsOn | *[]*string | _No description._ | -| ForEach | ITerraformIterator | _No description._ | -| Variables | \*map[string]interface{} | _No description._ | +| **Name** | **Type** | **Description** | +| --------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------- | +| Node | github.com/aws/constructs-go/constructs/v10.Node | The tree node. | +| CdktfStack | TerraformStack | _No description._ | +| Fqn | \*string | _No description._ | +| FriendlyUniqueId | \*string | _No description._ | +| Source | \*string | _No description._ | +| Providers | \*[]interface{} | _No description._ | +| SkipAssetCreationFromLocalModules | \*bool | _No description._ | +| Version | \*string | _No description._ | +| DependsOn | *[]*string | _No description._ | +| ForEach | ITerraformIterator | _No description._ | +| Variables | \*map[string]interface{} | _No description._ | --- @@ -9693,6 +9694,16 @@ func Providers() *[]interface{} --- +##### `SkipAssetCreationFromLocalModules`Optional + +```go +func SkipAssetCreationFromLocalModules() *bool +``` + +- _Type:_ \*bool + +--- + ##### `Version`Optional ```go @@ -10188,17 +10199,18 @@ Any object. #### Properties -| **Name** | **Type** | **Description** | -| -------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------- | -| Node | github.com/aws/constructs-go/constructs/v10.Node | The tree node. | -| CdktfStack | TerraformStack | _No description._ | -| Fqn | \*string | _No description._ | -| FriendlyUniqueId | \*string | _No description._ | -| Source | \*string | _No description._ | -| Providers | \*[]interface{} | _No description._ | -| Version | \*string | _No description._ | -| DependsOn | *[]*string | _No description._ | -| ForEach | ITerraformIterator | _No description._ | +| **Name** | **Type** | **Description** | +| ------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------- | ----------------- | +| Node | github.com/aws/constructs-go/constructs/v10.Node | The tree node. | +| CdktfStack | TerraformStack | _No description._ | +| Fqn | \*string | _No description._ | +| FriendlyUniqueId | \*string | _No description._ | +| Source | \*string | _No description._ | +| Providers | \*[]interface{} | _No description._ | +| SkipAssetCreationFromLocalModules | \*bool | _No description._ | +| Version | \*string | _No description._ | +| DependsOn | *[]*string | _No description._ | +| ForEach | ITerraformIterator | _No description._ | --- @@ -10264,6 +10276,16 @@ func Providers() *[]interface{} --- +##### `SkipAssetCreationFromLocalModules`Optional + +```go +func SkipAssetCreationFromLocalModules() *bool +``` + +- _Type:_ \*bool + +--- + ##### `Version`Optional ```go @@ -11892,6 +11914,7 @@ cdktf.NewTerraformVariable(scope Construct, id *string, config TerraformVariable | ResetOverrideLogicalId | Resets a previously passed logical Id to use the auto-generated logical id again. | | ToMetadata | _No description._ | | ToTerraform | _No description._ | +| AddValidation | _No description._ | | SynthesizeAttributes | _No description._ | --- @@ -11958,6 +11981,18 @@ func ToMetadata() interface{} func ToTerraform() interface{} ``` +##### `AddValidation` + +```go +func AddValidation(validation TerraformVariableValidationConfig) +``` + +###### `validation`Required + +- _Type:_ TerraformVariableValidationConfig + +--- + ##### `SynthesizeAttributes` ```go @@ -12006,22 +12041,23 @@ Any object. #### Properties -| **Name** | **Type** | **Description** | -| ---------------------------------------------------------------------------------------------- | --------------------------------------------------------------- | ----------------- | -| Node | github.com/aws/constructs-go/constructs/v10.Node | The tree node. | -| CdktfStack | TerraformStack | _No description._ | -| Fqn | \*string | _No description._ | -| FriendlyUniqueId | \*string | _No description._ | -| BooleanValue | IResolvable | _No description._ | -| ListValue | *[]*string | _No description._ | -| NumberValue | \*f64 | _No description._ | -| StringValue | \*string | _No description._ | -| Value | interface{} | _No description._ | -| Default | interface{} | _No description._ | -| Description | \*string | _No description._ | -| Nullable | \*bool | _No description._ | -| Sensitive | \*bool | _No description._ | -| Type | \*string | _No description._ | +| **Name** | **Type** | **Description** | +| ---------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | ----------------- | +| Node | github.com/aws/constructs-go/constructs/v10.Node | The tree node. | +| CdktfStack | TerraformStack | _No description._ | +| Fqn | \*string | _No description._ | +| FriendlyUniqueId | \*string | _No description._ | +| BooleanValue | IResolvable | _No description._ | +| ListValue | *[]*string | _No description._ | +| NumberValue | \*f64 | _No description._ | +| StringValue | \*string | _No description._ | +| Value | interface{} | _No description._ | +| Default | interface{} | _No description._ | +| Description | \*string | _No description._ | +| Nullable | \*bool | _No description._ | +| Sensitive | \*bool | _No description._ | +| Type | \*string | _No description._ | +| Validation | \*[]TerraformVariableValidationConfig | _No description._ | --- @@ -12167,6 +12203,16 @@ func Type() *string --- +##### `Validation`Optional + +```go +func Validation() *[]TerraformVariableValidationConfig +``` + +- _Type:_ \*[]TerraformVariableValidationConfig + +--- + ## Structs ### AppOptions @@ -18272,6 +18318,7 @@ import "github.com/hashicorp/terraform-cdk-go/cdktf" DependsOn: *[]github.com/hashicorp/terraform-cdk-go/cdktf.ITerraformDependable, ForEach: github.com/hashicorp/terraform-cdk-go/cdktf.ITerraformIterator, Providers: *[]interface{}, + SkipAssetCreationFromLocalModules: *bool, Source: *string, Version: *string, Variables: *map[string]interface{}, @@ -18280,14 +18327,15 @@ import "github.com/hashicorp/terraform-cdk-go/cdktf" #### Properties -| **Name** | **Type** | **Description** | -| ---------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ----------------- | -| DependsOn | \*[]ITerraformDependable | _No description._ | -| ForEach | ITerraformIterator | _No description._ | -| Providers | \*[]interface{} | _No description._ | -| Source | \*string | _No description._ | -| Version | \*string | _No description._ | -| Variables | \*map[string]interface{} | _No description._ | +| **Name** | **Type** | **Description** | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ----------------- | +| DependsOn | \*[]ITerraformDependable | _No description._ | +| ForEach | ITerraformIterator | _No description._ | +| Providers | \*[]interface{} | _No description._ | +| SkipAssetCreationFromLocalModules | \*bool | _No description._ | +| Source | \*string | _No description._ | +| Version | \*string | _No description._ | +| Variables | \*map[string]interface{} | _No description._ | --- @@ -18321,6 +18369,16 @@ Providers *[]interface{} --- +##### `SkipAssetCreationFromLocalModules`Optional + +```go +SkipAssetCreationFromLocalModules *bool +``` + +- _Type:_ \*bool + +--- + ##### `Source`Required ```go @@ -18464,6 +18522,7 @@ import "github.com/hashicorp/terraform-cdk-go/cdktf" DependsOn: *[]github.com/hashicorp/terraform-cdk-go/cdktf.ITerraformDependable, ForEach: github.com/hashicorp/terraform-cdk-go/cdktf.ITerraformIterator, Providers: *[]interface{}, + SkipAssetCreationFromLocalModules: *bool, Source: *string, Version: *string, } @@ -18471,13 +18530,14 @@ import "github.com/hashicorp/terraform-cdk-go/cdktf" #### Properties -| **Name** | **Type** | **Description** | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ----------------- | -| DependsOn | \*[]ITerraformDependable | _No description._ | -| ForEach | ITerraformIterator | _No description._ | -| Providers | \*[]interface{} | _No description._ | -| Source | \*string | _No description._ | -| Version | \*string | _No description._ | +| **Name** | **Type** | **Description** | +| ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ----------------- | +| DependsOn | \*[]ITerraformDependable | _No description._ | +| ForEach | ITerraformIterator | _No description._ | +| Providers | \*[]interface{} | _No description._ | +| SkipAssetCreationFromLocalModules | \*bool | _No description._ | +| Source | \*string | _No description._ | +| Version | \*string | _No description._ | --- @@ -18511,6 +18571,16 @@ Providers *[]interface{} --- +##### `SkipAssetCreationFromLocalModules`Optional + +```go +SkipAssetCreationFromLocalModules *bool +``` + +- _Type:_ \*bool + +--- + ##### `Source`Required ```go @@ -18584,16 +18654,18 @@ import "github.com/hashicorp/terraform-cdk-go/cdktf" DependsOn: *[]github.com/hashicorp/terraform-cdk-go/cdktf.ITerraformDependable, ForEach: github.com/hashicorp/terraform-cdk-go/cdktf.ITerraformIterator, Providers: *[]interface{}, + SkipAssetCreationFromLocalModules: *bool, } ``` #### Properties -| **Name** | **Type** | **Description** | -| ----------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ----------------- | -| DependsOn | \*[]ITerraformDependable | _No description._ | -| ForEach | ITerraformIterator | _No description._ | -| Providers | \*[]interface{} | _No description._ | +| **Name** | **Type** | **Description** | +| ----------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ----------------- | +| DependsOn | \*[]ITerraformDependable | _No description._ | +| ForEach | ITerraformIterator | _No description._ | +| Providers | \*[]interface{} | _No description._ | +| SkipAssetCreationFromLocalModules | \*bool | _No description._ | --- @@ -18627,6 +18699,16 @@ Providers *[]interface{} --- +##### `SkipAssetCreationFromLocalModules`Optional + +```go +SkipAssetCreationFromLocalModules *bool +``` + +- _Type:_ \*bool + +--- + ### TerraformOutputConfig #### Initializer @@ -19063,18 +19145,20 @@ import "github.com/hashicorp/terraform-cdk-go/cdktf" Nullable: *bool, Sensitive: *bool, Type: *string, + Validation: *[]github.com/hashicorp/terraform-cdk-go/cdktf.TerraformVariableValidationConfig, } ``` #### Properties -| **Name** | **Type** | **Description** | -| ------------------------------------------------------------------------------------------ | ------------------------ | --------------------------------------------------------------------------------------------------------------------------------- | -| Default | interface{} | _No description._ | -| Description | \*string | _No description._ | -| Nullable | \*bool | _No description._ | -| Sensitive | \*bool | _No description._ | -| Type | \*string | The type argument in a variable block allows you to restrict the type of value that will be accepted as the value for a variable. | +| **Name** | **Type** | **Description** | +| ------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | +| Default | interface{} | _No description._ | +| Description | \*string | _No description._ | +| Nullable | \*bool | _No description._ | +| Sensitive | \*bool | _No description._ | +| Type | \*string | The type argument in a variable block allows you to restrict the type of value that will be accepted as the value for a variable. | +| Validation | \*[]TerraformVariableValidationConfig | Specify arbitrary custom validation rules for a particular variable using a validation block nested within the corresponding variable block. | --- @@ -19152,6 +19236,60 @@ If both the type and default arguments are specified, the given default value mu --- +##### `Validation`Optional + +```go +Validation *[]TerraformVariableValidationConfig +``` + +- _Type:_ \*[]TerraformVariableValidationConfig + +Specify arbitrary custom validation rules for a particular variable using a validation block nested within the corresponding variable block. + +--- + +### TerraformVariableValidationConfig + +#### Initializer + +```go +import "github.com/hashicorp/terraform-cdk-go/cdktf" + +&cdktf.TerraformVariableValidationConfig { + Condition: interface{}, + ErrorMessage: *string, +} +``` + +#### Properties + +| **Name** | **Type** | **Description** | +| ------------------------------------------------------------------------------------------------------ | ------------------------ | ----------------- | +| Condition | interface{} | _No description._ | +| ErrorMessage | \*string | _No description._ | + +--- + +##### `Condition`Required + +```go +Condition interface{} +``` + +- _Type:_ interface{} + +--- + +##### `ErrorMessage`Required + +```go +ErrorMessage *string +``` + +- _Type:_ \*string + +--- + ### TestingAppOptions #### Initializer @@ -19656,6 +19794,64 @@ The list of aspects which were directly applied on this scope. --- +### AssertionReturn + +#### Initializers + +```go +import "github.com/hashicorp/terraform-cdk-go/cdktf/testingmatchers" + +testingmatchers.NewAssertionReturn(message *string, pass *bool) AssertionReturn +``` + +| **Name** | **Type** | **Description** | +| ------------------------------------------------------------------------------------------------------- | --------------------- | ----------------- | +| message | \*string | _No description._ | +| pass | \*bool | _No description._ | + +--- + +##### `message`Required + +- _Type:_ \*string + +--- + +##### `pass`Required + +- _Type:_ \*bool + +--- + +#### Properties + +| **Name** | **Type** | **Description** | +| ------------------------------------------------------------------------------------------ | --------------------- | ----------------- | +| Message | \*string | _No description._ | +| Pass | \*bool | _No description._ | + +--- + +##### `Message`Required + +```go +func Message() *string +``` + +- _Type:_ \*string + +--- + +##### `Pass`Required + +```go +func Pass() *bool +``` + +- _Type:_ \*bool + +--- + ### BooleanMap - _Implements:_ ITerraformAddressable, IResolvable @@ -23215,6 +23411,7 @@ cdktf.NewListTerraformIterator(list interface{}) ListTerraformIterator | **Name** | **Description** | | ----------------------------------------------------------------------------------- | ----------------- | +| Dynamic | _No description._ | | GetAny | _No description._ | | GetAnyMap | _No description._ | | GetBoolean | _No description._ | @@ -23229,6 +23426,18 @@ cdktf.NewListTerraformIterator(list interface{}) ListTerraformIterator --- +##### `Dynamic` + +```go +func Dynamic(attributes *map[string]interface{}) IResolvable +``` + +###### `attributes`Required + +- _Type:_ \*map[string]interface{} + +--- + ##### `GetAny` ```go @@ -23632,6 +23841,7 @@ cdktf.NewMapTerraformIterator(map interface{}) MapTerraformIterator | **Name** | **Description** | | ---------------------------------------------------------------------------------- | ----------------- | +| Dynamic | _No description._ | | GetAny | _No description._ | | GetAnyMap | _No description._ | | GetBoolean | _No description._ | @@ -23646,6 +23856,18 @@ cdktf.NewMapTerraformIterator(map interface{}) MapTerraformIterator --- +##### `Dynamic` + +```go +func Dynamic(attributes *map[string]interface{}) IResolvable +``` + +###### `attributes`Required + +- _Type:_ \*map[string]interface{} + +--- + ##### `GetAny` ```go @@ -24536,6 +24758,7 @@ cdktf.NewTerraformIterator() TerraformIterator | **Name** | **Description** | | ------------------------------------------------------------------------------- | ----------------- | +| Dynamic | _No description._ | | GetAny | _No description._ | | GetAnyMap | _No description._ | | GetBoolean | _No description._ | @@ -24550,6 +24773,18 @@ cdktf.NewTerraformIterator() TerraformIterator --- +##### `Dynamic` + +```go +func Dynamic(attributes *map[string]interface{}) IResolvable +``` + +###### `attributes`Required + +- _Type:_ \*map[string]interface{} + +--- + ##### `GetAny` ```go @@ -24834,19 +25069,37 @@ Access a property on the resource like this: `getString("publicIp")` Testing utilities for cdktf applications. +#### Initializers + +```go +import "github.com/hashicorp/terraform-cdk-go/cdktf" + +cdktf.NewTesting() Testing +``` + +| **Name** | **Type** | **Description** | +| -------- | -------- | --------------- | + +--- + #### Static Functions -| **Name** | **Description** | -| --------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | -| App | Returns an app for testing with the following properties: - Output directory is a temp dir. | -| EnableFutureFlags | _No description._ | -| FakeCdktfJsonPath | _No description._ | -| FullSynth | _No description._ | -| RenderConstructTree | _No description._ | -| SetupJest | _No description._ | -| StubVersion | _No description._ | -| Synth | Returns the Terraform synthesized JSON. | -| SynthScope | _No description._ | +| **Name** | **Description** | +| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| App | Returns an app for testing with the following properties: - Output directory is a temp dir. | +| EnableFutureFlags | _No description._ | +| FakeCdktfJsonPath | _No description._ | +| FullSynth | _No description._ | +| RenderConstructTree | _No description._ | +| SetupJest | _No description._ | +| StubVersion | _No description._ | +| Synth | Returns the Terraform synthesized JSON. | +| SynthScope | _No description._ | +| ToBeValidTerraform | _No description._ | +| ToHaveDataSource | _No description._ | +| ToHaveDataSourceWithProperties | _No description._ | +| ToHaveResource | _No description._ | +| ToHaveResourceWithProperties | _No description._ | --- @@ -24974,6 +25227,112 @@ cdktf.Testing_SynthScope(fn IScopeCallback) *string --- +##### `ToBeValidTerraform` + +```go +import "github.com/hashicorp/terraform-cdk-go/cdktf" + +cdktf.Testing_ToBeValidTerraform(received *string) *bool +``` + +###### `received`Required + +- _Type:_ \*string + +--- + +##### `ToHaveDataSource` + +```go +import "github.com/hashicorp/terraform-cdk-go/cdktf" + +cdktf.Testing_ToHaveDataSource(received *string, resourceType *string) *bool +``` + +###### `received`Required + +- _Type:_ \*string + +--- + +###### `resourceType`Required + +- _Type:_ \*string + +--- + +##### `ToHaveDataSourceWithProperties` + +```go +import "github.com/hashicorp/terraform-cdk-go/cdktf" + +cdktf.Testing_ToHaveDataSourceWithProperties(received *string, resourceType *string, properties *map[string]interface{}) *bool +``` + +###### `received`Required + +- _Type:_ \*string + +--- + +###### `resourceType`Required + +- _Type:_ \*string + +--- + +###### `properties`Optional + +- _Type:_ \*map[string]interface{} + +--- + +##### `ToHaveResource` + +```go +import "github.com/hashicorp/terraform-cdk-go/cdktf" + +cdktf.Testing_ToHaveResource(received *string, resourceType *string) *bool +``` + +###### `received`Required + +- _Type:_ \*string + +--- + +###### `resourceType`Required + +- _Type:_ \*string + +--- + +##### `ToHaveResourceWithProperties` + +```go +import "github.com/hashicorp/terraform-cdk-go/cdktf" + +cdktf.Testing_ToHaveResourceWithProperties(received *string, resourceType *string, properties *map[string]interface{}) *bool +``` + +###### `received`Required + +- _Type:_ \*string + +--- + +###### `resourceType`Required + +- _Type:_ \*string + +--- + +###### `properties`Optional + +- _Type:_ \*map[string]interface{} + +--- + ### Token Represents a special or lazily-evaluated value. @@ -26609,11 +26968,12 @@ Resolve an inner object. #### Properties -| **Name** | **Type** | **Description** | -| ---------------------------------------------------------------------------------------- | ------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -| Preparing | \*bool | True when we are still preparing, false if we're rendering the final output. | -| Scope | github.com/aws/constructs-go/constructs/v10.IConstruct | The scope from which resolution has been initiated. | -| SuppressBraces | \*bool | True when ${} should be ommitted (because already inside them), false otherwise. | +| **Name** | **Type** | **Description** | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Preparing | \*bool | True when we are still preparing, false if we're rendering the final output. | +| Scope | github.com/aws/constructs-go/constructs/v10.IConstruct | The scope from which resolution has been initiated. | +| IteratorContext | \*string | TerraformIterators can be passed for block attributes and normal list attributes both require different handling when the iterable variable is accessed e.g. a dynamic block needs each.key while a for expression just needs key. | +| SuppressBraces | \*bool | True when ${} should be ommitted (because already inside them), false otherwise. | --- @@ -26641,6 +27001,18 @@ The scope from which resolution has been initiated. --- +##### `IteratorContext`Optional + +```go +func IteratorContext() *string +``` + +- _Type:_ \*string + +TerraformIterators can be passed for block attributes and normal list attributes both require different handling when the iterable variable is accessed e.g. a dynamic block needs each.key while a for expression just needs key. + +--- + ##### `SuppressBraces`Optional ```go diff --git a/website/docs/cdktf/api-reference/java.mdx b/website/docs/cdktf/api-reference/java.mdx index 17ec0f649b..45d7ba8267 100644 --- a/website/docs/cdktf/api-reference/java.mdx +++ b/website/docs/cdktf/api-reference/java.mdx @@ -12681,22 +12681,24 @@ TerraformHclModule.Builder.create(Construct scope, java.lang.String id) // .forEach(ITerraformIterator) // .providers(java.util.List< TerraformProvider) // .providers(TerraformModuleProvider >) +// .skipAssetCreationFromLocalModules(java.lang.Boolean) .source(java.lang.String) // .version(java.lang.String) // .variables(java.util.Map< java.lang.String, java.lang.Object >) .build(); ``` -| **Name** | **Type** | **Description** | -| ---------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | -| scope | software.constructs.Construct | _No description._ | -| id | java.lang.String | _No description._ | -| dependsOn | java.util.List< ITerraformDependable> | _No description._ | -| forEach | ITerraformIterator | _No description._ | -| providers | java.util.List< TerraformProvider OR TerraformModuleProvider> | _No description._ | -| source | java.lang.String | _No description._ | -| version | java.lang.String | _No description._ | -| variables | java.util.Map< java.lang.String, java.lang.Object > | _No description._ | +| **Name** | **Type** | **Description** | +| ---------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | +| scope | software.constructs.Construct | _No description._ | +| id | java.lang.String | _No description._ | +| dependsOn | java.util.List< ITerraformDependable> | _No description._ | +| forEach | ITerraformIterator | _No description._ | +| providers | java.util.List< TerraformProvider OR TerraformModuleProvider> | _No description._ | +| skipAssetCreationFromLocalModules | java.lang.Boolean | _No description._ | +| source | java.lang.String | _No description._ | +| version | java.lang.String | _No description._ | +| variables | java.util.Map< java.lang.String, java.lang.Object > | _No description._ | --- @@ -12730,6 +12732,12 @@ TerraformHclModule.Builder.create(Construct scope, java.lang.String id) --- +##### `skipAssetCreationFromLocalModules`Optional + +- _Type:_ java.lang.Boolean + +--- + ##### `source`Required - _Type:_ java.lang.String @@ -12975,18 +12983,19 @@ Any object. #### Properties -| **Name** | **Type** | **Description** | -| ----------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | -| node | software.constructs.Node | The tree node. | -| cdktfStack | TerraformStack | _No description._ | -| fqn | java.lang.String | _No description._ | -| friendlyUniqueId | java.lang.String | _No description._ | -| source | java.lang.String | _No description._ | -| providers | java.util.List< TerraformProvider OR TerraformModuleProvider> | _No description._ | -| version | java.lang.String | _No description._ | -| dependsOn | java.util.List< java.lang.String > | _No description._ | -| forEach | ITerraformIterator | _No description._ | -| variables | java.util.Map< java.lang.String, java.lang.Object > | _No description._ | +| **Name** | **Type** | **Description** | +| --------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | +| node | software.constructs.Node | The tree node. | +| cdktfStack | TerraformStack | _No description._ | +| fqn | java.lang.String | _No description._ | +| friendlyUniqueId | java.lang.String | _No description._ | +| source | java.lang.String | _No description._ | +| providers | java.util.List< TerraformProvider OR TerraformModuleProvider> | _No description._ | +| skipAssetCreationFromLocalModules | java.lang.Boolean | _No description._ | +| version | java.lang.String | _No description._ | +| dependsOn | java.util.List< java.lang.String > | _No description._ | +| forEach | ITerraformIterator | _No description._ | +| variables | java.util.Map< java.lang.String, java.lang.Object > | _No description._ | --- @@ -13052,6 +13061,16 @@ public java.lang.Object getProviders(); --- +##### `skipAssetCreationFromLocalModules`Optional + +```java +public java.lang.Boolean getSkipAssetCreationFromLocalModules(); +``` + +- _Type:_ java.lang.Boolean + +--- + ##### `version`Optional ```java @@ -13367,20 +13386,22 @@ TerraformModule.Builder.create(Construct scope, java.lang.String id) // .forEach(ITerraformIterator) // .providers(java.util.List< TerraformProvider) // .providers(TerraformModuleProvider >) +// .skipAssetCreationFromLocalModules(java.lang.Boolean) .source(java.lang.String) // .version(java.lang.String) .build(); ``` -| **Name** | **Type** | **Description** | -| ------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | -| scope | software.constructs.Construct | _No description._ | -| id | java.lang.String | _No description._ | -| dependsOn | java.util.List< ITerraformDependable> | _No description._ | -| forEach | ITerraformIterator | _No description._ | -| providers | java.util.List< TerraformProvider OR TerraformModuleProvider> | _No description._ | -| source | java.lang.String | _No description._ | -| version | java.lang.String | _No description._ | +| **Name** | **Type** | **Description** | +| ------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | +| scope | software.constructs.Construct | _No description._ | +| id | java.lang.String | _No description._ | +| dependsOn | java.util.List< ITerraformDependable> | _No description._ | +| forEach | ITerraformIterator | _No description._ | +| providers | java.util.List< TerraformProvider OR TerraformModuleProvider> | _No description._ | +| skipAssetCreationFromLocalModules | java.lang.Boolean | _No description._ | +| source | java.lang.String | _No description._ | +| version | java.lang.String | _No description._ | --- @@ -13414,6 +13435,12 @@ TerraformModule.Builder.create(Construct scope, java.lang.String id) --- +##### `skipAssetCreationFromLocalModules`Optional + +- _Type:_ java.lang.Boolean + +--- + ##### `source`Required - _Type:_ java.lang.String @@ -13582,17 +13609,18 @@ Any object. #### Properties -| **Name** | **Type** | **Description** | -| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | -| node | software.constructs.Node | The tree node. | -| cdktfStack | TerraformStack | _No description._ | -| fqn | java.lang.String | _No description._ | -| friendlyUniqueId | java.lang.String | _No description._ | -| source | java.lang.String | _No description._ | -| providers | java.util.List< TerraformProvider OR TerraformModuleProvider> | _No description._ | -| version | java.lang.String | _No description._ | -| dependsOn | java.util.List< java.lang.String > | _No description._ | -| forEach | ITerraformIterator | _No description._ | +| **Name** | **Type** | **Description** | +| ------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | +| node | software.constructs.Node | The tree node. | +| cdktfStack | TerraformStack | _No description._ | +| fqn | java.lang.String | _No description._ | +| friendlyUniqueId | java.lang.String | _No description._ | +| source | java.lang.String | _No description._ | +| providers | java.util.List< TerraformProvider OR TerraformModuleProvider> | _No description._ | +| skipAssetCreationFromLocalModules | java.lang.Boolean | _No description._ | +| version | java.lang.String | _No description._ | +| dependsOn | java.util.List< java.lang.String > | _No description._ | +| forEach | ITerraformIterator | _No description._ | --- @@ -13658,6 +13686,16 @@ public java.lang.Object getProviders(); --- +##### `skipAssetCreationFromLocalModules`Optional + +```java +public java.lang.Boolean getSkipAssetCreationFromLocalModules(); +``` + +- _Type:_ java.lang.Boolean + +--- + ##### `version`Optional ```java @@ -15387,18 +15425,20 @@ TerraformVariable.Builder.create(Construct scope, java.lang.String id) // .nullable(java.lang.Boolean) // .sensitive(java.lang.Boolean) // .type(java.lang.String) +// .validation(java.util.List< TerraformVariableValidationConfig >) .build(); ``` -| **Name** | **Type** | **Description** | -| ------------------------------------------------------------------------------------------------- | ------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------- | -| scope | software.constructs.Construct | _No description._ | -| id | java.lang.String | _No description._ | -| default | java.lang.Object | _No description._ | -| description | java.lang.String | _No description._ | -| nullable | java.lang.Boolean | _No description._ | -| sensitive | java.lang.Boolean | _No description._ | -| type | java.lang.String | The type argument in a variable block allows you to restrict the type of value that will be accepted as the value for a variable. | +| **Name** | **Type** | **Description** | +| ------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | +| scope | software.constructs.Construct | _No description._ | +| id | java.lang.String | _No description._ | +| default | java.lang.Object | _No description._ | +| description | java.lang.String | _No description._ | +| nullable | java.lang.Boolean | _No description._ | +| sensitive | java.lang.Boolean | _No description._ | +| type | java.lang.String | The type argument in a variable block allows you to restrict the type of value that will be accepted as the value for a variable. | +| validation | java.util.List< TerraformVariableValidationConfig> | Specify arbitrary custom validation rules for a particular variable using a validation block nested within the corresponding variable block. | --- @@ -15468,6 +15508,14 @@ If both the type and default arguments are specified, the given default value mu --- +##### `validation`Optional + +- _Type:_ java.util.List< TerraformVariableValidationConfig> + +Specify arbitrary custom validation rules for a particular variable using a validation block nested within the corresponding variable block. + +--- + #### Methods | **Name** | **Description** | @@ -15478,6 +15526,7 @@ If both the type and default arguments are specified, the given default value mu | resetOverrideLogicalId | Resets a previously passed logical Id to use the auto-generated logical id again. | | toMetadata | _No description._ | | toTerraform | _No description._ | +| addValidation | _No description._ | | synthesizeAttributes | _No description._ | --- @@ -15544,6 +15593,18 @@ public java.lang.Object toMetadata() public java.lang.Object toTerraform() ``` +##### `addValidation` + +```java +public void addValidation(TerraformVariableValidationConfig validation) +``` + +###### `validation`Required + +- _Type:_ TerraformVariableValidationConfig + +--- + ##### `synthesizeAttributes` ```java @@ -15592,22 +15653,23 @@ Any object. #### Properties -| **Name** | **Type** | **Description** | -| ---------------------------------------------------------------------------------------------- | --------------------------------------------------------------- | ----------------- | -| node | software.constructs.Node | The tree node. | -| cdktfStack | TerraformStack | _No description._ | -| fqn | java.lang.String | _No description._ | -| friendlyUniqueId | java.lang.String | _No description._ | -| booleanValue | IResolvable | _No description._ | -| listValue | java.util.List< java.lang.String > | _No description._ | -| numberValue | java.lang.Number | _No description._ | -| stringValue | java.lang.String | _No description._ | -| value | java.lang.Object | _No description._ | -| default | java.lang.Object | _No description._ | -| description | java.lang.String | _No description._ | -| nullable | java.lang.Boolean | _No description._ | -| sensitive | java.lang.Boolean | _No description._ | -| type | java.lang.String | _No description._ | +| **Name** | **Type** | **Description** | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ----------------- | +| node | software.constructs.Node | The tree node. | +| cdktfStack | TerraformStack | _No description._ | +| fqn | java.lang.String | _No description._ | +| friendlyUniqueId | java.lang.String | _No description._ | +| booleanValue | IResolvable | _No description._ | +| listValue | java.util.List< java.lang.String > | _No description._ | +| numberValue | java.lang.Number | _No description._ | +| stringValue | java.lang.String | _No description._ | +| value | java.lang.Object | _No description._ | +| default | java.lang.Object | _No description._ | +| description | java.lang.String | _No description._ | +| nullable | java.lang.Boolean | _No description._ | +| sensitive | java.lang.Boolean | _No description._ | +| type | java.lang.String | _No description._ | +| validation | java.util.List< TerraformVariableValidationConfig> | _No description._ | --- @@ -15753,6 +15815,16 @@ public java.lang.String getType(); --- +##### `validation`Optional + +```java +public java.util.List< TerraformVariableValidationConfig > getValidation(); +``` + +- _Type:_ java.util.List< TerraformVariableValidationConfig> + +--- + ## Structs ### AppOptions @@ -21859,6 +21931,7 @@ TerraformHclModuleOptions.builder() // .forEach(ITerraformIterator) // .providers(java.util.List< TerraformProvider) // .providers(TerraformModuleProvider >) +// .skipAssetCreationFromLocalModules(java.lang.Boolean) .source(java.lang.String) // .version(java.lang.String) // .variables(java.util.Map< java.lang.String, java.lang.Object >) @@ -21867,14 +21940,15 @@ TerraformHclModuleOptions.builder() #### Properties -| **Name** | **Type** | **Description** | -| ---------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | -| dependsOn | java.util.List< ITerraformDependable> | _No description._ | -| forEach | ITerraformIterator | _No description._ | -| providers | java.util.List< TerraformProvider OR TerraformModuleProvider> | _No description._ | -| source | java.lang.String | _No description._ | -| version | java.lang.String | _No description._ | -| variables | java.util.Map< java.lang.String, java.lang.Object > | _No description._ | +| **Name** | **Type** | **Description** | +| ---------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | +| dependsOn | java.util.List< ITerraformDependable> | _No description._ | +| forEach | ITerraformIterator | _No description._ | +| providers | java.util.List< TerraformProvider OR TerraformModuleProvider> | _No description._ | +| skipAssetCreationFromLocalModules | java.lang.Boolean | _No description._ | +| source | java.lang.String | _No description._ | +| version | java.lang.String | _No description._ | +| variables | java.util.Map< java.lang.String, java.lang.Object > | _No description._ | --- @@ -21908,6 +21982,16 @@ public java.lang.Object getProviders(); --- +##### `skipAssetCreationFromLocalModules`Optional + +```java +public java.lang.Boolean getSkipAssetCreationFromLocalModules(); +``` + +- _Type:_ java.lang.Boolean + +--- + ##### `source`Required ```java @@ -22055,6 +22139,7 @@ TerraformModuleOptions.builder() // .forEach(ITerraformIterator) // .providers(java.util.List< TerraformProvider) // .providers(TerraformModuleProvider >) +// .skipAssetCreationFromLocalModules(java.lang.Boolean) .source(java.lang.String) // .version(java.lang.String) .build(); @@ -22062,13 +22147,14 @@ TerraformModuleOptions.builder() #### Properties -| **Name** | **Type** | **Description** | -| ------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | -| dependsOn | java.util.List< ITerraformDependable> | _No description._ | -| forEach | ITerraformIterator | _No description._ | -| providers | java.util.List< TerraformProvider OR TerraformModuleProvider> | _No description._ | -| source | java.lang.String | _No description._ | -| version | java.lang.String | _No description._ | +| **Name** | **Type** | **Description** | +| ------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | +| dependsOn | java.util.List< ITerraformDependable> | _No description._ | +| forEach | ITerraformIterator | _No description._ | +| providers | java.util.List< TerraformProvider OR TerraformModuleProvider> | _No description._ | +| skipAssetCreationFromLocalModules | java.lang.Boolean | _No description._ | +| source | java.lang.String | _No description._ | +| version | java.lang.String | _No description._ | --- @@ -22102,6 +22188,16 @@ public java.lang.Object getProviders(); --- +##### `skipAssetCreationFromLocalModules`Optional + +```java +public java.lang.Boolean getSkipAssetCreationFromLocalModules(); +``` + +- _Type:_ java.lang.Boolean + +--- + ##### `source`Required ```java @@ -22176,16 +22272,18 @@ TerraformModuleUserOptions.builder() // .forEach(ITerraformIterator) // .providers(java.util.List< TerraformProvider) // .providers(TerraformModuleProvider >) +// .skipAssetCreationFromLocalModules(java.lang.Boolean) .build(); ``` #### Properties -| **Name** | **Type** | **Description** | -| ----------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | -| dependsOn | java.util.List< ITerraformDependable> | _No description._ | -| forEach | ITerraformIterator | _No description._ | -| providers | java.util.List< TerraformProvider OR TerraformModuleProvider> | _No description._ | +| **Name** | **Type** | **Description** | +| ----------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | +| dependsOn | java.util.List< ITerraformDependable> | _No description._ | +| forEach | ITerraformIterator | _No description._ | +| providers | java.util.List< TerraformProvider OR TerraformModuleProvider> | _No description._ | +| skipAssetCreationFromLocalModules | java.lang.Boolean | _No description._ | --- @@ -22219,6 +22317,16 @@ public java.lang.Object getProviders(); --- +##### `skipAssetCreationFromLocalModules`Optional + +```java +public java.lang.Boolean getSkipAssetCreationFromLocalModules(); +``` + +- _Type:_ java.lang.Boolean + +--- + ### TerraformOutputConfig #### Initializer @@ -22659,18 +22767,20 @@ TerraformVariableConfig.builder() // .nullable(java.lang.Boolean) // .sensitive(java.lang.Boolean) // .type(java.lang.String) +// .validation(java.util.List< TerraformVariableValidationConfig >) .build(); ``` #### Properties -| **Name** | **Type** | **Description** | -| ------------------------------------------------------------------------------------------ | ------------------------------ | --------------------------------------------------------------------------------------------------------------------------------- | -| default | java.lang.Object | _No description._ | -| description | java.lang.String | _No description._ | -| nullable | java.lang.Boolean | _No description._ | -| sensitive | java.lang.Boolean | _No description._ | -| type | java.lang.String | The type argument in a variable block allows you to restrict the type of value that will be accepted as the value for a variable. | +| **Name** | **Type** | **Description** | +| ------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | +| default | java.lang.Object | _No description._ | +| description | java.lang.String | _No description._ | +| nullable | java.lang.Boolean | _No description._ | +| sensitive | java.lang.Boolean | _No description._ | +| type | java.lang.String | The type argument in a variable block allows you to restrict the type of value that will be accepted as the value for a variable. | +| validation | java.util.List< TerraformVariableValidationConfig> | Specify arbitrary custom validation rules for a particular variable using a validation block nested within the corresponding variable block. | --- @@ -22748,6 +22858,60 @@ If both the type and default arguments are specified, the given default value mu --- +##### `validation`Optional + +```java +public java.util.List< TerraformVariableValidationConfig > getValidation(); +``` + +- _Type:_ java.util.List< TerraformVariableValidationConfig> + +Specify arbitrary custom validation rules for a particular variable using a validation block nested within the corresponding variable block. + +--- + +### TerraformVariableValidationConfig + +#### Initializer + +```java +import com.hashicorp.cdktf.TerraformVariableValidationConfig; + +TerraformVariableValidationConfig.builder() + .condition(java.lang.Object) + .errorMessage(java.lang.String) + .build(); +``` + +#### Properties + +| **Name** | **Type** | **Description** | +| ------------------------------------------------------------------------------------------------------ | ----------------------------- | ----------------- | +| condition | java.lang.Object | _No description._ | +| errorMessage | java.lang.String | _No description._ | + +--- + +##### `condition`Required + +```java +public java.lang.Object getCondition(); +``` + +- _Type:_ java.lang.Object + +--- + +##### `errorMessage`Required + +```java +public java.lang.String getErrorMessage(); +``` + +- _Type:_ java.lang.String + +--- + ### TestingAppOptions #### Initializer @@ -23252,6 +23416,64 @@ The list of aspects which were directly applied on this scope. --- +### AssertionReturn + +#### Initializers + +```java +import com.hashicorp.cdktf.testing_matchers.AssertionReturn; + +new AssertionReturn(java.lang.String message, java.lang.Boolean pass); +``` + +| **Name** | **Type** | **Description** | +| ------------------------------------------------------------------------------------------------------- | ------------------------------ | ----------------- | +| message | java.lang.String | _No description._ | +| pass | java.lang.Boolean | _No description._ | + +--- + +##### `message`Required + +- _Type:_ java.lang.String + +--- + +##### `pass`Required + +- _Type:_ java.lang.Boolean + +--- + +#### Properties + +| **Name** | **Type** | **Description** | +| ------------------------------------------------------------------------------------------ | ------------------------------ | ----------------- | +| message | java.lang.String | _No description._ | +| pass | java.lang.Boolean | _No description._ | + +--- + +##### `message`Required + +```java +public java.lang.String getMessage(); +``` + +- _Type:_ java.lang.String + +--- + +##### `pass`Required + +```java +public java.lang.Boolean getPass(); +``` + +- _Type:_ java.lang.Boolean + +--- + ### BooleanMap - _Implements:_ ITerraformAddressable, IResolvable @@ -26811,6 +27033,7 @@ new ListTerraformIterator(java.util.List< java.lang.String > OR IResolvable OR j | **Name** | **Description** | | ----------------------------------------------------------------------------------- | ----------------- | +| dynamic | _No description._ | | getAny | _No description._ | | getAnyMap | _No description._ | | getBoolean | _No description._ | @@ -26825,6 +27048,18 @@ new ListTerraformIterator(java.util.List< java.lang.String > OR IResolvable OR j --- +##### `dynamic` + +```java +public IResolvable dynamic(java.util.Map< java.lang.String, java.lang.Object > attributes) +``` + +###### `attributes`Required + +- _Type:_ java.util.Map< java.lang.String, java.lang.Object > + +--- + ##### `getAny` ```java @@ -27228,6 +27463,7 @@ new MapTerraformIterator(StringMap OR NumberMap OR BooleanMap OR AnyMap OR Compl | **Name** | **Description** | | ---------------------------------------------------------------------------------- | ----------------- | +| dynamic | _No description._ | | getAny | _No description._ | | getAnyMap | _No description._ | | getBoolean | _No description._ | @@ -27242,6 +27478,18 @@ new MapTerraformIterator(StringMap OR NumberMap OR BooleanMap OR AnyMap OR Compl --- +##### `dynamic` + +```java +public IResolvable dynamic(java.util.Map< java.lang.String, java.lang.Object > attributes) +``` + +###### `attributes`Required + +- _Type:_ java.util.Map< java.lang.String, java.lang.Object > + +--- + ##### `getAny` ```java @@ -28132,6 +28380,7 @@ new TerraformIterator(); | **Name** | **Description** | | ------------------------------------------------------------------------------- | ----------------- | +| dynamic | _No description._ | | getAny | _No description._ | | getAnyMap | _No description._ | | getBoolean | _No description._ | @@ -28146,6 +28395,18 @@ new TerraformIterator(); --- +##### `dynamic` + +```java +public IResolvable dynamic(java.util.Map< java.lang.String, java.lang.Object > attributes) +``` + +###### `attributes`Required + +- _Type:_ java.util.Map< java.lang.String, java.lang.Object > + +--- + ##### `getAny` ```java @@ -28430,19 +28691,37 @@ Access a property on the resource like this: `getString("publicIp")` Testing utilities for cdktf applications. +#### Initializers + +```java +import com.hashicorp.cdktf.Testing; + +new Testing(); +``` + +| **Name** | **Type** | **Description** | +| -------- | -------- | --------------- | + +--- + #### Static Functions -| **Name** | **Description** | -| --------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | -| app | Returns an app for testing with the following properties: - Output directory is a temp dir. | -| enableFutureFlags | _No description._ | -| fakeCdktfJsonPath | _No description._ | -| fullSynth | _No description._ | -| renderConstructTree | _No description._ | -| setupJest | _No description._ | -| stubVersion | _No description._ | -| synth | Returns the Terraform synthesized JSON. | -| synthScope | _No description._ | +| **Name** | **Description** | +| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| app | Returns an app for testing with the following properties: - Output directory is a temp dir. | +| enableFutureFlags | _No description._ | +| fakeCdktfJsonPath | _No description._ | +| fullSynth | _No description._ | +| renderConstructTree | _No description._ | +| setupJest | _No description._ | +| stubVersion | _No description._ | +| synth | Returns the Terraform synthesized JSON. | +| synthScope | _No description._ | +| toBeValidTerraform | _No description._ | +| toHaveDataSource | _No description._ | +| toHaveDataSourceWithProperties | _No description._ | +| toHaveResource | _No description._ | +| toHaveResourceWithProperties | _No description._ | --- @@ -28570,6 +28849,112 @@ Testing.synthScope(IScopeCallback fn) --- +##### `toBeValidTerraform` + +```java +import com.hashicorp.cdktf.Testing; + +Testing.toBeValidTerraform(java.lang.String received) +``` + +###### `received`Required + +- _Type:_ java.lang.String + +--- + +##### `toHaveDataSource` + +```java +import com.hashicorp.cdktf.Testing; + +Testing.toHaveDataSource(java.lang.String received, java.lang.String resourceType) +``` + +###### `received`Required + +- _Type:_ java.lang.String + +--- + +###### `resourceType`Required + +- _Type:_ java.lang.String + +--- + +##### `toHaveDataSourceWithProperties` + +```java +import com.hashicorp.cdktf.Testing; + +Testing.toHaveDataSourceWithProperties(java.lang.String received, java.lang.String resourceType),Testing.toHaveDataSourceWithProperties(java.lang.String received, java.lang.String resourceType, java.util.Map< java.lang.String, java.lang.Object > properties) +``` + +###### `received`Required + +- _Type:_ java.lang.String + +--- + +###### `resourceType`Required + +- _Type:_ java.lang.String + +--- + +###### `properties`Optional + +- _Type:_ java.util.Map< java.lang.String, java.lang.Object > + +--- + +##### `toHaveResource` + +```java +import com.hashicorp.cdktf.Testing; + +Testing.toHaveResource(java.lang.String received, java.lang.String resourceType) +``` + +###### `received`Required + +- _Type:_ java.lang.String + +--- + +###### `resourceType`Required + +- _Type:_ java.lang.String + +--- + +##### `toHaveResourceWithProperties` + +```java +import com.hashicorp.cdktf.Testing; + +Testing.toHaveResourceWithProperties(java.lang.String received, java.lang.String resourceType),Testing.toHaveResourceWithProperties(java.lang.String received, java.lang.String resourceType, java.util.Map< java.lang.String, java.lang.Object > properties) +``` + +###### `received`Required + +- _Type:_ java.lang.String + +--- + +###### `resourceType`Required + +- _Type:_ java.lang.String + +--- + +###### `properties`Optional + +- _Type:_ java.util.Map< java.lang.String, java.lang.Object > + +--- + ### Token Represents a special or lazily-evaluated value. @@ -30205,11 +30590,12 @@ Resolve an inner object. #### Properties -| **Name** | **Type** | **Description** | -| ---------------------------------------------------------------------------------------- | ------------------------------------------- | -------------------------------------------------------------------------------- | -| preparing | java.lang.Boolean | True when we are still preparing, false if we're rendering the final output. | -| scope | software.constructs.IConstruct | The scope from which resolution has been initiated. | -| suppressBraces | java.lang.Boolean | True when ${} should be ommitted (because already inside them), false otherwise. | +| **Name** | **Type** | **Description** | +| ------------------------------------------------------------------------------------------ | ------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| preparing | java.lang.Boolean | True when we are still preparing, false if we're rendering the final output. | +| scope | software.constructs.IConstruct | The scope from which resolution has been initiated. | +| iteratorContext | java.lang.String | TerraformIterators can be passed for block attributes and normal list attributes both require different handling when the iterable variable is accessed e.g. a dynamic block needs each.key while a for expression just needs key. | +| suppressBraces | java.lang.Boolean | True when ${} should be ommitted (because already inside them), false otherwise. | --- @@ -30237,6 +30623,18 @@ The scope from which resolution has been initiated. --- +##### `iteratorContext`Optional + +```java +public java.lang.String getIteratorContext(); +``` + +- _Type:_ java.lang.String + +TerraformIterators can be passed for block attributes and normal list attributes both require different handling when the iterable variable is accessed e.g. a dynamic block needs each.key while a for expression just needs key. + +--- + ##### `suppressBraces`Optional ```java diff --git a/website/docs/cdktf/api-reference/python.mdx b/website/docs/cdktf/api-reference/python.mdx index 0f7acd0fd6..ace177dab1 100644 --- a/website/docs/cdktf/api-reference/python.mdx +++ b/website/docs/cdktf/api-reference/python.mdx @@ -13250,22 +13250,24 @@ cdktf.TerraformHclModule( depends_on: typing.List[ITerraformDependable] = None, for_each: ITerraformIterator = None, providers: typing.List[typing.Union[TerraformProvider, TerraformModuleProvider]] = None, + skip_asset_creation_from_local_modules: bool = None, source: str, version: str = None, variables: typing.Mapping[typing.Any] = None ) ``` -| **Name** | **Type** | **Description** | -| ----------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | -| scope | constructs.Construct | _No description._ | -| id | str | _No description._ | -| depends_on | typing.List[ITerraformDependable] | _No description._ | -| for_each | ITerraformIterator | _No description._ | -| providers | typing.List[typing.Union[TerraformProvider, TerraformModuleProvider]] | _No description._ | -| source | str | _No description._ | -| version | str | _No description._ | -| variables | typing.Mapping[typing.Any] | _No description._ | +| **Name** | **Type** | **Description** | +| --------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | +| scope | constructs.Construct | _No description._ | +| id | str | _No description._ | +| depends_on | typing.List[ITerraformDependable] | _No description._ | +| for_each | ITerraformIterator | _No description._ | +| providers | typing.List[typing.Union[TerraformProvider, TerraformModuleProvider]] | _No description._ | +| skip_asset_creation_from_local_modules | bool | _No description._ | +| source | str | _No description._ | +| version | str | _No description._ | +| variables | typing.Mapping[typing.Any] | _No description._ | --- @@ -13299,6 +13301,12 @@ cdktf.TerraformHclModule( --- +##### `skip_asset_creation_from_local_modules`Optional + +- _Type:_ bool + +--- + ##### `source`Required - _Type:_ str @@ -13568,18 +13576,19 @@ Any object. #### Properties -| **Name** | **Type** | **Description** | -| ------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | -| node | constructs.Node | The tree node. | -| cdktf_stack | TerraformStack | _No description._ | -| fqn | str | _No description._ | -| friendly_unique_id | str | _No description._ | -| source | str | _No description._ | -| providers | typing.List[typing.Union[TerraformProvider, TerraformModuleProvider]] | _No description._ | -| version | str | _No description._ | -| depends_on | typing.List[str] | _No description._ | -| for_each | ITerraformIterator | _No description._ | -| variables | typing.Mapping[typing.Any] | _No description._ | +| **Name** | **Type** | **Description** | +| -------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | +| node | constructs.Node | The tree node. | +| cdktf_stack | TerraformStack | _No description._ | +| fqn | str | _No description._ | +| friendly_unique_id | str | _No description._ | +| source | str | _No description._ | +| providers | typing.List[typing.Union[TerraformProvider, TerraformModuleProvider]] | _No description._ | +| skip_asset_creation_from_local_modules | bool | _No description._ | +| version | str | _No description._ | +| depends_on | typing.List[str] | _No description._ | +| for_each | ITerraformIterator | _No description._ | +| variables | typing.Mapping[typing.Any] | _No description._ | --- @@ -13645,6 +13654,16 @@ providers: typing.List[typing.Union[TerraformProvider, TerraformModuleProvider]] --- +##### `skip_asset_creation_from_local_modules`Optional + +```python +skip_asset_creation_from_local_modules: bool +``` + +- _Type:_ bool + +--- + ##### `version`Optional ```python @@ -13972,20 +13991,22 @@ cdktf.TerraformModule( depends_on: typing.List[ITerraformDependable] = None, for_each: ITerraformIterator = None, providers: typing.List[typing.Union[TerraformProvider, TerraformModuleProvider]] = None, + skip_asset_creation_from_local_modules: bool = None, source: str, version: str = None ) ``` -| **Name** | **Type** | **Description** | -| -------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | -| scope | constructs.Construct | _No description._ | -| id | str | _No description._ | -| depends_on | typing.List[ITerraformDependable] | _No description._ | -| for_each | ITerraformIterator | _No description._ | -| providers | typing.List[typing.Union[TerraformProvider, TerraformModuleProvider]] | _No description._ | -| source | str | _No description._ | -| version | str | _No description._ | +| **Name** | **Type** | **Description** | +| ------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | +| scope | constructs.Construct | _No description._ | +| id | str | _No description._ | +| depends_on | typing.List[ITerraformDependable] | _No description._ | +| for_each | ITerraformIterator | _No description._ | +| providers | typing.List[typing.Union[TerraformProvider, TerraformModuleProvider]] | _No description._ | +| skip_asset_creation_from_local_modules | bool | _No description._ | +| source | str | _No description._ | +| version | str | _No description._ | --- @@ -14019,6 +14040,12 @@ cdktf.TerraformModule( --- +##### `skip_asset_creation_from_local_modules`Optional + +- _Type:_ bool + +--- + ##### `source`Required - _Type:_ str @@ -14200,17 +14227,18 @@ Any object. #### Properties -| **Name** | **Type** | **Description** | -| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | -| node | constructs.Node | The tree node. | -| cdktf_stack | TerraformStack | _No description._ | -| fqn | str | _No description._ | -| friendly_unique_id | str | _No description._ | -| source | str | _No description._ | -| providers | typing.List[typing.Union[TerraformProvider, TerraformModuleProvider]] | _No description._ | -| version | str | _No description._ | -| depends_on | typing.List[str] | _No description._ | -| for_each | ITerraformIterator | _No description._ | +| **Name** | **Type** | **Description** | +| ----------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | +| node | constructs.Node | The tree node. | +| cdktf_stack | TerraformStack | _No description._ | +| fqn | str | _No description._ | +| friendly_unique_id | str | _No description._ | +| source | str | _No description._ | +| providers | typing.List[typing.Union[TerraformProvider, TerraformModuleProvider]] | _No description._ | +| skip_asset_creation_from_local_modules | bool | _No description._ | +| version | str | _No description._ | +| depends_on | typing.List[str] | _No description._ | +| for_each | ITerraformIterator | _No description._ | --- @@ -14276,6 +14304,16 @@ providers: typing.List[typing.Union[TerraformProvider, TerraformModuleProvider]] --- +##### `skip_asset_creation_from_local_modules`Optional + +```python +skip_asset_creation_from_local_modules: bool +``` + +- _Type:_ bool + +--- + ##### `version`Optional ```python @@ -16094,19 +16132,21 @@ cdktf.TerraformVariable( description: str = None, nullable: bool = None, sensitive: bool = None, - type: str = None + type: str = None, + validation: typing.List[TerraformVariableValidationConfig] = None ) ``` -| **Name** | **Type** | **Description** | -| ------------------------------------------------------------------------------------------------- | --------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | -| scope | constructs.Construct | _No description._ | -| id | str | _No description._ | -| default | typing.Any | _No description._ | -| description | str | _No description._ | -| nullable | bool | _No description._ | -| sensitive | bool | _No description._ | -| type | str | The type argument in a variable block allows you to restrict the type of value that will be accepted as the value for a variable. | +| **Name** | **Type** | **Description** | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------- | +| scope | constructs.Construct | _No description._ | +| id | str | _No description._ | +| default | typing.Any | _No description._ | +| description | str | _No description._ | +| nullable | bool | _No description._ | +| sensitive | bool | _No description._ | +| type | str | The type argument in a variable block allows you to restrict the type of value that will be accepted as the value for a variable. | +| validation | typing.List[TerraformVariableValidationConfig] | Specify arbitrary custom validation rules for a particular variable using a validation block nested within the corresponding variable block. | --- @@ -16176,6 +16216,14 @@ If both the type and default arguments are specified, the given default value mu --- +##### `validation`Optional + +- _Type:_ typing.List[TerraformVariableValidationConfig] + +Specify arbitrary custom validation rules for a particular variable using a validation block nested within the corresponding variable block. + +--- + #### Methods | **Name** | **Description** | @@ -16186,6 +16234,7 @@ If both the type and default arguments are specified, the given default value mu | reset_override_logical_id | Resets a previously passed logical Id to use the auto-generated logical id again. | | to_metadata | _No description._ | | to_terraform | _No description._ | +| add_validation | _No description._ | | synthesize_attributes | _No description._ | --- @@ -16257,6 +16306,27 @@ def to_metadata() - > typing.Any def to_terraform() - > typing.Any ``` +##### `add_validation` + +```python +def add_validation( + condition: typing.Any, + error_message: str +) - > None +``` + +###### `condition`Required + +- _Type:_ typing.Any + +--- + +###### `error_message`Required + +- _Type:_ str + +--- + ##### `synthesize_attributes` ```python @@ -16307,22 +16377,23 @@ Any object. #### Properties -| **Name** | **Type** | **Description** | -| ------------------------------------------------------------------------------------------------ | --------------------------------------------------------------- | ----------------- | -| node | constructs.Node | The tree node. | -| cdktf_stack | TerraformStack | _No description._ | -| fqn | str | _No description._ | -| friendly_unique_id | str | _No description._ | -| boolean_value | IResolvable | _No description._ | -| list_value | typing.List[str] | _No description._ | -| number_value | typing.Union[int, float] | _No description._ | -| string_value | str | _No description._ | -| value | typing.Any | _No description._ | -| default | typing.Any | _No description._ | -| description | str | _No description._ | -| nullable | bool | _No description._ | -| sensitive | bool | _No description._ | -| type | str | _No description._ | +| **Name** | **Type** | **Description** | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ----------------- | +| node | constructs.Node | The tree node. | +| cdktf_stack | TerraformStack | _No description._ | +| fqn | str | _No description._ | +| friendly_unique_id | str | _No description._ | +| boolean_value | IResolvable | _No description._ | +| list_value | typing.List[str] | _No description._ | +| number_value | typing.Union[int, float] | _No description._ | +| string_value | str | _No description._ | +| value | typing.Any | _No description._ | +| default | typing.Any | _No description._ | +| description | str | _No description._ | +| nullable | bool | _No description._ | +| sensitive | bool | _No description._ | +| type | str | _No description._ | +| validation | typing.List[TerraformVariableValidationConfig] | _No description._ | --- @@ -16468,6 +16539,16 @@ type: str --- +##### `validation`Optional + +```python +validation: typing.List[TerraformVariableValidationConfig] +``` + +- _Type:_ typing.List[TerraformVariableValidationConfig] + +--- + ## Structs ### AppOptions @@ -22573,6 +22654,7 @@ cdktf.TerraformHclModuleOptions( depends_on: typing.List[ITerraformDependable] = None, for_each: ITerraformIterator = None, providers: typing.List[typing.Union[TerraformProvider, TerraformModuleProvider]] = None, + skip_asset_creation_from_local_modules: bool = None, source: str, version: str = None, variables: typing.Mapping[typing.Any] = None @@ -22581,14 +22663,15 @@ cdktf.TerraformHclModuleOptions( #### Properties -| **Name** | **Type** | **Description** | -| ----------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | -| depends_on | typing.List[ITerraformDependable] | _No description._ | -| for_each | ITerraformIterator | _No description._ | -| providers | typing.List[typing.Union[TerraformProvider, TerraformModuleProvider]] | _No description._ | -| source | str | _No description._ | -| version | str | _No description._ | -| variables | typing.Mapping[typing.Any] | _No description._ | +| **Name** | **Type** | **Description** | +| --------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | +| depends_on | typing.List[ITerraformDependable] | _No description._ | +| for_each | ITerraformIterator | _No description._ | +| providers | typing.List[typing.Union[TerraformProvider, TerraformModuleProvider]] | _No description._ | +| skip_asset_creation_from_local_modules | bool | _No description._ | +| source | str | _No description._ | +| version | str | _No description._ | +| variables | typing.Mapping[typing.Any] | _No description._ | --- @@ -22622,6 +22705,16 @@ providers: typing.List[typing.Union[TerraformProvider, TerraformModuleProvider]] --- +##### `skip_asset_creation_from_local_modules`Optional + +```python +skip_asset_creation_from_local_modules: bool +``` + +- _Type:_ bool + +--- + ##### `source`Required ```python @@ -22765,6 +22858,7 @@ cdktf.TerraformModuleOptions( depends_on: typing.List[ITerraformDependable] = None, for_each: ITerraformIterator = None, providers: typing.List[typing.Union[TerraformProvider, TerraformModuleProvider]] = None, + skip_asset_creation_from_local_modules: bool = None, source: str, version: str = None ) @@ -22772,13 +22866,14 @@ cdktf.TerraformModuleOptions( #### Properties -| **Name** | **Type** | **Description** | -| -------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | -| depends_on | typing.List[ITerraformDependable] | _No description._ | -| for_each | ITerraformIterator | _No description._ | -| providers | typing.List[typing.Union[TerraformProvider, TerraformModuleProvider]] | _No description._ | -| source | str | _No description._ | -| version | str | _No description._ | +| **Name** | **Type** | **Description** | +| ------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | +| depends_on | typing.List[ITerraformDependable] | _No description._ | +| for_each | ITerraformIterator | _No description._ | +| providers | typing.List[typing.Union[TerraformProvider, TerraformModuleProvider]] | _No description._ | +| skip_asset_creation_from_local_modules | bool | _No description._ | +| source | str | _No description._ | +| version | str | _No description._ | --- @@ -22812,6 +22907,16 @@ providers: typing.List[typing.Union[TerraformProvider, TerraformModuleProvider]] --- +##### `skip_asset_creation_from_local_modules`Optional + +```python +skip_asset_creation_from_local_modules: bool +``` + +- _Type:_ bool + +--- + ##### `source`Required ```python @@ -22884,17 +22989,19 @@ import cdktf cdktf.TerraformModuleUserOptions( depends_on: typing.List[ITerraformDependable] = None, for_each: ITerraformIterator = None, - providers: typing.List[typing.Union[TerraformProvider, TerraformModuleProvider]] = None + providers: typing.List[typing.Union[TerraformProvider, TerraformModuleProvider]] = None, + skip_asset_creation_from_local_modules: bool = None ) ``` #### Properties -| **Name** | **Type** | **Description** | -| ------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | -| depends_on | typing.List[ITerraformDependable] | _No description._ | -| for_each | ITerraformIterator | _No description._ | -| providers | typing.List[typing.Union[TerraformProvider, TerraformModuleProvider]] | _No description._ | +| **Name** | **Type** | **Description** | +| ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | +| depends_on | typing.List[ITerraformDependable] | _No description._ | +| for_each | ITerraformIterator | _No description._ | +| providers | typing.List[typing.Union[TerraformProvider, TerraformModuleProvider]] | _No description._ | +| skip_asset_creation_from_local_modules | bool | _No description._ | --- @@ -22928,6 +23035,16 @@ providers: typing.List[typing.Union[TerraformProvider, TerraformModuleProvider]] --- +##### `skip_asset_creation_from_local_modules`Optional + +```python +skip_asset_creation_from_local_modules: bool +``` + +- _Type:_ bool + +--- + ### TerraformOutputConfig #### Initializer @@ -23363,19 +23480,21 @@ cdktf.TerraformVariableConfig( description: str = None, nullable: bool = None, sensitive: bool = None, - type: str = None + type: str = None, + validation: typing.List[TerraformVariableValidationConfig] = None ) ``` #### Properties -| **Name** | **Type** | **Description** | -| ------------------------------------------------------------------------------------------ | ----------------------- | --------------------------------------------------------------------------------------------------------------------------------- | -| default | typing.Any | _No description._ | -| description | str | _No description._ | -| nullable | bool | _No description._ | -| sensitive | bool | _No description._ | -| type | str | The type argument in a variable block allows you to restrict the type of value that will be accepted as the value for a variable. | +| **Name** | **Type** | **Description** | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------- | +| default | typing.Any | _No description._ | +| description | str | _No description._ | +| nullable | bool | _No description._ | +| sensitive | bool | _No description._ | +| type | str | The type argument in a variable block allows you to restrict the type of value that will be accepted as the value for a variable. | +| validation | typing.List[TerraformVariableValidationConfig] | Specify arbitrary custom validation rules for a particular variable using a validation block nested within the corresponding variable block. | --- @@ -23453,6 +23572,60 @@ If both the type and default arguments are specified, the given default value mu --- +##### `validation`Optional + +```python +validation: typing.List[TerraformVariableValidationConfig] +``` + +- _Type:_ typing.List[TerraformVariableValidationConfig] + +Specify arbitrary custom validation rules for a particular variable using a validation block nested within the corresponding variable block. + +--- + +### TerraformVariableValidationConfig + +#### Initializer + +```python +import cdktf + +cdktf.TerraformVariableValidationConfig( + condition: typing.Any, + error_message: str +) +``` + +#### Properties + +| **Name** | **Type** | **Description** | +| ------------------------------------------------------------------------------------------------------- | ----------------------- | ----------------- | +| condition | typing.Any | _No description._ | +| error_message | str | _No description._ | + +--- + +##### `condition`Required + +```python +condition: typing.Any +``` + +- _Type:_ typing.Any + +--- + +##### `error_message`Required + +```python +error_message: str +``` + +- _Type:_ str + +--- + ### TestingAppOptions #### Initializer @@ -23986,6 +24159,67 @@ The list of aspects which were directly applied on this scope. --- +### AssertionReturn + +#### Initializers + +```python +from cdktf import testing_matchers + +testingMatchers.AssertionReturn( + message: str, + pass: bool +) +``` + +| **Name** | **Type** | **Description** | +| ------------------------------------------------------------------------------------------------------- | ----------------- | ----------------- | +| message | str | _No description._ | +| pass | bool | _No description._ | + +--- + +##### `message`Required + +- _Type:_ str + +--- + +##### `pass`Required + +- _Type:_ bool + +--- + +#### Properties + +| **Name** | **Type** | **Description** | +| ------------------------------------------------------------------------------------------ | ----------------- | ----------------- | +| message | str | _No description._ | +| pass | bool | _No description._ | + +--- + +##### `message`Required + +```python +message: str +``` + +- _Type:_ str + +--- + +##### `pass`Required + +```python +pass: bool +``` + +- _Type:_ bool + +--- + ### BooleanMap - _Implements:_ ITerraformAddressable, IResolvable @@ -27949,6 +28183,7 @@ cdktf.ListTerraformIterator( | **Name** | **Description** | | ------------------------------------------------------------------------------------- | ----------------- | +| dynamic | _No description._ | | get_any | _No description._ | | get_any_map | _No description._ | | get_boolean | _No description._ | @@ -27963,6 +28198,20 @@ cdktf.ListTerraformIterator( --- +##### `dynamic` + +```python +def dynamic( + attributes: typing.Mapping[typing.Any] +) - > IResolvable +``` + +###### `attributes`Required + +- _Type:_ typing.Mapping[typing.Any] + +--- + ##### `get_any` ```python @@ -28399,6 +28648,7 @@ cdktf.MapTerraformIterator( | **Name** | **Description** | | ------------------------------------------------------------------------------------ | ----------------- | +| dynamic | _No description._ | | get_any | _No description._ | | get_any_map | _No description._ | | get_boolean | _No description._ | @@ -28413,6 +28663,20 @@ cdktf.MapTerraformIterator( --- +##### `dynamic` + +```python +def dynamic( + attributes: typing.Mapping[typing.Any] +) - > IResolvable +``` + +###### `attributes`Required + +- _Type:_ typing.Mapping[typing.Any] + +--- + ##### `get_any` ```python @@ -29370,6 +29634,7 @@ cdktf.TerraformIterator() | **Name** | **Description** | | --------------------------------------------------------------------------------- | ----------------- | +| dynamic | _No description._ | | get_any | _No description._ | | get_any_map | _No description._ | | get_boolean | _No description._ | @@ -29384,6 +29649,20 @@ cdktf.TerraformIterator() --- +##### `dynamic` + +```python +def dynamic( + attributes: typing.Mapping[typing.Any] +) - > IResolvable +``` + +###### `attributes`Required + +- _Type:_ typing.Mapping[typing.Any] + +--- + ##### `get_any` ```python @@ -29700,19 +29979,37 @@ Access a property on the resource like this: `getString("publicIp")` Testing utilities for cdktf applications. +#### Initializers + +```python +import cdktf + +cdktf.Testing() +``` + +| **Name** | **Type** | **Description** | +| -------- | -------- | --------------- | + +--- + #### Static Functions -| **Name** | **Description** | -| ----------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | -| app | Returns an app for testing with the following properties: - Output directory is a temp dir. | -| enable_future_flags | _No description._ | -| fake_cdktf_json_path | _No description._ | -| full_synth | _No description._ | -| render_construct_tree | _No description._ | -| setup_jest | _No description._ | -| stub_version | _No description._ | -| synth | Returns the Terraform synthesized JSON. | -| synth_scope | _No description._ | +| **Name** | **Description** | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------- | +| app | Returns an app for testing with the following properties: - Output directory is a temp dir. | +| enable_future_flags | _No description._ | +| fake_cdktf_json_path | _No description._ | +| full_synth | _No description._ | +| render_construct_tree | _No description._ | +| setup_jest | _No description._ | +| stub_version | _No description._ | +| synth | Returns the Terraform synthesized JSON. | +| synth_scope | _No description._ | +| to_be_valid_terraform | _No description._ | +| to_have_data_source | _No description._ | +| to_have_data_source_with_properties | _No description._ | +| to_have_resource | _No description._ | +| to_have_resource_with_properties | _No description._ | --- @@ -29884,6 +30181,128 @@ cdktf.Testing.synth_scope( --- +##### `to_be_valid_terraform` + +```python +import cdktf + +cdktf.Testing.to_be_valid_terraform( + received: str +) +``` + +###### `received`Required + +- _Type:_ str + +--- + +##### `to_have_data_source` + +```python +import cdktf + +cdktf.Testing.to_have_data_source( + received: str, + resource_type: str +) +``` + +###### `received`Required + +- _Type:_ str + +--- + +###### `resource_type`Required + +- _Type:_ str + +--- + +##### `to_have_data_source_with_properties` + +```python +import cdktf + +cdktf.Testing.to_have_data_source_with_properties( + received: str, + resource_type: str, + properties: typing.Mapping[typing.Any] = None +) +``` + +###### `received`Required + +- _Type:_ str + +--- + +###### `resource_type`Required + +- _Type:_ str + +--- + +###### `properties`Optional + +- _Type:_ typing.Mapping[typing.Any] + +--- + +##### `to_have_resource` + +```python +import cdktf + +cdktf.Testing.to_have_resource( + received: str, + resource_type: str +) +``` + +###### `received`Required + +- _Type:_ str + +--- + +###### `resource_type`Required + +- _Type:_ str + +--- + +##### `to_have_resource_with_properties` + +```python +import cdktf + +cdktf.Testing.to_have_resource_with_properties( + received: str, + resource_type: str, + properties: typing.Mapping[typing.Any] = None +) +``` + +###### `received`Required + +- _Type:_ str + +--- + +###### `resource_type`Required + +- _Type:_ str + +--- + +###### `properties`Optional + +- _Type:_ typing.Mapping[typing.Any] + +--- + ### Token Represents a special or lazily-evaluated value. @@ -31650,11 +32069,12 @@ Resolve an inner object. #### Properties -| **Name** | **Type** | **Description** | -| ----------------------------------------------------------------------------------------- | ---------------------------------- | -------------------------------------------------------------------------------- | -| preparing | bool | True when we are still preparing, false if we're rendering the final output. | -| scope | constructs.IConstruct | The scope from which resolution has been initiated. | -| suppress_braces | bool | True when ${} should be ommitted (because already inside them), false otherwise. | +| **Name** | **Type** | **Description** | +| ------------------------------------------------------------------------------------------- | ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| preparing | bool | True when we are still preparing, false if we're rendering the final output. | +| scope | constructs.IConstruct | The scope from which resolution has been initiated. | +| iterator_context | str | TerraformIterators can be passed for block attributes and normal list attributes both require different handling when the iterable variable is accessed e.g. a dynamic block needs each.key while a for expression just needs key. | +| suppress_braces | bool | True when ${} should be ommitted (because already inside them), false otherwise. | --- @@ -31682,6 +32102,18 @@ The scope from which resolution has been initiated. --- +##### `iterator_context`Optional + +```python +iterator_context: str +``` + +- _Type:_ str + +TerraformIterators can be passed for block attributes and normal list attributes both require different handling when the iterable variable is accessed e.g. a dynamic block needs each.key while a for expression just needs key. + +--- + ##### `suppress_braces`Optional ```python diff --git a/website/docs/cdktf/api-reference/typescript.mdx b/website/docs/cdktf/api-reference/typescript.mdx index 3cbe4980d3..e370a76c5b 100644 --- a/website/docs/cdktf/api-reference/typescript.mdx +++ b/website/docs/cdktf/api-reference/typescript.mdx @@ -9616,18 +9616,19 @@ Any object. #### Properties -| **Name** | **Type** | **Description** | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | -| node | constructs.Node | The tree node. | -| cdktfStack | TerraformStack | _No description._ | -| fqn | string | _No description._ | -| friendlyUniqueId | string | _No description._ | -| source | string | _No description._ | -| providers | TerraformProvider \| TerraformModuleProvider[] | _No description._ | -| version | string | _No description._ | -| dependsOn | string[] | _No description._ | -| forEach | ITerraformIterator | _No description._ | -| variables | {[ key: string ]: any} | _No description._ | +| **Name** | **Type** | **Description** | +| --------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | +| node | constructs.Node | The tree node. | +| cdktfStack | TerraformStack | _No description._ | +| fqn | string | _No description._ | +| friendlyUniqueId | string | _No description._ | +| source | string | _No description._ | +| providers | TerraformProvider \| TerraformModuleProvider[] | _No description._ | +| skipAssetCreationFromLocalModules | boolean | _No description._ | +| version | string | _No description._ | +| dependsOn | string[] | _No description._ | +| forEach | ITerraformIterator | _No description._ | +| variables | {[ key: string ]: any} | _No description._ | --- @@ -9693,6 +9694,16 @@ public readonly providers: TerraformProvider | TerraformModuleProvider[]; --- +##### `skipAssetCreationFromLocalModules`Optional + +```typescript +public readonly skipAssetCreationFromLocalModules: boolean; +``` + +- _Type:_ boolean + +--- + ##### `version`Optional ```typescript @@ -10188,17 +10199,18 @@ Any object. #### Properties -| **Name** | **Type** | **Description** | -| -------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | -| node | constructs.Node | The tree node. | -| cdktfStack | TerraformStack | _No description._ | -| fqn | string | _No description._ | -| friendlyUniqueId | string | _No description._ | -| source | string | _No description._ | -| providers | TerraformProvider \| TerraformModuleProvider[] | _No description._ | -| version | string | _No description._ | -| dependsOn | string[] | _No description._ | -| forEach | ITerraformIterator | _No description._ | +| **Name** | **Type** | **Description** | +| ------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | +| node | constructs.Node | The tree node. | +| cdktfStack | TerraformStack | _No description._ | +| fqn | string | _No description._ | +| friendlyUniqueId | string | _No description._ | +| source | string | _No description._ | +| providers | TerraformProvider \| TerraformModuleProvider[] | _No description._ | +| skipAssetCreationFromLocalModules | boolean | _No description._ | +| version | string | _No description._ | +| dependsOn | string[] | _No description._ | +| forEach | ITerraformIterator | _No description._ | --- @@ -10264,6 +10276,16 @@ public readonly providers: TerraformProvider | TerraformModuleProvider[]; --- +##### `skipAssetCreationFromLocalModules`Optional + +```typescript +public readonly skipAssetCreationFromLocalModules: boolean; +``` + +- _Type:_ boolean + +--- + ##### `version`Optional ```typescript @@ -11892,6 +11914,7 @@ new TerraformVariable(scope: Construct, id: string, config: TerraformVariableCon | resetOverrideLogicalId | Resets a previously passed logical Id to use the auto-generated logical id again. | | toMetadata | _No description._ | | toTerraform | _No description._ | +| addValidation | _No description._ | | synthesizeAttributes | _No description._ | --- @@ -11958,6 +11981,18 @@ public toMetadata(): any public toTerraform(): any ``` +##### `addValidation` + +```typescript +public addValidation(validation: TerraformVariableValidationConfig): void +``` + +###### `validation`Required + +- _Type:_ TerraformVariableValidationConfig + +--- + ##### `synthesizeAttributes` ```typescript @@ -12006,22 +12041,23 @@ Any object. #### Properties -| **Name** | **Type** | **Description** | -| ---------------------------------------------------------------------------------------------- | --------------------------------------------------------------- | ----------------- | -| node | constructs.Node | The tree node. | -| cdktfStack | TerraformStack | _No description._ | -| fqn | string | _No description._ | -| friendlyUniqueId | string | _No description._ | -| booleanValue | IResolvable | _No description._ | -| listValue | string[] | _No description._ | -| numberValue | number | _No description._ | -| stringValue | string | _No description._ | -| value | any | _No description._ | -| default | any | _No description._ | -| description | string | _No description._ | -| nullable | boolean | _No description._ | -| sensitive | boolean | _No description._ | -| type | string | _No description._ | +| **Name** | **Type** | **Description** | +| ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ----------------- | +| node | constructs.Node | The tree node. | +| cdktfStack | TerraformStack | _No description._ | +| fqn | string | _No description._ | +| friendlyUniqueId | string | _No description._ | +| booleanValue | IResolvable | _No description._ | +| listValue | string[] | _No description._ | +| numberValue | number | _No description._ | +| stringValue | string | _No description._ | +| value | any | _No description._ | +| default | any | _No description._ | +| description | string | _No description._ | +| nullable | boolean | _No description._ | +| sensitive | boolean | _No description._ | +| type | string | _No description._ | +| validation | TerraformVariableValidationConfig[] | _No description._ | --- @@ -12167,6 +12203,16 @@ public readonly type: string; --- +##### `validation`Optional + +```typescript +public readonly validation: TerraformVariableValidationConfig[]; +``` + +- _Type:_ TerraformVariableValidationConfig[] + +--- + ## Structs ### AppOptions @@ -17854,14 +17900,15 @@ const terraformHclModuleOptions: TerraformHclModuleOptions = { ... } #### Properties -| **Name** | **Type** | **Description** | -| ---------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | -| dependsOn | ITerraformDependable[] | _No description._ | -| forEach | ITerraformIterator | _No description._ | -| providers | TerraformProvider \| TerraformModuleProvider[] | _No description._ | -| source | string | _No description._ | -| version | string | _No description._ | -| variables | {[ key: string ]: any} | _No description._ | +| **Name** | **Type** | **Description** | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | +| dependsOn | ITerraformDependable[] | _No description._ | +| forEach | ITerraformIterator | _No description._ | +| providers | TerraformProvider \| TerraformModuleProvider[] | _No description._ | +| skipAssetCreationFromLocalModules | boolean | _No description._ | +| source | string | _No description._ | +| version | string | _No description._ | +| variables | {[ key: string ]: any} | _No description._ | --- @@ -17895,6 +17942,16 @@ public readonly providers: TerraformProvider | TerraformModuleProvider[]; --- +##### `skipAssetCreationFromLocalModules`Optional + +```typescript +public readonly skipAssetCreationFromLocalModules: boolean; +``` + +- _Type:_ boolean + +--- + ##### `source`Required ```typescript @@ -18031,13 +18088,14 @@ const terraformModuleOptions: TerraformModuleOptions = { ... } #### Properties -| **Name** | **Type** | **Description** | -| ------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | -| dependsOn | ITerraformDependable[] | _No description._ | -| forEach | ITerraformIterator | _No description._ | -| providers | TerraformProvider \| TerraformModuleProvider[] | _No description._ | -| source | string | _No description._ | -| version | string | _No description._ | +| **Name** | **Type** | **Description** | +| ------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | +| dependsOn | ITerraformDependable[] | _No description._ | +| forEach | ITerraformIterator | _No description._ | +| providers | TerraformProvider \| TerraformModuleProvider[] | _No description._ | +| skipAssetCreationFromLocalModules | boolean | _No description._ | +| source | string | _No description._ | +| version | string | _No description._ | --- @@ -18071,6 +18129,16 @@ public readonly providers: TerraformProvider | TerraformModuleProvider[]; --- +##### `skipAssetCreationFromLocalModules`Optional + +```typescript +public readonly skipAssetCreationFromLocalModules: boolean; +``` + +- _Type:_ boolean + +--- + ##### `source`Required ```typescript @@ -18142,11 +18210,12 @@ const terraformModuleUserOptions: TerraformModuleUserOptions = { ... } #### Properties -| **Name** | **Type** | **Description** | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | -| dependsOn | ITerraformDependable[] | _No description._ | -| forEach | ITerraformIterator | _No description._ | -| providers | TerraformProvider \| TerraformModuleProvider[] | _No description._ | +| **Name** | **Type** | **Description** | +| ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | +| dependsOn | ITerraformDependable[] | _No description._ | +| forEach | ITerraformIterator | _No description._ | +| providers | TerraformProvider \| TerraformModuleProvider[] | _No description._ | +| skipAssetCreationFromLocalModules | boolean | _No description._ | --- @@ -18180,6 +18249,16 @@ public readonly providers: TerraformProvider | TerraformModuleProvider[]; --- +##### `skipAssetCreationFromLocalModules`Optional + +```typescript +public readonly skipAssetCreationFromLocalModules: boolean; +``` + +- _Type:_ boolean + +--- + ### TerraformOutputConfig #### Initializer @@ -18583,13 +18662,14 @@ const terraformVariableConfig: TerraformVariableConfig = { ... } #### Properties -| **Name** | **Type** | **Description** | -| ------------------------------------------------------------------------------------------ | -------------------- | --------------------------------------------------------------------------------------------------------------------------------- | -| default | any | _No description._ | -| description | string | _No description._ | -| nullable | boolean | _No description._ | -| sensitive | boolean | _No description._ | -| type | string | The type argument in a variable block allows you to restrict the type of value that will be accepted as the value for a variable. | +| **Name** | **Type** | **Description** | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | +| default | any | _No description._ | +| description | string | _No description._ | +| nullable | boolean | _No description._ | +| sensitive | boolean | _No description._ | +| type | string | The type argument in a variable block allows you to restrict the type of value that will be accepted as the value for a variable. | +| validation | TerraformVariableValidationConfig[] | Specify arbitrary custom validation rules for a particular variable using a validation block nested within the corresponding variable block. | --- @@ -18667,6 +18747,57 @@ If both the type and default arguments are specified, the given default value mu --- +##### `validation`Optional + +```typescript +public readonly validation: TerraformVariableValidationConfig[]; +``` + +- _Type:_ TerraformVariableValidationConfig[] + +Specify arbitrary custom validation rules for a particular variable using a validation block nested within the corresponding variable block. + +--- + +### TerraformVariableValidationConfig + +#### Initializer + +```typescript +import { TerraformVariableValidationConfig } from 'cdktf' + +const terraformVariableValidationConfig: TerraformVariableValidationConfig = { ... } +``` + +#### Properties + +| **Name** | **Type** | **Description** | +| ------------------------------------------------------------------------------------------------------ | ------------------- | ----------------- | +| condition | any | _No description._ | +| errorMessage | string | _No description._ | + +--- + +##### `condition`Required + +```typescript +public readonly condition: any; +``` + +- _Type:_ any + +--- + +##### `errorMessage`Required + +```typescript +public readonly errorMessage: string; +``` + +- _Type:_ string + +--- + ### TestingAppOptions #### Initializer @@ -19165,6 +19296,64 @@ The list of aspects which were directly applied on this scope. --- +### AssertionReturn + +#### Initializers + +```typescript +import { testingMatchers } from 'cdktf' + +new testingMatchers.AssertionReturn(message: string, pass: boolean) +``` + +| **Name** | **Type** | **Description** | +| ------------------------------------------------------------------------------------------------------- | -------------------- | ----------------- | +| message | string | _No description._ | +| pass | boolean | _No description._ | + +--- + +##### `message`Required + +- _Type:_ string + +--- + +##### `pass`Required + +- _Type:_ boolean + +--- + +#### Properties + +| **Name** | **Type** | **Description** | +| ------------------------------------------------------------------------------------------ | -------------------- | ----------------- | +| message | string | _No description._ | +| pass | boolean | _No description._ | + +--- + +##### `message`Required + +```typescript +public readonly message: string; +``` + +- _Type:_ string + +--- + +##### `pass`Required + +```typescript +public readonly pass: boolean; +``` + +- _Type:_ boolean + +--- + ### BooleanMap - _Implements:_ ITerraformAddressable, IResolvable @@ -22724,6 +22913,7 @@ new ListTerraformIterator(list: string[] | IResolvable | number[] | ComplexList | **Name** | **Description** | | ----------------------------------------------------------------------------------- | ----------------- | +| dynamic | _No description._ | | getAny | _No description._ | | getAnyMap | _No description._ | | getBoolean | _No description._ | @@ -22738,6 +22928,18 @@ new ListTerraformIterator(list: string[] | IResolvable | number[] | ComplexList --- +##### `dynamic` + +```typescript +public dynamic(attributes: {[ key: string ]: any}): IResolvable +``` + +###### `attributes`Required + +- _Type:_ {[ key: string ]: any} + +--- + ##### `getAny` ```typescript @@ -23141,6 +23343,7 @@ new MapTerraformIterator(map: StringMap | NumberMap | BooleanMap | AnyMap | Comp | **Name** | **Description** | | ---------------------------------------------------------------------------------- | ----------------- | +| dynamic | _No description._ | | getAny | _No description._ | | getAnyMap | _No description._ | | getBoolean | _No description._ | @@ -23155,6 +23358,18 @@ new MapTerraformIterator(map: StringMap | NumberMap | BooleanMap | AnyMap | Comp --- +##### `dynamic` + +```typescript +public dynamic(attributes: {[ key: string ]: any}): IResolvable +``` + +###### `attributes`Required + +- _Type:_ {[ key: string ]: any} + +--- + ##### `getAny` ```typescript @@ -24045,6 +24260,7 @@ new TerraformIterator(); | **Name** | **Description** | | ------------------------------------------------------------------------------- | ----------------- | +| dynamic | _No description._ | | getAny | _No description._ | | getAnyMap | _No description._ | | getBoolean | _No description._ | @@ -24059,6 +24275,18 @@ new TerraformIterator(); --- +##### `dynamic` + +```typescript +public dynamic(attributes: {[ key: string ]: any}): IResolvable +``` + +###### `attributes`Required + +- _Type:_ {[ key: string ]: any} + +--- + ##### `getAny` ```typescript @@ -24343,19 +24571,37 @@ Access a property on the resource like this: `getString("publicIp")` Testing utilities for cdktf applications. +#### Initializers + +```typescript +import { Testing } from "cdktf"; + +new Testing(); +``` + +| **Name** | **Type** | **Description** | +| -------- | -------- | --------------- | + +--- + #### Static Functions -| **Name** | **Description** | -| --------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | -| app | Returns an app for testing with the following properties: - Output directory is a temp dir. | -| enableFutureFlags | _No description._ | -| fakeCdktfJsonPath | _No description._ | -| fullSynth | _No description._ | -| renderConstructTree | _No description._ | -| setupJest | _No description._ | -| stubVersion | _No description._ | -| synth | Returns the Terraform synthesized JSON. | -| synthScope | _No description._ | +| **Name** | **Description** | +| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| app | Returns an app for testing with the following properties: - Output directory is a temp dir. | +| enableFutureFlags | _No description._ | +| fakeCdktfJsonPath | _No description._ | +| fullSynth | _No description._ | +| renderConstructTree | _No description._ | +| setupJest | _No description._ | +| stubVersion | _No description._ | +| synth | Returns the Terraform synthesized JSON. | +| synthScope | _No description._ | +| toBeValidTerraform | _No description._ | +| toHaveDataSource | _No description._ | +| toHaveDataSourceWithProperties | _No description._ | +| toHaveResource | _No description._ | +| toHaveResourceWithProperties | _No description._ | --- @@ -24483,6 +24729,112 @@ Testing.synthScope(fn: IScopeCallback) --- +##### `toBeValidTerraform` + +```typescript +import { Testing } from 'cdktf' + +Testing.toBeValidTerraform(received: string) +``` + +###### `received`Required + +- _Type:_ string + +--- + +##### `toHaveDataSource` + +```typescript +import { Testing } from 'cdktf' + +Testing.toHaveDataSource(received: string, resourceType: string) +``` + +###### `received`Required + +- _Type:_ string + +--- + +###### `resourceType`Required + +- _Type:_ string + +--- + +##### `toHaveDataSourceWithProperties` + +```typescript +import { Testing } from 'cdktf' + +Testing.toHaveDataSourceWithProperties(received: string, resourceType: string, properties?: {[ key: string ]: any}) +``` + +###### `received`Required + +- _Type:_ string + +--- + +###### `resourceType`Required + +- _Type:_ string + +--- + +###### `properties`Optional + +- _Type:_ {[ key: string ]: any} + +--- + +##### `toHaveResource` + +```typescript +import { Testing } from 'cdktf' + +Testing.toHaveResource(received: string, resourceType: string) +``` + +###### `received`Required + +- _Type:_ string + +--- + +###### `resourceType`Required + +- _Type:_ string + +--- + +##### `toHaveResourceWithProperties` + +```typescript +import { Testing } from 'cdktf' + +Testing.toHaveResourceWithProperties(received: string, resourceType: string, properties?: {[ key: string ]: any}) +``` + +###### `received`Required + +- _Type:_ string + +--- + +###### `resourceType`Required + +- _Type:_ string + +--- + +###### `properties`Optional + +- _Type:_ {[ key: string ]: any} + +--- + ### Token Represents a special or lazily-evaluated value. @@ -26118,11 +26470,12 @@ Resolve an inner object. #### Properties -| **Name** | **Type** | **Description** | -| ---------------------------------------------------------------------------------------- | ---------------------------------- | -------------------------------------------------------------------------------- | -| preparing | boolean | True when we are still preparing, false if we're rendering the final output. | -| scope | constructs.IConstruct | The scope from which resolution has been initiated. | -| suppressBraces | boolean | True when ${} should be ommitted (because already inside them), false otherwise. | +| **Name** | **Type** | **Description** | +| ------------------------------------------------------------------------------------------ | ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| preparing | boolean | True when we are still preparing, false if we're rendering the final output. | +| scope | constructs.IConstruct | The scope from which resolution has been initiated. | +| iteratorContext | string | TerraformIterators can be passed for block attributes and normal list attributes both require different handling when the iterable variable is accessed e.g. a dynamic block needs each.key while a for expression just needs key. | +| suppressBraces | boolean | True when ${} should be ommitted (because already inside them), false otherwise. | --- @@ -26150,6 +26503,18 @@ The scope from which resolution has been initiated. --- +##### `iteratorContext`Optional + +```typescript +public readonly iteratorContext: string; +``` + +- _Type:_ string + +TerraformIterators can be passed for block attributes and normal list attributes both require different handling when the iterable variable is accessed e.g. a dynamic block needs each.key while a for expression just needs key. + +--- + ##### `suppressBraces`Optional ```typescript diff --git a/website/docs/cdktf/release/index.mdx b/website/docs/cdktf/release/index.mdx index de085a1ffa..415a56baae 100644 --- a/website/docs/cdktf/release/index.mdx +++ b/website/docs/cdktf/release/index.mdx @@ -12,6 +12,7 @@ We release CDK for Terraform (CDKTF) regularly. The [CHANGELOG on Github](https: CDKTF includes upgrade guides for releases that have breaking changes. +- [Upgrading to v0.12](/cdktf/release/upgrade-guide-v0-12) - [Upgrading to v0.11](/cdktf/release/upgrade-guide-v0-11) - [Upgrading to v0.10](/cdktf/release/upgrade-guide-v0-10) - [Upgrading to v0.9](/cdktf/release/upgrade-guide-v0-9) diff --git a/website/docs/cdktf/release/upgrade-guide-v0-12.mdx b/website/docs/cdktf/release/upgrade-guide-v0-12.mdx new file mode 100644 index 0000000000..f9dab1d272 --- /dev/null +++ b/website/docs/cdktf/release/upgrade-guide-v0-12.mdx @@ -0,0 +1,35 @@ +--- +page_title: Upgrading to CDKTF Version 0.12 +description: >- + We simplified recursive attribute types to have shorter names +--- + +# Upgrading to CDK for Terraform Version 0.12 + +0.12 includes improvements to the provider code bindings, allowing for shorter +attribute names for recursive attributes. + +### Simplified interfaces of recursive attributes + +The generated provider bindings are based on the Terraform schema which does not +support recursion and hence uses a large, explicit structure instead. Previously +this resulted in long names such as e.g. +`Wafv2WebAclRuleStatementAndStatementStatementOrStatementStatementLabelMatchStatement`. +In 0.12 we implemented a first rough detection for this underlying recursion +which drastically reduced the amount of generated interfaces as they now are +converted to recursive data structures themselves. If you are currently using +those types e.g. in a language like Java, you will need to change them to the +new shorter names. + +### `cdktf get` exits with 0 exit code when no provider / module specifications are found in the `cdktf.json` + +Previously we would throw an error and exit with 1 if there were no provider or +module specifications in the `cdktf.json` file. This can be inconvenient if +`cdktf get` is part of a workflow. + +### `Fn.merge` is split into `Fn.mergeLists` and `Fn.mergeMaps` + +The Terraform `merge` function can merge both lists and maps, but this can cause +[issues](https://github.com/hashicorp/terraform-cdk/issues/1653) when using the +result in a typed language. Therefore we split it into `Fn.mergeLists` and +`Fn.mergeMaps`, this means you need to change your cdktf programs code.