diff --git a/src/lib/azure/.gen/constraints.json b/src/lib/azure/.gen/constraints.json deleted file mode 100644 index 26a1a681..00000000 --- a/src/lib/azure/.gen/constraints.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "cdktf": "0.20.11", - "providers": { - "azapi": "~> 2.2" - } -} diff --git a/src/lib/azure/.gen/providers/azapi/data-azapi-client-config/README.md b/src/lib/azure/.gen/providers/azapi/data-azapi-client-config/README.md deleted file mode 100644 index 42b6f5cb..00000000 --- a/src/lib/azure/.gen/providers/azapi/data-azapi-client-config/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# `data_azapi_client_config` - -Refer to the Terraform Registry for docs: [`data_azapi_client_config`](https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/client_config). diff --git a/src/lib/azure/.gen/providers/azapi/data-azapi-client-config/index.ts b/src/lib/azure/.gen/providers/azapi/data-azapi-client-config/index.ts deleted file mode 100644 index 8a45debb..00000000 --- a/src/lib/azure/.gen/providers/azapi/data-azapi-client-config/index.ts +++ /dev/null @@ -1,257 +0,0 @@ -// https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/client_config -// generated from terraform resource schema - -import { Construct } from 'constructs' -import * as cdktf from 'cdktf' - -// Configuration - -export interface DataAzapiClientConfigConfig extends cdktf.TerraformMetaArguments { - /** - * timeouts block - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/client_config#timeouts DataAzapiClientConfig#timeouts} - */ - readonly timeouts?: DataAzapiClientConfigTimeouts -} -export interface DataAzapiClientConfigTimeouts { - /** - * A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/client_config#read DataAzapiClientConfig#read} - */ - readonly read?: string -} - -export function dataAzapiClientConfigTimeoutsToTerraform( - struct?: DataAzapiClientConfigTimeouts | cdktf.IResolvable -): any { - if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { - return struct - } - if (cdktf.isComplexElement(struct)) { - throw new Error( - 'A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration' - ) - } - return { - read: cdktf.stringToTerraform(struct!.read), - } -} - -export function dataAzapiClientConfigTimeoutsToHclTerraform( - struct?: DataAzapiClientConfigTimeouts | cdktf.IResolvable -): any { - if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { - return struct - } - if (cdktf.isComplexElement(struct)) { - throw new Error( - 'A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration' - ) - } - const attrs = { - read: { - value: cdktf.stringToHclTerraform(struct!.read), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - } - - // remove undefined attributes - return Object.fromEntries( - Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined) - ) -} - -export class DataAzapiClientConfigTimeoutsOutputReference extends cdktf.ComplexObject { - private isEmptyObject = false - private resolvableValue?: cdktf.IResolvable - - /** - * @param terraformResource The parent resource - * @param terraformAttribute The attribute on the parent resource this class is referencing - */ - public constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string) { - super(terraformResource, terraformAttribute, false) - } - - public get internalValue(): DataAzapiClientConfigTimeouts | cdktf.IResolvable | undefined { - if (this.resolvableValue) { - return this.resolvableValue - } - let hasAnyValues = this.isEmptyObject - const internalValueResult: any = {} - if (this._read !== undefined) { - hasAnyValues = true - internalValueResult.read = this._read - } - return hasAnyValues ? internalValueResult : undefined - } - - public set internalValue(value: DataAzapiClientConfigTimeouts | cdktf.IResolvable | undefined) { - if (value === undefined) { - this.isEmptyObject = false - this.resolvableValue = undefined - this._read = undefined - } else if (cdktf.Tokenization.isResolvable(value)) { - this.isEmptyObject = false - this.resolvableValue = value - } else { - this.isEmptyObject = Object.keys(value).length === 0 - this.resolvableValue = undefined - this._read = value.read - } - } - - // read - computed: false, optional: true, required: false - private _read?: string - public get read() { - return this.getStringAttribute('read') - } - public set read(value: string) { - this._read = value - } - public resetRead() { - this._read = undefined - } - // Temporarily expose input value. Use with caution. - public get readInput() { - return this._read - } -} - -/** - * Represents a {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/client_config azapi_client_config} - */ -export class DataAzapiClientConfig extends cdktf.TerraformDataSource { - // ================= - // STATIC PROPERTIES - // ================= - public static readonly tfResourceType = 'azapi_client_config' - - // ============== - // STATIC Methods - // ============== - /** - * Generates CDKTF code for importing a DataAzapiClientConfig resource upon running "cdktf plan " - * @param scope The scope in which to define this construct - * @param importToId The construct id used in the generated config for the DataAzapiClientConfig to import - * @param importFromId The id of the existing DataAzapiClientConfig that should be imported. Refer to the {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/client_config#import import section} in the documentation of this resource for the id to use - * @param provider? Optional instance of the provider where the DataAzapiClientConfig to import is found - */ - public static generateConfigForImport( - scope: Construct, - importToId: string, - importFromId: string, - provider?: cdktf.TerraformProvider - ) { - return new cdktf.ImportableResource(scope, importToId, { - terraformResourceType: 'azapi_client_config', - importId: importFromId, - provider, - }) - } - - // =========== - // INITIALIZER - // =========== - - /** - * Create a new {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/client_config azapi_client_config} Data Source - * - * @param scope The scope in which to define this construct - * @param id The scoped construct ID. Must be unique amongst siblings in the same scope - * @param options DataAzapiClientConfigConfig = {} - */ - public constructor(scope: Construct, id: string, config: DataAzapiClientConfigConfig = {}) { - super(scope, id, { - terraformResourceType: 'azapi_client_config', - terraformGeneratorMetadata: { - providerName: 'azapi', - providerVersion: '2.2.0', - providerVersionConstraint: '~> 2.2', - }, - provider: config.provider, - dependsOn: config.dependsOn, - count: config.count, - lifecycle: config.lifecycle, - provisioners: config.provisioners, - connection: config.connection, - forEach: config.forEach, - }) - this._timeouts.internalValue = config.timeouts - } - - // ========== - // ATTRIBUTES - // ========== - - // id - computed: true, optional: false, required: false - public get id() { - return this.getStringAttribute('id') - } - - // object_id - computed: true, optional: false, required: false - public get objectId() { - return this.getStringAttribute('object_id') - } - - // subscription_id - computed: true, optional: false, required: false - public get subscriptionId() { - return this.getStringAttribute('subscription_id') - } - - // subscription_resource_id - computed: true, optional: false, required: false - public get subscriptionResourceId() { - return this.getStringAttribute('subscription_resource_id') - } - - // tenant_id - computed: true, optional: false, required: false - public get tenantId() { - return this.getStringAttribute('tenant_id') - } - - // timeouts - computed: false, optional: true, required: false - private _timeouts = new DataAzapiClientConfigTimeoutsOutputReference(this, 'timeouts') - public get timeouts() { - return this._timeouts - } - public putTimeouts(value: DataAzapiClientConfigTimeouts) { - this._timeouts.internalValue = value - } - public resetTimeouts() { - this._timeouts.internalValue = undefined - } - // Temporarily expose input value. Use with caution. - public get timeoutsInput() { - return this._timeouts.internalValue - } - - // ========= - // SYNTHESIS - // ========= - - protected synthesizeAttributes(): { [name: string]: any } { - return { - timeouts: dataAzapiClientConfigTimeoutsToTerraform(this._timeouts.internalValue), - } - } - - protected synthesizeHclAttributes(): { [name: string]: any } { - const attrs = { - timeouts: { - value: dataAzapiClientConfigTimeoutsToHclTerraform(this._timeouts.internalValue), - isBlock: true, - type: 'struct', - storageClassType: 'DataAzapiClientConfigTimeouts', - }, - } - - // remove undefined attributes - return Object.fromEntries( - Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined) - ) - } -} diff --git a/src/lib/azure/.gen/providers/azapi/data-azapi-resource-action/README.md b/src/lib/azure/.gen/providers/azapi/data-azapi-resource-action/README.md deleted file mode 100644 index 234ce6ed..00000000 --- a/src/lib/azure/.gen/providers/azapi/data-azapi-resource-action/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# `data_azapi_resource_action` - -Refer to the Terraform Registry for docs: [`data_azapi_resource_action`](https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource_action). diff --git a/src/lib/azure/.gen/providers/azapi/data-azapi-resource-action/index.ts b/src/lib/azure/.gen/providers/azapi/data-azapi-resource-action/index.ts deleted file mode 100644 index 0d8bd148..00000000 --- a/src/lib/azure/.gen/providers/azapi/data-azapi-resource-action/index.ts +++ /dev/null @@ -1,779 +0,0 @@ -// https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource_action -// generated from terraform resource schema - -import { Construct } from 'constructs' -import * as cdktf from 'cdktf' - -// Configuration - -export interface DataAzapiResourceActionConfig extends cdktf.TerraformMetaArguments { - /** - * The name of the resource action. It's also possible to make HTTP requests towards the resource ID if leave this field empty. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource_action#action DataAzapiResourceAction#action} - */ - readonly action?: string - /** - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource_action#body DataAzapiResourceAction#body} - */ - readonly body?: { [key: string]: any } - /** - * A map of headers to include in the request - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource_action#headers DataAzapiResourceAction#headers} - */ - readonly headers?: { [key: string]: string } - /** - * The HTTP method to use when performing the action. Must be one of `POST`, `GET`. Defaults to `POST`. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource_action#method DataAzapiResourceAction#method} - */ - readonly method?: string - /** - * A map of query parameters to include in the request - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource_action#query_parameters DataAzapiResourceAction#query_parameters} - */ - readonly queryParameters?: { [key: string]: string[] } | cdktf.IResolvable - /** - * The ID of the Azure resource to perform the action on. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource_action#resource_id DataAzapiResourceAction#resource_id} - */ - readonly resourceId?: string - /** - * The attribute can accept either a list or a map. - * - * - **List**: A list of paths that need to be exported from the response body. Setting it to `["*"]` will export the full response body. Here's an example. If it sets to `["properties.loginServer", "properties.policies.quarantinePolicy.status"]`, it will set the following HCL object to the computed property output. - * - * ```text - * { - * properties = { - * loginServer = "registry1.azurecr.io" - * policies = { - * quarantinePolicy = { - * status = "disabled" - * } - * } - * } - * } - * ``` - * - * - **Map**: A map where the key is the name for the result and the value is a JMESPath query string to filter the response. Here's an example. If it sets to `{"login_server": "properties.loginServer", "quarantine_status": "properties.policies.quarantinePolicy.status"}`, it will set the following HCL object to the computed property output. - * - * ```text - * { - * "login_server" = "registry1.azurecr.io" - * "quarantine_status" = "disabled" - * } - * ``` - * - * To learn more about JMESPath, visit [JMESPath](https://jmespath.org/). - * - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource_action#response_export_values DataAzapiResourceAction#response_export_values} - */ - readonly responseExportValues?: { [key: string]: any } - /** - * The retry block supports the following arguments: - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource_action#retry DataAzapiResourceAction#retry} - */ - readonly retry?: DataAzapiResourceActionRetry - /** - * In a format like `@`. `` is the Azure resource type, for example, `Microsoft.Storage/storageAccounts`. `` is version of the API used to manage this azure resource. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource_action#type DataAzapiResourceAction#type} - */ - readonly type: string - /** - * timeouts block - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource_action#timeouts DataAzapiResourceAction#timeouts} - */ - readonly timeouts?: DataAzapiResourceActionTimeouts -} -export interface DataAzapiResourceActionRetry { - /** - * A list of regular expressions to match against error messages. If any of the regular expressions match, the error is considered retryable. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource_action#error_message_regex DataAzapiResourceAction#error_message_regex} - */ - readonly errorMessageRegex: string[] - /** - * The base number of seconds to wait between retries. Default is `10`. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource_action#interval_seconds DataAzapiResourceAction#interval_seconds} - */ - readonly intervalSeconds?: number - /** - * The maximum number of seconds to wait between retries. Default is `180`. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource_action#max_interval_seconds DataAzapiResourceAction#max_interval_seconds} - */ - readonly maxIntervalSeconds?: number - /** - * The multiplier to apply to the interval between retries. Default is `1.5`. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource_action#multiplier DataAzapiResourceAction#multiplier} - */ - readonly multiplier?: number - /** - * The randomization factor to apply to the interval between retries. The formula for the randomized interval is: `RetryInterval * (random value in range [1 - RandomizationFactor, 1 + RandomizationFactor])`. Therefore set to zero `0.0` for no randomization. Default is `0.5`. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource_action#randomization_factor DataAzapiResourceAction#randomization_factor} - */ - readonly randomizationFactor?: number -} - -export function dataAzapiResourceActionRetryToTerraform( - struct?: DataAzapiResourceActionRetry | cdktf.IResolvable -): any { - if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { - return struct - } - if (cdktf.isComplexElement(struct)) { - throw new Error( - 'A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration' - ) - } - return { - error_message_regex: cdktf.listMapper(cdktf.stringToTerraform, false)(struct!.errorMessageRegex), - interval_seconds: cdktf.numberToTerraform(struct!.intervalSeconds), - max_interval_seconds: cdktf.numberToTerraform(struct!.maxIntervalSeconds), - multiplier: cdktf.numberToTerraform(struct!.multiplier), - randomization_factor: cdktf.numberToTerraform(struct!.randomizationFactor), - } -} - -export function dataAzapiResourceActionRetryToHclTerraform( - struct?: DataAzapiResourceActionRetry | cdktf.IResolvable -): any { - if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { - return struct - } - if (cdktf.isComplexElement(struct)) { - throw new Error( - 'A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration' - ) - } - const attrs = { - error_message_regex: { - value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct!.errorMessageRegex), - isBlock: false, - type: 'list', - storageClassType: 'stringList', - }, - interval_seconds: { - value: cdktf.numberToHclTerraform(struct!.intervalSeconds), - isBlock: false, - type: 'simple', - storageClassType: 'number', - }, - max_interval_seconds: { - value: cdktf.numberToHclTerraform(struct!.maxIntervalSeconds), - isBlock: false, - type: 'simple', - storageClassType: 'number', - }, - multiplier: { - value: cdktf.numberToHclTerraform(struct!.multiplier), - isBlock: false, - type: 'simple', - storageClassType: 'number', - }, - randomization_factor: { - value: cdktf.numberToHclTerraform(struct!.randomizationFactor), - isBlock: false, - type: 'simple', - storageClassType: 'number', - }, - } - - // remove undefined attributes - return Object.fromEntries( - Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined) - ) -} - -export class DataAzapiResourceActionRetryOutputReference extends cdktf.ComplexObject { - private isEmptyObject = false - private resolvableValue?: cdktf.IResolvable - - /** - * @param terraformResource The parent resource - * @param terraformAttribute The attribute on the parent resource this class is referencing - */ - public constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string) { - super(terraformResource, terraformAttribute, false) - } - - public get internalValue(): DataAzapiResourceActionRetry | cdktf.IResolvable | undefined { - if (this.resolvableValue) { - return this.resolvableValue - } - let hasAnyValues = this.isEmptyObject - const internalValueResult: any = {} - if (this._errorMessageRegex !== undefined) { - hasAnyValues = true - internalValueResult.errorMessageRegex = this._errorMessageRegex - } - if (this._intervalSeconds !== undefined) { - hasAnyValues = true - internalValueResult.intervalSeconds = this._intervalSeconds - } - if (this._maxIntervalSeconds !== undefined) { - hasAnyValues = true - internalValueResult.maxIntervalSeconds = this._maxIntervalSeconds - } - if (this._multiplier !== undefined) { - hasAnyValues = true - internalValueResult.multiplier = this._multiplier - } - if (this._randomizationFactor !== undefined) { - hasAnyValues = true - internalValueResult.randomizationFactor = this._randomizationFactor - } - return hasAnyValues ? internalValueResult : undefined - } - - public set internalValue(value: DataAzapiResourceActionRetry | cdktf.IResolvable | undefined) { - if (value === undefined) { - this.isEmptyObject = false - this.resolvableValue = undefined - this._errorMessageRegex = undefined - this._intervalSeconds = undefined - this._maxIntervalSeconds = undefined - this._multiplier = undefined - this._randomizationFactor = undefined - } else if (cdktf.Tokenization.isResolvable(value)) { - this.isEmptyObject = false - this.resolvableValue = value - } else { - this.isEmptyObject = Object.keys(value).length === 0 - this.resolvableValue = undefined - this._errorMessageRegex = value.errorMessageRegex - this._intervalSeconds = value.intervalSeconds - this._maxIntervalSeconds = value.maxIntervalSeconds - this._multiplier = value.multiplier - this._randomizationFactor = value.randomizationFactor - } - } - - // error_message_regex - computed: false, optional: false, required: true - private _errorMessageRegex?: string[] - public get errorMessageRegex() { - return this.getListAttribute('error_message_regex') - } - public set errorMessageRegex(value: string[]) { - this._errorMessageRegex = value - } - // Temporarily expose input value. Use with caution. - public get errorMessageRegexInput() { - return this._errorMessageRegex - } - - // interval_seconds - computed: true, optional: true, required: false - private _intervalSeconds?: number - public get intervalSeconds() { - return this.getNumberAttribute('interval_seconds') - } - public set intervalSeconds(value: number) { - this._intervalSeconds = value - } - public resetIntervalSeconds() { - this._intervalSeconds = undefined - } - // Temporarily expose input value. Use with caution. - public get intervalSecondsInput() { - return this._intervalSeconds - } - - // max_interval_seconds - computed: true, optional: true, required: false - private _maxIntervalSeconds?: number - public get maxIntervalSeconds() { - return this.getNumberAttribute('max_interval_seconds') - } - public set maxIntervalSeconds(value: number) { - this._maxIntervalSeconds = value - } - public resetMaxIntervalSeconds() { - this._maxIntervalSeconds = undefined - } - // Temporarily expose input value. Use with caution. - public get maxIntervalSecondsInput() { - return this._maxIntervalSeconds - } - - // multiplier - computed: true, optional: true, required: false - private _multiplier?: number - public get multiplier() { - return this.getNumberAttribute('multiplier') - } - public set multiplier(value: number) { - this._multiplier = value - } - public resetMultiplier() { - this._multiplier = undefined - } - // Temporarily expose input value. Use with caution. - public get multiplierInput() { - return this._multiplier - } - - // randomization_factor - computed: true, optional: true, required: false - private _randomizationFactor?: number - public get randomizationFactor() { - return this.getNumberAttribute('randomization_factor') - } - public set randomizationFactor(value: number) { - this._randomizationFactor = value - } - public resetRandomizationFactor() { - this._randomizationFactor = undefined - } - // Temporarily expose input value. Use with caution. - public get randomizationFactorInput() { - return this._randomizationFactor - } -} -export interface DataAzapiResourceActionTimeouts { - /** - * A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource_action#read DataAzapiResourceAction#read} - */ - readonly read?: string -} - -export function dataAzapiResourceActionTimeoutsToTerraform( - struct?: DataAzapiResourceActionTimeouts | cdktf.IResolvable -): any { - if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { - return struct - } - if (cdktf.isComplexElement(struct)) { - throw new Error( - 'A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration' - ) - } - return { - read: cdktf.stringToTerraform(struct!.read), - } -} - -export function dataAzapiResourceActionTimeoutsToHclTerraform( - struct?: DataAzapiResourceActionTimeouts | cdktf.IResolvable -): any { - if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { - return struct - } - if (cdktf.isComplexElement(struct)) { - throw new Error( - 'A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration' - ) - } - const attrs = { - read: { - value: cdktf.stringToHclTerraform(struct!.read), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - } - - // remove undefined attributes - return Object.fromEntries( - Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined) - ) -} - -export class DataAzapiResourceActionTimeoutsOutputReference extends cdktf.ComplexObject { - private isEmptyObject = false - private resolvableValue?: cdktf.IResolvable - - /** - * @param terraformResource The parent resource - * @param terraformAttribute The attribute on the parent resource this class is referencing - */ - public constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string) { - super(terraformResource, terraformAttribute, false) - } - - public get internalValue(): DataAzapiResourceActionTimeouts | cdktf.IResolvable | undefined { - if (this.resolvableValue) { - return this.resolvableValue - } - let hasAnyValues = this.isEmptyObject - const internalValueResult: any = {} - if (this._read !== undefined) { - hasAnyValues = true - internalValueResult.read = this._read - } - return hasAnyValues ? internalValueResult : undefined - } - - public set internalValue(value: DataAzapiResourceActionTimeouts | cdktf.IResolvable | undefined) { - if (value === undefined) { - this.isEmptyObject = false - this.resolvableValue = undefined - this._read = undefined - } else if (cdktf.Tokenization.isResolvable(value)) { - this.isEmptyObject = false - this.resolvableValue = value - } else { - this.isEmptyObject = Object.keys(value).length === 0 - this.resolvableValue = undefined - this._read = value.read - } - } - - // read - computed: false, optional: true, required: false - private _read?: string - public get read() { - return this.getStringAttribute('read') - } - public set read(value: string) { - this._read = value - } - public resetRead() { - this._read = undefined - } - // Temporarily expose input value. Use with caution. - public get readInput() { - return this._read - } -} - -/** - * Represents a {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource_action azapi_resource_action} - */ -export class DataAzapiResourceAction extends cdktf.TerraformDataSource { - // ================= - // STATIC PROPERTIES - // ================= - public static readonly tfResourceType = 'azapi_resource_action' - - // ============== - // STATIC Methods - // ============== - /** - * Generates CDKTF code for importing a DataAzapiResourceAction resource upon running "cdktf plan " - * @param scope The scope in which to define this construct - * @param importToId The construct id used in the generated config for the DataAzapiResourceAction to import - * @param importFromId The id of the existing DataAzapiResourceAction that should be imported. Refer to the {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource_action#import import section} in the documentation of this resource for the id to use - * @param provider? Optional instance of the provider where the DataAzapiResourceAction to import is found - */ - public static generateConfigForImport( - scope: Construct, - importToId: string, - importFromId: string, - provider?: cdktf.TerraformProvider - ) { - return new cdktf.ImportableResource(scope, importToId, { - terraformResourceType: 'azapi_resource_action', - importId: importFromId, - provider, - }) - } - - // =========== - // INITIALIZER - // =========== - - /** - * Create a new {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource_action azapi_resource_action} Data Source - * - * @param scope The scope in which to define this construct - * @param id The scoped construct ID. Must be unique amongst siblings in the same scope - * @param options DataAzapiResourceActionConfig - */ - public constructor(scope: Construct, id: string, config: DataAzapiResourceActionConfig) { - super(scope, id, { - terraformResourceType: 'azapi_resource_action', - terraformGeneratorMetadata: { - providerName: 'azapi', - providerVersion: '2.2.0', - providerVersionConstraint: '~> 2.2', - }, - provider: config.provider, - dependsOn: config.dependsOn, - count: config.count, - lifecycle: config.lifecycle, - provisioners: config.provisioners, - connection: config.connection, - forEach: config.forEach, - }) - this._action = config.action - this._body = config.body - this._headers = config.headers - this._method = config.method - this._queryParameters = config.queryParameters - this._resourceId = config.resourceId - this._responseExportValues = config.responseExportValues - this._retry.internalValue = config.retry - this._type = config.type - this._timeouts.internalValue = config.timeouts - } - - // ========== - // ATTRIBUTES - // ========== - - // action - computed: false, optional: true, required: false - private _action?: string - public get action() { - return this.getStringAttribute('action') - } - public set action(value: string) { - this._action = value - } - public resetAction() { - this._action = undefined - } - // Temporarily expose input value. Use with caution. - public get actionInput() { - return this._action - } - - // body - computed: false, optional: true, required: false - private _body?: { [key: string]: any } - public get body() { - return this.getAnyMapAttribute('body') - } - public set body(value: { [key: string]: any }) { - this._body = value - } - public resetBody() { - this._body = undefined - } - // Temporarily expose input value. Use with caution. - public get bodyInput() { - return this._body - } - - // headers - computed: false, optional: true, required: false - private _headers?: { [key: string]: string } - public get headers() { - return this.getStringMapAttribute('headers') - } - public set headers(value: { [key: string]: string }) { - this._headers = value - } - public resetHeaders() { - this._headers = undefined - } - // Temporarily expose input value. Use with caution. - public get headersInput() { - return this._headers - } - - // id - computed: true, optional: false, required: false - public get id() { - return this.getStringAttribute('id') - } - - // method - computed: true, optional: true, required: false - private _method?: string - public get method() { - return this.getStringAttribute('method') - } - public set method(value: string) { - this._method = value - } - public resetMethod() { - this._method = undefined - } - // Temporarily expose input value. Use with caution. - public get methodInput() { - return this._method - } - - // output - computed: true, optional: false, required: false - private _output = new cdktf.AnyMap(this, 'output') - public get output() { - return this._output - } - - // query_parameters - computed: false, optional: true, required: false - private _queryParameters?: { [key: string]: string[] } | cdktf.IResolvable - public get queryParameters() { - return this.interpolationForAttribute('query_parameters') - } - public set queryParameters(value: { [key: string]: string[] } | cdktf.IResolvable) { - this._queryParameters = value - } - public resetQueryParameters() { - this._queryParameters = undefined - } - // Temporarily expose input value. Use with caution. - public get queryParametersInput() { - return this._queryParameters - } - - // resource_id - computed: false, optional: true, required: false - private _resourceId?: string - public get resourceId() { - return this.getStringAttribute('resource_id') - } - public set resourceId(value: string) { - this._resourceId = value - } - public resetResourceId() { - this._resourceId = undefined - } - // Temporarily expose input value. Use with caution. - public get resourceIdInput() { - return this._resourceId - } - - // response_export_values - computed: false, optional: true, required: false - private _responseExportValues?: { [key: string]: any } - public get responseExportValues() { - return this.getAnyMapAttribute('response_export_values') - } - public set responseExportValues(value: { [key: string]: any }) { - this._responseExportValues = value - } - public resetResponseExportValues() { - this._responseExportValues = undefined - } - // Temporarily expose input value. Use with caution. - public get responseExportValuesInput() { - return this._responseExportValues - } - - // retry - computed: false, optional: true, required: false - private _retry = new DataAzapiResourceActionRetryOutputReference(this, 'retry') - public get retry() { - return this._retry - } - public putRetry(value: DataAzapiResourceActionRetry) { - this._retry.internalValue = value - } - public resetRetry() { - this._retry.internalValue = undefined - } - // Temporarily expose input value. Use with caution. - public get retryInput() { - return this._retry.internalValue - } - - // type - computed: false, optional: false, required: true - private _type?: string - public get type() { - return this.getStringAttribute('type') - } - public set type(value: string) { - this._type = value - } - // Temporarily expose input value. Use with caution. - public get typeInput() { - return this._type - } - - // timeouts - computed: false, optional: true, required: false - private _timeouts = new DataAzapiResourceActionTimeoutsOutputReference(this, 'timeouts') - public get timeouts() { - return this._timeouts - } - public putTimeouts(value: DataAzapiResourceActionTimeouts) { - this._timeouts.internalValue = value - } - public resetTimeouts() { - this._timeouts.internalValue = undefined - } - // Temporarily expose input value. Use with caution. - public get timeoutsInput() { - return this._timeouts.internalValue - } - - // ========= - // SYNTHESIS - // ========= - - protected synthesizeAttributes(): { [name: string]: any } { - return { - action: cdktf.stringToTerraform(this._action), - body: cdktf.hashMapper(cdktf.anyToTerraform)(this._body), - headers: cdktf.hashMapper(cdktf.stringToTerraform)(this._headers), - method: cdktf.stringToTerraform(this._method), - query_parameters: cdktf.hashMapper(cdktf.listMapper(cdktf.stringToTerraform, false))(this._queryParameters), - resource_id: cdktf.stringToTerraform(this._resourceId), - response_export_values: cdktf.hashMapper(cdktf.anyToTerraform)(this._responseExportValues), - retry: dataAzapiResourceActionRetryToTerraform(this._retry.internalValue), - type: cdktf.stringToTerraform(this._type), - timeouts: dataAzapiResourceActionTimeoutsToTerraform(this._timeouts.internalValue), - } - } - - protected synthesizeHclAttributes(): { [name: string]: any } { - const attrs = { - action: { - value: cdktf.stringToHclTerraform(this._action), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - body: { - value: cdktf.hashMapperHcl(cdktf.anyToHclTerraform)(this._body), - isBlock: false, - type: 'map', - storageClassType: 'anyMap', - }, - headers: { - value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(this._headers), - isBlock: false, - type: 'map', - storageClassType: 'stringMap', - }, - method: { - value: cdktf.stringToHclTerraform(this._method), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - query_parameters: { - value: cdktf.hashMapperHcl(cdktf.listMapperHcl(cdktf.stringToHclTerraform, false))(this._queryParameters), - isBlock: false, - type: 'map', - storageClassType: 'stringListMap', - }, - resource_id: { - value: cdktf.stringToHclTerraform(this._resourceId), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - response_export_values: { - value: cdktf.hashMapperHcl(cdktf.anyToHclTerraform)(this._responseExportValues), - isBlock: false, - type: 'map', - storageClassType: 'anyMap', - }, - retry: { - value: dataAzapiResourceActionRetryToHclTerraform(this._retry.internalValue), - isBlock: true, - type: 'struct', - storageClassType: 'DataAzapiResourceActionRetry', - }, - type: { - value: cdktf.stringToHclTerraform(this._type), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - timeouts: { - value: dataAzapiResourceActionTimeoutsToHclTerraform(this._timeouts.internalValue), - isBlock: true, - type: 'struct', - storageClassType: 'DataAzapiResourceActionTimeouts', - }, - } - - // remove undefined attributes - return Object.fromEntries( - Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined) - ) - } -} diff --git a/src/lib/azure/.gen/providers/azapi/data-azapi-resource-id/README.md b/src/lib/azure/.gen/providers/azapi/data-azapi-resource-id/README.md deleted file mode 100644 index c10fbd58..00000000 --- a/src/lib/azure/.gen/providers/azapi/data-azapi-resource-id/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# `data_azapi_resource_id` - -Refer to the Terraform Registry for docs: [`data_azapi_resource_id`](https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource_id). diff --git a/src/lib/azure/.gen/providers/azapi/data-azapi-resource-id/index.ts b/src/lib/azure/.gen/providers/azapi/data-azapi-resource-id/index.ts deleted file mode 100644 index c463b5de..00000000 --- a/src/lib/azure/.gen/providers/azapi/data-azapi-resource-id/index.ts +++ /dev/null @@ -1,383 +0,0 @@ -// https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource_id -// generated from terraform resource schema - -import { Construct } from 'constructs' -import * as cdktf from 'cdktf' - -// Configuration - -export interface DataAzapiResourceIdConfig extends cdktf.TerraformMetaArguments { - /** - * The name of the Azure resource. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource_id#name DataAzapiResourceId#name} - */ - readonly name?: string - /** - * The ID of the azure resource in which this resource is created. It supports different kinds of deployment scope for **top level** resources: - * - * - resource group scope: `parent_id` should be the ID of a resource group, it's recommended to manage a resource group by azurerm_resource_group. - * - management group scope: `parent_id` should be the ID of a management group, it's recommended to manage a management group by azurerm_management_group. - * - extension scope: `parent_id` should be the ID of the resource you're adding the extension to. - * - subscription scope: `parent_id` should be like \x60/subscriptions/00000000-0000-0000-0000-000000000000\x60 - * - tenant scope: `parent_id` should be / - * - * For child level resources, the `parent_id` should be the ID of its parent resource, for example, subnet resource's `parent_id` is the ID of the vnet. - * - * For type `Microsoft.Resources/resourceGroups`, the `parent_id` could be omitted, it defaults to subscription ID specified in provider or the default subscription (You could check the default subscription by azure cli command: `az account show`). - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource_id#parent_id DataAzapiResourceId#parent_id} - */ - readonly parentId?: string - /** - * The ID of an existing Azure source. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource_id#resource_id DataAzapiResourceId#resource_id} - */ - readonly resourceId?: string - /** - * In a format like `@`. `` is the Azure resource type, for example, `Microsoft.Storage/storageAccounts`. `` is version of the API used to manage this azure resource. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource_id#type DataAzapiResourceId#type} - */ - readonly type: string - /** - * timeouts block - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource_id#timeouts DataAzapiResourceId#timeouts} - */ - readonly timeouts?: DataAzapiResourceIdTimeouts -} -export interface DataAzapiResourceIdTimeouts { - /** - * A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource_id#read DataAzapiResourceId#read} - */ - readonly read?: string -} - -export function dataAzapiResourceIdTimeoutsToTerraform(struct?: DataAzapiResourceIdTimeouts | cdktf.IResolvable): any { - if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { - return struct - } - if (cdktf.isComplexElement(struct)) { - throw new Error( - 'A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration' - ) - } - return { - read: cdktf.stringToTerraform(struct!.read), - } -} - -export function dataAzapiResourceIdTimeoutsToHclTerraform( - struct?: DataAzapiResourceIdTimeouts | cdktf.IResolvable -): any { - if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { - return struct - } - if (cdktf.isComplexElement(struct)) { - throw new Error( - 'A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration' - ) - } - const attrs = { - read: { - value: cdktf.stringToHclTerraform(struct!.read), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - } - - // remove undefined attributes - return Object.fromEntries( - Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined) - ) -} - -export class DataAzapiResourceIdTimeoutsOutputReference extends cdktf.ComplexObject { - private isEmptyObject = false - private resolvableValue?: cdktf.IResolvable - - /** - * @param terraformResource The parent resource - * @param terraformAttribute The attribute on the parent resource this class is referencing - */ - public constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string) { - super(terraformResource, terraformAttribute, false) - } - - public get internalValue(): DataAzapiResourceIdTimeouts | cdktf.IResolvable | undefined { - if (this.resolvableValue) { - return this.resolvableValue - } - let hasAnyValues = this.isEmptyObject - const internalValueResult: any = {} - if (this._read !== undefined) { - hasAnyValues = true - internalValueResult.read = this._read - } - return hasAnyValues ? internalValueResult : undefined - } - - public set internalValue(value: DataAzapiResourceIdTimeouts | cdktf.IResolvable | undefined) { - if (value === undefined) { - this.isEmptyObject = false - this.resolvableValue = undefined - this._read = undefined - } else if (cdktf.Tokenization.isResolvable(value)) { - this.isEmptyObject = false - this.resolvableValue = value - } else { - this.isEmptyObject = Object.keys(value).length === 0 - this.resolvableValue = undefined - this._read = value.read - } - } - - // read - computed: false, optional: true, required: false - private _read?: string - public get read() { - return this.getStringAttribute('read') - } - public set read(value: string) { - this._read = value - } - public resetRead() { - this._read = undefined - } - // Temporarily expose input value. Use with caution. - public get readInput() { - return this._read - } -} - -/** - * Represents a {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource_id azapi_resource_id} - */ -export class DataAzapiResourceId extends cdktf.TerraformDataSource { - // ================= - // STATIC PROPERTIES - // ================= - public static readonly tfResourceType = 'azapi_resource_id' - - // ============== - // STATIC Methods - // ============== - /** - * Generates CDKTF code for importing a DataAzapiResourceId resource upon running "cdktf plan " - * @param scope The scope in which to define this construct - * @param importToId The construct id used in the generated config for the DataAzapiResourceId to import - * @param importFromId The id of the existing DataAzapiResourceId that should be imported. Refer to the {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource_id#import import section} in the documentation of this resource for the id to use - * @param provider? Optional instance of the provider where the DataAzapiResourceId to import is found - */ - public static generateConfigForImport( - scope: Construct, - importToId: string, - importFromId: string, - provider?: cdktf.TerraformProvider - ) { - return new cdktf.ImportableResource(scope, importToId, { - terraformResourceType: 'azapi_resource_id', - importId: importFromId, - provider, - }) - } - - // =========== - // INITIALIZER - // =========== - - /** - * Create a new {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource_id azapi_resource_id} Data Source - * - * @param scope The scope in which to define this construct - * @param id The scoped construct ID. Must be unique amongst siblings in the same scope - * @param options DataAzapiResourceIdConfig - */ - public constructor(scope: Construct, id: string, config: DataAzapiResourceIdConfig) { - super(scope, id, { - terraformResourceType: 'azapi_resource_id', - terraformGeneratorMetadata: { - providerName: 'azapi', - providerVersion: '2.2.0', - providerVersionConstraint: '~> 2.2', - }, - provider: config.provider, - dependsOn: config.dependsOn, - count: config.count, - lifecycle: config.lifecycle, - provisioners: config.provisioners, - connection: config.connection, - forEach: config.forEach, - }) - this._name = config.name - this._parentId = config.parentId - this._resourceId = config.resourceId - this._type = config.type - this._timeouts.internalValue = config.timeouts - } - - // ========== - // ATTRIBUTES - // ========== - - // id - computed: true, optional: false, required: false - public get id() { - return this.getStringAttribute('id') - } - - // name - computed: true, optional: true, required: false - private _name?: string - public get name() { - return this.getStringAttribute('name') - } - public set name(value: string) { - this._name = value - } - public resetName() { - this._name = undefined - } - // Temporarily expose input value. Use with caution. - public get nameInput() { - return this._name - } - - // parent_id - computed: true, optional: true, required: false - private _parentId?: string - public get parentId() { - return this.getStringAttribute('parent_id') - } - public set parentId(value: string) { - this._parentId = value - } - public resetParentId() { - this._parentId = undefined - } - // Temporarily expose input value. Use with caution. - public get parentIdInput() { - return this._parentId - } - - // parts - computed: true, optional: false, required: false - private _parts = new cdktf.StringMap(this, 'parts') - public get parts() { - return this._parts - } - - // provider_namespace - computed: true, optional: false, required: false - public get providerNamespace() { - return this.getStringAttribute('provider_namespace') - } - - // resource_group_name - computed: true, optional: false, required: false - public get resourceGroupName() { - return this.getStringAttribute('resource_group_name') - } - - // resource_id - computed: true, optional: true, required: false - private _resourceId?: string - public get resourceId() { - return this.getStringAttribute('resource_id') - } - public set resourceId(value: string) { - this._resourceId = value - } - public resetResourceId() { - this._resourceId = undefined - } - // Temporarily expose input value. Use with caution. - public get resourceIdInput() { - return this._resourceId - } - - // subscription_id - computed: true, optional: false, required: false - public get subscriptionId() { - return this.getStringAttribute('subscription_id') - } - - // type - computed: false, optional: false, required: true - private _type?: string - public get type() { - return this.getStringAttribute('type') - } - public set type(value: string) { - this._type = value - } - // Temporarily expose input value. Use with caution. - public get typeInput() { - return this._type - } - - // timeouts - computed: false, optional: true, required: false - private _timeouts = new DataAzapiResourceIdTimeoutsOutputReference(this, 'timeouts') - public get timeouts() { - return this._timeouts - } - public putTimeouts(value: DataAzapiResourceIdTimeouts) { - this._timeouts.internalValue = value - } - public resetTimeouts() { - this._timeouts.internalValue = undefined - } - // Temporarily expose input value. Use with caution. - public get timeoutsInput() { - return this._timeouts.internalValue - } - - // ========= - // SYNTHESIS - // ========= - - protected synthesizeAttributes(): { [name: string]: any } { - return { - name: cdktf.stringToTerraform(this._name), - parent_id: cdktf.stringToTerraform(this._parentId), - resource_id: cdktf.stringToTerraform(this._resourceId), - type: cdktf.stringToTerraform(this._type), - timeouts: dataAzapiResourceIdTimeoutsToTerraform(this._timeouts.internalValue), - } - } - - protected synthesizeHclAttributes(): { [name: string]: any } { - const attrs = { - name: { - value: cdktf.stringToHclTerraform(this._name), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - parent_id: { - value: cdktf.stringToHclTerraform(this._parentId), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - resource_id: { - value: cdktf.stringToHclTerraform(this._resourceId), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - type: { - value: cdktf.stringToHclTerraform(this._type), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - timeouts: { - value: dataAzapiResourceIdTimeoutsToHclTerraform(this._timeouts.internalValue), - isBlock: true, - type: 'struct', - storageClassType: 'DataAzapiResourceIdTimeouts', - }, - } - - // remove undefined attributes - return Object.fromEntries( - Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined) - ) - } -} diff --git a/src/lib/azure/.gen/providers/azapi/data-azapi-resource-list/README.md b/src/lib/azure/.gen/providers/azapi/data-azapi-resource-list/README.md deleted file mode 100644 index 1db86c39..00000000 --- a/src/lib/azure/.gen/providers/azapi/data-azapi-resource-list/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# `data_azapi_resource_list` - -Refer to the Terraform Registry for docs: [`data_azapi_resource_list`](https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource_list). diff --git a/src/lib/azure/.gen/providers/azapi/data-azapi-resource-list/index.ts b/src/lib/azure/.gen/providers/azapi/data-azapi-resource-list/index.ts deleted file mode 100644 index 49e7be08..00000000 --- a/src/lib/azure/.gen/providers/azapi/data-azapi-resource-list/index.ts +++ /dev/null @@ -1,713 +0,0 @@ -// https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource_list -// generated from terraform resource schema - -import { Construct } from 'constructs' -import * as cdktf from 'cdktf' - -// Configuration - -export interface DataAzapiResourceListConfig extends cdktf.TerraformMetaArguments { - /** - * A map of headers to include in the request - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource_list#headers DataAzapiResourceList#headers} - */ - readonly headers?: { [key: string]: string } - /** - * The ID of the azure resource in which this resource is created. It supports different kinds of deployment scope for **top level** resources: - * - * - resource group scope: `parent_id` should be the ID of a resource group, it's recommended to manage a resource group by azurerm_resource_group. - * - management group scope: `parent_id` should be the ID of a management group, it's recommended to manage a management group by azurerm_management_group. - * - extension scope: `parent_id` should be the ID of the resource you're adding the extension to. - * - subscription scope: `parent_id` should be like \x60/subscriptions/00000000-0000-0000-0000-000000000000\x60 - * - tenant scope: `parent_id` should be / - * - * For child level resources, the `parent_id` should be the ID of its parent resource, for example, subnet resource's `parent_id` is the ID of the vnet. - * - * For type `Microsoft.Resources/resourceGroups`, the `parent_id` could be omitted, it defaults to subscription ID specified in provider or the default subscription (You could check the default subscription by azure cli command: `az account show`). - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource_list#parent_id DataAzapiResourceList#parent_id} - */ - readonly parentId: string - /** - * A map of query parameters to include in the request - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource_list#query_parameters DataAzapiResourceList#query_parameters} - */ - readonly queryParameters?: { [key: string]: string[] } | cdktf.IResolvable - /** - * The attribute can accept either a list or a map. - * - * - **List**: A list of paths that need to be exported from the response body. Setting it to `["*"]` will export the full response body. Here's an example. If it sets to `["value"]`, it will set the following HCL object to the computed property output. - * - * ```text - * { - * "value" = [ - * { - * "id" = "/subscriptions/000000/resourceGroups/demo-rg/providers/Microsoft.Automation/automationAccounts/example" - * "location" = "eastus2" - * "name" = "example" - * "properties" = { - * "creationTime" = "2024-10-11T08:18:38.737+00:00" - * "disableLocalAuth" = false - * "lastModifiedTime" = "2024-10-11T08:18:38.737+00:00" - * "publicNetworkAccess" = true - * } - * "tags" = {} - * "type" = "Microsoft.Automation/AutomationAccounts" - * } - * ] - * } - * ``` - * - * - **Map**: A map where the key is the name for the result and the value is a JMESPath query string to filter the response. Here's an example. If it sets to `{"values": "value[].{name: name, publicNetworkAccess: properties.publicNetworkAccess}", "names": "value[].name"}`, it will set the following HCL object to the computed property output. - * - * ```text - * { - * "names" = [ - * "example", - * "fredaccount01", - * ] - * "values" = [ - * { - * "name" = "example" - * "publicNetworkAccess" = true - * }, - * { - * "name" = "fredaccount01" - * "publicNetworkAccess" = null - * }, - * ] - * } - * ``` - * - * To learn more about JMESPath, visit [JMESPath](https://jmespath.org/). - * - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource_list#response_export_values DataAzapiResourceList#response_export_values} - */ - readonly responseExportValues?: { [key: string]: any } - /** - * The retry block supports the following arguments: - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource_list#retry DataAzapiResourceList#retry} - */ - readonly retry?: DataAzapiResourceListRetry - /** - * In a format like `@`. `` is the Azure resource type, for example, `Microsoft.Storage/storageAccounts`. `` is version of the API used to manage this azure resource. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource_list#type DataAzapiResourceList#type} - */ - readonly type: string - /** - * timeouts block - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource_list#timeouts DataAzapiResourceList#timeouts} - */ - readonly timeouts?: DataAzapiResourceListTimeouts -} -export interface DataAzapiResourceListRetry { - /** - * A list of regular expressions to match against error messages. If any of the regular expressions match, the error is considered retryable. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource_list#error_message_regex DataAzapiResourceList#error_message_regex} - */ - readonly errorMessageRegex: string[] - /** - * The base number of seconds to wait between retries. Default is `10`. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource_list#interval_seconds DataAzapiResourceList#interval_seconds} - */ - readonly intervalSeconds?: number - /** - * The maximum number of seconds to wait between retries. Default is `180`. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource_list#max_interval_seconds DataAzapiResourceList#max_interval_seconds} - */ - readonly maxIntervalSeconds?: number - /** - * The multiplier to apply to the interval between retries. Default is `1.5`. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource_list#multiplier DataAzapiResourceList#multiplier} - */ - readonly multiplier?: number - /** - * The randomization factor to apply to the interval between retries. The formula for the randomized interval is: `RetryInterval * (random value in range [1 - RandomizationFactor, 1 + RandomizationFactor])`. Therefore set to zero `0.0` for no randomization. Default is `0.5`. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource_list#randomization_factor DataAzapiResourceList#randomization_factor} - */ - readonly randomizationFactor?: number -} - -export function dataAzapiResourceListRetryToTerraform(struct?: DataAzapiResourceListRetry | cdktf.IResolvable): any { - if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { - return struct - } - if (cdktf.isComplexElement(struct)) { - throw new Error( - 'A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration' - ) - } - return { - error_message_regex: cdktf.listMapper(cdktf.stringToTerraform, false)(struct!.errorMessageRegex), - interval_seconds: cdktf.numberToTerraform(struct!.intervalSeconds), - max_interval_seconds: cdktf.numberToTerraform(struct!.maxIntervalSeconds), - multiplier: cdktf.numberToTerraform(struct!.multiplier), - randomization_factor: cdktf.numberToTerraform(struct!.randomizationFactor), - } -} - -export function dataAzapiResourceListRetryToHclTerraform(struct?: DataAzapiResourceListRetry | cdktf.IResolvable): any { - if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { - return struct - } - if (cdktf.isComplexElement(struct)) { - throw new Error( - 'A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration' - ) - } - const attrs = { - error_message_regex: { - value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct!.errorMessageRegex), - isBlock: false, - type: 'list', - storageClassType: 'stringList', - }, - interval_seconds: { - value: cdktf.numberToHclTerraform(struct!.intervalSeconds), - isBlock: false, - type: 'simple', - storageClassType: 'number', - }, - max_interval_seconds: { - value: cdktf.numberToHclTerraform(struct!.maxIntervalSeconds), - isBlock: false, - type: 'simple', - storageClassType: 'number', - }, - multiplier: { - value: cdktf.numberToHclTerraform(struct!.multiplier), - isBlock: false, - type: 'simple', - storageClassType: 'number', - }, - randomization_factor: { - value: cdktf.numberToHclTerraform(struct!.randomizationFactor), - isBlock: false, - type: 'simple', - storageClassType: 'number', - }, - } - - // remove undefined attributes - return Object.fromEntries( - Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined) - ) -} - -export class DataAzapiResourceListRetryOutputReference extends cdktf.ComplexObject { - private isEmptyObject = false - private resolvableValue?: cdktf.IResolvable - - /** - * @param terraformResource The parent resource - * @param terraformAttribute The attribute on the parent resource this class is referencing - */ - public constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string) { - super(terraformResource, terraformAttribute, false) - } - - public get internalValue(): DataAzapiResourceListRetry | cdktf.IResolvable | undefined { - if (this.resolvableValue) { - return this.resolvableValue - } - let hasAnyValues = this.isEmptyObject - const internalValueResult: any = {} - if (this._errorMessageRegex !== undefined) { - hasAnyValues = true - internalValueResult.errorMessageRegex = this._errorMessageRegex - } - if (this._intervalSeconds !== undefined) { - hasAnyValues = true - internalValueResult.intervalSeconds = this._intervalSeconds - } - if (this._maxIntervalSeconds !== undefined) { - hasAnyValues = true - internalValueResult.maxIntervalSeconds = this._maxIntervalSeconds - } - if (this._multiplier !== undefined) { - hasAnyValues = true - internalValueResult.multiplier = this._multiplier - } - if (this._randomizationFactor !== undefined) { - hasAnyValues = true - internalValueResult.randomizationFactor = this._randomizationFactor - } - return hasAnyValues ? internalValueResult : undefined - } - - public set internalValue(value: DataAzapiResourceListRetry | cdktf.IResolvable | undefined) { - if (value === undefined) { - this.isEmptyObject = false - this.resolvableValue = undefined - this._errorMessageRegex = undefined - this._intervalSeconds = undefined - this._maxIntervalSeconds = undefined - this._multiplier = undefined - this._randomizationFactor = undefined - } else if (cdktf.Tokenization.isResolvable(value)) { - this.isEmptyObject = false - this.resolvableValue = value - } else { - this.isEmptyObject = Object.keys(value).length === 0 - this.resolvableValue = undefined - this._errorMessageRegex = value.errorMessageRegex - this._intervalSeconds = value.intervalSeconds - this._maxIntervalSeconds = value.maxIntervalSeconds - this._multiplier = value.multiplier - this._randomizationFactor = value.randomizationFactor - } - } - - // error_message_regex - computed: false, optional: false, required: true - private _errorMessageRegex?: string[] - public get errorMessageRegex() { - return this.getListAttribute('error_message_regex') - } - public set errorMessageRegex(value: string[]) { - this._errorMessageRegex = value - } - // Temporarily expose input value. Use with caution. - public get errorMessageRegexInput() { - return this._errorMessageRegex - } - - // interval_seconds - computed: true, optional: true, required: false - private _intervalSeconds?: number - public get intervalSeconds() { - return this.getNumberAttribute('interval_seconds') - } - public set intervalSeconds(value: number) { - this._intervalSeconds = value - } - public resetIntervalSeconds() { - this._intervalSeconds = undefined - } - // Temporarily expose input value. Use with caution. - public get intervalSecondsInput() { - return this._intervalSeconds - } - - // max_interval_seconds - computed: true, optional: true, required: false - private _maxIntervalSeconds?: number - public get maxIntervalSeconds() { - return this.getNumberAttribute('max_interval_seconds') - } - public set maxIntervalSeconds(value: number) { - this._maxIntervalSeconds = value - } - public resetMaxIntervalSeconds() { - this._maxIntervalSeconds = undefined - } - // Temporarily expose input value. Use with caution. - public get maxIntervalSecondsInput() { - return this._maxIntervalSeconds - } - - // multiplier - computed: true, optional: true, required: false - private _multiplier?: number - public get multiplier() { - return this.getNumberAttribute('multiplier') - } - public set multiplier(value: number) { - this._multiplier = value - } - public resetMultiplier() { - this._multiplier = undefined - } - // Temporarily expose input value. Use with caution. - public get multiplierInput() { - return this._multiplier - } - - // randomization_factor - computed: true, optional: true, required: false - private _randomizationFactor?: number - public get randomizationFactor() { - return this.getNumberAttribute('randomization_factor') - } - public set randomizationFactor(value: number) { - this._randomizationFactor = value - } - public resetRandomizationFactor() { - this._randomizationFactor = undefined - } - // Temporarily expose input value. Use with caution. - public get randomizationFactorInput() { - return this._randomizationFactor - } -} -export interface DataAzapiResourceListTimeouts { - /** - * A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource_list#read DataAzapiResourceList#read} - */ - readonly read?: string -} - -export function dataAzapiResourceListTimeoutsToTerraform( - struct?: DataAzapiResourceListTimeouts | cdktf.IResolvable -): any { - if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { - return struct - } - if (cdktf.isComplexElement(struct)) { - throw new Error( - 'A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration' - ) - } - return { - read: cdktf.stringToTerraform(struct!.read), - } -} - -export function dataAzapiResourceListTimeoutsToHclTerraform( - struct?: DataAzapiResourceListTimeouts | cdktf.IResolvable -): any { - if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { - return struct - } - if (cdktf.isComplexElement(struct)) { - throw new Error( - 'A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration' - ) - } - const attrs = { - read: { - value: cdktf.stringToHclTerraform(struct!.read), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - } - - // remove undefined attributes - return Object.fromEntries( - Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined) - ) -} - -export class DataAzapiResourceListTimeoutsOutputReference extends cdktf.ComplexObject { - private isEmptyObject = false - private resolvableValue?: cdktf.IResolvable - - /** - * @param terraformResource The parent resource - * @param terraformAttribute The attribute on the parent resource this class is referencing - */ - public constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string) { - super(terraformResource, terraformAttribute, false) - } - - public get internalValue(): DataAzapiResourceListTimeouts | cdktf.IResolvable | undefined { - if (this.resolvableValue) { - return this.resolvableValue - } - let hasAnyValues = this.isEmptyObject - const internalValueResult: any = {} - if (this._read !== undefined) { - hasAnyValues = true - internalValueResult.read = this._read - } - return hasAnyValues ? internalValueResult : undefined - } - - public set internalValue(value: DataAzapiResourceListTimeouts | cdktf.IResolvable | undefined) { - if (value === undefined) { - this.isEmptyObject = false - this.resolvableValue = undefined - this._read = undefined - } else if (cdktf.Tokenization.isResolvable(value)) { - this.isEmptyObject = false - this.resolvableValue = value - } else { - this.isEmptyObject = Object.keys(value).length === 0 - this.resolvableValue = undefined - this._read = value.read - } - } - - // read - computed: false, optional: true, required: false - private _read?: string - public get read() { - return this.getStringAttribute('read') - } - public set read(value: string) { - this._read = value - } - public resetRead() { - this._read = undefined - } - // Temporarily expose input value. Use with caution. - public get readInput() { - return this._read - } -} - -/** - * Represents a {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource_list azapi_resource_list} - */ -export class DataAzapiResourceList extends cdktf.TerraformDataSource { - // ================= - // STATIC PROPERTIES - // ================= - public static readonly tfResourceType = 'azapi_resource_list' - - // ============== - // STATIC Methods - // ============== - /** - * Generates CDKTF code for importing a DataAzapiResourceList resource upon running "cdktf plan " - * @param scope The scope in which to define this construct - * @param importToId The construct id used in the generated config for the DataAzapiResourceList to import - * @param importFromId The id of the existing DataAzapiResourceList that should be imported. Refer to the {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource_list#import import section} in the documentation of this resource for the id to use - * @param provider? Optional instance of the provider where the DataAzapiResourceList to import is found - */ - public static generateConfigForImport( - scope: Construct, - importToId: string, - importFromId: string, - provider?: cdktf.TerraformProvider - ) { - return new cdktf.ImportableResource(scope, importToId, { - terraformResourceType: 'azapi_resource_list', - importId: importFromId, - provider, - }) - } - - // =========== - // INITIALIZER - // =========== - - /** - * Create a new {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource_list azapi_resource_list} Data Source - * - * @param scope The scope in which to define this construct - * @param id The scoped construct ID. Must be unique amongst siblings in the same scope - * @param options DataAzapiResourceListConfig - */ - public constructor(scope: Construct, id: string, config: DataAzapiResourceListConfig) { - super(scope, id, { - terraformResourceType: 'azapi_resource_list', - terraformGeneratorMetadata: { - providerName: 'azapi', - providerVersion: '2.2.0', - providerVersionConstraint: '~> 2.2', - }, - provider: config.provider, - dependsOn: config.dependsOn, - count: config.count, - lifecycle: config.lifecycle, - provisioners: config.provisioners, - connection: config.connection, - forEach: config.forEach, - }) - this._headers = config.headers - this._parentId = config.parentId - this._queryParameters = config.queryParameters - this._responseExportValues = config.responseExportValues - this._retry.internalValue = config.retry - this._type = config.type - this._timeouts.internalValue = config.timeouts - } - - // ========== - // ATTRIBUTES - // ========== - - // headers - computed: false, optional: true, required: false - private _headers?: { [key: string]: string } - public get headers() { - return this.getStringMapAttribute('headers') - } - public set headers(value: { [key: string]: string }) { - this._headers = value - } - public resetHeaders() { - this._headers = undefined - } - // Temporarily expose input value. Use with caution. - public get headersInput() { - return this._headers - } - - // id - computed: true, optional: false, required: false - public get id() { - return this.getStringAttribute('id') - } - - // output - computed: true, optional: false, required: false - private _output = new cdktf.AnyMap(this, 'output') - public get output() { - return this._output - } - - // parent_id - computed: false, optional: false, required: true - private _parentId?: string - public get parentId() { - return this.getStringAttribute('parent_id') - } - public set parentId(value: string) { - this._parentId = value - } - // Temporarily expose input value. Use with caution. - public get parentIdInput() { - return this._parentId - } - - // query_parameters - computed: false, optional: true, required: false - private _queryParameters?: { [key: string]: string[] } | cdktf.IResolvable - public get queryParameters() { - return this.interpolationForAttribute('query_parameters') - } - public set queryParameters(value: { [key: string]: string[] } | cdktf.IResolvable) { - this._queryParameters = value - } - public resetQueryParameters() { - this._queryParameters = undefined - } - // Temporarily expose input value. Use with caution. - public get queryParametersInput() { - return this._queryParameters - } - - // response_export_values - computed: false, optional: true, required: false - private _responseExportValues?: { [key: string]: any } - public get responseExportValues() { - return this.getAnyMapAttribute('response_export_values') - } - public set responseExportValues(value: { [key: string]: any }) { - this._responseExportValues = value - } - public resetResponseExportValues() { - this._responseExportValues = undefined - } - // Temporarily expose input value. Use with caution. - public get responseExportValuesInput() { - return this._responseExportValues - } - - // retry - computed: false, optional: true, required: false - private _retry = new DataAzapiResourceListRetryOutputReference(this, 'retry') - public get retry() { - return this._retry - } - public putRetry(value: DataAzapiResourceListRetry) { - this._retry.internalValue = value - } - public resetRetry() { - this._retry.internalValue = undefined - } - // Temporarily expose input value. Use with caution. - public get retryInput() { - return this._retry.internalValue - } - - // type - computed: false, optional: false, required: true - private _type?: string - public get type() { - return this.getStringAttribute('type') - } - public set type(value: string) { - this._type = value - } - // Temporarily expose input value. Use with caution. - public get typeInput() { - return this._type - } - - // timeouts - computed: false, optional: true, required: false - private _timeouts = new DataAzapiResourceListTimeoutsOutputReference(this, 'timeouts') - public get timeouts() { - return this._timeouts - } - public putTimeouts(value: DataAzapiResourceListTimeouts) { - this._timeouts.internalValue = value - } - public resetTimeouts() { - this._timeouts.internalValue = undefined - } - // Temporarily expose input value. Use with caution. - public get timeoutsInput() { - return this._timeouts.internalValue - } - - // ========= - // SYNTHESIS - // ========= - - protected synthesizeAttributes(): { [name: string]: any } { - return { - headers: cdktf.hashMapper(cdktf.stringToTerraform)(this._headers), - parent_id: cdktf.stringToTerraform(this._parentId), - query_parameters: cdktf.hashMapper(cdktf.listMapper(cdktf.stringToTerraform, false))(this._queryParameters), - response_export_values: cdktf.hashMapper(cdktf.anyToTerraform)(this._responseExportValues), - retry: dataAzapiResourceListRetryToTerraform(this._retry.internalValue), - type: cdktf.stringToTerraform(this._type), - timeouts: dataAzapiResourceListTimeoutsToTerraform(this._timeouts.internalValue), - } - } - - protected synthesizeHclAttributes(): { [name: string]: any } { - const attrs = { - headers: { - value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(this._headers), - isBlock: false, - type: 'map', - storageClassType: 'stringMap', - }, - parent_id: { - value: cdktf.stringToHclTerraform(this._parentId), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - query_parameters: { - value: cdktf.hashMapperHcl(cdktf.listMapperHcl(cdktf.stringToHclTerraform, false))(this._queryParameters), - isBlock: false, - type: 'map', - storageClassType: 'stringListMap', - }, - response_export_values: { - value: cdktf.hashMapperHcl(cdktf.anyToHclTerraform)(this._responseExportValues), - isBlock: false, - type: 'map', - storageClassType: 'anyMap', - }, - retry: { - value: dataAzapiResourceListRetryToHclTerraform(this._retry.internalValue), - isBlock: true, - type: 'struct', - storageClassType: 'DataAzapiResourceListRetry', - }, - type: { - value: cdktf.stringToHclTerraform(this._type), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - timeouts: { - value: dataAzapiResourceListTimeoutsToHclTerraform(this._timeouts.internalValue), - isBlock: true, - type: 'struct', - storageClassType: 'DataAzapiResourceListTimeouts', - }, - } - - // remove undefined attributes - return Object.fromEntries( - Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined) - ) - } -} diff --git a/src/lib/azure/.gen/providers/azapi/data-azapi-resource/README.md b/src/lib/azure/.gen/providers/azapi/data-azapi-resource/README.md deleted file mode 100644 index 3cef2545..00000000 --- a/src/lib/azure/.gen/providers/azapi/data-azapi-resource/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# `data_azapi_resource` - -Refer to the Terraform Registry for docs: [`data_azapi_resource`](https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource). diff --git a/src/lib/azure/.gen/providers/azapi/data-azapi-resource/index.ts b/src/lib/azure/.gen/providers/azapi/data-azapi-resource/index.ts deleted file mode 100644 index 9044d71a..00000000 --- a/src/lib/azure/.gen/providers/azapi/data-azapi-resource/index.ts +++ /dev/null @@ -1,876 +0,0 @@ -// https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource -// generated from terraform resource schema - -import { Construct } from 'constructs' -import * as cdktf from 'cdktf' - -// Configuration - -export interface DataAzapiResourceConfig extends cdktf.TerraformMetaArguments { - /** - * A map of headers to include in the request - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource#headers DataAzapiResource#headers} - */ - readonly headers?: { [key: string]: string } - /** - * Specifies the name of the Azure resource. Exactly one of the arguments `name` or `resource_id` must be set. It could be omitted if the `type` is `Microsoft.Resources/subscriptions`. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource#name DataAzapiResource#name} - */ - readonly name?: string - /** - * The ID of the azure resource in which this resource is created. It supports different kinds of deployment scope for **top level** resources: - * - * - resource group scope: `parent_id` should be the ID of a resource group, it's recommended to manage a resource group by azurerm_resource_group. - * - management group scope: `parent_id` should be the ID of a management group, it's recommended to manage a management group by azurerm_management_group. - * - extension scope: `parent_id` should be the ID of the resource you're adding the extension to. - * - subscription scope: `parent_id` should be like \x60/subscriptions/00000000-0000-0000-0000-000000000000\x60 - * - tenant scope: `parent_id` should be / - * - * For child level resources, the `parent_id` should be the ID of its parent resource, for example, subnet resource's `parent_id` is the ID of the vnet. - * - * For type `Microsoft.Resources/resourceGroups`, the `parent_id` could be omitted, it defaults to subscription ID specified in provider or the default subscription (You could check the default subscription by azure cli command: `az account show`). - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource#parent_id DataAzapiResource#parent_id} - */ - readonly parentId?: string - /** - * A map of query parameters to include in the request - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource#query_parameters DataAzapiResource#query_parameters} - */ - readonly queryParameters?: { [key: string]: string[] } | cdktf.IResolvable - /** - * The ID of the Azure resource to retrieve. Exactly one of the arguments `name` or `resource_id` must be set. It could be omitted if the `type` is `Microsoft.Resources/subscriptions`. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource#resource_id DataAzapiResource#resource_id} - */ - readonly resourceId?: string - /** - * The attribute can accept either a list or a map. - * - * - **List**: A list of paths that need to be exported from the response body. Setting it to `["*"]` will export the full response body. Here's an example. If it sets to `["properties.loginServer", "properties.policies.quarantinePolicy.status"]`, it will set the following HCL object to the computed property output. - * - * ```text - * { - * properties = { - * loginServer = "registry1.azurecr.io" - * policies = { - * quarantinePolicy = { - * status = "disabled" - * } - * } - * } - * } - * ``` - * - * - **Map**: A map where the key is the name for the result and the value is a JMESPath query string to filter the response. Here's an example. If it sets to `{"login_server": "properties.loginServer", "quarantine_status": "properties.policies.quarantinePolicy.status"}`, it will set the following HCL object to the computed property output. - * - * ```text - * { - * "login_server" = "registry1.azurecr.io" - * "quarantine_status" = "disabled" - * } - * ``` - * - * To learn more about JMESPath, visit [JMESPath](https://jmespath.org/). - * - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource#response_export_values DataAzapiResource#response_export_values} - */ - readonly responseExportValues?: { [key: string]: any } - /** - * The retry block supports the following arguments: - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource#retry DataAzapiResource#retry} - */ - readonly retry?: DataAzapiResourceRetry - /** - * In a format like `@`. `` is the Azure resource type, for example, `Microsoft.Storage/storageAccounts`. `` is version of the API used to manage this azure resource. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource#type DataAzapiResource#type} - */ - readonly type: string - /** - * timeouts block - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource#timeouts DataAzapiResource#timeouts} - */ - readonly timeouts?: DataAzapiResourceTimeouts -} -export interface DataAzapiResourceIdentity {} - -export function dataAzapiResourceIdentityToTerraform(struct?: DataAzapiResourceIdentity): any { - if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { - return struct - } - if (cdktf.isComplexElement(struct)) { - throw new Error( - 'A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration' - ) - } - return {} -} - -export function dataAzapiResourceIdentityToHclTerraform(struct?: DataAzapiResourceIdentity): any { - if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { - return struct - } - if (cdktf.isComplexElement(struct)) { - throw new Error( - 'A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration' - ) - } - const attrs = {} - return attrs -} - -export class DataAzapiResourceIdentityOutputReference extends cdktf.ComplexObject { - private isEmptyObject = false - - /** - * @param terraformResource The parent resource - * @param terraformAttribute The attribute on the parent resource this class is referencing - * @param complexObjectIndex the index of this item in the list - * @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index) - */ - public constructor( - terraformResource: cdktf.IInterpolatingParent, - terraformAttribute: string, - complexObjectIndex: number, - complexObjectIsFromSet: boolean - ) { - super(terraformResource, terraformAttribute, complexObjectIsFromSet, complexObjectIndex) - } - - public get internalValue(): DataAzapiResourceIdentity | undefined { - let hasAnyValues = this.isEmptyObject - const internalValueResult: any = {} - return hasAnyValues ? internalValueResult : undefined - } - - public set internalValue(value: DataAzapiResourceIdentity | undefined) { - if (value === undefined) { - this.isEmptyObject = false - } else { - this.isEmptyObject = Object.keys(value).length === 0 - } - } - - // identity_ids - computed: true, optional: false, required: false - public get identityIds() { - return this.getListAttribute('identity_ids') - } - - // principal_id - computed: true, optional: false, required: false - public get principalId() { - return this.getStringAttribute('principal_id') - } - - // tenant_id - computed: true, optional: false, required: false - public get tenantId() { - return this.getStringAttribute('tenant_id') - } - - // type - computed: true, optional: false, required: false - public get type() { - return this.getStringAttribute('type') - } -} - -export class DataAzapiResourceIdentityList extends cdktf.ComplexList { - /** - * @param terraformResource The parent resource - * @param terraformAttribute The attribute on the parent resource this class is referencing - * @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index) - */ - constructor( - protected terraformResource: cdktf.IInterpolatingParent, - protected terraformAttribute: string, - protected wrapsSet: boolean - ) { - super(terraformResource, terraformAttribute, wrapsSet) - } - - /** - * @param index the index of the item to return - */ - public get(index: number): DataAzapiResourceIdentityOutputReference { - return new DataAzapiResourceIdentityOutputReference( - this.terraformResource, - this.terraformAttribute, - index, - this.wrapsSet - ) - } -} -export interface DataAzapiResourceRetry { - /** - * A list of regular expressions to match against error messages. If any of the regular expressions match, the error is considered retryable. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource#error_message_regex DataAzapiResource#error_message_regex} - */ - readonly errorMessageRegex: string[] - /** - * The base number of seconds to wait between retries. Default is `10`. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource#interval_seconds DataAzapiResource#interval_seconds} - */ - readonly intervalSeconds?: number - /** - * The maximum number of seconds to wait between retries. Default is `180`. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource#max_interval_seconds DataAzapiResource#max_interval_seconds} - */ - readonly maxIntervalSeconds?: number - /** - * The multiplier to apply to the interval between retries. Default is `1.5`. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource#multiplier DataAzapiResource#multiplier} - */ - readonly multiplier?: number - /** - * The randomization factor to apply to the interval between retries. The formula for the randomized interval is: `RetryInterval * (random value in range [1 - RandomizationFactor, 1 + RandomizationFactor])`. Therefore set to zero `0.0` for no randomization. Default is `0.5`. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource#randomization_factor DataAzapiResource#randomization_factor} - */ - readonly randomizationFactor?: number -} - -export function dataAzapiResourceRetryToTerraform(struct?: DataAzapiResourceRetry | cdktf.IResolvable): any { - if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { - return struct - } - if (cdktf.isComplexElement(struct)) { - throw new Error( - 'A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration' - ) - } - return { - error_message_regex: cdktf.listMapper(cdktf.stringToTerraform, false)(struct!.errorMessageRegex), - interval_seconds: cdktf.numberToTerraform(struct!.intervalSeconds), - max_interval_seconds: cdktf.numberToTerraform(struct!.maxIntervalSeconds), - multiplier: cdktf.numberToTerraform(struct!.multiplier), - randomization_factor: cdktf.numberToTerraform(struct!.randomizationFactor), - } -} - -export function dataAzapiResourceRetryToHclTerraform(struct?: DataAzapiResourceRetry | cdktf.IResolvable): any { - if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { - return struct - } - if (cdktf.isComplexElement(struct)) { - throw new Error( - 'A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration' - ) - } - const attrs = { - error_message_regex: { - value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct!.errorMessageRegex), - isBlock: false, - type: 'list', - storageClassType: 'stringList', - }, - interval_seconds: { - value: cdktf.numberToHclTerraform(struct!.intervalSeconds), - isBlock: false, - type: 'simple', - storageClassType: 'number', - }, - max_interval_seconds: { - value: cdktf.numberToHclTerraform(struct!.maxIntervalSeconds), - isBlock: false, - type: 'simple', - storageClassType: 'number', - }, - multiplier: { - value: cdktf.numberToHclTerraform(struct!.multiplier), - isBlock: false, - type: 'simple', - storageClassType: 'number', - }, - randomization_factor: { - value: cdktf.numberToHclTerraform(struct!.randomizationFactor), - isBlock: false, - type: 'simple', - storageClassType: 'number', - }, - } - - // remove undefined attributes - return Object.fromEntries( - Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined) - ) -} - -export class DataAzapiResourceRetryOutputReference extends cdktf.ComplexObject { - private isEmptyObject = false - private resolvableValue?: cdktf.IResolvable - - /** - * @param terraformResource The parent resource - * @param terraformAttribute The attribute on the parent resource this class is referencing - */ - public constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string) { - super(terraformResource, terraformAttribute, false) - } - - public get internalValue(): DataAzapiResourceRetry | cdktf.IResolvable | undefined { - if (this.resolvableValue) { - return this.resolvableValue - } - let hasAnyValues = this.isEmptyObject - const internalValueResult: any = {} - if (this._errorMessageRegex !== undefined) { - hasAnyValues = true - internalValueResult.errorMessageRegex = this._errorMessageRegex - } - if (this._intervalSeconds !== undefined) { - hasAnyValues = true - internalValueResult.intervalSeconds = this._intervalSeconds - } - if (this._maxIntervalSeconds !== undefined) { - hasAnyValues = true - internalValueResult.maxIntervalSeconds = this._maxIntervalSeconds - } - if (this._multiplier !== undefined) { - hasAnyValues = true - internalValueResult.multiplier = this._multiplier - } - if (this._randomizationFactor !== undefined) { - hasAnyValues = true - internalValueResult.randomizationFactor = this._randomizationFactor - } - return hasAnyValues ? internalValueResult : undefined - } - - public set internalValue(value: DataAzapiResourceRetry | cdktf.IResolvable | undefined) { - if (value === undefined) { - this.isEmptyObject = false - this.resolvableValue = undefined - this._errorMessageRegex = undefined - this._intervalSeconds = undefined - this._maxIntervalSeconds = undefined - this._multiplier = undefined - this._randomizationFactor = undefined - } else if (cdktf.Tokenization.isResolvable(value)) { - this.isEmptyObject = false - this.resolvableValue = value - } else { - this.isEmptyObject = Object.keys(value).length === 0 - this.resolvableValue = undefined - this._errorMessageRegex = value.errorMessageRegex - this._intervalSeconds = value.intervalSeconds - this._maxIntervalSeconds = value.maxIntervalSeconds - this._multiplier = value.multiplier - this._randomizationFactor = value.randomizationFactor - } - } - - // error_message_regex - computed: false, optional: false, required: true - private _errorMessageRegex?: string[] - public get errorMessageRegex() { - return this.getListAttribute('error_message_regex') - } - public set errorMessageRegex(value: string[]) { - this._errorMessageRegex = value - } - // Temporarily expose input value. Use with caution. - public get errorMessageRegexInput() { - return this._errorMessageRegex - } - - // interval_seconds - computed: true, optional: true, required: false - private _intervalSeconds?: number - public get intervalSeconds() { - return this.getNumberAttribute('interval_seconds') - } - public set intervalSeconds(value: number) { - this._intervalSeconds = value - } - public resetIntervalSeconds() { - this._intervalSeconds = undefined - } - // Temporarily expose input value. Use with caution. - public get intervalSecondsInput() { - return this._intervalSeconds - } - - // max_interval_seconds - computed: true, optional: true, required: false - private _maxIntervalSeconds?: number - public get maxIntervalSeconds() { - return this.getNumberAttribute('max_interval_seconds') - } - public set maxIntervalSeconds(value: number) { - this._maxIntervalSeconds = value - } - public resetMaxIntervalSeconds() { - this._maxIntervalSeconds = undefined - } - // Temporarily expose input value. Use with caution. - public get maxIntervalSecondsInput() { - return this._maxIntervalSeconds - } - - // multiplier - computed: true, optional: true, required: false - private _multiplier?: number - public get multiplier() { - return this.getNumberAttribute('multiplier') - } - public set multiplier(value: number) { - this._multiplier = value - } - public resetMultiplier() { - this._multiplier = undefined - } - // Temporarily expose input value. Use with caution. - public get multiplierInput() { - return this._multiplier - } - - // randomization_factor - computed: true, optional: true, required: false - private _randomizationFactor?: number - public get randomizationFactor() { - return this.getNumberAttribute('randomization_factor') - } - public set randomizationFactor(value: number) { - this._randomizationFactor = value - } - public resetRandomizationFactor() { - this._randomizationFactor = undefined - } - // Temporarily expose input value. Use with caution. - public get randomizationFactorInput() { - return this._randomizationFactor - } -} -export interface DataAzapiResourceTimeouts { - /** - * A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource#read DataAzapiResource#read} - */ - readonly read?: string -} - -export function dataAzapiResourceTimeoutsToTerraform(struct?: DataAzapiResourceTimeouts | cdktf.IResolvable): any { - if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { - return struct - } - if (cdktf.isComplexElement(struct)) { - throw new Error( - 'A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration' - ) - } - return { - read: cdktf.stringToTerraform(struct!.read), - } -} - -export function dataAzapiResourceTimeoutsToHclTerraform(struct?: DataAzapiResourceTimeouts | cdktf.IResolvable): any { - if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { - return struct - } - if (cdktf.isComplexElement(struct)) { - throw new Error( - 'A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration' - ) - } - const attrs = { - read: { - value: cdktf.stringToHclTerraform(struct!.read), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - } - - // remove undefined attributes - return Object.fromEntries( - Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined) - ) -} - -export class DataAzapiResourceTimeoutsOutputReference extends cdktf.ComplexObject { - private isEmptyObject = false - private resolvableValue?: cdktf.IResolvable - - /** - * @param terraformResource The parent resource - * @param terraformAttribute The attribute on the parent resource this class is referencing - */ - public constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string) { - super(terraformResource, terraformAttribute, false) - } - - public get internalValue(): DataAzapiResourceTimeouts | cdktf.IResolvable | undefined { - if (this.resolvableValue) { - return this.resolvableValue - } - let hasAnyValues = this.isEmptyObject - const internalValueResult: any = {} - if (this._read !== undefined) { - hasAnyValues = true - internalValueResult.read = this._read - } - return hasAnyValues ? internalValueResult : undefined - } - - public set internalValue(value: DataAzapiResourceTimeouts | cdktf.IResolvable | undefined) { - if (value === undefined) { - this.isEmptyObject = false - this.resolvableValue = undefined - this._read = undefined - } else if (cdktf.Tokenization.isResolvable(value)) { - this.isEmptyObject = false - this.resolvableValue = value - } else { - this.isEmptyObject = Object.keys(value).length === 0 - this.resolvableValue = undefined - this._read = value.read - } - } - - // read - computed: false, optional: true, required: false - private _read?: string - public get read() { - return this.getStringAttribute('read') - } - public set read(value: string) { - this._read = value - } - public resetRead() { - this._read = undefined - } - // Temporarily expose input value. Use with caution. - public get readInput() { - return this._read - } -} - -/** - * Represents a {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource azapi_resource} - */ -export class DataAzapiResource extends cdktf.TerraformDataSource { - // ================= - // STATIC PROPERTIES - // ================= - public static readonly tfResourceType = 'azapi_resource' - - // ============== - // STATIC Methods - // ============== - /** - * Generates CDKTF code for importing a DataAzapiResource resource upon running "cdktf plan " - * @param scope The scope in which to define this construct - * @param importToId The construct id used in the generated config for the DataAzapiResource to import - * @param importFromId The id of the existing DataAzapiResource that should be imported. Refer to the {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource#import import section} in the documentation of this resource for the id to use - * @param provider? Optional instance of the provider where the DataAzapiResource to import is found - */ - public static generateConfigForImport( - scope: Construct, - importToId: string, - importFromId: string, - provider?: cdktf.TerraformProvider - ) { - return new cdktf.ImportableResource(scope, importToId, { - terraformResourceType: 'azapi_resource', - importId: importFromId, - provider, - }) - } - - // =========== - // INITIALIZER - // =========== - - /** - * Create a new {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/data-sources/resource azapi_resource} Data Source - * - * @param scope The scope in which to define this construct - * @param id The scoped construct ID. Must be unique amongst siblings in the same scope - * @param options DataAzapiResourceConfig - */ - public constructor(scope: Construct, id: string, config: DataAzapiResourceConfig) { - super(scope, id, { - terraformResourceType: 'azapi_resource', - terraformGeneratorMetadata: { - providerName: 'azapi', - providerVersion: '2.2.0', - providerVersionConstraint: '~> 2.2', - }, - provider: config.provider, - dependsOn: config.dependsOn, - count: config.count, - lifecycle: config.lifecycle, - provisioners: config.provisioners, - connection: config.connection, - forEach: config.forEach, - }) - this._headers = config.headers - this._name = config.name - this._parentId = config.parentId - this._queryParameters = config.queryParameters - this._resourceId = config.resourceId - this._responseExportValues = config.responseExportValues - this._retry.internalValue = config.retry - this._type = config.type - this._timeouts.internalValue = config.timeouts - } - - // ========== - // ATTRIBUTES - // ========== - - // headers - computed: false, optional: true, required: false - private _headers?: { [key: string]: string } - public get headers() { - return this.getStringMapAttribute('headers') - } - public set headers(value: { [key: string]: string }) { - this._headers = value - } - public resetHeaders() { - this._headers = undefined - } - // Temporarily expose input value. Use with caution. - public get headersInput() { - return this._headers - } - - // id - computed: true, optional: false, required: false - public get id() { - return this.getStringAttribute('id') - } - - // identity - computed: true, optional: false, required: false - private _identity = new DataAzapiResourceIdentityList(this, 'identity', false) - public get identity() { - return this._identity - } - - // location - computed: true, optional: false, required: false - public get location() { - return this.getStringAttribute('location') - } - - // name - computed: true, optional: true, required: false - private _name?: string - public get name() { - return this.getStringAttribute('name') - } - public set name(value: string) { - this._name = value - } - public resetName() { - this._name = undefined - } - // Temporarily expose input value. Use with caution. - public get nameInput() { - return this._name - } - - // output - computed: true, optional: false, required: false - private _output = new cdktf.AnyMap(this, 'output') - public get output() { - return this._output - } - - // parent_id - computed: true, optional: true, required: false - private _parentId?: string - public get parentId() { - return this.getStringAttribute('parent_id') - } - public set parentId(value: string) { - this._parentId = value - } - public resetParentId() { - this._parentId = undefined - } - // Temporarily expose input value. Use with caution. - public get parentIdInput() { - return this._parentId - } - - // query_parameters - computed: false, optional: true, required: false - private _queryParameters?: { [key: string]: string[] } | cdktf.IResolvable - public get queryParameters() { - return this.interpolationForAttribute('query_parameters') - } - public set queryParameters(value: { [key: string]: string[] } | cdktf.IResolvable) { - this._queryParameters = value - } - public resetQueryParameters() { - this._queryParameters = undefined - } - // Temporarily expose input value. Use with caution. - public get queryParametersInput() { - return this._queryParameters - } - - // resource_id - computed: true, optional: true, required: false - private _resourceId?: string - public get resourceId() { - return this.getStringAttribute('resource_id') - } - public set resourceId(value: string) { - this._resourceId = value - } - public resetResourceId() { - this._resourceId = undefined - } - // Temporarily expose input value. Use with caution. - public get resourceIdInput() { - return this._resourceId - } - - // response_export_values - computed: false, optional: true, required: false - private _responseExportValues?: { [key: string]: any } - public get responseExportValues() { - return this.getAnyMapAttribute('response_export_values') - } - public set responseExportValues(value: { [key: string]: any }) { - this._responseExportValues = value - } - public resetResponseExportValues() { - this._responseExportValues = undefined - } - // Temporarily expose input value. Use with caution. - public get responseExportValuesInput() { - return this._responseExportValues - } - - // retry - computed: false, optional: true, required: false - private _retry = new DataAzapiResourceRetryOutputReference(this, 'retry') - public get retry() { - return this._retry - } - public putRetry(value: DataAzapiResourceRetry) { - this._retry.internalValue = value - } - public resetRetry() { - this._retry.internalValue = undefined - } - // Temporarily expose input value. Use with caution. - public get retryInput() { - return this._retry.internalValue - } - - // tags - computed: true, optional: false, required: false - private _tags = new cdktf.StringMap(this, 'tags') - public get tags() { - return this._tags - } - - // type - computed: false, optional: false, required: true - private _type?: string - public get type() { - return this.getStringAttribute('type') - } - public set type(value: string) { - this._type = value - } - // Temporarily expose input value. Use with caution. - public get typeInput() { - return this._type - } - - // timeouts - computed: false, optional: true, required: false - private _timeouts = new DataAzapiResourceTimeoutsOutputReference(this, 'timeouts') - public get timeouts() { - return this._timeouts - } - public putTimeouts(value: DataAzapiResourceTimeouts) { - this._timeouts.internalValue = value - } - public resetTimeouts() { - this._timeouts.internalValue = undefined - } - // Temporarily expose input value. Use with caution. - public get timeoutsInput() { - return this._timeouts.internalValue - } - - // ========= - // SYNTHESIS - // ========= - - protected synthesizeAttributes(): { [name: string]: any } { - return { - headers: cdktf.hashMapper(cdktf.stringToTerraform)(this._headers), - name: cdktf.stringToTerraform(this._name), - parent_id: cdktf.stringToTerraform(this._parentId), - query_parameters: cdktf.hashMapper(cdktf.listMapper(cdktf.stringToTerraform, false))(this._queryParameters), - resource_id: cdktf.stringToTerraform(this._resourceId), - response_export_values: cdktf.hashMapper(cdktf.anyToTerraform)(this._responseExportValues), - retry: dataAzapiResourceRetryToTerraform(this._retry.internalValue), - type: cdktf.stringToTerraform(this._type), - timeouts: dataAzapiResourceTimeoutsToTerraform(this._timeouts.internalValue), - } - } - - protected synthesizeHclAttributes(): { [name: string]: any } { - const attrs = { - headers: { - value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(this._headers), - isBlock: false, - type: 'map', - storageClassType: 'stringMap', - }, - name: { - value: cdktf.stringToHclTerraform(this._name), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - parent_id: { - value: cdktf.stringToHclTerraform(this._parentId), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - query_parameters: { - value: cdktf.hashMapperHcl(cdktf.listMapperHcl(cdktf.stringToHclTerraform, false))(this._queryParameters), - isBlock: false, - type: 'map', - storageClassType: 'stringListMap', - }, - resource_id: { - value: cdktf.stringToHclTerraform(this._resourceId), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - response_export_values: { - value: cdktf.hashMapperHcl(cdktf.anyToHclTerraform)(this._responseExportValues), - isBlock: false, - type: 'map', - storageClassType: 'anyMap', - }, - retry: { - value: dataAzapiResourceRetryToHclTerraform(this._retry.internalValue), - isBlock: true, - type: 'struct', - storageClassType: 'DataAzapiResourceRetry', - }, - type: { - value: cdktf.stringToHclTerraform(this._type), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - timeouts: { - value: dataAzapiResourceTimeoutsToHclTerraform(this._timeouts.internalValue), - isBlock: true, - type: 'struct', - storageClassType: 'DataAzapiResourceTimeouts', - }, - } - - // remove undefined attributes - return Object.fromEntries( - Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined) - ) - } -} diff --git a/src/lib/azure/.gen/providers/azapi/data-plane-resource/README.md b/src/lib/azure/.gen/providers/azapi/data-plane-resource/README.md deleted file mode 100644 index b3ac478e..00000000 --- a/src/lib/azure/.gen/providers/azapi/data-plane-resource/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# `azapi_data_plane_resource` - -Refer to the Terraform Registry for docs: [`azapi_data_plane_resource`](https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/data_plane_resource). diff --git a/src/lib/azure/.gen/providers/azapi/data-plane-resource/index.ts b/src/lib/azure/.gen/providers/azapi/data-plane-resource/index.ts deleted file mode 100644 index 9e4f63d0..00000000 --- a/src/lib/azure/.gen/providers/azapi/data-plane-resource/index.ts +++ /dev/null @@ -1,1203 +0,0 @@ -// https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/data_plane_resource -// generated from terraform resource schema - -import { Construct } from 'constructs' -import * as cdktf from 'cdktf' - -// Configuration - -export interface DataPlaneResourceConfig extends cdktf.TerraformMetaArguments { - /** - * A dynamic attribute that contains the request body. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/data_plane_resource#body DataPlaneResource#body} - */ - readonly body?: { [key: string]: any } - /** - * A mapping of headers to be sent with the create request. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/data_plane_resource#create_headers DataPlaneResource#create_headers} - */ - readonly createHeaders?: { [key: string]: string } - /** - * A mapping of query parameters to be sent with the create request. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/data_plane_resource#create_query_parameters DataPlaneResource#create_query_parameters} - */ - readonly createQueryParameters?: { [key: string]: string[] } | cdktf.IResolvable - /** - * A mapping of headers to be sent with the delete request. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/data_plane_resource#delete_headers DataPlaneResource#delete_headers} - */ - readonly deleteHeaders?: { [key: string]: string } - /** - * A mapping of query parameters to be sent with the delete request. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/data_plane_resource#delete_query_parameters DataPlaneResource#delete_query_parameters} - */ - readonly deleteQueryParameters?: { [key: string]: string[] } | cdktf.IResolvable - /** - * A dynamic attribute that contains the request body. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/data_plane_resource#ignore_casing DataPlaneResource#ignore_casing} - */ - readonly ignoreCasing?: boolean | cdktf.IResolvable - /** - * Whether ignore not returned properties like credentials in `body` to suppress plan-diff. Defaults to `true`. It's recommend to enable this option when some sensitive properties are not returned in response body, instead of setting them in `lifecycle.ignore_changes` because it will make the sensitive fields unable to update. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/data_plane_resource#ignore_missing_property DataPlaneResource#ignore_missing_property} - */ - readonly ignoreMissingProperty?: boolean | cdktf.IResolvable - /** - * A list of ARM resource IDs which are used to avoid create/modify/delete azapi resources at the same time. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/data_plane_resource#locks DataPlaneResource#locks} - */ - readonly locks?: string[] - /** - * Specifies the name of the Azure resource. Changing this forces a new resource to be created. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/data_plane_resource#name DataPlaneResource#name} - */ - readonly name: string - /** - * The ID of the azure resource in which this resource is created. Changing this forces a new resource to be created. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/data_plane_resource#parent_id DataPlaneResource#parent_id} - */ - readonly parentId: string - /** - * A mapping of headers to be sent with the read request. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/data_plane_resource#read_headers DataPlaneResource#read_headers} - */ - readonly readHeaders?: { [key: string]: string } - /** - * A mapping of query parameters to be sent with the read request. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/data_plane_resource#read_query_parameters DataPlaneResource#read_query_parameters} - */ - readonly readQueryParameters?: { [key: string]: string[] } | cdktf.IResolvable - /** - * Will trigger a replace of the resource when the value changes and is not `null`. This can be used by practitioners to force a replace of the resource when certain values change, e.g. changing the SKU of a virtual machine based on the value of variables or locals. The value is a `dynamic`, so practitioners can compose the input however they wish. For a "break glass" set the value to `null` to prevent the plan modifier taking effect. - * If you have `null` values that you do want to be tracked as affecting the resource replacement, include these inside an object. - * Advanced use cases are possible and resource replacement can be triggered by values external to the resource, for example when a dependent resource changes. - * - * e.g. to replace a resource when either the SKU or os_type attributes change: - * - * ```hcl - * resource "azapi_data_plane_resource" "example" { - * name = var.name - * type = "Microsoft.AppConfiguration/configurationStores/keyValues@1.0" - * body = { - * properties = { - * sku = var.sku - * zones = var.zones - * } - * } - * - * replace_triggers_external_values = [ - * var.sku, - * var.zones, - * ] - * } - * ``` - * - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/data_plane_resource#replace_triggers_external_values DataPlaneResource#replace_triggers_external_values} - */ - readonly replaceTriggersExternalValues?: { [key: string]: any } - /** - * A list of paths in the current Terraform configuration. When the values at these paths change, the resource will be replaced. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/data_plane_resource#replace_triggers_refs DataPlaneResource#replace_triggers_refs} - */ - readonly replaceTriggersRefs?: string[] - /** - * The attribute can accept either a list or a map. - * - * - **List**: A list of paths that need to be exported from the response body. Setting it to `["*"]` will export the full response body. Here's an example. If it sets to `["properties.loginServer", "properties.policies.quarantinePolicy.status"]`, it will set the following HCL object to the computed property output. - * - * ```text - * { - * properties = { - * loginServer = "registry1.azurecr.io" - * policies = { - * quarantinePolicy = { - * status = "disabled" - * } - * } - * } - * } - * ``` - * - * - **Map**: A map where the key is the name for the result and the value is a JMESPath query string to filter the response. Here's an example. If it sets to `{"login_server": "properties.loginServer", "quarantine_status": "properties.policies.quarantinePolicy.status"}`, it will set the following HCL object to the computed property output. - * - * ```text - * { - * "login_server" = "registry1.azurecr.io" - * "quarantine_status" = "disabled" - * } - * ``` - * - * To learn more about JMESPath, visit [JMESPath](https://jmespath.org/). - * - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/data_plane_resource#response_export_values DataPlaneResource#response_export_values} - */ - readonly responseExportValues?: { [key: string]: any } - /** - * The retry block supports the following arguments: - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/data_plane_resource#retry DataPlaneResource#retry} - */ - readonly retry?: DataPlaneResourceRetry - /** - * In a format like `@`. `` is the Azure resource type, for example, `Microsoft.Storage/storageAccounts`. `` is version of the API used to manage this azure resource. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/data_plane_resource#type DataPlaneResource#type} - */ - readonly type: string - /** - * A mapping of headers to be sent with the update request. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/data_plane_resource#update_headers DataPlaneResource#update_headers} - */ - readonly updateHeaders?: { [key: string]: string } - /** - * A mapping of query parameters to be sent with the update request. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/data_plane_resource#update_query_parameters DataPlaneResource#update_query_parameters} - */ - readonly updateQueryParameters?: { [key: string]: string[] } | cdktf.IResolvable - /** - * timeouts block - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/data_plane_resource#timeouts DataPlaneResource#timeouts} - */ - readonly timeouts?: DataPlaneResourceTimeouts -} -export interface DataPlaneResourceRetry { - /** - * A list of regular expressions to match against error messages. If any of the regular expressions match, the error is considered retryable. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/data_plane_resource#error_message_regex DataPlaneResource#error_message_regex} - */ - readonly errorMessageRegex: string[] - /** - * The base number of seconds to wait between retries. Default is `10`. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/data_plane_resource#interval_seconds DataPlaneResource#interval_seconds} - */ - readonly intervalSeconds?: number - /** - * The maximum number of seconds to wait between retries. Default is `180`. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/data_plane_resource#max_interval_seconds DataPlaneResource#max_interval_seconds} - */ - readonly maxIntervalSeconds?: number - /** - * The multiplier to apply to the interval between retries. Default is `1.5`. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/data_plane_resource#multiplier DataPlaneResource#multiplier} - */ - readonly multiplier?: number - /** - * The randomization factor to apply to the interval between retries. The formula for the randomized interval is: `RetryInterval * (random value in range [1 - RandomizationFactor, 1 + RandomizationFactor])`. Therefore set to zero `0.0` for no randomization. Default is `0.5`. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/data_plane_resource#randomization_factor DataPlaneResource#randomization_factor} - */ - readonly randomizationFactor?: number -} - -export function dataPlaneResourceRetryToTerraform(struct?: DataPlaneResourceRetry | cdktf.IResolvable): any { - if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { - return struct - } - if (cdktf.isComplexElement(struct)) { - throw new Error( - 'A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration' - ) - } - return { - error_message_regex: cdktf.listMapper(cdktf.stringToTerraform, false)(struct!.errorMessageRegex), - interval_seconds: cdktf.numberToTerraform(struct!.intervalSeconds), - max_interval_seconds: cdktf.numberToTerraform(struct!.maxIntervalSeconds), - multiplier: cdktf.numberToTerraform(struct!.multiplier), - randomization_factor: cdktf.numberToTerraform(struct!.randomizationFactor), - } -} - -export function dataPlaneResourceRetryToHclTerraform(struct?: DataPlaneResourceRetry | cdktf.IResolvable): any { - if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { - return struct - } - if (cdktf.isComplexElement(struct)) { - throw new Error( - 'A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration' - ) - } - const attrs = { - error_message_regex: { - value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct!.errorMessageRegex), - isBlock: false, - type: 'list', - storageClassType: 'stringList', - }, - interval_seconds: { - value: cdktf.numberToHclTerraform(struct!.intervalSeconds), - isBlock: false, - type: 'simple', - storageClassType: 'number', - }, - max_interval_seconds: { - value: cdktf.numberToHclTerraform(struct!.maxIntervalSeconds), - isBlock: false, - type: 'simple', - storageClassType: 'number', - }, - multiplier: { - value: cdktf.numberToHclTerraform(struct!.multiplier), - isBlock: false, - type: 'simple', - storageClassType: 'number', - }, - randomization_factor: { - value: cdktf.numberToHclTerraform(struct!.randomizationFactor), - isBlock: false, - type: 'simple', - storageClassType: 'number', - }, - } - - // remove undefined attributes - return Object.fromEntries( - Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined) - ) -} - -export class DataPlaneResourceRetryOutputReference extends cdktf.ComplexObject { - private isEmptyObject = false - private resolvableValue?: cdktf.IResolvable - - /** - * @param terraformResource The parent resource - * @param terraformAttribute The attribute on the parent resource this class is referencing - */ - public constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string) { - super(terraformResource, terraformAttribute, false) - } - - public get internalValue(): DataPlaneResourceRetry | cdktf.IResolvable | undefined { - if (this.resolvableValue) { - return this.resolvableValue - } - let hasAnyValues = this.isEmptyObject - const internalValueResult: any = {} - if (this._errorMessageRegex !== undefined) { - hasAnyValues = true - internalValueResult.errorMessageRegex = this._errorMessageRegex - } - if (this._intervalSeconds !== undefined) { - hasAnyValues = true - internalValueResult.intervalSeconds = this._intervalSeconds - } - if (this._maxIntervalSeconds !== undefined) { - hasAnyValues = true - internalValueResult.maxIntervalSeconds = this._maxIntervalSeconds - } - if (this._multiplier !== undefined) { - hasAnyValues = true - internalValueResult.multiplier = this._multiplier - } - if (this._randomizationFactor !== undefined) { - hasAnyValues = true - internalValueResult.randomizationFactor = this._randomizationFactor - } - return hasAnyValues ? internalValueResult : undefined - } - - public set internalValue(value: DataPlaneResourceRetry | cdktf.IResolvable | undefined) { - if (value === undefined) { - this.isEmptyObject = false - this.resolvableValue = undefined - this._errorMessageRegex = undefined - this._intervalSeconds = undefined - this._maxIntervalSeconds = undefined - this._multiplier = undefined - this._randomizationFactor = undefined - } else if (cdktf.Tokenization.isResolvable(value)) { - this.isEmptyObject = false - this.resolvableValue = value - } else { - this.isEmptyObject = Object.keys(value).length === 0 - this.resolvableValue = undefined - this._errorMessageRegex = value.errorMessageRegex - this._intervalSeconds = value.intervalSeconds - this._maxIntervalSeconds = value.maxIntervalSeconds - this._multiplier = value.multiplier - this._randomizationFactor = value.randomizationFactor - } - } - - // error_message_regex - computed: false, optional: false, required: true - private _errorMessageRegex?: string[] - public get errorMessageRegex() { - return this.getListAttribute('error_message_regex') - } - public set errorMessageRegex(value: string[]) { - this._errorMessageRegex = value - } - // Temporarily expose input value. Use with caution. - public get errorMessageRegexInput() { - return this._errorMessageRegex - } - - // interval_seconds - computed: true, optional: true, required: false - private _intervalSeconds?: number - public get intervalSeconds() { - return this.getNumberAttribute('interval_seconds') - } - public set intervalSeconds(value: number) { - this._intervalSeconds = value - } - public resetIntervalSeconds() { - this._intervalSeconds = undefined - } - // Temporarily expose input value. Use with caution. - public get intervalSecondsInput() { - return this._intervalSeconds - } - - // max_interval_seconds - computed: true, optional: true, required: false - private _maxIntervalSeconds?: number - public get maxIntervalSeconds() { - return this.getNumberAttribute('max_interval_seconds') - } - public set maxIntervalSeconds(value: number) { - this._maxIntervalSeconds = value - } - public resetMaxIntervalSeconds() { - this._maxIntervalSeconds = undefined - } - // Temporarily expose input value. Use with caution. - public get maxIntervalSecondsInput() { - return this._maxIntervalSeconds - } - - // multiplier - computed: true, optional: true, required: false - private _multiplier?: number - public get multiplier() { - return this.getNumberAttribute('multiplier') - } - public set multiplier(value: number) { - this._multiplier = value - } - public resetMultiplier() { - this._multiplier = undefined - } - // Temporarily expose input value. Use with caution. - public get multiplierInput() { - return this._multiplier - } - - // randomization_factor - computed: true, optional: true, required: false - private _randomizationFactor?: number - public get randomizationFactor() { - return this.getNumberAttribute('randomization_factor') - } - public set randomizationFactor(value: number) { - this._randomizationFactor = value - } - public resetRandomizationFactor() { - this._randomizationFactor = undefined - } - // Temporarily expose input value. Use with caution. - public get randomizationFactorInput() { - return this._randomizationFactor - } -} -export interface DataPlaneResourceTimeouts { - /** - * A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/data_plane_resource#create DataPlaneResource#create} - */ - readonly create?: string - /** - * A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/data_plane_resource#delete DataPlaneResource#delete} - */ - readonly delete?: string - /** - * A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/data_plane_resource#read DataPlaneResource#read} - */ - readonly read?: string - /** - * A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/data_plane_resource#update DataPlaneResource#update} - */ - readonly update?: string -} - -export function dataPlaneResourceTimeoutsToTerraform(struct?: DataPlaneResourceTimeouts | cdktf.IResolvable): any { - if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { - return struct - } - if (cdktf.isComplexElement(struct)) { - throw new Error( - 'A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration' - ) - } - return { - create: cdktf.stringToTerraform(struct!.create), - delete: cdktf.stringToTerraform(struct!.delete), - read: cdktf.stringToTerraform(struct!.read), - update: cdktf.stringToTerraform(struct!.update), - } -} - -export function dataPlaneResourceTimeoutsToHclTerraform(struct?: DataPlaneResourceTimeouts | cdktf.IResolvable): any { - if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { - return struct - } - if (cdktf.isComplexElement(struct)) { - throw new Error( - 'A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration' - ) - } - const attrs = { - create: { - value: cdktf.stringToHclTerraform(struct!.create), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - delete: { - value: cdktf.stringToHclTerraform(struct!.delete), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - read: { - value: cdktf.stringToHclTerraform(struct!.read), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - update: { - value: cdktf.stringToHclTerraform(struct!.update), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - } - - // remove undefined attributes - return Object.fromEntries( - Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined) - ) -} - -export class DataPlaneResourceTimeoutsOutputReference extends cdktf.ComplexObject { - private isEmptyObject = false - private resolvableValue?: cdktf.IResolvable - - /** - * @param terraformResource The parent resource - * @param terraformAttribute The attribute on the parent resource this class is referencing - */ - public constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string) { - super(terraformResource, terraformAttribute, false) - } - - public get internalValue(): DataPlaneResourceTimeouts | cdktf.IResolvable | undefined { - if (this.resolvableValue) { - return this.resolvableValue - } - let hasAnyValues = this.isEmptyObject - const internalValueResult: any = {} - if (this._create !== undefined) { - hasAnyValues = true - internalValueResult.create = this._create - } - if (this._delete !== undefined) { - hasAnyValues = true - internalValueResult.delete = this._delete - } - if (this._read !== undefined) { - hasAnyValues = true - internalValueResult.read = this._read - } - if (this._update !== undefined) { - hasAnyValues = true - internalValueResult.update = this._update - } - return hasAnyValues ? internalValueResult : undefined - } - - public set internalValue(value: DataPlaneResourceTimeouts | cdktf.IResolvable | undefined) { - if (value === undefined) { - this.isEmptyObject = false - this.resolvableValue = undefined - this._create = undefined - this._delete = undefined - this._read = undefined - this._update = undefined - } else if (cdktf.Tokenization.isResolvable(value)) { - this.isEmptyObject = false - this.resolvableValue = value - } else { - this.isEmptyObject = Object.keys(value).length === 0 - this.resolvableValue = undefined - this._create = value.create - this._delete = value.delete - this._read = value.read - this._update = value.update - } - } - - // create - computed: false, optional: true, required: false - private _create?: string - public get create() { - return this.getStringAttribute('create') - } - public set create(value: string) { - this._create = value - } - public resetCreate() { - this._create = undefined - } - // Temporarily expose input value. Use with caution. - public get createInput() { - return this._create - } - - // delete - computed: false, optional: true, required: false - private _delete?: string - public get delete() { - return this.getStringAttribute('delete') - } - public set delete(value: string) { - this._delete = value - } - public resetDelete() { - this._delete = undefined - } - // Temporarily expose input value. Use with caution. - public get deleteInput() { - return this._delete - } - - // read - computed: false, optional: true, required: false - private _read?: string - public get read() { - return this.getStringAttribute('read') - } - public set read(value: string) { - this._read = value - } - public resetRead() { - this._read = undefined - } - // Temporarily expose input value. Use with caution. - public get readInput() { - return this._read - } - - // update - computed: false, optional: true, required: false - private _update?: string - public get update() { - return this.getStringAttribute('update') - } - public set update(value: string) { - this._update = value - } - public resetUpdate() { - this._update = undefined - } - // Temporarily expose input value. Use with caution. - public get updateInput() { - return this._update - } -} - -/** - * Represents a {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/data_plane_resource azapi_data_plane_resource} - */ -export class DataPlaneResource extends cdktf.TerraformResource { - // ================= - // STATIC PROPERTIES - // ================= - public static readonly tfResourceType = 'azapi_data_plane_resource' - - // ============== - // STATIC Methods - // ============== - /** - * Generates CDKTF code for importing a DataPlaneResource resource upon running "cdktf plan " - * @param scope The scope in which to define this construct - * @param importToId The construct id used in the generated config for the DataPlaneResource to import - * @param importFromId The id of the existing DataPlaneResource that should be imported. Refer to the {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/data_plane_resource#import import section} in the documentation of this resource for the id to use - * @param provider? Optional instance of the provider where the DataPlaneResource to import is found - */ - public static generateConfigForImport( - scope: Construct, - importToId: string, - importFromId: string, - provider?: cdktf.TerraformProvider - ) { - return new cdktf.ImportableResource(scope, importToId, { - terraformResourceType: 'azapi_data_plane_resource', - importId: importFromId, - provider, - }) - } - - // =========== - // INITIALIZER - // =========== - - /** - * Create a new {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/data_plane_resource azapi_data_plane_resource} Resource - * - * @param scope The scope in which to define this construct - * @param id The scoped construct ID. Must be unique amongst siblings in the same scope - * @param options DataPlaneResourceConfig - */ - public constructor(scope: Construct, id: string, config: DataPlaneResourceConfig) { - super(scope, id, { - terraformResourceType: 'azapi_data_plane_resource', - terraformGeneratorMetadata: { - providerName: 'azapi', - providerVersion: '2.2.0', - providerVersionConstraint: '~> 2.2', - }, - provider: config.provider, - dependsOn: config.dependsOn, - count: config.count, - lifecycle: config.lifecycle, - provisioners: config.provisioners, - connection: config.connection, - forEach: config.forEach, - }) - this._body = config.body - this._createHeaders = config.createHeaders - this._createQueryParameters = config.createQueryParameters - this._deleteHeaders = config.deleteHeaders - this._deleteQueryParameters = config.deleteQueryParameters - this._ignoreCasing = config.ignoreCasing - this._ignoreMissingProperty = config.ignoreMissingProperty - this._locks = config.locks - this._name = config.name - this._parentId = config.parentId - this._readHeaders = config.readHeaders - this._readQueryParameters = config.readQueryParameters - this._replaceTriggersExternalValues = config.replaceTriggersExternalValues - this._replaceTriggersRefs = config.replaceTriggersRefs - this._responseExportValues = config.responseExportValues - this._retry.internalValue = config.retry - this._type = config.type - this._updateHeaders = config.updateHeaders - this._updateQueryParameters = config.updateQueryParameters - this._timeouts.internalValue = config.timeouts - } - - // ========== - // ATTRIBUTES - // ========== - - // body - computed: true, optional: true, required: false - private _body?: { [key: string]: any } - public get body() { - return this.getAnyMapAttribute('body') - } - public set body(value: { [key: string]: any }) { - this._body = value - } - public resetBody() { - this._body = undefined - } - // Temporarily expose input value. Use with caution. - public get bodyInput() { - return this._body - } - - // create_headers - computed: false, optional: true, required: false - private _createHeaders?: { [key: string]: string } - public get createHeaders() { - return this.getStringMapAttribute('create_headers') - } - public set createHeaders(value: { [key: string]: string }) { - this._createHeaders = value - } - public resetCreateHeaders() { - this._createHeaders = undefined - } - // Temporarily expose input value. Use with caution. - public get createHeadersInput() { - return this._createHeaders - } - - // create_query_parameters - computed: false, optional: true, required: false - private _createQueryParameters?: { [key: string]: string[] } | cdktf.IResolvable - public get createQueryParameters() { - return this.interpolationForAttribute('create_query_parameters') - } - public set createQueryParameters(value: { [key: string]: string[] } | cdktf.IResolvable) { - this._createQueryParameters = value - } - public resetCreateQueryParameters() { - this._createQueryParameters = undefined - } - // Temporarily expose input value. Use with caution. - public get createQueryParametersInput() { - return this._createQueryParameters - } - - // delete_headers - computed: false, optional: true, required: false - private _deleteHeaders?: { [key: string]: string } - public get deleteHeaders() { - return this.getStringMapAttribute('delete_headers') - } - public set deleteHeaders(value: { [key: string]: string }) { - this._deleteHeaders = value - } - public resetDeleteHeaders() { - this._deleteHeaders = undefined - } - // Temporarily expose input value. Use with caution. - public get deleteHeadersInput() { - return this._deleteHeaders - } - - // delete_query_parameters - computed: false, optional: true, required: false - private _deleteQueryParameters?: { [key: string]: string[] } | cdktf.IResolvable - public get deleteQueryParameters() { - return this.interpolationForAttribute('delete_query_parameters') - } - public set deleteQueryParameters(value: { [key: string]: string[] } | cdktf.IResolvable) { - this._deleteQueryParameters = value - } - public resetDeleteQueryParameters() { - this._deleteQueryParameters = undefined - } - // Temporarily expose input value. Use with caution. - public get deleteQueryParametersInput() { - return this._deleteQueryParameters - } - - // id - computed: true, optional: false, required: false - public get id() { - return this.getStringAttribute('id') - } - - // ignore_casing - computed: true, optional: true, required: false - private _ignoreCasing?: boolean | cdktf.IResolvable - public get ignoreCasing() { - return this.getBooleanAttribute('ignore_casing') - } - public set ignoreCasing(value: boolean | cdktf.IResolvable) { - this._ignoreCasing = value - } - public resetIgnoreCasing() { - this._ignoreCasing = undefined - } - // Temporarily expose input value. Use with caution. - public get ignoreCasingInput() { - return this._ignoreCasing - } - - // ignore_missing_property - computed: true, optional: true, required: false - private _ignoreMissingProperty?: boolean | cdktf.IResolvable - public get ignoreMissingProperty() { - return this.getBooleanAttribute('ignore_missing_property') - } - public set ignoreMissingProperty(value: boolean | cdktf.IResolvable) { - this._ignoreMissingProperty = value - } - public resetIgnoreMissingProperty() { - this._ignoreMissingProperty = undefined - } - // Temporarily expose input value. Use with caution. - public get ignoreMissingPropertyInput() { - return this._ignoreMissingProperty - } - - // locks - computed: false, optional: true, required: false - private _locks?: string[] - public get locks() { - return this.getListAttribute('locks') - } - public set locks(value: string[]) { - this._locks = value - } - public resetLocks() { - this._locks = undefined - } - // Temporarily expose input value. Use with caution. - public get locksInput() { - return this._locks - } - - // name - computed: false, optional: false, required: true - private _name?: string - public get name() { - return this.getStringAttribute('name') - } - public set name(value: string) { - this._name = value - } - // Temporarily expose input value. Use with caution. - public get nameInput() { - return this._name - } - - // output - computed: true, optional: false, required: false - private _output = new cdktf.AnyMap(this, 'output') - public get output() { - return this._output - } - - // parent_id - computed: false, optional: false, required: true - private _parentId?: string - public get parentId() { - return this.getStringAttribute('parent_id') - } - public set parentId(value: string) { - this._parentId = value - } - // Temporarily expose input value. Use with caution. - public get parentIdInput() { - return this._parentId - } - - // read_headers - computed: false, optional: true, required: false - private _readHeaders?: { [key: string]: string } - public get readHeaders() { - return this.getStringMapAttribute('read_headers') - } - public set readHeaders(value: { [key: string]: string }) { - this._readHeaders = value - } - public resetReadHeaders() { - this._readHeaders = undefined - } - // Temporarily expose input value. Use with caution. - public get readHeadersInput() { - return this._readHeaders - } - - // read_query_parameters - computed: false, optional: true, required: false - private _readQueryParameters?: { [key: string]: string[] } | cdktf.IResolvable - public get readQueryParameters() { - return this.interpolationForAttribute('read_query_parameters') - } - public set readQueryParameters(value: { [key: string]: string[] } | cdktf.IResolvable) { - this._readQueryParameters = value - } - public resetReadQueryParameters() { - this._readQueryParameters = undefined - } - // Temporarily expose input value. Use with caution. - public get readQueryParametersInput() { - return this._readQueryParameters - } - - // replace_triggers_external_values - computed: false, optional: true, required: false - private _replaceTriggersExternalValues?: { [key: string]: any } - public get replaceTriggersExternalValues() { - return this.getAnyMapAttribute('replace_triggers_external_values') - } - public set replaceTriggersExternalValues(value: { [key: string]: any }) { - this._replaceTriggersExternalValues = value - } - public resetReplaceTriggersExternalValues() { - this._replaceTriggersExternalValues = undefined - } - // Temporarily expose input value. Use with caution. - public get replaceTriggersExternalValuesInput() { - return this._replaceTriggersExternalValues - } - - // replace_triggers_refs - computed: false, optional: true, required: false - private _replaceTriggersRefs?: string[] - public get replaceTriggersRefs() { - return this.getListAttribute('replace_triggers_refs') - } - public set replaceTriggersRefs(value: string[]) { - this._replaceTriggersRefs = value - } - public resetReplaceTriggersRefs() { - this._replaceTriggersRefs = undefined - } - // Temporarily expose input value. Use with caution. - public get replaceTriggersRefsInput() { - return this._replaceTriggersRefs - } - - // response_export_values - computed: false, optional: true, required: false - private _responseExportValues?: { [key: string]: any } - public get responseExportValues() { - return this.getAnyMapAttribute('response_export_values') - } - public set responseExportValues(value: { [key: string]: any }) { - this._responseExportValues = value - } - public resetResponseExportValues() { - this._responseExportValues = undefined - } - // Temporarily expose input value. Use with caution. - public get responseExportValuesInput() { - return this._responseExportValues - } - - // retry - computed: false, optional: true, required: false - private _retry = new DataPlaneResourceRetryOutputReference(this, 'retry') - public get retry() { - return this._retry - } - public putRetry(value: DataPlaneResourceRetry) { - this._retry.internalValue = value - } - public resetRetry() { - this._retry.internalValue = undefined - } - // Temporarily expose input value. Use with caution. - public get retryInput() { - return this._retry.internalValue - } - - // type - computed: false, optional: false, required: true - private _type?: string - public get type() { - return this.getStringAttribute('type') - } - public set type(value: string) { - this._type = value - } - // Temporarily expose input value. Use with caution. - public get typeInput() { - return this._type - } - - // update_headers - computed: false, optional: true, required: false - private _updateHeaders?: { [key: string]: string } - public get updateHeaders() { - return this.getStringMapAttribute('update_headers') - } - public set updateHeaders(value: { [key: string]: string }) { - this._updateHeaders = value - } - public resetUpdateHeaders() { - this._updateHeaders = undefined - } - // Temporarily expose input value. Use with caution. - public get updateHeadersInput() { - return this._updateHeaders - } - - // update_query_parameters - computed: false, optional: true, required: false - private _updateQueryParameters?: { [key: string]: string[] } | cdktf.IResolvable - public get updateQueryParameters() { - return this.interpolationForAttribute('update_query_parameters') - } - public set updateQueryParameters(value: { [key: string]: string[] } | cdktf.IResolvable) { - this._updateQueryParameters = value - } - public resetUpdateQueryParameters() { - this._updateQueryParameters = undefined - } - // Temporarily expose input value. Use with caution. - public get updateQueryParametersInput() { - return this._updateQueryParameters - } - - // timeouts - computed: false, optional: true, required: false - private _timeouts = new DataPlaneResourceTimeoutsOutputReference(this, 'timeouts') - public get timeouts() { - return this._timeouts - } - public putTimeouts(value: DataPlaneResourceTimeouts) { - this._timeouts.internalValue = value - } - public resetTimeouts() { - this._timeouts.internalValue = undefined - } - // Temporarily expose input value. Use with caution. - public get timeoutsInput() { - return this._timeouts.internalValue - } - - // ========= - // SYNTHESIS - // ========= - - protected synthesizeAttributes(): { [name: string]: any } { - return { - body: cdktf.hashMapper(cdktf.anyToTerraform)(this._body), - create_headers: cdktf.hashMapper(cdktf.stringToTerraform)(this._createHeaders), - create_query_parameters: cdktf.hashMapper(cdktf.listMapper(cdktf.stringToTerraform, false))( - this._createQueryParameters - ), - delete_headers: cdktf.hashMapper(cdktf.stringToTerraform)(this._deleteHeaders), - delete_query_parameters: cdktf.hashMapper(cdktf.listMapper(cdktf.stringToTerraform, false))( - this._deleteQueryParameters - ), - ignore_casing: cdktf.booleanToTerraform(this._ignoreCasing), - ignore_missing_property: cdktf.booleanToTerraform(this._ignoreMissingProperty), - locks: cdktf.listMapper(cdktf.stringToTerraform, false)(this._locks), - name: cdktf.stringToTerraform(this._name), - parent_id: cdktf.stringToTerraform(this._parentId), - read_headers: cdktf.hashMapper(cdktf.stringToTerraform)(this._readHeaders), - read_query_parameters: cdktf.hashMapper(cdktf.listMapper(cdktf.stringToTerraform, false))( - this._readQueryParameters - ), - replace_triggers_external_values: cdktf.hashMapper(cdktf.anyToTerraform)(this._replaceTriggersExternalValues), - replace_triggers_refs: cdktf.listMapper(cdktf.stringToTerraform, false)(this._replaceTriggersRefs), - response_export_values: cdktf.hashMapper(cdktf.anyToTerraform)(this._responseExportValues), - retry: dataPlaneResourceRetryToTerraform(this._retry.internalValue), - type: cdktf.stringToTerraform(this._type), - update_headers: cdktf.hashMapper(cdktf.stringToTerraform)(this._updateHeaders), - update_query_parameters: cdktf.hashMapper(cdktf.listMapper(cdktf.stringToTerraform, false))( - this._updateQueryParameters - ), - timeouts: dataPlaneResourceTimeoutsToTerraform(this._timeouts.internalValue), - } - } - - protected synthesizeHclAttributes(): { [name: string]: any } { - const attrs = { - body: { - value: cdktf.hashMapperHcl(cdktf.anyToHclTerraform)(this._body), - isBlock: false, - type: 'map', - storageClassType: 'anyMap', - }, - create_headers: { - value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(this._createHeaders), - isBlock: false, - type: 'map', - storageClassType: 'stringMap', - }, - create_query_parameters: { - value: cdktf.hashMapperHcl(cdktf.listMapperHcl(cdktf.stringToHclTerraform, false))(this._createQueryParameters), - isBlock: false, - type: 'map', - storageClassType: 'stringListMap', - }, - delete_headers: { - value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(this._deleteHeaders), - isBlock: false, - type: 'map', - storageClassType: 'stringMap', - }, - delete_query_parameters: { - value: cdktf.hashMapperHcl(cdktf.listMapperHcl(cdktf.stringToHclTerraform, false))(this._deleteQueryParameters), - isBlock: false, - type: 'map', - storageClassType: 'stringListMap', - }, - ignore_casing: { - value: cdktf.booleanToHclTerraform(this._ignoreCasing), - isBlock: false, - type: 'simple', - storageClassType: 'boolean', - }, - ignore_missing_property: { - value: cdktf.booleanToHclTerraform(this._ignoreMissingProperty), - isBlock: false, - type: 'simple', - storageClassType: 'boolean', - }, - locks: { - value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(this._locks), - isBlock: false, - type: 'list', - storageClassType: 'stringList', - }, - name: { - value: cdktf.stringToHclTerraform(this._name), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - parent_id: { - value: cdktf.stringToHclTerraform(this._parentId), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - read_headers: { - value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(this._readHeaders), - isBlock: false, - type: 'map', - storageClassType: 'stringMap', - }, - read_query_parameters: { - value: cdktf.hashMapperHcl(cdktf.listMapperHcl(cdktf.stringToHclTerraform, false))(this._readQueryParameters), - isBlock: false, - type: 'map', - storageClassType: 'stringListMap', - }, - replace_triggers_external_values: { - value: cdktf.hashMapperHcl(cdktf.anyToHclTerraform)(this._replaceTriggersExternalValues), - isBlock: false, - type: 'map', - storageClassType: 'anyMap', - }, - replace_triggers_refs: { - value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(this._replaceTriggersRefs), - isBlock: false, - type: 'list', - storageClassType: 'stringList', - }, - response_export_values: { - value: cdktf.hashMapperHcl(cdktf.anyToHclTerraform)(this._responseExportValues), - isBlock: false, - type: 'map', - storageClassType: 'anyMap', - }, - retry: { - value: dataPlaneResourceRetryToHclTerraform(this._retry.internalValue), - isBlock: true, - type: 'struct', - storageClassType: 'DataPlaneResourceRetry', - }, - type: { - value: cdktf.stringToHclTerraform(this._type), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - update_headers: { - value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(this._updateHeaders), - isBlock: false, - type: 'map', - storageClassType: 'stringMap', - }, - update_query_parameters: { - value: cdktf.hashMapperHcl(cdktf.listMapperHcl(cdktf.stringToHclTerraform, false))(this._updateQueryParameters), - isBlock: false, - type: 'map', - storageClassType: 'stringListMap', - }, - timeouts: { - value: dataPlaneResourceTimeoutsToHclTerraform(this._timeouts.internalValue), - isBlock: true, - type: 'struct', - storageClassType: 'DataPlaneResourceTimeouts', - }, - } - - // remove undefined attributes - return Object.fromEntries( - Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined) - ) - } -} diff --git a/src/lib/azure/.gen/providers/azapi/index.ts b/src/lib/azure/.gen/providers/azapi/index.ts deleted file mode 100644 index 0373e833..00000000 --- a/src/lib/azure/.gen/providers/azapi/index.ts +++ /dev/null @@ -1,11 +0,0 @@ -// generated by cdktf get -export * as dataPlaneResource from './data-plane-resource' -export * as resource from './resource' -export * as resourceAction from './resource-action' -export * as updateResource from './update-resource' -export * as dataAzapiClientConfig from './data-azapi-client-config' -export * as dataAzapiResource from './data-azapi-resource' -export * as dataAzapiResourceAction from './data-azapi-resource-action' -export * as dataAzapiResourceId from './data-azapi-resource-id' -export * as dataAzapiResourceList from './data-azapi-resource-list' -export * as provider from './provider' diff --git a/src/lib/azure/.gen/providers/azapi/lazy-index.ts b/src/lib/azure/.gen/providers/azapi/lazy-index.ts deleted file mode 100644 index c1088c2b..00000000 --- a/src/lib/azure/.gen/providers/azapi/lazy-index.ts +++ /dev/null @@ -1,51 +0,0 @@ -// generated by cdktf get -Object.defineProperty(exports, 'dataPlaneResource', { - get: function () { - return require('./data-plane-resource') - }, -}) -Object.defineProperty(exports, 'resource', { - get: function () { - return require('./resource') - }, -}) -Object.defineProperty(exports, 'resourceAction', { - get: function () { - return require('./resource-action') - }, -}) -Object.defineProperty(exports, 'updateResource', { - get: function () { - return require('./update-resource') - }, -}) -Object.defineProperty(exports, 'dataAzapiClientConfig', { - get: function () { - return require('./data-azapi-client-config') - }, -}) -Object.defineProperty(exports, 'dataAzapiResource', { - get: function () { - return require('./data-azapi-resource') - }, -}) -Object.defineProperty(exports, 'dataAzapiResourceAction', { - get: function () { - return require('./data-azapi-resource-action') - }, -}) -Object.defineProperty(exports, 'dataAzapiResourceId', { - get: function () { - return require('./data-azapi-resource-id') - }, -}) -Object.defineProperty(exports, 'dataAzapiResourceList', { - get: function () { - return require('./data-azapi-resource-list') - }, -}) -Object.defineProperty(exports, 'provider', { - get: function () { - return require('./provider') - }, -}) diff --git a/src/lib/azure/.gen/providers/azapi/provider/README.md b/src/lib/azure/.gen/providers/azapi/provider/README.md deleted file mode 100644 index e60fa5d6..00000000 --- a/src/lib/azure/.gen/providers/azapi/provider/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# `provider` - -Refer to the Terraform Registry for docs: [`azapi`](https://registry.terraform.io/providers/azure/azapi/2.2.0/docs). diff --git a/src/lib/azure/.gen/providers/azapi/provider/index.ts b/src/lib/azure/.gen/providers/azapi/provider/index.ts deleted file mode 100644 index 8c401013..00000000 --- a/src/lib/azure/.gen/providers/azapi/provider/index.ts +++ /dev/null @@ -1,1121 +0,0 @@ -// https://registry.terraform.io/providers/azure/azapi/2.2.0/docs -// generated from terraform resource schema - -import { Construct } from 'constructs' -import * as cdktf from 'cdktf' - -// Configuration - -export interface AzapiProviderConfig { - /** - * List of auxiliary Tenant IDs required for multi-tenancy and cross-tenant scenarios. This can also be sourced from the `ARM_AUXILIARY_TENANT_IDS` Environment Variable. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs#auxiliary_tenant_ids AzapiProvider#auxiliary_tenant_ids} - */ - readonly auxiliaryTenantIds?: string[] - /** - * A base64-encoded PKCS#12 bundle to be used as the client certificate for authentication. This can also be sourced from the `ARM_CLIENT_CERTIFICATE` environment variable. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs#client_certificate AzapiProvider#client_certificate} - */ - readonly clientCertificate?: string - /** - * The password associated with the Client Certificate. This can also be sourced from the `ARM_CLIENT_CERTIFICATE_PASSWORD` Environment Variable. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs#client_certificate_password AzapiProvider#client_certificate_password} - */ - readonly clientCertificatePassword?: string - /** - * The path to the Client Certificate associated with the Service Principal which should be used. This can also be sourced from the `ARM_CLIENT_CERTIFICATE_PATH` Environment Variable. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs#client_certificate_path AzapiProvider#client_certificate_path} - */ - readonly clientCertificatePath?: string - /** - * The Client ID which should be used. This can also be sourced from the `ARM_CLIENT_ID` Environment Variable. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs#client_id AzapiProvider#client_id} - */ - readonly clientId?: string - /** - * The path to a file containing the Client ID which should be used. This can also be sourced from the `ARM_CLIENT_ID_FILE_PATH` Environment Variable. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs#client_id_file_path AzapiProvider#client_id_file_path} - */ - readonly clientIdFilePath?: string - /** - * The Client Secret which should be used. This can also be sourced from the `ARM_CLIENT_SECRET` Environment Variable. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs#client_secret AzapiProvider#client_secret} - */ - readonly clientSecret?: string - /** - * The path to a file containing the Client Secret which should be used. For use When authenticating as a Service Principal using a Client Secret. This can also be sourced from the `ARM_CLIENT_SECRET_FILE_PATH` Environment Variable. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs#client_secret_file_path AzapiProvider#client_secret_file_path} - */ - readonly clientSecretFilePath?: string - /** - * The value of the `x-ms-correlation-request-id` header, otherwise an auto-generated UUID will be used. This can also be sourced from the `ARM_CORRELATION_REQUEST_ID` environment variable. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs#custom_correlation_request_id AzapiProvider#custom_correlation_request_id} - */ - readonly customCorrelationRequestId?: string - /** - * The default Azure Region where the azure resource should exist. The `location` in each resource block can override the `default_location`. Changing this forces new resources to be created. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs#default_location AzapiProvider#default_location} - */ - readonly defaultLocation?: string - /** - * The default name to create the azure resource. The `name` in each resource block can override the `default_name`. Changing this forces new resources to be created. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs#default_name AzapiProvider#default_name} - */ - readonly defaultName?: string - /** - * A mapping of tags which should be assigned to the azure resource as default tags. The`tags` in each resource block can override the `default_tags`. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs#default_tags AzapiProvider#default_tags} - */ - readonly defaultTags?: { [key: string]: string } - /** - * This will disable the x-ms-correlation-request-id header. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs#disable_correlation_request_id AzapiProvider#disable_correlation_request_id} - */ - readonly disableCorrelationRequestId?: boolean | cdktf.IResolvable - /** - * Disable default output. The default is false. When set to false, the provider will output the read-only properties if `response_export_values` is not specified in the resource block. When set to true, the provider will disable this output. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs#disable_default_output AzapiProvider#disable_default_output} - */ - readonly disableDefaultOutput?: boolean | cdktf.IResolvable - /** - * Disable sending the Terraform Partner ID if a custom `partner_id` isn't specified, which allows Microsoft to better understand the usage of Terraform. The Partner ID does not give HashiCorp any direct access to usage information. This can also be sourced from the `ARM_DISABLE_TERRAFORM_PARTNER_ID` environment variable. Defaults to `false`. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs#disable_terraform_partner_id AzapiProvider#disable_terraform_partner_id} - */ - readonly disableTerraformPartnerId?: boolean | cdktf.IResolvable - /** - * Enable Preflight Validation. The default is false. When set to true, the provider will use Preflight to do static validation before really deploying a new resource. When set to false, the provider will disable this validation. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs#enable_preflight AzapiProvider#enable_preflight} - */ - readonly enablePreflight?: boolean | cdktf.IResolvable - /** - * The Azure API Endpoint Configuration. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs#endpoint AzapiProvider#endpoint} - */ - readonly endpoint?: AzapiProviderEndpoint[] | cdktf.IResolvable - /** - * The Cloud Environment which should be used. Possible values are `public`, `usgovernment` and `china`. Defaults to `public`. This can also be sourced from the `ARM_ENVIRONMENT` Environment Variable. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs#environment AzapiProvider#environment} - */ - readonly environment?: string - /** - * The Azure Pipelines Service Connection ID to use for authentication. This can also be sourced from the `ARM_OIDC_AZURE_SERVICE_CONNECTION_ID` environment variable. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs#oidc_azure_service_connection_id AzapiProvider#oidc_azure_service_connection_id} - */ - readonly oidcAzureServiceConnectionId?: string - /** - * The bearer token for the request to the OIDC provider. This can also be sourced from the `ARM_OIDC_REQUEST_TOKEN` or `ACTIONS_ID_TOKEN_REQUEST_TOKEN` Environment Variables. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs#oidc_request_token AzapiProvider#oidc_request_token} - */ - readonly oidcRequestToken?: string - /** - * The URL for the OIDC provider from which to request an ID token. This can also be sourced from the `ARM_OIDC_REQUEST_URL` or `ACTIONS_ID_TOKEN_REQUEST_URL` Environment Variables. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs#oidc_request_url AzapiProvider#oidc_request_url} - */ - readonly oidcRequestUrl?: string - /** - * The ID token when authenticating using OpenID Connect (OIDC). This can also be sourced from the `ARM_OIDC_TOKEN` environment Variable. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs#oidc_token AzapiProvider#oidc_token} - */ - readonly oidcToken?: string - /** - * The path to a file containing an ID token when authenticating using OpenID Connect (OIDC). This can also be sourced from the `ARM_OIDC_TOKEN_FILE_PATH` environment Variable. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs#oidc_token_file_path AzapiProvider#oidc_token_file_path} - */ - readonly oidcTokenFilePath?: string - /** - * A GUID/UUID that is [registered](https://docs.microsoft.com/azure/marketplace/azure-partner-customer-usage-attribution#register-guids-and-offers) with Microsoft to facilitate partner resource usage attribution. This can also be sourced from the `ARM_PARTNER_ID` Environment Variable. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs#partner_id AzapiProvider#partner_id} - */ - readonly partnerId?: string - /** - * Should the Provider skip registering the Resource Providers it supports? This can also be sourced from the `ARM_SKIP_PROVIDER_REGISTRATION` Environment Variable. Defaults to `false`. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs#skip_provider_registration AzapiProvider#skip_provider_registration} - */ - readonly skipProviderRegistration?: boolean | cdktf.IResolvable - /** - * The Subscription ID which should be used. This can also be sourced from the `ARM_SUBSCRIPTION_ID` Environment Variable. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs#subscription_id AzapiProvider#subscription_id} - */ - readonly subscriptionId?: string - /** - * The Tenant ID should be used. This can also be sourced from the `ARM_TENANT_ID` Environment Variable. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs#tenant_id AzapiProvider#tenant_id} - */ - readonly tenantId?: string - /** - * Should AKS Workload Identity be used for Authentication? This can also be sourced from the `ARM_USE_AKS_WORKLOAD_IDENTITY` Environment Variable. Defaults to `false`. When set, `client_id`, `tenant_id` and `oidc_token_file_path` will be detected from the environment and do not need to be specified. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs#use_aks_workload_identity AzapiProvider#use_aks_workload_identity} - */ - readonly useAksWorkloadIdentity?: boolean | cdktf.IResolvable - /** - * Should Azure CLI be used for authentication? This can also be sourced from the `ARM_USE_CLI` environment variable. Defaults to `true`. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs#use_cli AzapiProvider#use_cli} - */ - readonly useCli?: boolean | cdktf.IResolvable - /** - * Should Managed Identity be used for Authentication? This can also be sourced from the `ARM_USE_MSI` Environment Variable. Defaults to `false`. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs#use_msi AzapiProvider#use_msi} - */ - readonly useMsi?: boolean | cdktf.IResolvable - /** - * Should OIDC be used for Authentication? This can also be sourced from the `ARM_USE_OIDC` Environment Variable. Defaults to `false`. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs#use_oidc AzapiProvider#use_oidc} - */ - readonly useOidc?: boolean | cdktf.IResolvable - /** - * Alias name - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs#alias AzapiProvider#alias} - */ - readonly alias?: string -} -export interface AzapiProviderEndpoint { - /** - * The Azure Resource Manager endpoint to use. This can also be sourced from the `ARM_RESOURCE_MANAGER_ENDPOINT` Environment Variable. Defaults to `https://management.azure.com/` for public cloud. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs#active_directory_authority_host AzapiProvider#active_directory_authority_host} - */ - readonly activeDirectoryAuthorityHost?: string - /** - * The Azure Active Directory login endpoint to use. This can also be sourced from the `ARM_ACTIVE_DIRECTORY_AUTHORITY_HOST` Environment Variable. Defaults to `https://login.microsoftonline.com/` for public cloud. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs#resource_manager_audience AzapiProvider#resource_manager_audience} - */ - readonly resourceManagerAudience?: string - /** - * The resource ID to obtain AD tokens for. This can also be sourced from the `ARM_RESOURCE_MANAGER_AUDIENCE` Environment Variable. Defaults to `https://management.core.windows.net/` for public cloud. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs#resource_manager_endpoint AzapiProvider#resource_manager_endpoint} - */ - readonly resourceManagerEndpoint?: string -} - -export function azapiProviderEndpointToTerraform(struct?: AzapiProviderEndpoint | cdktf.IResolvable): any { - if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { - return struct - } - if (cdktf.isComplexElement(struct)) { - throw new Error( - 'A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration' - ) - } - return { - active_directory_authority_host: cdktf.stringToTerraform(struct!.activeDirectoryAuthorityHost), - resource_manager_audience: cdktf.stringToTerraform(struct!.resourceManagerAudience), - resource_manager_endpoint: cdktf.stringToTerraform(struct!.resourceManagerEndpoint), - } -} - -export function azapiProviderEndpointToHclTerraform(struct?: AzapiProviderEndpoint | cdktf.IResolvable): any { - if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { - return struct - } - if (cdktf.isComplexElement(struct)) { - throw new Error( - 'A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration' - ) - } - const attrs = { - active_directory_authority_host: { - value: cdktf.stringToHclTerraform(struct!.activeDirectoryAuthorityHost), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - resource_manager_audience: { - value: cdktf.stringToHclTerraform(struct!.resourceManagerAudience), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - resource_manager_endpoint: { - value: cdktf.stringToHclTerraform(struct!.resourceManagerEndpoint), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - } - - // remove undefined attributes - return Object.fromEntries( - Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined) - ) -} - -/** - * Represents a {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs azapi} - */ -export class AzapiProvider extends cdktf.TerraformProvider { - // ================= - // STATIC PROPERTIES - // ================= - public static readonly tfResourceType = 'azapi' - - // ============== - // STATIC Methods - // ============== - /** - * Generates CDKTF code for importing a AzapiProvider resource upon running "cdktf plan " - * @param scope The scope in which to define this construct - * @param importToId The construct id used in the generated config for the AzapiProvider to import - * @param importFromId The id of the existing AzapiProvider that should be imported. Refer to the {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs#import import section} in the documentation of this resource for the id to use - * @param provider? Optional instance of the provider where the AzapiProvider to import is found - */ - public static generateConfigForImport( - scope: Construct, - importToId: string, - importFromId: string, - provider?: cdktf.TerraformProvider - ) { - return new cdktf.ImportableResource(scope, importToId, { - terraformResourceType: 'azapi', - importId: importFromId, - provider, - }) - } - - // =========== - // INITIALIZER - // =========== - - /** - * Create a new {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs azapi} Resource - * - * @param scope The scope in which to define this construct - * @param id The scoped construct ID. Must be unique amongst siblings in the same scope - * @param options AzapiProviderConfig = {} - */ - public constructor(scope: Construct, id: string, config: AzapiProviderConfig = {}) { - super(scope, id, { - terraformResourceType: 'azapi', - terraformGeneratorMetadata: { - providerName: 'azapi', - providerVersion: '2.2.0', - providerVersionConstraint: '~> 2.2', - }, - terraformProviderSource: 'azure/azapi', - }) - this._auxiliaryTenantIds = config.auxiliaryTenantIds - this._clientCertificate = config.clientCertificate - this._clientCertificatePassword = config.clientCertificatePassword - this._clientCertificatePath = config.clientCertificatePath - this._clientId = config.clientId - this._clientIdFilePath = config.clientIdFilePath - this._clientSecret = config.clientSecret - this._clientSecretFilePath = config.clientSecretFilePath - this._customCorrelationRequestId = config.customCorrelationRequestId - this._defaultLocation = config.defaultLocation - this._defaultName = config.defaultName - this._defaultTags = config.defaultTags - this._disableCorrelationRequestId = config.disableCorrelationRequestId - this._disableDefaultOutput = config.disableDefaultOutput - this._disableTerraformPartnerId = config.disableTerraformPartnerId - this._enablePreflight = config.enablePreflight - this._endpoint = config.endpoint - this._environment = config.environment - this._oidcAzureServiceConnectionId = config.oidcAzureServiceConnectionId - this._oidcRequestToken = config.oidcRequestToken - this._oidcRequestUrl = config.oidcRequestUrl - this._oidcToken = config.oidcToken - this._oidcTokenFilePath = config.oidcTokenFilePath - this._partnerId = config.partnerId - this._skipProviderRegistration = config.skipProviderRegistration - this._subscriptionId = config.subscriptionId - this._tenantId = config.tenantId - this._useAksWorkloadIdentity = config.useAksWorkloadIdentity - this._useCli = config.useCli - this._useMsi = config.useMsi - this._useOidc = config.useOidc - this._alias = config.alias - } - - // ========== - // ATTRIBUTES - // ========== - - // auxiliary_tenant_ids - computed: false, optional: true, required: false - private _auxiliaryTenantIds?: string[] - public get auxiliaryTenantIds() { - return this._auxiliaryTenantIds - } - public set auxiliaryTenantIds(value: string[] | undefined) { - this._auxiliaryTenantIds = value - } - public resetAuxiliaryTenantIds() { - this._auxiliaryTenantIds = undefined - } - // Temporarily expose input value. Use with caution. - public get auxiliaryTenantIdsInput() { - return this._auxiliaryTenantIds - } - - // client_certificate - computed: false, optional: true, required: false - private _clientCertificate?: string - public get clientCertificate() { - return this._clientCertificate - } - public set clientCertificate(value: string | undefined) { - this._clientCertificate = value - } - public resetClientCertificate() { - this._clientCertificate = undefined - } - // Temporarily expose input value. Use with caution. - public get clientCertificateInput() { - return this._clientCertificate - } - - // client_certificate_password - computed: false, optional: true, required: false - private _clientCertificatePassword?: string - public get clientCertificatePassword() { - return this._clientCertificatePassword - } - public set clientCertificatePassword(value: string | undefined) { - this._clientCertificatePassword = value - } - public resetClientCertificatePassword() { - this._clientCertificatePassword = undefined - } - // Temporarily expose input value. Use with caution. - public get clientCertificatePasswordInput() { - return this._clientCertificatePassword - } - - // client_certificate_path - computed: false, optional: true, required: false - private _clientCertificatePath?: string - public get clientCertificatePath() { - return this._clientCertificatePath - } - public set clientCertificatePath(value: string | undefined) { - this._clientCertificatePath = value - } - public resetClientCertificatePath() { - this._clientCertificatePath = undefined - } - // Temporarily expose input value. Use with caution. - public get clientCertificatePathInput() { - return this._clientCertificatePath - } - - // client_id - computed: false, optional: true, required: false - private _clientId?: string - public get clientId() { - return this._clientId - } - public set clientId(value: string | undefined) { - this._clientId = value - } - public resetClientId() { - this._clientId = undefined - } - // Temporarily expose input value. Use with caution. - public get clientIdInput() { - return this._clientId - } - - // client_id_file_path - computed: false, optional: true, required: false - private _clientIdFilePath?: string - public get clientIdFilePath() { - return this._clientIdFilePath - } - public set clientIdFilePath(value: string | undefined) { - this._clientIdFilePath = value - } - public resetClientIdFilePath() { - this._clientIdFilePath = undefined - } - // Temporarily expose input value. Use with caution. - public get clientIdFilePathInput() { - return this._clientIdFilePath - } - - // client_secret - computed: false, optional: true, required: false - private _clientSecret?: string - public get clientSecret() { - return this._clientSecret - } - public set clientSecret(value: string | undefined) { - this._clientSecret = value - } - public resetClientSecret() { - this._clientSecret = undefined - } - // Temporarily expose input value. Use with caution. - public get clientSecretInput() { - return this._clientSecret - } - - // client_secret_file_path - computed: false, optional: true, required: false - private _clientSecretFilePath?: string - public get clientSecretFilePath() { - return this._clientSecretFilePath - } - public set clientSecretFilePath(value: string | undefined) { - this._clientSecretFilePath = value - } - public resetClientSecretFilePath() { - this._clientSecretFilePath = undefined - } - // Temporarily expose input value. Use with caution. - public get clientSecretFilePathInput() { - return this._clientSecretFilePath - } - - // custom_correlation_request_id - computed: false, optional: true, required: false - private _customCorrelationRequestId?: string - public get customCorrelationRequestId() { - return this._customCorrelationRequestId - } - public set customCorrelationRequestId(value: string | undefined) { - this._customCorrelationRequestId = value - } - public resetCustomCorrelationRequestId() { - this._customCorrelationRequestId = undefined - } - // Temporarily expose input value. Use with caution. - public get customCorrelationRequestIdInput() { - return this._customCorrelationRequestId - } - - // default_location - computed: false, optional: true, required: false - private _defaultLocation?: string - public get defaultLocation() { - return this._defaultLocation - } - public set defaultLocation(value: string | undefined) { - this._defaultLocation = value - } - public resetDefaultLocation() { - this._defaultLocation = undefined - } - // Temporarily expose input value. Use with caution. - public get defaultLocationInput() { - return this._defaultLocation - } - - // default_name - computed: false, optional: true, required: false - private _defaultName?: string - public get defaultName() { - return this._defaultName - } - public set defaultName(value: string | undefined) { - this._defaultName = value - } - public resetDefaultName() { - this._defaultName = undefined - } - // Temporarily expose input value. Use with caution. - public get defaultNameInput() { - return this._defaultName - } - - // default_tags - computed: false, optional: true, required: false - private _defaultTags?: { [key: string]: string } - public get defaultTags() { - return this._defaultTags - } - public set defaultTags(value: { [key: string]: string } | undefined) { - this._defaultTags = value - } - public resetDefaultTags() { - this._defaultTags = undefined - } - // Temporarily expose input value. Use with caution. - public get defaultTagsInput() { - return this._defaultTags - } - - // disable_correlation_request_id - computed: false, optional: true, required: false - private _disableCorrelationRequestId?: boolean | cdktf.IResolvable - public get disableCorrelationRequestId() { - return this._disableCorrelationRequestId - } - public set disableCorrelationRequestId(value: boolean | cdktf.IResolvable | undefined) { - this._disableCorrelationRequestId = value - } - public resetDisableCorrelationRequestId() { - this._disableCorrelationRequestId = undefined - } - // Temporarily expose input value. Use with caution. - public get disableCorrelationRequestIdInput() { - return this._disableCorrelationRequestId - } - - // disable_default_output - computed: false, optional: true, required: false - private _disableDefaultOutput?: boolean | cdktf.IResolvable - public get disableDefaultOutput() { - return this._disableDefaultOutput - } - public set disableDefaultOutput(value: boolean | cdktf.IResolvable | undefined) { - this._disableDefaultOutput = value - } - public resetDisableDefaultOutput() { - this._disableDefaultOutput = undefined - } - // Temporarily expose input value. Use with caution. - public get disableDefaultOutputInput() { - return this._disableDefaultOutput - } - - // disable_terraform_partner_id - computed: false, optional: true, required: false - private _disableTerraformPartnerId?: boolean | cdktf.IResolvable - public get disableTerraformPartnerId() { - return this._disableTerraformPartnerId - } - public set disableTerraformPartnerId(value: boolean | cdktf.IResolvable | undefined) { - this._disableTerraformPartnerId = value - } - public resetDisableTerraformPartnerId() { - this._disableTerraformPartnerId = undefined - } - // Temporarily expose input value. Use with caution. - public get disableTerraformPartnerIdInput() { - return this._disableTerraformPartnerId - } - - // enable_preflight - computed: false, optional: true, required: false - private _enablePreflight?: boolean | cdktf.IResolvable - public get enablePreflight() { - return this._enablePreflight - } - public set enablePreflight(value: boolean | cdktf.IResolvable | undefined) { - this._enablePreflight = value - } - public resetEnablePreflight() { - this._enablePreflight = undefined - } - // Temporarily expose input value. Use with caution. - public get enablePreflightInput() { - return this._enablePreflight - } - - // endpoint - computed: false, optional: true, required: false - private _endpoint?: AzapiProviderEndpoint[] | cdktf.IResolvable - public get endpoint() { - return this._endpoint - } - public set endpoint(value: AzapiProviderEndpoint[] | cdktf.IResolvable | undefined) { - this._endpoint = value - } - public resetEndpoint() { - this._endpoint = undefined - } - // Temporarily expose input value. Use with caution. - public get endpointInput() { - return this._endpoint - } - - // environment - computed: false, optional: true, required: false - private _environment?: string - public get environment() { - return this._environment - } - public set environment(value: string | undefined) { - this._environment = value - } - public resetEnvironment() { - this._environment = undefined - } - // Temporarily expose input value. Use with caution. - public get environmentInput() { - return this._environment - } - - // oidc_azure_service_connection_id - computed: false, optional: true, required: false - private _oidcAzureServiceConnectionId?: string - public get oidcAzureServiceConnectionId() { - return this._oidcAzureServiceConnectionId - } - public set oidcAzureServiceConnectionId(value: string | undefined) { - this._oidcAzureServiceConnectionId = value - } - public resetOidcAzureServiceConnectionId() { - this._oidcAzureServiceConnectionId = undefined - } - // Temporarily expose input value. Use with caution. - public get oidcAzureServiceConnectionIdInput() { - return this._oidcAzureServiceConnectionId - } - - // oidc_request_token - computed: false, optional: true, required: false - private _oidcRequestToken?: string - public get oidcRequestToken() { - return this._oidcRequestToken - } - public set oidcRequestToken(value: string | undefined) { - this._oidcRequestToken = value - } - public resetOidcRequestToken() { - this._oidcRequestToken = undefined - } - // Temporarily expose input value. Use with caution. - public get oidcRequestTokenInput() { - return this._oidcRequestToken - } - - // oidc_request_url - computed: false, optional: true, required: false - private _oidcRequestUrl?: string - public get oidcRequestUrl() { - return this._oidcRequestUrl - } - public set oidcRequestUrl(value: string | undefined) { - this._oidcRequestUrl = value - } - public resetOidcRequestUrl() { - this._oidcRequestUrl = undefined - } - // Temporarily expose input value. Use with caution. - public get oidcRequestUrlInput() { - return this._oidcRequestUrl - } - - // oidc_token - computed: false, optional: true, required: false - private _oidcToken?: string - public get oidcToken() { - return this._oidcToken - } - public set oidcToken(value: string | undefined) { - this._oidcToken = value - } - public resetOidcToken() { - this._oidcToken = undefined - } - // Temporarily expose input value. Use with caution. - public get oidcTokenInput() { - return this._oidcToken - } - - // oidc_token_file_path - computed: false, optional: true, required: false - private _oidcTokenFilePath?: string - public get oidcTokenFilePath() { - return this._oidcTokenFilePath - } - public set oidcTokenFilePath(value: string | undefined) { - this._oidcTokenFilePath = value - } - public resetOidcTokenFilePath() { - this._oidcTokenFilePath = undefined - } - // Temporarily expose input value. Use with caution. - public get oidcTokenFilePathInput() { - return this._oidcTokenFilePath - } - - // partner_id - computed: false, optional: true, required: false - private _partnerId?: string - public get partnerId() { - return this._partnerId - } - public set partnerId(value: string | undefined) { - this._partnerId = value - } - public resetPartnerId() { - this._partnerId = undefined - } - // Temporarily expose input value. Use with caution. - public get partnerIdInput() { - return this._partnerId - } - - // skip_provider_registration - computed: false, optional: true, required: false - private _skipProviderRegistration?: boolean | cdktf.IResolvable - public get skipProviderRegistration() { - return this._skipProviderRegistration - } - public set skipProviderRegistration(value: boolean | cdktf.IResolvable | undefined) { - this._skipProviderRegistration = value - } - public resetSkipProviderRegistration() { - this._skipProviderRegistration = undefined - } - // Temporarily expose input value. Use with caution. - public get skipProviderRegistrationInput() { - return this._skipProviderRegistration - } - - // subscription_id - computed: false, optional: true, required: false - private _subscriptionId?: string - public get subscriptionId() { - return this._subscriptionId - } - public set subscriptionId(value: string | undefined) { - this._subscriptionId = value - } - public resetSubscriptionId() { - this._subscriptionId = undefined - } - // Temporarily expose input value. Use with caution. - public get subscriptionIdInput() { - return this._subscriptionId - } - - // tenant_id - computed: false, optional: true, required: false - private _tenantId?: string - public get tenantId() { - return this._tenantId - } - public set tenantId(value: string | undefined) { - this._tenantId = value - } - public resetTenantId() { - this._tenantId = undefined - } - // Temporarily expose input value. Use with caution. - public get tenantIdInput() { - return this._tenantId - } - - // use_aks_workload_identity - computed: false, optional: true, required: false - private _useAksWorkloadIdentity?: boolean | cdktf.IResolvable - public get useAksWorkloadIdentity() { - return this._useAksWorkloadIdentity - } - public set useAksWorkloadIdentity(value: boolean | cdktf.IResolvable | undefined) { - this._useAksWorkloadIdentity = value - } - public resetUseAksWorkloadIdentity() { - this._useAksWorkloadIdentity = undefined - } - // Temporarily expose input value. Use with caution. - public get useAksWorkloadIdentityInput() { - return this._useAksWorkloadIdentity - } - - // use_cli - computed: false, optional: true, required: false - private _useCli?: boolean | cdktf.IResolvable - public get useCli() { - return this._useCli - } - public set useCli(value: boolean | cdktf.IResolvable | undefined) { - this._useCli = value - } - public resetUseCli() { - this._useCli = undefined - } - // Temporarily expose input value. Use with caution. - public get useCliInput() { - return this._useCli - } - - // use_msi - computed: false, optional: true, required: false - private _useMsi?: boolean | cdktf.IResolvable - public get useMsi() { - return this._useMsi - } - public set useMsi(value: boolean | cdktf.IResolvable | undefined) { - this._useMsi = value - } - public resetUseMsi() { - this._useMsi = undefined - } - // Temporarily expose input value. Use with caution. - public get useMsiInput() { - return this._useMsi - } - - // use_oidc - computed: false, optional: true, required: false - private _useOidc?: boolean | cdktf.IResolvable - public get useOidc() { - return this._useOidc - } - public set useOidc(value: boolean | cdktf.IResolvable | undefined) { - this._useOidc = value - } - public resetUseOidc() { - this._useOidc = undefined - } - // Temporarily expose input value. Use with caution. - public get useOidcInput() { - return this._useOidc - } - - // alias - computed: false, optional: true, required: false - private _alias?: string - public get alias() { - return this._alias - } - public set alias(value: string | undefined) { - this._alias = value - } - public resetAlias() { - this._alias = undefined - } - // Temporarily expose input value. Use with caution. - public get aliasInput() { - return this._alias - } - - // ========= - // SYNTHESIS - // ========= - - protected synthesizeAttributes(): { [name: string]: any } { - return { - auxiliary_tenant_ids: cdktf.listMapper(cdktf.stringToTerraform, false)(this._auxiliaryTenantIds), - client_certificate: cdktf.stringToTerraform(this._clientCertificate), - client_certificate_password: cdktf.stringToTerraform(this._clientCertificatePassword), - client_certificate_path: cdktf.stringToTerraform(this._clientCertificatePath), - client_id: cdktf.stringToTerraform(this._clientId), - client_id_file_path: cdktf.stringToTerraform(this._clientIdFilePath), - client_secret: cdktf.stringToTerraform(this._clientSecret), - client_secret_file_path: cdktf.stringToTerraform(this._clientSecretFilePath), - custom_correlation_request_id: cdktf.stringToTerraform(this._customCorrelationRequestId), - default_location: cdktf.stringToTerraform(this._defaultLocation), - default_name: cdktf.stringToTerraform(this._defaultName), - default_tags: cdktf.hashMapper(cdktf.stringToTerraform)(this._defaultTags), - disable_correlation_request_id: cdktf.booleanToTerraform(this._disableCorrelationRequestId), - disable_default_output: cdktf.booleanToTerraform(this._disableDefaultOutput), - disable_terraform_partner_id: cdktf.booleanToTerraform(this._disableTerraformPartnerId), - enable_preflight: cdktf.booleanToTerraform(this._enablePreflight), - endpoint: cdktf.listMapper(azapiProviderEndpointToTerraform, false)(this._endpoint), - environment: cdktf.stringToTerraform(this._environment), - oidc_azure_service_connection_id: cdktf.stringToTerraform(this._oidcAzureServiceConnectionId), - oidc_request_token: cdktf.stringToTerraform(this._oidcRequestToken), - oidc_request_url: cdktf.stringToTerraform(this._oidcRequestUrl), - oidc_token: cdktf.stringToTerraform(this._oidcToken), - oidc_token_file_path: cdktf.stringToTerraform(this._oidcTokenFilePath), - partner_id: cdktf.stringToTerraform(this._partnerId), - skip_provider_registration: cdktf.booleanToTerraform(this._skipProviderRegistration), - subscription_id: cdktf.stringToTerraform(this._subscriptionId), - tenant_id: cdktf.stringToTerraform(this._tenantId), - use_aks_workload_identity: cdktf.booleanToTerraform(this._useAksWorkloadIdentity), - use_cli: cdktf.booleanToTerraform(this._useCli), - use_msi: cdktf.booleanToTerraform(this._useMsi), - use_oidc: cdktf.booleanToTerraform(this._useOidc), - alias: cdktf.stringToTerraform(this._alias), - } - } - - protected synthesizeHclAttributes(): { [name: string]: any } { - const attrs = { - auxiliary_tenant_ids: { - value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(this._auxiliaryTenantIds), - isBlock: false, - type: 'list', - storageClassType: 'stringList', - }, - client_certificate: { - value: cdktf.stringToHclTerraform(this._clientCertificate), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - client_certificate_password: { - value: cdktf.stringToHclTerraform(this._clientCertificatePassword), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - client_certificate_path: { - value: cdktf.stringToHclTerraform(this._clientCertificatePath), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - client_id: { - value: cdktf.stringToHclTerraform(this._clientId), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - client_id_file_path: { - value: cdktf.stringToHclTerraform(this._clientIdFilePath), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - client_secret: { - value: cdktf.stringToHclTerraform(this._clientSecret), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - client_secret_file_path: { - value: cdktf.stringToHclTerraform(this._clientSecretFilePath), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - custom_correlation_request_id: { - value: cdktf.stringToHclTerraform(this._customCorrelationRequestId), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - default_location: { - value: cdktf.stringToHclTerraform(this._defaultLocation), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - default_name: { - value: cdktf.stringToHclTerraform(this._defaultName), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - default_tags: { - value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(this._defaultTags), - isBlock: false, - type: 'map', - storageClassType: 'stringMap', - }, - disable_correlation_request_id: { - value: cdktf.booleanToHclTerraform(this._disableCorrelationRequestId), - isBlock: false, - type: 'simple', - storageClassType: 'boolean', - }, - disable_default_output: { - value: cdktf.booleanToHclTerraform(this._disableDefaultOutput), - isBlock: false, - type: 'simple', - storageClassType: 'boolean', - }, - disable_terraform_partner_id: { - value: cdktf.booleanToHclTerraform(this._disableTerraformPartnerId), - isBlock: false, - type: 'simple', - storageClassType: 'boolean', - }, - enable_preflight: { - value: cdktf.booleanToHclTerraform(this._enablePreflight), - isBlock: false, - type: 'simple', - storageClassType: 'boolean', - }, - endpoint: { - value: cdktf.listMapperHcl(azapiProviderEndpointToHclTerraform, false)(this._endpoint), - isBlock: true, - type: 'list', - storageClassType: 'AzapiProviderEndpointList', - }, - environment: { - value: cdktf.stringToHclTerraform(this._environment), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - oidc_azure_service_connection_id: { - value: cdktf.stringToHclTerraform(this._oidcAzureServiceConnectionId), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - oidc_request_token: { - value: cdktf.stringToHclTerraform(this._oidcRequestToken), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - oidc_request_url: { - value: cdktf.stringToHclTerraform(this._oidcRequestUrl), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - oidc_token: { - value: cdktf.stringToHclTerraform(this._oidcToken), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - oidc_token_file_path: { - value: cdktf.stringToHclTerraform(this._oidcTokenFilePath), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - partner_id: { - value: cdktf.stringToHclTerraform(this._partnerId), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - skip_provider_registration: { - value: cdktf.booleanToHclTerraform(this._skipProviderRegistration), - isBlock: false, - type: 'simple', - storageClassType: 'boolean', - }, - subscription_id: { - value: cdktf.stringToHclTerraform(this._subscriptionId), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - tenant_id: { - value: cdktf.stringToHclTerraform(this._tenantId), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - use_aks_workload_identity: { - value: cdktf.booleanToHclTerraform(this._useAksWorkloadIdentity), - isBlock: false, - type: 'simple', - storageClassType: 'boolean', - }, - use_cli: { - value: cdktf.booleanToHclTerraform(this._useCli), - isBlock: false, - type: 'simple', - storageClassType: 'boolean', - }, - use_msi: { - value: cdktf.booleanToHclTerraform(this._useMsi), - isBlock: false, - type: 'simple', - storageClassType: 'boolean', - }, - use_oidc: { - value: cdktf.booleanToHclTerraform(this._useOidc), - isBlock: false, - type: 'simple', - storageClassType: 'boolean', - }, - alias: { - value: cdktf.stringToHclTerraform(this._alias), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - } - - // remove undefined attributes - return Object.fromEntries( - Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined) - ) - } -} diff --git a/src/lib/azure/.gen/providers/azapi/resource-action/README.md b/src/lib/azure/.gen/providers/azapi/resource-action/README.md deleted file mode 100644 index 522d7283..00000000 --- a/src/lib/azure/.gen/providers/azapi/resource-action/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# `azapi_resource_action` - -Refer to the Terraform Registry for docs: [`azapi_resource_action`](https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource_action). diff --git a/src/lib/azure/.gen/providers/azapi/resource-action/index.ts b/src/lib/azure/.gen/providers/azapi/resource-action/index.ts deleted file mode 100644 index 02f15c02..00000000 --- a/src/lib/azure/.gen/providers/azapi/resource-action/index.ts +++ /dev/null @@ -1,935 +0,0 @@ -// https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource_action -// generated from terraform resource schema - -import { Construct } from 'constructs' -import * as cdktf from 'cdktf' - -// Configuration - -export interface ResourceActionConfig extends cdktf.TerraformMetaArguments { - /** - * The name of the resource action. It's also possible to make HTTP requests towards the resource ID if leave this field empty. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource_action#action ResourceAction#action} - */ - readonly action?: string - /** - * A dynamic attribute that contains the request body. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource_action#body ResourceAction#body} - */ - readonly body?: { [key: string]: any } - /** - * A map of headers to include in the request - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource_action#headers ResourceAction#headers} - */ - readonly headers?: { [key: string]: string } - /** - * A list of ARM resource IDs which are used to avoid create/modify/delete azapi resources at the same time. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource_action#locks ResourceAction#locks} - */ - readonly locks?: string[] - /** - * Specifies the HTTP method of the azure resource action. Allowed values are `POST`, `PATCH`, `PUT` and `DELETE`. Defaults to `POST`. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource_action#method ResourceAction#method} - */ - readonly method?: string - /** - * A map of query parameters to include in the request - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource_action#query_parameters ResourceAction#query_parameters} - */ - readonly queryParameters?: { [key: string]: string[] } | cdktf.IResolvable - /** - * The ID of an existing Azure source. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource_action#resource_id ResourceAction#resource_id} - */ - readonly resourceId: string - /** - * The attribute can accept either a list or a map. - * - * - **List**: A list of paths that need to be exported from the response body. Setting it to `["*"]` will export the full response body. Here's an example. If it sets to `["properties.loginServer", "properties.policies.quarantinePolicy.status"]`, it will set the following HCL object to the computed property output. - * - * ```text - * { - * properties = { - * loginServer = "registry1.azurecr.io" - * policies = { - * quarantinePolicy = { - * status = "disabled" - * } - * } - * } - * } - * ``` - * - * - **Map**: A map where the key is the name for the result and the value is a JMESPath query string to filter the response. Here's an example. If it sets to `{"login_server": "properties.loginServer", "quarantine_status": "properties.policies.quarantinePolicy.status"}`, it will set the following HCL object to the computed property output. - * - * ```text - * { - * "login_server" = "registry1.azurecr.io" - * "quarantine_status" = "disabled" - * } - * ``` - * - * To learn more about JMESPath, visit [JMESPath](https://jmespath.org/). - * - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource_action#response_export_values ResourceAction#response_export_values} - */ - readonly responseExportValues?: { [key: string]: any } - /** - * The retry block supports the following arguments: - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource_action#retry ResourceAction#retry} - */ - readonly retry?: ResourceActionRetry - /** - * In a format like `@`. `` is the Azure resource type, for example, `Microsoft.Storage/storageAccounts`. `` is version of the API used to manage this azure resource. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource_action#type ResourceAction#type} - */ - readonly type: string - /** - * When to perform the action, value must be one of: `apply`, `destroy`. Default is `apply`. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource_action#when ResourceAction#when} - */ - readonly when?: string - /** - * timeouts block - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource_action#timeouts ResourceAction#timeouts} - */ - readonly timeouts?: ResourceActionTimeouts -} -export interface ResourceActionRetry { - /** - * A list of regular expressions to match against error messages. If any of the regular expressions match, the error is considered retryable. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource_action#error_message_regex ResourceAction#error_message_regex} - */ - readonly errorMessageRegex: string[] - /** - * The base number of seconds to wait between retries. Default is `10`. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource_action#interval_seconds ResourceAction#interval_seconds} - */ - readonly intervalSeconds?: number - /** - * The maximum number of seconds to wait between retries. Default is `180`. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource_action#max_interval_seconds ResourceAction#max_interval_seconds} - */ - readonly maxIntervalSeconds?: number - /** - * The multiplier to apply to the interval between retries. Default is `1.5`. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource_action#multiplier ResourceAction#multiplier} - */ - readonly multiplier?: number - /** - * The randomization factor to apply to the interval between retries. The formula for the randomized interval is: `RetryInterval * (random value in range [1 - RandomizationFactor, 1 + RandomizationFactor])`. Therefore set to zero `0.0` for no randomization. Default is `0.5`. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource_action#randomization_factor ResourceAction#randomization_factor} - */ - readonly randomizationFactor?: number -} - -export function resourceActionRetryToTerraform(struct?: ResourceActionRetry | cdktf.IResolvable): any { - if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { - return struct - } - if (cdktf.isComplexElement(struct)) { - throw new Error( - 'A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration' - ) - } - return { - error_message_regex: cdktf.listMapper(cdktf.stringToTerraform, false)(struct!.errorMessageRegex), - interval_seconds: cdktf.numberToTerraform(struct!.intervalSeconds), - max_interval_seconds: cdktf.numberToTerraform(struct!.maxIntervalSeconds), - multiplier: cdktf.numberToTerraform(struct!.multiplier), - randomization_factor: cdktf.numberToTerraform(struct!.randomizationFactor), - } -} - -export function resourceActionRetryToHclTerraform(struct?: ResourceActionRetry | cdktf.IResolvable): any { - if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { - return struct - } - if (cdktf.isComplexElement(struct)) { - throw new Error( - 'A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration' - ) - } - const attrs = { - error_message_regex: { - value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct!.errorMessageRegex), - isBlock: false, - type: 'list', - storageClassType: 'stringList', - }, - interval_seconds: { - value: cdktf.numberToHclTerraform(struct!.intervalSeconds), - isBlock: false, - type: 'simple', - storageClassType: 'number', - }, - max_interval_seconds: { - value: cdktf.numberToHclTerraform(struct!.maxIntervalSeconds), - isBlock: false, - type: 'simple', - storageClassType: 'number', - }, - multiplier: { - value: cdktf.numberToHclTerraform(struct!.multiplier), - isBlock: false, - type: 'simple', - storageClassType: 'number', - }, - randomization_factor: { - value: cdktf.numberToHclTerraform(struct!.randomizationFactor), - isBlock: false, - type: 'simple', - storageClassType: 'number', - }, - } - - // remove undefined attributes - return Object.fromEntries( - Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined) - ) -} - -export class ResourceActionRetryOutputReference extends cdktf.ComplexObject { - private isEmptyObject = false - private resolvableValue?: cdktf.IResolvable - - /** - * @param terraformResource The parent resource - * @param terraformAttribute The attribute on the parent resource this class is referencing - */ - public constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string) { - super(terraformResource, terraformAttribute, false) - } - - public get internalValue(): ResourceActionRetry | cdktf.IResolvable | undefined { - if (this.resolvableValue) { - return this.resolvableValue - } - let hasAnyValues = this.isEmptyObject - const internalValueResult: any = {} - if (this._errorMessageRegex !== undefined) { - hasAnyValues = true - internalValueResult.errorMessageRegex = this._errorMessageRegex - } - if (this._intervalSeconds !== undefined) { - hasAnyValues = true - internalValueResult.intervalSeconds = this._intervalSeconds - } - if (this._maxIntervalSeconds !== undefined) { - hasAnyValues = true - internalValueResult.maxIntervalSeconds = this._maxIntervalSeconds - } - if (this._multiplier !== undefined) { - hasAnyValues = true - internalValueResult.multiplier = this._multiplier - } - if (this._randomizationFactor !== undefined) { - hasAnyValues = true - internalValueResult.randomizationFactor = this._randomizationFactor - } - return hasAnyValues ? internalValueResult : undefined - } - - public set internalValue(value: ResourceActionRetry | cdktf.IResolvable | undefined) { - if (value === undefined) { - this.isEmptyObject = false - this.resolvableValue = undefined - this._errorMessageRegex = undefined - this._intervalSeconds = undefined - this._maxIntervalSeconds = undefined - this._multiplier = undefined - this._randomizationFactor = undefined - } else if (cdktf.Tokenization.isResolvable(value)) { - this.isEmptyObject = false - this.resolvableValue = value - } else { - this.isEmptyObject = Object.keys(value).length === 0 - this.resolvableValue = undefined - this._errorMessageRegex = value.errorMessageRegex - this._intervalSeconds = value.intervalSeconds - this._maxIntervalSeconds = value.maxIntervalSeconds - this._multiplier = value.multiplier - this._randomizationFactor = value.randomizationFactor - } - } - - // error_message_regex - computed: false, optional: false, required: true - private _errorMessageRegex?: string[] - public get errorMessageRegex() { - return this.getListAttribute('error_message_regex') - } - public set errorMessageRegex(value: string[]) { - this._errorMessageRegex = value - } - // Temporarily expose input value. Use with caution. - public get errorMessageRegexInput() { - return this._errorMessageRegex - } - - // interval_seconds - computed: true, optional: true, required: false - private _intervalSeconds?: number - public get intervalSeconds() { - return this.getNumberAttribute('interval_seconds') - } - public set intervalSeconds(value: number) { - this._intervalSeconds = value - } - public resetIntervalSeconds() { - this._intervalSeconds = undefined - } - // Temporarily expose input value. Use with caution. - public get intervalSecondsInput() { - return this._intervalSeconds - } - - // max_interval_seconds - computed: true, optional: true, required: false - private _maxIntervalSeconds?: number - public get maxIntervalSeconds() { - return this.getNumberAttribute('max_interval_seconds') - } - public set maxIntervalSeconds(value: number) { - this._maxIntervalSeconds = value - } - public resetMaxIntervalSeconds() { - this._maxIntervalSeconds = undefined - } - // Temporarily expose input value. Use with caution. - public get maxIntervalSecondsInput() { - return this._maxIntervalSeconds - } - - // multiplier - computed: true, optional: true, required: false - private _multiplier?: number - public get multiplier() { - return this.getNumberAttribute('multiplier') - } - public set multiplier(value: number) { - this._multiplier = value - } - public resetMultiplier() { - this._multiplier = undefined - } - // Temporarily expose input value. Use with caution. - public get multiplierInput() { - return this._multiplier - } - - // randomization_factor - computed: true, optional: true, required: false - private _randomizationFactor?: number - public get randomizationFactor() { - return this.getNumberAttribute('randomization_factor') - } - public set randomizationFactor(value: number) { - this._randomizationFactor = value - } - public resetRandomizationFactor() { - this._randomizationFactor = undefined - } - // Temporarily expose input value. Use with caution. - public get randomizationFactorInput() { - return this._randomizationFactor - } -} -export interface ResourceActionTimeouts { - /** - * A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource_action#create ResourceAction#create} - */ - readonly create?: string - /** - * A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource_action#delete ResourceAction#delete} - */ - readonly delete?: string - /** - * A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource_action#read ResourceAction#read} - */ - readonly read?: string - /** - * A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource_action#update ResourceAction#update} - */ - readonly update?: string -} - -export function resourceActionTimeoutsToTerraform(struct?: ResourceActionTimeouts | cdktf.IResolvable): any { - if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { - return struct - } - if (cdktf.isComplexElement(struct)) { - throw new Error( - 'A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration' - ) - } - return { - create: cdktf.stringToTerraform(struct!.create), - delete: cdktf.stringToTerraform(struct!.delete), - read: cdktf.stringToTerraform(struct!.read), - update: cdktf.stringToTerraform(struct!.update), - } -} - -export function resourceActionTimeoutsToHclTerraform(struct?: ResourceActionTimeouts | cdktf.IResolvable): any { - if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { - return struct - } - if (cdktf.isComplexElement(struct)) { - throw new Error( - 'A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration' - ) - } - const attrs = { - create: { - value: cdktf.stringToHclTerraform(struct!.create), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - delete: { - value: cdktf.stringToHclTerraform(struct!.delete), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - read: { - value: cdktf.stringToHclTerraform(struct!.read), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - update: { - value: cdktf.stringToHclTerraform(struct!.update), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - } - - // remove undefined attributes - return Object.fromEntries( - Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined) - ) -} - -export class ResourceActionTimeoutsOutputReference extends cdktf.ComplexObject { - private isEmptyObject = false - private resolvableValue?: cdktf.IResolvable - - /** - * @param terraformResource The parent resource - * @param terraformAttribute The attribute on the parent resource this class is referencing - */ - public constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string) { - super(terraformResource, terraformAttribute, false) - } - - public get internalValue(): ResourceActionTimeouts | cdktf.IResolvable | undefined { - if (this.resolvableValue) { - return this.resolvableValue - } - let hasAnyValues = this.isEmptyObject - const internalValueResult: any = {} - if (this._create !== undefined) { - hasAnyValues = true - internalValueResult.create = this._create - } - if (this._delete !== undefined) { - hasAnyValues = true - internalValueResult.delete = this._delete - } - if (this._read !== undefined) { - hasAnyValues = true - internalValueResult.read = this._read - } - if (this._update !== undefined) { - hasAnyValues = true - internalValueResult.update = this._update - } - return hasAnyValues ? internalValueResult : undefined - } - - public set internalValue(value: ResourceActionTimeouts | cdktf.IResolvable | undefined) { - if (value === undefined) { - this.isEmptyObject = false - this.resolvableValue = undefined - this._create = undefined - this._delete = undefined - this._read = undefined - this._update = undefined - } else if (cdktf.Tokenization.isResolvable(value)) { - this.isEmptyObject = false - this.resolvableValue = value - } else { - this.isEmptyObject = Object.keys(value).length === 0 - this.resolvableValue = undefined - this._create = value.create - this._delete = value.delete - this._read = value.read - this._update = value.update - } - } - - // create - computed: false, optional: true, required: false - private _create?: string - public get create() { - return this.getStringAttribute('create') - } - public set create(value: string) { - this._create = value - } - public resetCreate() { - this._create = undefined - } - // Temporarily expose input value. Use with caution. - public get createInput() { - return this._create - } - - // delete - computed: false, optional: true, required: false - private _delete?: string - public get delete() { - return this.getStringAttribute('delete') - } - public set delete(value: string) { - this._delete = value - } - public resetDelete() { - this._delete = undefined - } - // Temporarily expose input value. Use with caution. - public get deleteInput() { - return this._delete - } - - // read - computed: false, optional: true, required: false - private _read?: string - public get read() { - return this.getStringAttribute('read') - } - public set read(value: string) { - this._read = value - } - public resetRead() { - this._read = undefined - } - // Temporarily expose input value. Use with caution. - public get readInput() { - return this._read - } - - // update - computed: false, optional: true, required: false - private _update?: string - public get update() { - return this.getStringAttribute('update') - } - public set update(value: string) { - this._update = value - } - public resetUpdate() { - this._update = undefined - } - // Temporarily expose input value. Use with caution. - public get updateInput() { - return this._update - } -} - -/** - * Represents a {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource_action azapi_resource_action} - */ -export class ResourceAction extends cdktf.TerraformResource { - // ================= - // STATIC PROPERTIES - // ================= - public static readonly tfResourceType = 'azapi_resource_action' - - // ============== - // STATIC Methods - // ============== - /** - * Generates CDKTF code for importing a ResourceAction resource upon running "cdktf plan " - * @param scope The scope in which to define this construct - * @param importToId The construct id used in the generated config for the ResourceAction to import - * @param importFromId The id of the existing ResourceAction that should be imported. Refer to the {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource_action#import import section} in the documentation of this resource for the id to use - * @param provider? Optional instance of the provider where the ResourceAction to import is found - */ - public static generateConfigForImport( - scope: Construct, - importToId: string, - importFromId: string, - provider?: cdktf.TerraformProvider - ) { - return new cdktf.ImportableResource(scope, importToId, { - terraformResourceType: 'azapi_resource_action', - importId: importFromId, - provider, - }) - } - - // =========== - // INITIALIZER - // =========== - - /** - * Create a new {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource_action azapi_resource_action} Resource - * - * @param scope The scope in which to define this construct - * @param id The scoped construct ID. Must be unique amongst siblings in the same scope - * @param options ResourceActionConfig - */ - public constructor(scope: Construct, id: string, config: ResourceActionConfig) { - super(scope, id, { - terraformResourceType: 'azapi_resource_action', - terraformGeneratorMetadata: { - providerName: 'azapi', - providerVersion: '2.2.0', - providerVersionConstraint: '~> 2.2', - }, - provider: config.provider, - dependsOn: config.dependsOn, - count: config.count, - lifecycle: config.lifecycle, - provisioners: config.provisioners, - connection: config.connection, - forEach: config.forEach, - }) - this._action = config.action - this._body = config.body - this._headers = config.headers - this._locks = config.locks - this._method = config.method - this._queryParameters = config.queryParameters - this._resourceId = config.resourceId - this._responseExportValues = config.responseExportValues - this._retry.internalValue = config.retry - this._type = config.type - this._when = config.when - this._timeouts.internalValue = config.timeouts - } - - // ========== - // ATTRIBUTES - // ========== - - // action - computed: false, optional: true, required: false - private _action?: string - public get action() { - return this.getStringAttribute('action') - } - public set action(value: string) { - this._action = value - } - public resetAction() { - this._action = undefined - } - // Temporarily expose input value. Use with caution. - public get actionInput() { - return this._action - } - - // body - computed: false, optional: true, required: false - private _body?: { [key: string]: any } - public get body() { - return this.getAnyMapAttribute('body') - } - public set body(value: { [key: string]: any }) { - this._body = value - } - public resetBody() { - this._body = undefined - } - // Temporarily expose input value. Use with caution. - public get bodyInput() { - return this._body - } - - // headers - computed: false, optional: true, required: false - private _headers?: { [key: string]: string } - public get headers() { - return this.getStringMapAttribute('headers') - } - public set headers(value: { [key: string]: string }) { - this._headers = value - } - public resetHeaders() { - this._headers = undefined - } - // Temporarily expose input value. Use with caution. - public get headersInput() { - return this._headers - } - - // id - computed: true, optional: false, required: false - public get id() { - return this.getStringAttribute('id') - } - - // locks - computed: false, optional: true, required: false - private _locks?: string[] - public get locks() { - return this.getListAttribute('locks') - } - public set locks(value: string[]) { - this._locks = value - } - public resetLocks() { - this._locks = undefined - } - // Temporarily expose input value. Use with caution. - public get locksInput() { - return this._locks - } - - // method - computed: true, optional: true, required: false - private _method?: string - public get method() { - return this.getStringAttribute('method') - } - public set method(value: string) { - this._method = value - } - public resetMethod() { - this._method = undefined - } - // Temporarily expose input value. Use with caution. - public get methodInput() { - return this._method - } - - // output - computed: true, optional: false, required: false - private _output = new cdktf.AnyMap(this, 'output') - public get output() { - return this._output - } - - // query_parameters - computed: false, optional: true, required: false - private _queryParameters?: { [key: string]: string[] } | cdktf.IResolvable - public get queryParameters() { - return this.interpolationForAttribute('query_parameters') - } - public set queryParameters(value: { [key: string]: string[] } | cdktf.IResolvable) { - this._queryParameters = value - } - public resetQueryParameters() { - this._queryParameters = undefined - } - // Temporarily expose input value. Use with caution. - public get queryParametersInput() { - return this._queryParameters - } - - // resource_id - computed: false, optional: false, required: true - private _resourceId?: string - public get resourceId() { - return this.getStringAttribute('resource_id') - } - public set resourceId(value: string) { - this._resourceId = value - } - // Temporarily expose input value. Use with caution. - public get resourceIdInput() { - return this._resourceId - } - - // response_export_values - computed: false, optional: true, required: false - private _responseExportValues?: { [key: string]: any } - public get responseExportValues() { - return this.getAnyMapAttribute('response_export_values') - } - public set responseExportValues(value: { [key: string]: any }) { - this._responseExportValues = value - } - public resetResponseExportValues() { - this._responseExportValues = undefined - } - // Temporarily expose input value. Use with caution. - public get responseExportValuesInput() { - return this._responseExportValues - } - - // retry - computed: false, optional: true, required: false - private _retry = new ResourceActionRetryOutputReference(this, 'retry') - public get retry() { - return this._retry - } - public putRetry(value: ResourceActionRetry) { - this._retry.internalValue = value - } - public resetRetry() { - this._retry.internalValue = undefined - } - // Temporarily expose input value. Use with caution. - public get retryInput() { - return this._retry.internalValue - } - - // type - computed: false, optional: false, required: true - private _type?: string - public get type() { - return this.getStringAttribute('type') - } - public set type(value: string) { - this._type = value - } - // Temporarily expose input value. Use with caution. - public get typeInput() { - return this._type - } - - // when - computed: true, optional: true, required: false - private _when?: string - public get when() { - return this.getStringAttribute('when') - } - public set when(value: string) { - this._when = value - } - public resetWhen() { - this._when = undefined - } - // Temporarily expose input value. Use with caution. - public get whenInput() { - return this._when - } - - // timeouts - computed: false, optional: true, required: false - private _timeouts = new ResourceActionTimeoutsOutputReference(this, 'timeouts') - public get timeouts() { - return this._timeouts - } - public putTimeouts(value: ResourceActionTimeouts) { - this._timeouts.internalValue = value - } - public resetTimeouts() { - this._timeouts.internalValue = undefined - } - // Temporarily expose input value. Use with caution. - public get timeoutsInput() { - return this._timeouts.internalValue - } - - // ========= - // SYNTHESIS - // ========= - - protected synthesizeAttributes(): { [name: string]: any } { - return { - action: cdktf.stringToTerraform(this._action), - body: cdktf.hashMapper(cdktf.anyToTerraform)(this._body), - headers: cdktf.hashMapper(cdktf.stringToTerraform)(this._headers), - locks: cdktf.listMapper(cdktf.stringToTerraform, false)(this._locks), - method: cdktf.stringToTerraform(this._method), - query_parameters: cdktf.hashMapper(cdktf.listMapper(cdktf.stringToTerraform, false))(this._queryParameters), - resource_id: cdktf.stringToTerraform(this._resourceId), - response_export_values: cdktf.hashMapper(cdktf.anyToTerraform)(this._responseExportValues), - retry: resourceActionRetryToTerraform(this._retry.internalValue), - type: cdktf.stringToTerraform(this._type), - when: cdktf.stringToTerraform(this._when), - timeouts: resourceActionTimeoutsToTerraform(this._timeouts.internalValue), - } - } - - protected synthesizeHclAttributes(): { [name: string]: any } { - const attrs = { - action: { - value: cdktf.stringToHclTerraform(this._action), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - body: { - value: cdktf.hashMapperHcl(cdktf.anyToHclTerraform)(this._body), - isBlock: false, - type: 'map', - storageClassType: 'anyMap', - }, - headers: { - value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(this._headers), - isBlock: false, - type: 'map', - storageClassType: 'stringMap', - }, - locks: { - value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(this._locks), - isBlock: false, - type: 'list', - storageClassType: 'stringList', - }, - method: { - value: cdktf.stringToHclTerraform(this._method), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - query_parameters: { - value: cdktf.hashMapperHcl(cdktf.listMapperHcl(cdktf.stringToHclTerraform, false))(this._queryParameters), - isBlock: false, - type: 'map', - storageClassType: 'stringListMap', - }, - resource_id: { - value: cdktf.stringToHclTerraform(this._resourceId), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - response_export_values: { - value: cdktf.hashMapperHcl(cdktf.anyToHclTerraform)(this._responseExportValues), - isBlock: false, - type: 'map', - storageClassType: 'anyMap', - }, - retry: { - value: resourceActionRetryToHclTerraform(this._retry.internalValue), - isBlock: true, - type: 'struct', - storageClassType: 'ResourceActionRetry', - }, - type: { - value: cdktf.stringToHclTerraform(this._type), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - when: { - value: cdktf.stringToHclTerraform(this._when), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - timeouts: { - value: resourceActionTimeoutsToHclTerraform(this._timeouts.internalValue), - isBlock: true, - type: 'struct', - storageClassType: 'ResourceActionTimeouts', - }, - } - - // remove undefined attributes - return Object.fromEntries( - Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined) - ) - } -} diff --git a/src/lib/azure/.gen/providers/azapi/resource/README.md b/src/lib/azure/.gen/providers/azapi/resource/README.md deleted file mode 100644 index 4766188e..00000000 --- a/src/lib/azure/.gen/providers/azapi/resource/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# `azapi_resource` - -Refer to the Terraform Registry for docs: [`azapi_resource`](https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource). diff --git a/src/lib/azure/.gen/providers/azapi/resource/index.ts b/src/lib/azure/.gen/providers/azapi/resource/index.ts deleted file mode 100644 index 13ae66d7..00000000 --- a/src/lib/azure/.gen/providers/azapi/resource/index.ts +++ /dev/null @@ -1,1516 +0,0 @@ -// https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource -// generated from terraform resource schema - -import { Construct } from 'constructs' -import * as cdktf from 'cdktf' - -// Configuration - -export interface ResourceConfig extends cdktf.TerraformMetaArguments { - /** - * A dynamic attribute that contains the request body. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource#body Resource#body} - */ - readonly body?: { [key: string]: any } - /** - * A mapping of headers to be sent with the create request. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource#create_headers Resource#create_headers} - */ - readonly createHeaders?: { [key: string]: string } - /** - * A mapping of query parameters to be sent with the create request. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource#create_query_parameters Resource#create_query_parameters} - */ - readonly createQueryParameters?: { [key: string]: string[] } | cdktf.IResolvable - /** - * A mapping of headers to be sent with the delete request. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource#delete_headers Resource#delete_headers} - */ - readonly deleteHeaders?: { [key: string]: string } - /** - * A mapping of query parameters to be sent with the delete request. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource#delete_query_parameters Resource#delete_query_parameters} - */ - readonly deleteQueryParameters?: { [key: string]: string[] } | cdktf.IResolvable - /** - * Whether ignore the casing of the property names in the response body. Defaults to `false`. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource#ignore_casing Resource#ignore_casing} - */ - readonly ignoreCasing?: boolean | cdktf.IResolvable - /** - * Whether ignore not returned properties like credentials in `body` to suppress plan-diff. Defaults to `true`. It's recommend to enable this option when some sensitive properties are not returned in response body, instead of setting them in `lifecycle.ignore_changes` because it will make the sensitive fields unable to update. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource#ignore_missing_property Resource#ignore_missing_property} - */ - readonly ignoreMissingProperty?: boolean | cdktf.IResolvable - /** - * The location of the Azure resource. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource#location Resource#location} - */ - readonly location?: string - /** - * A list of ARM resource IDs which are used to avoid create/modify/delete azapi resources at the same time. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource#locks Resource#locks} - */ - readonly locks?: string[] - /** - * Specifies the name of the azure resource. Changing this forces a new resource to be created. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource#name Resource#name} - */ - readonly name?: string - /** - * The ID of the azure resource in which this resource is created. It supports different kinds of deployment scope for **top level** resources: - * - * - resource group scope: `parent_id` should be the ID of a resource group, it's recommended to manage a resource group by azurerm_resource_group. - * - management group scope: `parent_id` should be the ID of a management group, it's recommended to manage a management group by azurerm_management_group. - * - extension scope: `parent_id` should be the ID of the resource you're adding the extension to. - * - subscription scope: `parent_id` should be like \x60/subscriptions/00000000-0000-0000-0000-000000000000\x60 - * - tenant scope: `parent_id` should be / - * - * For child level resources, the `parent_id` should be the ID of its parent resource, for example, subnet resource's `parent_id` is the ID of the vnet. - * - * For type `Microsoft.Resources/resourceGroups`, the `parent_id` could be omitted, it defaults to subscription ID specified in provider or the default subscription (You could check the default subscription by azure cli command: `az account show`). - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource#parent_id Resource#parent_id} - */ - readonly parentId?: string - /** - * A mapping of headers to be sent with the read request. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource#read_headers Resource#read_headers} - */ - readonly readHeaders?: { [key: string]: string } - /** - * A mapping of query parameters to be sent with the read request. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource#read_query_parameters Resource#read_query_parameters} - */ - readonly readQueryParameters?: { [key: string]: string[] } | cdktf.IResolvable - /** - * Will trigger a replace of the resource when the value changes and is not `null`. This can be used by practitioners to force a replace of the resource when certain values change, e.g. changing the SKU of a virtual machine based on the value of variables or locals. The value is a `dynamic`, so practitioners can compose the input however they wish. For a "break glass" set the value to `null` to prevent the plan modifier taking effect. - * If you have `null` values that you do want to be tracked as affecting the resource replacement, include these inside an object. - * Advanced use cases are possible and resource replacement can be triggered by values external to the resource, for example when a dependent resource changes. - * - * e.g. to replace a resource when either the SKU or os_type attributes change: - * - * ```hcl - * resource "azapi_resource" "example" { - * name = var.name - * type = "Microsoft.Network/publicIPAddresses@2023-11-01" - * parent_id = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example" - * body = { - * properties = { - * sku = var.sku - * zones = var.zones - * } - * } - * - * replace_triggers_external_values = [ - * var.sku, - * var.zones, - * ] - * } - * ``` - * - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource#replace_triggers_external_values Resource#replace_triggers_external_values} - */ - readonly replaceTriggersExternalValues?: { [key: string]: any } - /** - * A list of paths in the current Terraform configuration. When the values at these paths change, the resource will be replaced. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource#replace_triggers_refs Resource#replace_triggers_refs} - */ - readonly replaceTriggersRefs?: string[] - /** - * The attribute can accept either a list or a map. - * - * - **List**: A list of paths that need to be exported from the response body. Setting it to `["*"]` will export the full response body. Here's an example. If it sets to `["properties.loginServer", "properties.policies.quarantinePolicy.status"]`, it will set the following HCL object to the computed property output. - * - * ```text - * { - * properties = { - * loginServer = "registry1.azurecr.io" - * policies = { - * quarantinePolicy = { - * status = "disabled" - * } - * } - * } - * } - * ``` - * - * - **Map**: A map where the key is the name for the result and the value is a JMESPath query string to filter the response. Here's an example. If it sets to `{"login_server": "properties.loginServer", "quarantine_status": "properties.policies.quarantinePolicy.status"}`, it will set the following HCL object to the computed property output. - * - * ```text - * { - * "login_server" = "registry1.azurecr.io" - * "quarantine_status" = "disabled" - * } - * ``` - * - * To learn more about JMESPath, visit [JMESPath](https://jmespath.org/). - * - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource#response_export_values Resource#response_export_values} - */ - readonly responseExportValues?: { [key: string]: any } - /** - * The retry block supports the following arguments: - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource#retry Resource#retry} - */ - readonly retry?: ResourceRetry - /** - * Whether enabled the validation on `type` and `body` with embedded schema. Defaults to `true`. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource#schema_validation_enabled Resource#schema_validation_enabled} - */ - readonly schemaValidationEnabled?: boolean | cdktf.IResolvable - /** - * A mapping of tags which should be assigned to the Azure resource. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource#tags Resource#tags} - */ - readonly tags?: { [key: string]: string } - /** - * In a format like `@`. `` is the Azure resource type, for example, `Microsoft.Storage/storageAccounts`. `` is version of the API used to manage this azure resource. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource#type Resource#type} - */ - readonly type: string - /** - * A mapping of headers to be sent with the update request. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource#update_headers Resource#update_headers} - */ - readonly updateHeaders?: { [key: string]: string } - /** - * A mapping of query parameters to be sent with the update request. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource#update_query_parameters Resource#update_query_parameters} - */ - readonly updateQueryParameters?: { [key: string]: string[] } | cdktf.IResolvable - /** - * identity block - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource#identity Resource#identity} - */ - readonly identity?: ResourceIdentity[] | cdktf.IResolvable - /** - * timeouts block - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource#timeouts Resource#timeouts} - */ - readonly timeouts?: ResourceTimeouts -} -export interface ResourceRetry { - /** - * A list of regular expressions to match against error messages. If any of the regular expressions match, the error is considered retryable. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource#error_message_regex Resource#error_message_regex} - */ - readonly errorMessageRegex: string[] - /** - * The base number of seconds to wait between retries. Default is `10`. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource#interval_seconds Resource#interval_seconds} - */ - readonly intervalSeconds?: number - /** - * The maximum number of seconds to wait between retries. Default is `180`. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource#max_interval_seconds Resource#max_interval_seconds} - */ - readonly maxIntervalSeconds?: number - /** - * The multiplier to apply to the interval between retries. Default is `1.5`. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource#multiplier Resource#multiplier} - */ - readonly multiplier?: number - /** - * The randomization factor to apply to the interval between retries. The formula for the randomized interval is: `RetryInterval * (random value in range [1 - RandomizationFactor, 1 + RandomizationFactor])`. Therefore set to zero `0.0` for no randomization. Default is `0.5`. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource#randomization_factor Resource#randomization_factor} - */ - readonly randomizationFactor?: number -} - -export function resourceRetryToTerraform(struct?: ResourceRetry | cdktf.IResolvable): any { - if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { - return struct - } - if (cdktf.isComplexElement(struct)) { - throw new Error( - 'A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration' - ) - } - return { - error_message_regex: cdktf.listMapper(cdktf.stringToTerraform, false)(struct!.errorMessageRegex), - interval_seconds: cdktf.numberToTerraform(struct!.intervalSeconds), - max_interval_seconds: cdktf.numberToTerraform(struct!.maxIntervalSeconds), - multiplier: cdktf.numberToTerraform(struct!.multiplier), - randomization_factor: cdktf.numberToTerraform(struct!.randomizationFactor), - } -} - -export function resourceRetryToHclTerraform(struct?: ResourceRetry | cdktf.IResolvable): any { - if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { - return struct - } - if (cdktf.isComplexElement(struct)) { - throw new Error( - 'A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration' - ) - } - const attrs = { - error_message_regex: { - value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct!.errorMessageRegex), - isBlock: false, - type: 'list', - storageClassType: 'stringList', - }, - interval_seconds: { - value: cdktf.numberToHclTerraform(struct!.intervalSeconds), - isBlock: false, - type: 'simple', - storageClassType: 'number', - }, - max_interval_seconds: { - value: cdktf.numberToHclTerraform(struct!.maxIntervalSeconds), - isBlock: false, - type: 'simple', - storageClassType: 'number', - }, - multiplier: { - value: cdktf.numberToHclTerraform(struct!.multiplier), - isBlock: false, - type: 'simple', - storageClassType: 'number', - }, - randomization_factor: { - value: cdktf.numberToHclTerraform(struct!.randomizationFactor), - isBlock: false, - type: 'simple', - storageClassType: 'number', - }, - } - - // remove undefined attributes - return Object.fromEntries( - Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined) - ) -} - -export class ResourceRetryOutputReference extends cdktf.ComplexObject { - private isEmptyObject = false - private resolvableValue?: cdktf.IResolvable - - /** - * @param terraformResource The parent resource - * @param terraformAttribute The attribute on the parent resource this class is referencing - */ - public constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string) { - super(terraformResource, terraformAttribute, false) - } - - public get internalValue(): ResourceRetry | cdktf.IResolvable | undefined { - if (this.resolvableValue) { - return this.resolvableValue - } - let hasAnyValues = this.isEmptyObject - const internalValueResult: any = {} - if (this._errorMessageRegex !== undefined) { - hasAnyValues = true - internalValueResult.errorMessageRegex = this._errorMessageRegex - } - if (this._intervalSeconds !== undefined) { - hasAnyValues = true - internalValueResult.intervalSeconds = this._intervalSeconds - } - if (this._maxIntervalSeconds !== undefined) { - hasAnyValues = true - internalValueResult.maxIntervalSeconds = this._maxIntervalSeconds - } - if (this._multiplier !== undefined) { - hasAnyValues = true - internalValueResult.multiplier = this._multiplier - } - if (this._randomizationFactor !== undefined) { - hasAnyValues = true - internalValueResult.randomizationFactor = this._randomizationFactor - } - return hasAnyValues ? internalValueResult : undefined - } - - public set internalValue(value: ResourceRetry | cdktf.IResolvable | undefined) { - if (value === undefined) { - this.isEmptyObject = false - this.resolvableValue = undefined - this._errorMessageRegex = undefined - this._intervalSeconds = undefined - this._maxIntervalSeconds = undefined - this._multiplier = undefined - this._randomizationFactor = undefined - } else if (cdktf.Tokenization.isResolvable(value)) { - this.isEmptyObject = false - this.resolvableValue = value - } else { - this.isEmptyObject = Object.keys(value).length === 0 - this.resolvableValue = undefined - this._errorMessageRegex = value.errorMessageRegex - this._intervalSeconds = value.intervalSeconds - this._maxIntervalSeconds = value.maxIntervalSeconds - this._multiplier = value.multiplier - this._randomizationFactor = value.randomizationFactor - } - } - - // error_message_regex - computed: false, optional: false, required: true - private _errorMessageRegex?: string[] - public get errorMessageRegex() { - return this.getListAttribute('error_message_regex') - } - public set errorMessageRegex(value: string[]) { - this._errorMessageRegex = value - } - // Temporarily expose input value. Use with caution. - public get errorMessageRegexInput() { - return this._errorMessageRegex - } - - // interval_seconds - computed: true, optional: true, required: false - private _intervalSeconds?: number - public get intervalSeconds() { - return this.getNumberAttribute('interval_seconds') - } - public set intervalSeconds(value: number) { - this._intervalSeconds = value - } - public resetIntervalSeconds() { - this._intervalSeconds = undefined - } - // Temporarily expose input value. Use with caution. - public get intervalSecondsInput() { - return this._intervalSeconds - } - - // max_interval_seconds - computed: true, optional: true, required: false - private _maxIntervalSeconds?: number - public get maxIntervalSeconds() { - return this.getNumberAttribute('max_interval_seconds') - } - public set maxIntervalSeconds(value: number) { - this._maxIntervalSeconds = value - } - public resetMaxIntervalSeconds() { - this._maxIntervalSeconds = undefined - } - // Temporarily expose input value. Use with caution. - public get maxIntervalSecondsInput() { - return this._maxIntervalSeconds - } - - // multiplier - computed: true, optional: true, required: false - private _multiplier?: number - public get multiplier() { - return this.getNumberAttribute('multiplier') - } - public set multiplier(value: number) { - this._multiplier = value - } - public resetMultiplier() { - this._multiplier = undefined - } - // Temporarily expose input value. Use with caution. - public get multiplierInput() { - return this._multiplier - } - - // randomization_factor - computed: true, optional: true, required: false - private _randomizationFactor?: number - public get randomizationFactor() { - return this.getNumberAttribute('randomization_factor') - } - public set randomizationFactor(value: number) { - this._randomizationFactor = value - } - public resetRandomizationFactor() { - this._randomizationFactor = undefined - } - // Temporarily expose input value. Use with caution. - public get randomizationFactorInput() { - return this._randomizationFactor - } -} -export interface ResourceIdentity { - /** - * A list of User Managed Identity ID's which should be assigned to the azure resource. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource#identity_ids Resource#identity_ids} - */ - readonly identityIds?: string[] - /** - * The Type of Identity which should be used for this azure resource. Possible values are `SystemAssigned`, `UserAssigned` and `SystemAssigned,UserAssigned` - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource#type Resource#type} - */ - readonly type: string -} - -export function resourceIdentityToTerraform(struct?: ResourceIdentity | cdktf.IResolvable): any { - if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { - return struct - } - if (cdktf.isComplexElement(struct)) { - throw new Error( - 'A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration' - ) - } - return { - identity_ids: cdktf.listMapper(cdktf.stringToTerraform, false)(struct!.identityIds), - type: cdktf.stringToTerraform(struct!.type), - } -} - -export function resourceIdentityToHclTerraform(struct?: ResourceIdentity | cdktf.IResolvable): any { - if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { - return struct - } - if (cdktf.isComplexElement(struct)) { - throw new Error( - 'A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration' - ) - } - const attrs = { - identity_ids: { - value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct!.identityIds), - isBlock: false, - type: 'list', - storageClassType: 'stringList', - }, - type: { - value: cdktf.stringToHclTerraform(struct!.type), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - } - - // remove undefined attributes - return Object.fromEntries( - Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined) - ) -} - -export class ResourceIdentityOutputReference extends cdktf.ComplexObject { - private isEmptyObject = false - private resolvableValue?: cdktf.IResolvable - - /** - * @param terraformResource The parent resource - * @param terraformAttribute The attribute on the parent resource this class is referencing - * @param complexObjectIndex the index of this item in the list - * @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index) - */ - public constructor( - terraformResource: cdktf.IInterpolatingParent, - terraformAttribute: string, - complexObjectIndex: number, - complexObjectIsFromSet: boolean - ) { - super(terraformResource, terraformAttribute, complexObjectIsFromSet, complexObjectIndex) - } - - public get internalValue(): ResourceIdentity | cdktf.IResolvable | undefined { - if (this.resolvableValue) { - return this.resolvableValue - } - let hasAnyValues = this.isEmptyObject - const internalValueResult: any = {} - if (this._identityIds !== undefined) { - hasAnyValues = true - internalValueResult.identityIds = this._identityIds - } - if (this._type !== undefined) { - hasAnyValues = true - internalValueResult.type = this._type - } - return hasAnyValues ? internalValueResult : undefined - } - - public set internalValue(value: ResourceIdentity | cdktf.IResolvable | undefined) { - if (value === undefined) { - this.isEmptyObject = false - this.resolvableValue = undefined - this._identityIds = undefined - this._type = undefined - } else if (cdktf.Tokenization.isResolvable(value)) { - this.isEmptyObject = false - this.resolvableValue = value - } else { - this.isEmptyObject = Object.keys(value).length === 0 - this.resolvableValue = undefined - this._identityIds = value.identityIds - this._type = value.type - } - } - - // identity_ids - computed: false, optional: true, required: false - private _identityIds?: string[] - public get identityIds() { - return this.getListAttribute('identity_ids') - } - public set identityIds(value: string[]) { - this._identityIds = value - } - public resetIdentityIds() { - this._identityIds = undefined - } - // Temporarily expose input value. Use with caution. - public get identityIdsInput() { - return this._identityIds - } - - // principal_id - computed: true, optional: false, required: false - public get principalId() { - return this.getStringAttribute('principal_id') - } - - // tenant_id - computed: true, optional: false, required: false - public get tenantId() { - return this.getStringAttribute('tenant_id') - } - - // type - computed: false, optional: false, required: true - private _type?: string - public get type() { - return this.getStringAttribute('type') - } - public set type(value: string) { - this._type = value - } - // Temporarily expose input value. Use with caution. - public get typeInput() { - return this._type - } -} - -export class ResourceIdentityList extends cdktf.ComplexList { - public internalValue?: ResourceIdentity[] | cdktf.IResolvable - - /** - * @param terraformResource The parent resource - * @param terraformAttribute The attribute on the parent resource this class is referencing - * @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index) - */ - constructor( - protected terraformResource: cdktf.IInterpolatingParent, - protected terraformAttribute: string, - protected wrapsSet: boolean - ) { - super(terraformResource, terraformAttribute, wrapsSet) - } - - /** - * @param index the index of the item to return - */ - public get(index: number): ResourceIdentityOutputReference { - return new ResourceIdentityOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet) - } -} -export interface ResourceTimeouts { - /** - * A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource#create Resource#create} - */ - readonly create?: string - /** - * A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource#delete Resource#delete} - */ - readonly delete?: string - /** - * A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource#read Resource#read} - */ - readonly read?: string - /** - * A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource#update Resource#update} - */ - readonly update?: string -} - -export function resourceTimeoutsToTerraform(struct?: ResourceTimeouts | cdktf.IResolvable): any { - if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { - return struct - } - if (cdktf.isComplexElement(struct)) { - throw new Error( - 'A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration' - ) - } - return { - create: cdktf.stringToTerraform(struct!.create), - delete: cdktf.stringToTerraform(struct!.delete), - read: cdktf.stringToTerraform(struct!.read), - update: cdktf.stringToTerraform(struct!.update), - } -} - -export function resourceTimeoutsToHclTerraform(struct?: ResourceTimeouts | cdktf.IResolvable): any { - if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { - return struct - } - if (cdktf.isComplexElement(struct)) { - throw new Error( - 'A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration' - ) - } - const attrs = { - create: { - value: cdktf.stringToHclTerraform(struct!.create), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - delete: { - value: cdktf.stringToHclTerraform(struct!.delete), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - read: { - value: cdktf.stringToHclTerraform(struct!.read), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - update: { - value: cdktf.stringToHclTerraform(struct!.update), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - } - - // remove undefined attributes - return Object.fromEntries( - Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined) - ) -} - -export class ResourceTimeoutsOutputReference extends cdktf.ComplexObject { - private isEmptyObject = false - private resolvableValue?: cdktf.IResolvable - - /** - * @param terraformResource The parent resource - * @param terraformAttribute The attribute on the parent resource this class is referencing - */ - public constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string) { - super(terraformResource, terraformAttribute, false) - } - - public get internalValue(): ResourceTimeouts | cdktf.IResolvable | undefined { - if (this.resolvableValue) { - return this.resolvableValue - } - let hasAnyValues = this.isEmptyObject - const internalValueResult: any = {} - if (this._create !== undefined) { - hasAnyValues = true - internalValueResult.create = this._create - } - if (this._delete !== undefined) { - hasAnyValues = true - internalValueResult.delete = this._delete - } - if (this._read !== undefined) { - hasAnyValues = true - internalValueResult.read = this._read - } - if (this._update !== undefined) { - hasAnyValues = true - internalValueResult.update = this._update - } - return hasAnyValues ? internalValueResult : undefined - } - - public set internalValue(value: ResourceTimeouts | cdktf.IResolvable | undefined) { - if (value === undefined) { - this.isEmptyObject = false - this.resolvableValue = undefined - this._create = undefined - this._delete = undefined - this._read = undefined - this._update = undefined - } else if (cdktf.Tokenization.isResolvable(value)) { - this.isEmptyObject = false - this.resolvableValue = value - } else { - this.isEmptyObject = Object.keys(value).length === 0 - this.resolvableValue = undefined - this._create = value.create - this._delete = value.delete - this._read = value.read - this._update = value.update - } - } - - // create - computed: false, optional: true, required: false - private _create?: string - public get create() { - return this.getStringAttribute('create') - } - public set create(value: string) { - this._create = value - } - public resetCreate() { - this._create = undefined - } - // Temporarily expose input value. Use with caution. - public get createInput() { - return this._create - } - - // delete - computed: false, optional: true, required: false - private _delete?: string - public get delete() { - return this.getStringAttribute('delete') - } - public set delete(value: string) { - this._delete = value - } - public resetDelete() { - this._delete = undefined - } - // Temporarily expose input value. Use with caution. - public get deleteInput() { - return this._delete - } - - // read - computed: false, optional: true, required: false - private _read?: string - public get read() { - return this.getStringAttribute('read') - } - public set read(value: string) { - this._read = value - } - public resetRead() { - this._read = undefined - } - // Temporarily expose input value. Use with caution. - public get readInput() { - return this._read - } - - // update - computed: false, optional: true, required: false - private _update?: string - public get update() { - return this.getStringAttribute('update') - } - public set update(value: string) { - this._update = value - } - public resetUpdate() { - this._update = undefined - } - // Temporarily expose input value. Use with caution. - public get updateInput() { - return this._update - } -} - -/** - * Represents a {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource azapi_resource} - */ -export class Resource extends cdktf.TerraformResource { - // ================= - // STATIC PROPERTIES - // ================= - public static readonly tfResourceType = 'azapi_resource' - - // ============== - // STATIC Methods - // ============== - /** - * Generates CDKTF code for importing a Resource resource upon running "cdktf plan " - * @param scope The scope in which to define this construct - * @param importToId The construct id used in the generated config for the Resource to import - * @param importFromId The id of the existing Resource that should be imported. Refer to the {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource#import import section} in the documentation of this resource for the id to use - * @param provider? Optional instance of the provider where the Resource to import is found - */ - public static generateConfigForImport( - scope: Construct, - importToId: string, - importFromId: string, - provider?: cdktf.TerraformProvider - ) { - return new cdktf.ImportableResource(scope, importToId, { - terraformResourceType: 'azapi_resource', - importId: importFromId, - provider, - }) - } - - // =========== - // INITIALIZER - // =========== - - /** - * Create a new {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/resource azapi_resource} Resource - * - * @param scope The scope in which to define this construct - * @param id The scoped construct ID. Must be unique amongst siblings in the same scope - * @param options ResourceConfig - */ - public constructor(scope: Construct, id: string, config: ResourceConfig) { - super(scope, id, { - terraformResourceType: 'azapi_resource', - terraformGeneratorMetadata: { - providerName: 'azapi', - providerVersion: '2.2.0', - providerVersionConstraint: '~> 2.2', - }, - provider: config.provider, - dependsOn: config.dependsOn, - count: config.count, - lifecycle: config.lifecycle, - provisioners: config.provisioners, - connection: config.connection, - forEach: config.forEach, - }) - this._body = config.body - this._createHeaders = config.createHeaders - this._createQueryParameters = config.createQueryParameters - this._deleteHeaders = config.deleteHeaders - this._deleteQueryParameters = config.deleteQueryParameters - this._ignoreCasing = config.ignoreCasing - this._ignoreMissingProperty = config.ignoreMissingProperty - this._location = config.location - this._locks = config.locks - this._name = config.name - this._parentId = config.parentId - this._readHeaders = config.readHeaders - this._readQueryParameters = config.readQueryParameters - this._replaceTriggersExternalValues = config.replaceTriggersExternalValues - this._replaceTriggersRefs = config.replaceTriggersRefs - this._responseExportValues = config.responseExportValues - this._retry.internalValue = config.retry - this._schemaValidationEnabled = config.schemaValidationEnabled - this._tags = config.tags - this._type = config.type - this._updateHeaders = config.updateHeaders - this._updateQueryParameters = config.updateQueryParameters - this._identity.internalValue = config.identity - this._timeouts.internalValue = config.timeouts - } - - // ========== - // ATTRIBUTES - // ========== - - // body - computed: true, optional: true, required: false - private _body?: { [key: string]: any } - public get body() { - return this.getAnyMapAttribute('body') - } - public set body(value: { [key: string]: any }) { - this._body = value - } - public resetBody() { - this._body = undefined - } - // Temporarily expose input value. Use with caution. - public get bodyInput() { - return this._body - } - - // create_headers - computed: false, optional: true, required: false - private _createHeaders?: { [key: string]: string } - public get createHeaders() { - return this.getStringMapAttribute('create_headers') - } - public set createHeaders(value: { [key: string]: string }) { - this._createHeaders = value - } - public resetCreateHeaders() { - this._createHeaders = undefined - } - // Temporarily expose input value. Use with caution. - public get createHeadersInput() { - return this._createHeaders - } - - // create_query_parameters - computed: false, optional: true, required: false - private _createQueryParameters?: { [key: string]: string[] } | cdktf.IResolvable - public get createQueryParameters() { - return this.interpolationForAttribute('create_query_parameters') - } - public set createQueryParameters(value: { [key: string]: string[] } | cdktf.IResolvable) { - this._createQueryParameters = value - } - public resetCreateQueryParameters() { - this._createQueryParameters = undefined - } - // Temporarily expose input value. Use with caution. - public get createQueryParametersInput() { - return this._createQueryParameters - } - - // delete_headers - computed: false, optional: true, required: false - private _deleteHeaders?: { [key: string]: string } - public get deleteHeaders() { - return this.getStringMapAttribute('delete_headers') - } - public set deleteHeaders(value: { [key: string]: string }) { - this._deleteHeaders = value - } - public resetDeleteHeaders() { - this._deleteHeaders = undefined - } - // Temporarily expose input value. Use with caution. - public get deleteHeadersInput() { - return this._deleteHeaders - } - - // delete_query_parameters - computed: false, optional: true, required: false - private _deleteQueryParameters?: { [key: string]: string[] } | cdktf.IResolvable - public get deleteQueryParameters() { - return this.interpolationForAttribute('delete_query_parameters') - } - public set deleteQueryParameters(value: { [key: string]: string[] } | cdktf.IResolvable) { - this._deleteQueryParameters = value - } - public resetDeleteQueryParameters() { - this._deleteQueryParameters = undefined - } - // Temporarily expose input value. Use with caution. - public get deleteQueryParametersInput() { - return this._deleteQueryParameters - } - - // id - computed: true, optional: false, required: false - public get id() { - return this.getStringAttribute('id') - } - - // ignore_casing - computed: true, optional: true, required: false - private _ignoreCasing?: boolean | cdktf.IResolvable - public get ignoreCasing() { - return this.getBooleanAttribute('ignore_casing') - } - public set ignoreCasing(value: boolean | cdktf.IResolvable) { - this._ignoreCasing = value - } - public resetIgnoreCasing() { - this._ignoreCasing = undefined - } - // Temporarily expose input value. Use with caution. - public get ignoreCasingInput() { - return this._ignoreCasing - } - - // ignore_missing_property - computed: true, optional: true, required: false - private _ignoreMissingProperty?: boolean | cdktf.IResolvable - public get ignoreMissingProperty() { - return this.getBooleanAttribute('ignore_missing_property') - } - public set ignoreMissingProperty(value: boolean | cdktf.IResolvable) { - this._ignoreMissingProperty = value - } - public resetIgnoreMissingProperty() { - this._ignoreMissingProperty = undefined - } - // Temporarily expose input value. Use with caution. - public get ignoreMissingPropertyInput() { - return this._ignoreMissingProperty - } - - // location - computed: true, optional: true, required: false - private _location?: string - public get location() { - return this.getStringAttribute('location') - } - public set location(value: string) { - this._location = value - } - public resetLocation() { - this._location = undefined - } - // Temporarily expose input value. Use with caution. - public get locationInput() { - return this._location - } - - // locks - computed: false, optional: true, required: false - private _locks?: string[] - public get locks() { - return this.getListAttribute('locks') - } - public set locks(value: string[]) { - this._locks = value - } - public resetLocks() { - this._locks = undefined - } - // Temporarily expose input value. Use with caution. - public get locksInput() { - return this._locks - } - - // name - computed: true, optional: true, required: false - private _name?: string - public get name() { - return this.getStringAttribute('name') - } - public set name(value: string) { - this._name = value - } - public resetName() { - this._name = undefined - } - // Temporarily expose input value. Use with caution. - public get nameInput() { - return this._name - } - - // output - computed: true, optional: false, required: false - private _output = new cdktf.AnyMap(this, 'output') - public get output() { - return this._output - } - - // parent_id - computed: true, optional: true, required: false - private _parentId?: string - public get parentId() { - return this.getStringAttribute('parent_id') - } - public set parentId(value: string) { - this._parentId = value - } - public resetParentId() { - this._parentId = undefined - } - // Temporarily expose input value. Use with caution. - public get parentIdInput() { - return this._parentId - } - - // read_headers - computed: false, optional: true, required: false - private _readHeaders?: { [key: string]: string } - public get readHeaders() { - return this.getStringMapAttribute('read_headers') - } - public set readHeaders(value: { [key: string]: string }) { - this._readHeaders = value - } - public resetReadHeaders() { - this._readHeaders = undefined - } - // Temporarily expose input value. Use with caution. - public get readHeadersInput() { - return this._readHeaders - } - - // read_query_parameters - computed: false, optional: true, required: false - private _readQueryParameters?: { [key: string]: string[] } | cdktf.IResolvable - public get readQueryParameters() { - return this.interpolationForAttribute('read_query_parameters') - } - public set readQueryParameters(value: { [key: string]: string[] } | cdktf.IResolvable) { - this._readQueryParameters = value - } - public resetReadQueryParameters() { - this._readQueryParameters = undefined - } - // Temporarily expose input value. Use with caution. - public get readQueryParametersInput() { - return this._readQueryParameters - } - - // replace_triggers_external_values - computed: false, optional: true, required: false - private _replaceTriggersExternalValues?: { [key: string]: any } - public get replaceTriggersExternalValues() { - return this.getAnyMapAttribute('replace_triggers_external_values') - } - public set replaceTriggersExternalValues(value: { [key: string]: any }) { - this._replaceTriggersExternalValues = value - } - public resetReplaceTriggersExternalValues() { - this._replaceTriggersExternalValues = undefined - } - // Temporarily expose input value. Use with caution. - public get replaceTriggersExternalValuesInput() { - return this._replaceTriggersExternalValues - } - - // replace_triggers_refs - computed: false, optional: true, required: false - private _replaceTriggersRefs?: string[] - public get replaceTriggersRefs() { - return this.getListAttribute('replace_triggers_refs') - } - public set replaceTriggersRefs(value: string[]) { - this._replaceTriggersRefs = value - } - public resetReplaceTriggersRefs() { - this._replaceTriggersRefs = undefined - } - // Temporarily expose input value. Use with caution. - public get replaceTriggersRefsInput() { - return this._replaceTriggersRefs - } - - // response_export_values - computed: false, optional: true, required: false - private _responseExportValues?: { [key: string]: any } - public get responseExportValues() { - return this.getAnyMapAttribute('response_export_values') - } - public set responseExportValues(value: { [key: string]: any }) { - this._responseExportValues = value - } - public resetResponseExportValues() { - this._responseExportValues = undefined - } - // Temporarily expose input value. Use with caution. - public get responseExportValuesInput() { - return this._responseExportValues - } - - // retry - computed: false, optional: true, required: false - private _retry = new ResourceRetryOutputReference(this, 'retry') - public get retry() { - return this._retry - } - public putRetry(value: ResourceRetry) { - this._retry.internalValue = value - } - public resetRetry() { - this._retry.internalValue = undefined - } - // Temporarily expose input value. Use with caution. - public get retryInput() { - return this._retry.internalValue - } - - // schema_validation_enabled - computed: true, optional: true, required: false - private _schemaValidationEnabled?: boolean | cdktf.IResolvable - public get schemaValidationEnabled() { - return this.getBooleanAttribute('schema_validation_enabled') - } - public set schemaValidationEnabled(value: boolean | cdktf.IResolvable) { - this._schemaValidationEnabled = value - } - public resetSchemaValidationEnabled() { - this._schemaValidationEnabled = undefined - } - // Temporarily expose input value. Use with caution. - public get schemaValidationEnabledInput() { - return this._schemaValidationEnabled - } - - // tags - computed: true, optional: true, required: false - private _tags?: { [key: string]: string } - public get tags() { - return this.getStringMapAttribute('tags') - } - public set tags(value: { [key: string]: string }) { - this._tags = value - } - public resetTags() { - this._tags = undefined - } - // Temporarily expose input value. Use with caution. - public get tagsInput() { - return this._tags - } - - // type - computed: false, optional: false, required: true - private _type?: string - public get type() { - return this.getStringAttribute('type') - } - public set type(value: string) { - this._type = value - } - // Temporarily expose input value. Use with caution. - public get typeInput() { - return this._type - } - - // update_headers - computed: false, optional: true, required: false - private _updateHeaders?: { [key: string]: string } - public get updateHeaders() { - return this.getStringMapAttribute('update_headers') - } - public set updateHeaders(value: { [key: string]: string }) { - this._updateHeaders = value - } - public resetUpdateHeaders() { - this._updateHeaders = undefined - } - // Temporarily expose input value. Use with caution. - public get updateHeadersInput() { - return this._updateHeaders - } - - // update_query_parameters - computed: false, optional: true, required: false - private _updateQueryParameters?: { [key: string]: string[] } | cdktf.IResolvable - public get updateQueryParameters() { - return this.interpolationForAttribute('update_query_parameters') - } - public set updateQueryParameters(value: { [key: string]: string[] } | cdktf.IResolvable) { - this._updateQueryParameters = value - } - public resetUpdateQueryParameters() { - this._updateQueryParameters = undefined - } - // Temporarily expose input value. Use with caution. - public get updateQueryParametersInput() { - return this._updateQueryParameters - } - - // identity - computed: false, optional: true, required: false - private _identity = new ResourceIdentityList(this, 'identity', false) - public get identity() { - return this._identity - } - public putIdentity(value: ResourceIdentity[] | cdktf.IResolvable) { - this._identity.internalValue = value - } - public resetIdentity() { - this._identity.internalValue = undefined - } - // Temporarily expose input value. Use with caution. - public get identityInput() { - return this._identity.internalValue - } - - // timeouts - computed: false, optional: true, required: false - private _timeouts = new ResourceTimeoutsOutputReference(this, 'timeouts') - public get timeouts() { - return this._timeouts - } - public putTimeouts(value: ResourceTimeouts) { - this._timeouts.internalValue = value - } - public resetTimeouts() { - this._timeouts.internalValue = undefined - } - // Temporarily expose input value. Use with caution. - public get timeoutsInput() { - return this._timeouts.internalValue - } - - // ========= - // SYNTHESIS - // ========= - - protected synthesizeAttributes(): { [name: string]: any } { - return { - body: cdktf.hashMapper(cdktf.anyToTerraform)(this._body), - create_headers: cdktf.hashMapper(cdktf.stringToTerraform)(this._createHeaders), - create_query_parameters: cdktf.hashMapper(cdktf.listMapper(cdktf.stringToTerraform, false))( - this._createQueryParameters - ), - delete_headers: cdktf.hashMapper(cdktf.stringToTerraform)(this._deleteHeaders), - delete_query_parameters: cdktf.hashMapper(cdktf.listMapper(cdktf.stringToTerraform, false))( - this._deleteQueryParameters - ), - ignore_casing: cdktf.booleanToTerraform(this._ignoreCasing), - ignore_missing_property: cdktf.booleanToTerraform(this._ignoreMissingProperty), - location: cdktf.stringToTerraform(this._location), - locks: cdktf.listMapper(cdktf.stringToTerraform, false)(this._locks), - name: cdktf.stringToTerraform(this._name), - parent_id: cdktf.stringToTerraform(this._parentId), - read_headers: cdktf.hashMapper(cdktf.stringToTerraform)(this._readHeaders), - read_query_parameters: cdktf.hashMapper(cdktf.listMapper(cdktf.stringToTerraform, false))( - this._readQueryParameters - ), - replace_triggers_external_values: cdktf.hashMapper(cdktf.anyToTerraform)(this._replaceTriggersExternalValues), - replace_triggers_refs: cdktf.listMapper(cdktf.stringToTerraform, false)(this._replaceTriggersRefs), - response_export_values: cdktf.hashMapper(cdktf.anyToTerraform)(this._responseExportValues), - retry: resourceRetryToTerraform(this._retry.internalValue), - schema_validation_enabled: cdktf.booleanToTerraform(this._schemaValidationEnabled), - tags: cdktf.hashMapper(cdktf.stringToTerraform)(this._tags), - type: cdktf.stringToTerraform(this._type), - update_headers: cdktf.hashMapper(cdktf.stringToTerraform)(this._updateHeaders), - update_query_parameters: cdktf.hashMapper(cdktf.listMapper(cdktf.stringToTerraform, false))( - this._updateQueryParameters - ), - identity: cdktf.listMapper(resourceIdentityToTerraform, true)(this._identity.internalValue), - timeouts: resourceTimeoutsToTerraform(this._timeouts.internalValue), - } - } - - protected synthesizeHclAttributes(): { [name: string]: any } { - const attrs = { - body: { - value: cdktf.hashMapperHcl(cdktf.anyToHclTerraform)(this._body), - isBlock: false, - type: 'map', - storageClassType: 'anyMap', - }, - create_headers: { - value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(this._createHeaders), - isBlock: false, - type: 'map', - storageClassType: 'stringMap', - }, - create_query_parameters: { - value: cdktf.hashMapperHcl(cdktf.listMapperHcl(cdktf.stringToHclTerraform, false))(this._createQueryParameters), - isBlock: false, - type: 'map', - storageClassType: 'stringListMap', - }, - delete_headers: { - value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(this._deleteHeaders), - isBlock: false, - type: 'map', - storageClassType: 'stringMap', - }, - delete_query_parameters: { - value: cdktf.hashMapperHcl(cdktf.listMapperHcl(cdktf.stringToHclTerraform, false))(this._deleteQueryParameters), - isBlock: false, - type: 'map', - storageClassType: 'stringListMap', - }, - ignore_casing: { - value: cdktf.booleanToHclTerraform(this._ignoreCasing), - isBlock: false, - type: 'simple', - storageClassType: 'boolean', - }, - ignore_missing_property: { - value: cdktf.booleanToHclTerraform(this._ignoreMissingProperty), - isBlock: false, - type: 'simple', - storageClassType: 'boolean', - }, - location: { - value: cdktf.stringToHclTerraform(this._location), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - locks: { - value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(this._locks), - isBlock: false, - type: 'list', - storageClassType: 'stringList', - }, - name: { - value: cdktf.stringToHclTerraform(this._name), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - parent_id: { - value: cdktf.stringToHclTerraform(this._parentId), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - read_headers: { - value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(this._readHeaders), - isBlock: false, - type: 'map', - storageClassType: 'stringMap', - }, - read_query_parameters: { - value: cdktf.hashMapperHcl(cdktf.listMapperHcl(cdktf.stringToHclTerraform, false))(this._readQueryParameters), - isBlock: false, - type: 'map', - storageClassType: 'stringListMap', - }, - replace_triggers_external_values: { - value: cdktf.hashMapperHcl(cdktf.anyToHclTerraform)(this._replaceTriggersExternalValues), - isBlock: false, - type: 'map', - storageClassType: 'anyMap', - }, - replace_triggers_refs: { - value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(this._replaceTriggersRefs), - isBlock: false, - type: 'list', - storageClassType: 'stringList', - }, - response_export_values: { - value: cdktf.hashMapperHcl(cdktf.anyToHclTerraform)(this._responseExportValues), - isBlock: false, - type: 'map', - storageClassType: 'anyMap', - }, - retry: { - value: resourceRetryToHclTerraform(this._retry.internalValue), - isBlock: true, - type: 'struct', - storageClassType: 'ResourceRetry', - }, - schema_validation_enabled: { - value: cdktf.booleanToHclTerraform(this._schemaValidationEnabled), - isBlock: false, - type: 'simple', - storageClassType: 'boolean', - }, - tags: { - value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(this._tags), - isBlock: false, - type: 'map', - storageClassType: 'stringMap', - }, - type: { - value: cdktf.stringToHclTerraform(this._type), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - update_headers: { - value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(this._updateHeaders), - isBlock: false, - type: 'map', - storageClassType: 'stringMap', - }, - update_query_parameters: { - value: cdktf.hashMapperHcl(cdktf.listMapperHcl(cdktf.stringToHclTerraform, false))(this._updateQueryParameters), - isBlock: false, - type: 'map', - storageClassType: 'stringListMap', - }, - identity: { - value: cdktf.listMapperHcl(resourceIdentityToHclTerraform, true)(this._identity.internalValue), - isBlock: true, - type: 'list', - storageClassType: 'ResourceIdentityList', - }, - timeouts: { - value: resourceTimeoutsToHclTerraform(this._timeouts.internalValue), - isBlock: true, - type: 'struct', - storageClassType: 'ResourceTimeouts', - }, - } - - // remove undefined attributes - return Object.fromEntries( - Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined) - ) - } -} diff --git a/src/lib/azure/.gen/providers/azapi/update-resource/README.md b/src/lib/azure/.gen/providers/azapi/update-resource/README.md deleted file mode 100644 index f78015d5..00000000 --- a/src/lib/azure/.gen/providers/azapi/update-resource/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# `azapi_update_resource` - -Refer to the Terraform Registry for docs: [`azapi_update_resource`](https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/update_resource). diff --git a/src/lib/azure/.gen/providers/azapi/update-resource/index.ts b/src/lib/azure/.gen/providers/azapi/update-resource/index.ts deleted file mode 100644 index cc8bd256..00000000 --- a/src/lib/azure/.gen/providers/azapi/update-resource/index.ts +++ /dev/null @@ -1,1042 +0,0 @@ -// https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/update_resource -// generated from terraform resource schema - -import { Construct } from 'constructs' -import * as cdktf from 'cdktf' - -// Configuration - -export interface UpdateResourceConfig extends cdktf.TerraformMetaArguments { - /** - * A dynamic attribute that contains the request body. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/update_resource#body UpdateResource#body} - */ - readonly body?: { [key: string]: any } - /** - * Whether ignore the casing of the property names in the response body. Defaults to `false`. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/update_resource#ignore_casing UpdateResource#ignore_casing} - */ - readonly ignoreCasing?: boolean | cdktf.IResolvable - /** - * Whether ignore not returned properties like credentials in `body` to suppress plan-diff. Defaults to `true`. It's recommend to enable this option when some sensitive properties are not returned in response body, instead of setting them in `lifecycle.ignore_changes` because it will make the sensitive fields unable to update. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/update_resource#ignore_missing_property UpdateResource#ignore_missing_property} - */ - readonly ignoreMissingProperty?: boolean | cdktf.IResolvable - /** - * A list of ARM resource IDs which are used to avoid create/modify/delete azapi resources at the same time. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/update_resource#locks UpdateResource#locks} - */ - readonly locks?: string[] - /** - * Specifies the name of the Azure resource. Changing this forces a new resource to be created. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/update_resource#name UpdateResource#name} - */ - readonly name?: string - /** - * The ID of the azure resource in which this resource is created. It supports different kinds of deployment scope for **top level** resources: - * - * - resource group scope: `parent_id` should be the ID of a resource group, it's recommended to manage a resource group by azurerm_resource_group. - * - management group scope: `parent_id` should be the ID of a management group, it's recommended to manage a management group by azurerm_management_group. - * - extension scope: `parent_id` should be the ID of the resource you're adding the extension to. - * - subscription scope: `parent_id` should be like \x60/subscriptions/00000000-0000-0000-0000-000000000000\x60 - * - tenant scope: `parent_id` should be / - * - * For child level resources, the `parent_id` should be the ID of its parent resource, for example, subnet resource's `parent_id` is the ID of the vnet. - * - * For type `Microsoft.Resources/resourceGroups`, the `parent_id` could be omitted, it defaults to subscription ID specified in provider or the default subscription (You could check the default subscription by azure cli command: `az account show`). - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/update_resource#parent_id UpdateResource#parent_id} - */ - readonly parentId?: string - /** - * A mapping of headers to be sent with the read request. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/update_resource#read_headers UpdateResource#read_headers} - */ - readonly readHeaders?: { [key: string]: string } - /** - * A mapping of query parameters to be sent with the read request. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/update_resource#read_query_parameters UpdateResource#read_query_parameters} - */ - readonly readQueryParameters?: { [key: string]: string[] } | cdktf.IResolvable - /** - * The ID of an existing Azure source. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/update_resource#resource_id UpdateResource#resource_id} - */ - readonly resourceId?: string - /** - * The attribute can accept either a list or a map. - * - * - **List**: A list of paths that need to be exported from the response body. Setting it to `["*"]` will export the full response body. Here's an example. If it sets to `["properties.loginServer", "properties.policies.quarantinePolicy.status"]`, it will set the following HCL object to the computed property output. - * - * ```text - * { - * properties = { - * loginServer = "registry1.azurecr.io" - * policies = { - * quarantinePolicy = { - * status = "disabled" - * } - * } - * } - * } - * ``` - * - * - **Map**: A map where the key is the name for the result and the value is a JMESPath query string to filter the response. Here's an example. If it sets to `{"login_server": "properties.loginServer", "quarantine_status": "properties.policies.quarantinePolicy.status"}`, it will set the following HCL object to the computed property output. - * - * ```text - * { - * "login_server" = "registry1.azurecr.io" - * "quarantine_status" = "disabled" - * } - * ``` - * - * To learn more about JMESPath, visit [JMESPath](https://jmespath.org/). - * - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/update_resource#response_export_values UpdateResource#response_export_values} - */ - readonly responseExportValues?: { [key: string]: any } - /** - * The retry block supports the following arguments: - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/update_resource#retry UpdateResource#retry} - */ - readonly retry?: UpdateResourceRetry - /** - * In a format like `@`. `` is the Azure resource type, for example, `Microsoft.Storage/storageAccounts`. `` is version of the API used to manage this azure resource. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/update_resource#type UpdateResource#type} - */ - readonly type: string - /** - * A mapping of headers to be sent with the update request. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/update_resource#update_headers UpdateResource#update_headers} - */ - readonly updateHeaders?: { [key: string]: string } - /** - * A mapping of query parameters to be sent with the update request. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/update_resource#update_query_parameters UpdateResource#update_query_parameters} - */ - readonly updateQueryParameters?: { [key: string]: string[] } | cdktf.IResolvable - /** - * timeouts block - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/update_resource#timeouts UpdateResource#timeouts} - */ - readonly timeouts?: UpdateResourceTimeouts -} -export interface UpdateResourceRetry { - /** - * A list of regular expressions to match against error messages. If any of the regular expressions match, the error is considered retryable. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/update_resource#error_message_regex UpdateResource#error_message_regex} - */ - readonly errorMessageRegex: string[] - /** - * The base number of seconds to wait between retries. Default is `10`. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/update_resource#interval_seconds UpdateResource#interval_seconds} - */ - readonly intervalSeconds?: number - /** - * The maximum number of seconds to wait between retries. Default is `180`. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/update_resource#max_interval_seconds UpdateResource#max_interval_seconds} - */ - readonly maxIntervalSeconds?: number - /** - * The multiplier to apply to the interval between retries. Default is `1.5`. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/update_resource#multiplier UpdateResource#multiplier} - */ - readonly multiplier?: number - /** - * The randomization factor to apply to the interval between retries. The formula for the randomized interval is: `RetryInterval * (random value in range [1 - RandomizationFactor, 1 + RandomizationFactor])`. Therefore set to zero `0.0` for no randomization. Default is `0.5`. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/update_resource#randomization_factor UpdateResource#randomization_factor} - */ - readonly randomizationFactor?: number -} - -export function updateResourceRetryToTerraform(struct?: UpdateResourceRetry | cdktf.IResolvable): any { - if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { - return struct - } - if (cdktf.isComplexElement(struct)) { - throw new Error( - 'A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration' - ) - } - return { - error_message_regex: cdktf.listMapper(cdktf.stringToTerraform, false)(struct!.errorMessageRegex), - interval_seconds: cdktf.numberToTerraform(struct!.intervalSeconds), - max_interval_seconds: cdktf.numberToTerraform(struct!.maxIntervalSeconds), - multiplier: cdktf.numberToTerraform(struct!.multiplier), - randomization_factor: cdktf.numberToTerraform(struct!.randomizationFactor), - } -} - -export function updateResourceRetryToHclTerraform(struct?: UpdateResourceRetry | cdktf.IResolvable): any { - if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { - return struct - } - if (cdktf.isComplexElement(struct)) { - throw new Error( - 'A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration' - ) - } - const attrs = { - error_message_regex: { - value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct!.errorMessageRegex), - isBlock: false, - type: 'list', - storageClassType: 'stringList', - }, - interval_seconds: { - value: cdktf.numberToHclTerraform(struct!.intervalSeconds), - isBlock: false, - type: 'simple', - storageClassType: 'number', - }, - max_interval_seconds: { - value: cdktf.numberToHclTerraform(struct!.maxIntervalSeconds), - isBlock: false, - type: 'simple', - storageClassType: 'number', - }, - multiplier: { - value: cdktf.numberToHclTerraform(struct!.multiplier), - isBlock: false, - type: 'simple', - storageClassType: 'number', - }, - randomization_factor: { - value: cdktf.numberToHclTerraform(struct!.randomizationFactor), - isBlock: false, - type: 'simple', - storageClassType: 'number', - }, - } - - // remove undefined attributes - return Object.fromEntries( - Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined) - ) -} - -export class UpdateResourceRetryOutputReference extends cdktf.ComplexObject { - private isEmptyObject = false - private resolvableValue?: cdktf.IResolvable - - /** - * @param terraformResource The parent resource - * @param terraformAttribute The attribute on the parent resource this class is referencing - */ - public constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string) { - super(terraformResource, terraformAttribute, false) - } - - public get internalValue(): UpdateResourceRetry | cdktf.IResolvable | undefined { - if (this.resolvableValue) { - return this.resolvableValue - } - let hasAnyValues = this.isEmptyObject - const internalValueResult: any = {} - if (this._errorMessageRegex !== undefined) { - hasAnyValues = true - internalValueResult.errorMessageRegex = this._errorMessageRegex - } - if (this._intervalSeconds !== undefined) { - hasAnyValues = true - internalValueResult.intervalSeconds = this._intervalSeconds - } - if (this._maxIntervalSeconds !== undefined) { - hasAnyValues = true - internalValueResult.maxIntervalSeconds = this._maxIntervalSeconds - } - if (this._multiplier !== undefined) { - hasAnyValues = true - internalValueResult.multiplier = this._multiplier - } - if (this._randomizationFactor !== undefined) { - hasAnyValues = true - internalValueResult.randomizationFactor = this._randomizationFactor - } - return hasAnyValues ? internalValueResult : undefined - } - - public set internalValue(value: UpdateResourceRetry | cdktf.IResolvable | undefined) { - if (value === undefined) { - this.isEmptyObject = false - this.resolvableValue = undefined - this._errorMessageRegex = undefined - this._intervalSeconds = undefined - this._maxIntervalSeconds = undefined - this._multiplier = undefined - this._randomizationFactor = undefined - } else if (cdktf.Tokenization.isResolvable(value)) { - this.isEmptyObject = false - this.resolvableValue = value - } else { - this.isEmptyObject = Object.keys(value).length === 0 - this.resolvableValue = undefined - this._errorMessageRegex = value.errorMessageRegex - this._intervalSeconds = value.intervalSeconds - this._maxIntervalSeconds = value.maxIntervalSeconds - this._multiplier = value.multiplier - this._randomizationFactor = value.randomizationFactor - } - } - - // error_message_regex - computed: false, optional: false, required: true - private _errorMessageRegex?: string[] - public get errorMessageRegex() { - return this.getListAttribute('error_message_regex') - } - public set errorMessageRegex(value: string[]) { - this._errorMessageRegex = value - } - // Temporarily expose input value. Use with caution. - public get errorMessageRegexInput() { - return this._errorMessageRegex - } - - // interval_seconds - computed: true, optional: true, required: false - private _intervalSeconds?: number - public get intervalSeconds() { - return this.getNumberAttribute('interval_seconds') - } - public set intervalSeconds(value: number) { - this._intervalSeconds = value - } - public resetIntervalSeconds() { - this._intervalSeconds = undefined - } - // Temporarily expose input value. Use with caution. - public get intervalSecondsInput() { - return this._intervalSeconds - } - - // max_interval_seconds - computed: true, optional: true, required: false - private _maxIntervalSeconds?: number - public get maxIntervalSeconds() { - return this.getNumberAttribute('max_interval_seconds') - } - public set maxIntervalSeconds(value: number) { - this._maxIntervalSeconds = value - } - public resetMaxIntervalSeconds() { - this._maxIntervalSeconds = undefined - } - // Temporarily expose input value. Use with caution. - public get maxIntervalSecondsInput() { - return this._maxIntervalSeconds - } - - // multiplier - computed: true, optional: true, required: false - private _multiplier?: number - public get multiplier() { - return this.getNumberAttribute('multiplier') - } - public set multiplier(value: number) { - this._multiplier = value - } - public resetMultiplier() { - this._multiplier = undefined - } - // Temporarily expose input value. Use with caution. - public get multiplierInput() { - return this._multiplier - } - - // randomization_factor - computed: true, optional: true, required: false - private _randomizationFactor?: number - public get randomizationFactor() { - return this.getNumberAttribute('randomization_factor') - } - public set randomizationFactor(value: number) { - this._randomizationFactor = value - } - public resetRandomizationFactor() { - this._randomizationFactor = undefined - } - // Temporarily expose input value. Use with caution. - public get randomizationFactorInput() { - return this._randomizationFactor - } -} -export interface UpdateResourceTimeouts { - /** - * A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/update_resource#create UpdateResource#create} - */ - readonly create?: string - /** - * A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/update_resource#delete UpdateResource#delete} - */ - readonly delete?: string - /** - * A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled. - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/update_resource#read UpdateResource#read} - */ - readonly read?: string - /** - * A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). - * - * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/update_resource#update UpdateResource#update} - */ - readonly update?: string -} - -export function updateResourceTimeoutsToTerraform(struct?: UpdateResourceTimeouts | cdktf.IResolvable): any { - if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { - return struct - } - if (cdktf.isComplexElement(struct)) { - throw new Error( - 'A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration' - ) - } - return { - create: cdktf.stringToTerraform(struct!.create), - delete: cdktf.stringToTerraform(struct!.delete), - read: cdktf.stringToTerraform(struct!.read), - update: cdktf.stringToTerraform(struct!.update), - } -} - -export function updateResourceTimeoutsToHclTerraform(struct?: UpdateResourceTimeouts | cdktf.IResolvable): any { - if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { - return struct - } - if (cdktf.isComplexElement(struct)) { - throw new Error( - 'A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration' - ) - } - const attrs = { - create: { - value: cdktf.stringToHclTerraform(struct!.create), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - delete: { - value: cdktf.stringToHclTerraform(struct!.delete), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - read: { - value: cdktf.stringToHclTerraform(struct!.read), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - update: { - value: cdktf.stringToHclTerraform(struct!.update), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - } - - // remove undefined attributes - return Object.fromEntries( - Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined) - ) -} - -export class UpdateResourceTimeoutsOutputReference extends cdktf.ComplexObject { - private isEmptyObject = false - private resolvableValue?: cdktf.IResolvable - - /** - * @param terraformResource The parent resource - * @param terraformAttribute The attribute on the parent resource this class is referencing - */ - public constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string) { - super(terraformResource, terraformAttribute, false) - } - - public get internalValue(): UpdateResourceTimeouts | cdktf.IResolvable | undefined { - if (this.resolvableValue) { - return this.resolvableValue - } - let hasAnyValues = this.isEmptyObject - const internalValueResult: any = {} - if (this._create !== undefined) { - hasAnyValues = true - internalValueResult.create = this._create - } - if (this._delete !== undefined) { - hasAnyValues = true - internalValueResult.delete = this._delete - } - if (this._read !== undefined) { - hasAnyValues = true - internalValueResult.read = this._read - } - if (this._update !== undefined) { - hasAnyValues = true - internalValueResult.update = this._update - } - return hasAnyValues ? internalValueResult : undefined - } - - public set internalValue(value: UpdateResourceTimeouts | cdktf.IResolvable | undefined) { - if (value === undefined) { - this.isEmptyObject = false - this.resolvableValue = undefined - this._create = undefined - this._delete = undefined - this._read = undefined - this._update = undefined - } else if (cdktf.Tokenization.isResolvable(value)) { - this.isEmptyObject = false - this.resolvableValue = value - } else { - this.isEmptyObject = Object.keys(value).length === 0 - this.resolvableValue = undefined - this._create = value.create - this._delete = value.delete - this._read = value.read - this._update = value.update - } - } - - // create - computed: false, optional: true, required: false - private _create?: string - public get create() { - return this.getStringAttribute('create') - } - public set create(value: string) { - this._create = value - } - public resetCreate() { - this._create = undefined - } - // Temporarily expose input value. Use with caution. - public get createInput() { - return this._create - } - - // delete - computed: false, optional: true, required: false - private _delete?: string - public get delete() { - return this.getStringAttribute('delete') - } - public set delete(value: string) { - this._delete = value - } - public resetDelete() { - this._delete = undefined - } - // Temporarily expose input value. Use with caution. - public get deleteInput() { - return this._delete - } - - // read - computed: false, optional: true, required: false - private _read?: string - public get read() { - return this.getStringAttribute('read') - } - public set read(value: string) { - this._read = value - } - public resetRead() { - this._read = undefined - } - // Temporarily expose input value. Use with caution. - public get readInput() { - return this._read - } - - // update - computed: false, optional: true, required: false - private _update?: string - public get update() { - return this.getStringAttribute('update') - } - public set update(value: string) { - this._update = value - } - public resetUpdate() { - this._update = undefined - } - // Temporarily expose input value. Use with caution. - public get updateInput() { - return this._update - } -} - -/** - * Represents a {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/update_resource azapi_update_resource} - */ -export class UpdateResource extends cdktf.TerraformResource { - // ================= - // STATIC PROPERTIES - // ================= - public static readonly tfResourceType = 'azapi_update_resource' - - // ============== - // STATIC Methods - // ============== - /** - * Generates CDKTF code for importing a UpdateResource resource upon running "cdktf plan " - * @param scope The scope in which to define this construct - * @param importToId The construct id used in the generated config for the UpdateResource to import - * @param importFromId The id of the existing UpdateResource that should be imported. Refer to the {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/update_resource#import import section} in the documentation of this resource for the id to use - * @param provider? Optional instance of the provider where the UpdateResource to import is found - */ - public static generateConfigForImport( - scope: Construct, - importToId: string, - importFromId: string, - provider?: cdktf.TerraformProvider - ) { - return new cdktf.ImportableResource(scope, importToId, { - terraformResourceType: 'azapi_update_resource', - importId: importFromId, - provider, - }) - } - - // =========== - // INITIALIZER - // =========== - - /** - * Create a new {@link https://registry.terraform.io/providers/azure/azapi/2.2.0/docs/resources/update_resource azapi_update_resource} Resource - * - * @param scope The scope in which to define this construct - * @param id The scoped construct ID. Must be unique amongst siblings in the same scope - * @param options UpdateResourceConfig - */ - public constructor(scope: Construct, id: string, config: UpdateResourceConfig) { - super(scope, id, { - terraformResourceType: 'azapi_update_resource', - terraformGeneratorMetadata: { - providerName: 'azapi', - providerVersion: '2.2.0', - providerVersionConstraint: '~> 2.2', - }, - provider: config.provider, - dependsOn: config.dependsOn, - count: config.count, - lifecycle: config.lifecycle, - provisioners: config.provisioners, - connection: config.connection, - forEach: config.forEach, - }) - this._body = config.body - this._ignoreCasing = config.ignoreCasing - this._ignoreMissingProperty = config.ignoreMissingProperty - this._locks = config.locks - this._name = config.name - this._parentId = config.parentId - this._readHeaders = config.readHeaders - this._readQueryParameters = config.readQueryParameters - this._resourceId = config.resourceId - this._responseExportValues = config.responseExportValues - this._retry.internalValue = config.retry - this._type = config.type - this._updateHeaders = config.updateHeaders - this._updateQueryParameters = config.updateQueryParameters - this._timeouts.internalValue = config.timeouts - } - - // ========== - // ATTRIBUTES - // ========== - - // body - computed: false, optional: true, required: false - private _body?: { [key: string]: any } - public get body() { - return this.getAnyMapAttribute('body') - } - public set body(value: { [key: string]: any }) { - this._body = value - } - public resetBody() { - this._body = undefined - } - // Temporarily expose input value. Use with caution. - public get bodyInput() { - return this._body - } - - // id - computed: true, optional: false, required: false - public get id() { - return this.getStringAttribute('id') - } - - // ignore_casing - computed: true, optional: true, required: false - private _ignoreCasing?: boolean | cdktf.IResolvable - public get ignoreCasing() { - return this.getBooleanAttribute('ignore_casing') - } - public set ignoreCasing(value: boolean | cdktf.IResolvable) { - this._ignoreCasing = value - } - public resetIgnoreCasing() { - this._ignoreCasing = undefined - } - // Temporarily expose input value. Use with caution. - public get ignoreCasingInput() { - return this._ignoreCasing - } - - // ignore_missing_property - computed: true, optional: true, required: false - private _ignoreMissingProperty?: boolean | cdktf.IResolvable - public get ignoreMissingProperty() { - return this.getBooleanAttribute('ignore_missing_property') - } - public set ignoreMissingProperty(value: boolean | cdktf.IResolvable) { - this._ignoreMissingProperty = value - } - public resetIgnoreMissingProperty() { - this._ignoreMissingProperty = undefined - } - // Temporarily expose input value. Use with caution. - public get ignoreMissingPropertyInput() { - return this._ignoreMissingProperty - } - - // locks - computed: false, optional: true, required: false - private _locks?: string[] - public get locks() { - return this.getListAttribute('locks') - } - public set locks(value: string[]) { - this._locks = value - } - public resetLocks() { - this._locks = undefined - } - // Temporarily expose input value. Use with caution. - public get locksInput() { - return this._locks - } - - // name - computed: true, optional: true, required: false - private _name?: string - public get name() { - return this.getStringAttribute('name') - } - public set name(value: string) { - this._name = value - } - public resetName() { - this._name = undefined - } - // Temporarily expose input value. Use with caution. - public get nameInput() { - return this._name - } - - // output - computed: true, optional: false, required: false - private _output = new cdktf.AnyMap(this, 'output') - public get output() { - return this._output - } - - // parent_id - computed: true, optional: true, required: false - private _parentId?: string - public get parentId() { - return this.getStringAttribute('parent_id') - } - public set parentId(value: string) { - this._parentId = value - } - public resetParentId() { - this._parentId = undefined - } - // Temporarily expose input value. Use with caution. - public get parentIdInput() { - return this._parentId - } - - // read_headers - computed: false, optional: true, required: false - private _readHeaders?: { [key: string]: string } - public get readHeaders() { - return this.getStringMapAttribute('read_headers') - } - public set readHeaders(value: { [key: string]: string }) { - this._readHeaders = value - } - public resetReadHeaders() { - this._readHeaders = undefined - } - // Temporarily expose input value. Use with caution. - public get readHeadersInput() { - return this._readHeaders - } - - // read_query_parameters - computed: false, optional: true, required: false - private _readQueryParameters?: { [key: string]: string[] } | cdktf.IResolvable - public get readQueryParameters() { - return this.interpolationForAttribute('read_query_parameters') - } - public set readQueryParameters(value: { [key: string]: string[] } | cdktf.IResolvable) { - this._readQueryParameters = value - } - public resetReadQueryParameters() { - this._readQueryParameters = undefined - } - // Temporarily expose input value. Use with caution. - public get readQueryParametersInput() { - return this._readQueryParameters - } - - // resource_id - computed: true, optional: true, required: false - private _resourceId?: string - public get resourceId() { - return this.getStringAttribute('resource_id') - } - public set resourceId(value: string) { - this._resourceId = value - } - public resetResourceId() { - this._resourceId = undefined - } - // Temporarily expose input value. Use with caution. - public get resourceIdInput() { - return this._resourceId - } - - // response_export_values - computed: false, optional: true, required: false - private _responseExportValues?: { [key: string]: any } - public get responseExportValues() { - return this.getAnyMapAttribute('response_export_values') - } - public set responseExportValues(value: { [key: string]: any }) { - this._responseExportValues = value - } - public resetResponseExportValues() { - this._responseExportValues = undefined - } - // Temporarily expose input value. Use with caution. - public get responseExportValuesInput() { - return this._responseExportValues - } - - // retry - computed: false, optional: true, required: false - private _retry = new UpdateResourceRetryOutputReference(this, 'retry') - public get retry() { - return this._retry - } - public putRetry(value: UpdateResourceRetry) { - this._retry.internalValue = value - } - public resetRetry() { - this._retry.internalValue = undefined - } - // Temporarily expose input value. Use with caution. - public get retryInput() { - return this._retry.internalValue - } - - // type - computed: false, optional: false, required: true - private _type?: string - public get type() { - return this.getStringAttribute('type') - } - public set type(value: string) { - this._type = value - } - // Temporarily expose input value. Use with caution. - public get typeInput() { - return this._type - } - - // update_headers - computed: false, optional: true, required: false - private _updateHeaders?: { [key: string]: string } - public get updateHeaders() { - return this.getStringMapAttribute('update_headers') - } - public set updateHeaders(value: { [key: string]: string }) { - this._updateHeaders = value - } - public resetUpdateHeaders() { - this._updateHeaders = undefined - } - // Temporarily expose input value. Use with caution. - public get updateHeadersInput() { - return this._updateHeaders - } - - // update_query_parameters - computed: false, optional: true, required: false - private _updateQueryParameters?: { [key: string]: string[] } | cdktf.IResolvable - public get updateQueryParameters() { - return this.interpolationForAttribute('update_query_parameters') - } - public set updateQueryParameters(value: { [key: string]: string[] } | cdktf.IResolvable) { - this._updateQueryParameters = value - } - public resetUpdateQueryParameters() { - this._updateQueryParameters = undefined - } - // Temporarily expose input value. Use with caution. - public get updateQueryParametersInput() { - return this._updateQueryParameters - } - - // timeouts - computed: false, optional: true, required: false - private _timeouts = new UpdateResourceTimeoutsOutputReference(this, 'timeouts') - public get timeouts() { - return this._timeouts - } - public putTimeouts(value: UpdateResourceTimeouts) { - this._timeouts.internalValue = value - } - public resetTimeouts() { - this._timeouts.internalValue = undefined - } - // Temporarily expose input value. Use with caution. - public get timeoutsInput() { - return this._timeouts.internalValue - } - - // ========= - // SYNTHESIS - // ========= - - protected synthesizeAttributes(): { [name: string]: any } { - return { - body: cdktf.hashMapper(cdktf.anyToTerraform)(this._body), - ignore_casing: cdktf.booleanToTerraform(this._ignoreCasing), - ignore_missing_property: cdktf.booleanToTerraform(this._ignoreMissingProperty), - locks: cdktf.listMapper(cdktf.stringToTerraform, false)(this._locks), - name: cdktf.stringToTerraform(this._name), - parent_id: cdktf.stringToTerraform(this._parentId), - read_headers: cdktf.hashMapper(cdktf.stringToTerraform)(this._readHeaders), - read_query_parameters: cdktf.hashMapper(cdktf.listMapper(cdktf.stringToTerraform, false))( - this._readQueryParameters - ), - resource_id: cdktf.stringToTerraform(this._resourceId), - response_export_values: cdktf.hashMapper(cdktf.anyToTerraform)(this._responseExportValues), - retry: updateResourceRetryToTerraform(this._retry.internalValue), - type: cdktf.stringToTerraform(this._type), - update_headers: cdktf.hashMapper(cdktf.stringToTerraform)(this._updateHeaders), - update_query_parameters: cdktf.hashMapper(cdktf.listMapper(cdktf.stringToTerraform, false))( - this._updateQueryParameters - ), - timeouts: updateResourceTimeoutsToTerraform(this._timeouts.internalValue), - } - } - - protected synthesizeHclAttributes(): { [name: string]: any } { - const attrs = { - body: { - value: cdktf.hashMapperHcl(cdktf.anyToHclTerraform)(this._body), - isBlock: false, - type: 'map', - storageClassType: 'anyMap', - }, - ignore_casing: { - value: cdktf.booleanToHclTerraform(this._ignoreCasing), - isBlock: false, - type: 'simple', - storageClassType: 'boolean', - }, - ignore_missing_property: { - value: cdktf.booleanToHclTerraform(this._ignoreMissingProperty), - isBlock: false, - type: 'simple', - storageClassType: 'boolean', - }, - locks: { - value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(this._locks), - isBlock: false, - type: 'list', - storageClassType: 'stringList', - }, - name: { - value: cdktf.stringToHclTerraform(this._name), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - parent_id: { - value: cdktf.stringToHclTerraform(this._parentId), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - read_headers: { - value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(this._readHeaders), - isBlock: false, - type: 'map', - storageClassType: 'stringMap', - }, - read_query_parameters: { - value: cdktf.hashMapperHcl(cdktf.listMapperHcl(cdktf.stringToHclTerraform, false))(this._readQueryParameters), - isBlock: false, - type: 'map', - storageClassType: 'stringListMap', - }, - resource_id: { - value: cdktf.stringToHclTerraform(this._resourceId), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - response_export_values: { - value: cdktf.hashMapperHcl(cdktf.anyToHclTerraform)(this._responseExportValues), - isBlock: false, - type: 'map', - storageClassType: 'anyMap', - }, - retry: { - value: updateResourceRetryToHclTerraform(this._retry.internalValue), - isBlock: true, - type: 'struct', - storageClassType: 'UpdateResourceRetry', - }, - type: { - value: cdktf.stringToHclTerraform(this._type), - isBlock: false, - type: 'simple', - storageClassType: 'string', - }, - update_headers: { - value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(this._updateHeaders), - isBlock: false, - type: 'map', - storageClassType: 'stringMap', - }, - update_query_parameters: { - value: cdktf.hashMapperHcl(cdktf.listMapperHcl(cdktf.stringToHclTerraform, false))(this._updateQueryParameters), - isBlock: false, - type: 'map', - storageClassType: 'stringListMap', - }, - timeouts: { - value: updateResourceTimeoutsToHclTerraform(this._timeouts.internalValue), - isBlock: true, - type: 'struct', - storageClassType: 'UpdateResourceTimeouts', - }, - } - - // remove undefined attributes - return Object.fromEntries( - Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined) - ) - } -} diff --git a/src/lib/azure/.gen/versions.json b/src/lib/azure/.gen/versions.json deleted file mode 100644 index bf10e8bd..00000000 --- a/src/lib/azure/.gen/versions.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "registry.terraform.io/azure/azapi": "2.2.0" -} diff --git a/src/lib/azure/common/construct.ts b/src/lib/azure/common/construct.ts index 3ecfe0d0..00697873 100644 --- a/src/lib/azure/common/construct.ts +++ b/src/lib/azure/common/construct.ts @@ -4,7 +4,6 @@ import { AzurermBackend, TerraformStack } from 'cdktf' import { Provider } from 'cdktf-local-exec' import { Construct } from 'constructs' import { isDevStage, isPrdStage, isTestStage, isUatStage } from '../../common/index.js' -import { AzapiProvider } from '../.gen/providers/azapi/provider/index.js' import { AzureApiManagementManager, AzureAppConfigurationManager, @@ -74,7 +73,6 @@ export class CommonAzureConstruct extends TerraformStack { this.determineRemoteBackend() this.determineTenantId() - new AzapiProvider(this, `${this.id}-azapi-provider`, this.props) new AzurermProvider(this, `${this.id}-provider`, this.props) new Provider(this, `${this.id}-local-exec-provider`) }