// generated from terraform resource schema import { Construct } from 'constructs'; import * as cdktf from 'cdktf'; /** * App Runner */ export interface ApprunnerServiceConfig extends cdktf.TerraformMetaArguments { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/apprunner_service.html#auto_scaling_configuration_arn ApprunnerService#auto_scaling_configuration_arn} */ readonly autoScalingConfigurationArn?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/apprunner_service.html#service_name ApprunnerService#service_name} */ readonly serviceName: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/apprunner_service.html#tags ApprunnerService#tags} */ readonly tags?: { [key: string]: string } | cdktf.IResolvable; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/apprunner_service.html#tags_all ApprunnerService#tags_all} */ readonly tagsAll?: { [key: string]: string } | cdktf.IResolvable; /** * encryption_configuration block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/apprunner_service.html#encryption_configuration ApprunnerService#encryption_configuration} */ readonly encryptionConfiguration?: ApprunnerServiceEncryptionConfiguration; /** * health_check_configuration block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/apprunner_service.html#health_check_configuration ApprunnerService#health_check_configuration} */ readonly healthCheckConfiguration?: ApprunnerServiceHealthCheckConfiguration; /** * instance_configuration block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/apprunner_service.html#instance_configuration ApprunnerService#instance_configuration} */ readonly instanceConfiguration?: ApprunnerServiceInstanceConfiguration; /** * source_configuration block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/apprunner_service.html#source_configuration ApprunnerService#source_configuration} */ readonly sourceConfiguration: ApprunnerServiceSourceConfiguration; } export interface ApprunnerServiceEncryptionConfiguration { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/apprunner_service.html#kms_key ApprunnerService#kms_key} */ readonly kmsKey: string; } export function apprunnerServiceEncryptionConfigurationToTerraform(struct?: ApprunnerServiceEncryptionConfigurationOutputReference | ApprunnerServiceEncryptionConfiguration): any { if (!cdktf.canInspect(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 { kms_key: cdktf.stringToTerraform(struct!.kmsKey), } } export class ApprunnerServiceEncryptionConfigurationOutputReference extends cdktf.ComplexObject { private isEmptyObject = false; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param isSingleItem True if this is a block, false if it's a list */ public constructor(terraformResource: cdktf.ITerraformResource, terraformAttribute: string, isSingleItem: boolean) { super(terraformResource, terraformAttribute, isSingleItem); } public get internalValue(): ApprunnerServiceEncryptionConfiguration | undefined { let hasAnyValues = this.isEmptyObject; const internalValueResult: any = {}; if (this._kmsKey !== undefined) { hasAnyValues = true; internalValueResult.kmsKey = this._kmsKey; } return hasAnyValues ? internalValueResult : undefined; } public set internalValue(value: ApprunnerServiceEncryptionConfiguration | undefined) { if (value === undefined) { this.isEmptyObject = false; this._kmsKey = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._kmsKey = value.kmsKey; } } // kms_key - computed: false, optional: false, required: true private _kmsKey?: string; public get kmsKey() { return this.getStringAttribute('kms_key'); } public set kmsKey(value: string) { this._kmsKey = value; } // Temporarily expose input value. Use with caution. public get kmsKeyInput() { return this._kmsKey; } } export interface ApprunnerServiceHealthCheckConfiguration { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/apprunner_service.html#healthy_threshold ApprunnerService#healthy_threshold} */ readonly healthyThreshold?: number; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/apprunner_service.html#interval ApprunnerService#interval} */ readonly interval?: number; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/apprunner_service.html#path ApprunnerService#path} */ readonly path?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/apprunner_service.html#protocol ApprunnerService#protocol} */ readonly protocol?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/apprunner_service.html#timeout ApprunnerService#timeout} */ readonly timeout?: number; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/apprunner_service.html#unhealthy_threshold ApprunnerService#unhealthy_threshold} */ readonly unhealthyThreshold?: number; } export function apprunnerServiceHealthCheckConfigurationToTerraform(struct?: ApprunnerServiceHealthCheckConfigurationOutputReference | ApprunnerServiceHealthCheckConfiguration): any { if (!cdktf.canInspect(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 { healthy_threshold: cdktf.numberToTerraform(struct!.healthyThreshold), interval: cdktf.numberToTerraform(struct!.interval), path: cdktf.stringToTerraform(struct!.path), protocol: cdktf.stringToTerraform(struct!.protocol), timeout: cdktf.numberToTerraform(struct!.timeout), unhealthy_threshold: cdktf.numberToTerraform(struct!.unhealthyThreshold), } } export class ApprunnerServiceHealthCheckConfigurationOutputReference extends cdktf.ComplexObject { private isEmptyObject = false; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param isSingleItem True if this is a block, false if it's a list */ public constructor(terraformResource: cdktf.ITerraformResource, terraformAttribute: string, isSingleItem: boolean) { super(terraformResource, terraformAttribute, isSingleItem); } public get internalValue(): ApprunnerServiceHealthCheckConfiguration | undefined { let hasAnyValues = this.isEmptyObject; const internalValueResult: any = {}; if (this._healthyThreshold !== undefined) { hasAnyValues = true; internalValueResult.healthyThreshold = this._healthyThreshold; } if (this._interval !== undefined) { hasAnyValues = true; internalValueResult.interval = this._interval; } if (this._path !== undefined) { hasAnyValues = true; internalValueResult.path = this._path; } if (this._protocol !== undefined) { hasAnyValues = true; internalValueResult.protocol = this._protocol; } if (this._timeout !== undefined) { hasAnyValues = true; internalValueResult.timeout = this._timeout; } if (this._unhealthyThreshold !== undefined) { hasAnyValues = true; internalValueResult.unhealthyThreshold = this._unhealthyThreshold; } return hasAnyValues ? internalValueResult : undefined; } public set internalValue(value: ApprunnerServiceHealthCheckConfiguration | undefined) { if (value === undefined) { this.isEmptyObject = false; this._healthyThreshold = undefined; this._interval = undefined; this._path = undefined; this._protocol = undefined; this._timeout = undefined; this._unhealthyThreshold = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._healthyThreshold = value.healthyThreshold; this._interval = value.interval; this._path = value.path; this._protocol = value.protocol; this._timeout = value.timeout; this._unhealthyThreshold = value.unhealthyThreshold; } } // healthy_threshold - computed: false, optional: true, required: false private _healthyThreshold?: number; public get healthyThreshold() { return this.getNumberAttribute('healthy_threshold'); } public set healthyThreshold(value: number) { this._healthyThreshold = value; } public resetHealthyThreshold() { this._healthyThreshold = undefined; } // Temporarily expose input value. Use with caution. public get healthyThresholdInput() { return this._healthyThreshold; } // interval - computed: false, optional: true, required: false private _interval?: number; public get interval() { return this.getNumberAttribute('interval'); } public set interval(value: number) { this._interval = value; } public resetInterval() { this._interval = undefined; } // Temporarily expose input value. Use with caution. public get intervalInput() { return this._interval; } // path - computed: false, optional: true, required: false private _path?: string; public get path() { return this.getStringAttribute('path'); } public set path(value: string) { this._path = value; } public resetPath() { this._path = undefined; } // Temporarily expose input value. Use with caution. public get pathInput() { return this._path; } // protocol - computed: false, optional: true, required: false private _protocol?: string; public get protocol() { return this.getStringAttribute('protocol'); } public set protocol(value: string) { this._protocol = value; } public resetProtocol() { this._protocol = undefined; } // Temporarily expose input value. Use with caution. public get protocolInput() { return this._protocol; } // timeout - computed: false, optional: true, required: false private _timeout?: number; public get timeout() { return this.getNumberAttribute('timeout'); } public set timeout(value: number) { this._timeout = value; } public resetTimeout() { this._timeout = undefined; } // Temporarily expose input value. Use with caution. public get timeoutInput() { return this._timeout; } // unhealthy_threshold - computed: false, optional: true, required: false private _unhealthyThreshold?: number; public get unhealthyThreshold() { return this.getNumberAttribute('unhealthy_threshold'); } public set unhealthyThreshold(value: number) { this._unhealthyThreshold = value; } public resetUnhealthyThreshold() { this._unhealthyThreshold = undefined; } // Temporarily expose input value. Use with caution. public get unhealthyThresholdInput() { return this._unhealthyThreshold; } } export interface ApprunnerServiceInstanceConfiguration { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/apprunner_service.html#cpu ApprunnerService#cpu} */ readonly cpu?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/apprunner_service.html#instance_role_arn ApprunnerService#instance_role_arn} */ readonly instanceRoleArn?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/apprunner_service.html#memory ApprunnerService#memory} */ readonly memory?: string; } export function apprunnerServiceInstanceConfigurationToTerraform(struct?: ApprunnerServiceInstanceConfigurationOutputReference | ApprunnerServiceInstanceConfiguration): any { if (!cdktf.canInspect(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 { cpu: cdktf.stringToTerraform(struct!.cpu), instance_role_arn: cdktf.stringToTerraform(struct!.instanceRoleArn), memory: cdktf.stringToTerraform(struct!.memory), } } export class ApprunnerServiceInstanceConfigurationOutputReference extends cdktf.ComplexObject { private isEmptyObject = false; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param isSingleItem True if this is a block, false if it's a list */ public constructor(terraformResource: cdktf.ITerraformResource, terraformAttribute: string, isSingleItem: boolean) { super(terraformResource, terraformAttribute, isSingleItem); } public get internalValue(): ApprunnerServiceInstanceConfiguration | undefined { let hasAnyValues = this.isEmptyObject; const internalValueResult: any = {}; if (this._cpu !== undefined) { hasAnyValues = true; internalValueResult.cpu = this._cpu; } if (this._instanceRoleArn !== undefined) { hasAnyValues = true; internalValueResult.instanceRoleArn = this._instanceRoleArn; } if (this._memory !== undefined) { hasAnyValues = true; internalValueResult.memory = this._memory; } return hasAnyValues ? internalValueResult : undefined; } public set internalValue(value: ApprunnerServiceInstanceConfiguration | undefined) { if (value === undefined) { this.isEmptyObject = false; this._cpu = undefined; this._instanceRoleArn = undefined; this._memory = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._cpu = value.cpu; this._instanceRoleArn = value.instanceRoleArn; this._memory = value.memory; } } // cpu - computed: false, optional: true, required: false private _cpu?: string; public get cpu() { return this.getStringAttribute('cpu'); } public set cpu(value: string) { this._cpu = value; } public resetCpu() { this._cpu = undefined; } // Temporarily expose input value. Use with caution. public get cpuInput() { return this._cpu; } // instance_role_arn - computed: false, optional: true, required: false private _instanceRoleArn?: string; public get instanceRoleArn() { return this.getStringAttribute('instance_role_arn'); } public set instanceRoleArn(value: string) { this._instanceRoleArn = value; } public resetInstanceRoleArn() { this._instanceRoleArn = undefined; } // Temporarily expose input value. Use with caution. public get instanceRoleArnInput() { return this._instanceRoleArn; } // memory - computed: false, optional: true, required: false private _memory?: string; public get memory() { return this.getStringAttribute('memory'); } public set memory(value: string) { this._memory = value; } public resetMemory() { this._memory = undefined; } // Temporarily expose input value. Use with caution. public get memoryInput() { return this._memory; } } export interface ApprunnerServiceSourceConfigurationAuthenticationConfiguration { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/apprunner_service.html#access_role_arn ApprunnerService#access_role_arn} */ readonly accessRoleArn?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/apprunner_service.html#connection_arn ApprunnerService#connection_arn} */ readonly connectionArn?: string; } export function apprunnerServiceSourceConfigurationAuthenticationConfigurationToTerraform(struct?: ApprunnerServiceSourceConfigurationAuthenticationConfigurationOutputReference | ApprunnerServiceSourceConfigurationAuthenticationConfiguration): any { if (!cdktf.canInspect(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 { access_role_arn: cdktf.stringToTerraform(struct!.accessRoleArn), connection_arn: cdktf.stringToTerraform(struct!.connectionArn), } } export class ApprunnerServiceSourceConfigurationAuthenticationConfigurationOutputReference extends cdktf.ComplexObject { private isEmptyObject = false; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param isSingleItem True if this is a block, false if it's a list */ public constructor(terraformResource: cdktf.ITerraformResource, terraformAttribute: string, isSingleItem: boolean) { super(terraformResource, terraformAttribute, isSingleItem); } public get internalValue(): ApprunnerServiceSourceConfigurationAuthenticationConfiguration | undefined { let hasAnyValues = this.isEmptyObject; const internalValueResult: any = {}; if (this._accessRoleArn !== undefined) { hasAnyValues = true; internalValueResult.accessRoleArn = this._accessRoleArn; } if (this._connectionArn !== undefined) { hasAnyValues = true; internalValueResult.connectionArn = this._connectionArn; } return hasAnyValues ? internalValueResult : undefined; } public set internalValue(value: ApprunnerServiceSourceConfigurationAuthenticationConfiguration | undefined) { if (value === undefined) { this.isEmptyObject = false; this._accessRoleArn = undefined; this._connectionArn = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._accessRoleArn = value.accessRoleArn; this._connectionArn = value.connectionArn; } } // access_role_arn - computed: false, optional: true, required: false private _accessRoleArn?: string; public get accessRoleArn() { return this.getStringAttribute('access_role_arn'); } public set accessRoleArn(value: string) { this._accessRoleArn = value; } public resetAccessRoleArn() { this._accessRoleArn = undefined; } // Temporarily expose input value. Use with caution. public get accessRoleArnInput() { return this._accessRoleArn; } // connection_arn - computed: false, optional: true, required: false private _connectionArn?: string; public get connectionArn() { return this.getStringAttribute('connection_arn'); } public set connectionArn(value: string) { this._connectionArn = value; } public resetConnectionArn() { this._connectionArn = undefined; } // Temporarily expose input value. Use with caution. public get connectionArnInput() { return this._connectionArn; } } export interface ApprunnerServiceSourceConfigurationCodeRepositoryCodeConfigurationCodeConfigurationValues { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/apprunner_service.html#build_command ApprunnerService#build_command} */ readonly buildCommand?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/apprunner_service.html#port ApprunnerService#port} */ readonly port?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/apprunner_service.html#runtime ApprunnerService#runtime} */ readonly runtime: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/apprunner_service.html#runtime_environment_variables ApprunnerService#runtime_environment_variables} */ readonly runtimeEnvironmentVariables?: { [key: string]: string } | cdktf.IResolvable; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/apprunner_service.html#start_command ApprunnerService#start_command} */ readonly startCommand?: string; } export function apprunnerServiceSourceConfigurationCodeRepositoryCodeConfigurationCodeConfigurationValuesToTerraform(struct?: ApprunnerServiceSourceConfigurationCodeRepositoryCodeConfigurationCodeConfigurationValuesOutputReference | ApprunnerServiceSourceConfigurationCodeRepositoryCodeConfigurationCodeConfigurationValues): any { if (!cdktf.canInspect(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 { build_command: cdktf.stringToTerraform(struct!.buildCommand), port: cdktf.stringToTerraform(struct!.port), runtime: cdktf.stringToTerraform(struct!.runtime), runtime_environment_variables: cdktf.hashMapper(cdktf.anyToTerraform)(struct!.runtimeEnvironmentVariables), start_command: cdktf.stringToTerraform(struct!.startCommand), } } export class ApprunnerServiceSourceConfigurationCodeRepositoryCodeConfigurationCodeConfigurationValuesOutputReference extends cdktf.ComplexObject { private isEmptyObject = false; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param isSingleItem True if this is a block, false if it's a list */ public constructor(terraformResource: cdktf.ITerraformResource, terraformAttribute: string, isSingleItem: boolean) { super(terraformResource, terraformAttribute, isSingleItem); } public get internalValue(): ApprunnerServiceSourceConfigurationCodeRepositoryCodeConfigurationCodeConfigurationValues | undefined { let hasAnyValues = this.isEmptyObject; const internalValueResult: any = {}; if (this._buildCommand !== undefined) { hasAnyValues = true; internalValueResult.buildCommand = this._buildCommand; } if (this._port !== undefined) { hasAnyValues = true; internalValueResult.port = this._port; } if (this._runtime !== undefined) { hasAnyValues = true; internalValueResult.runtime = this._runtime; } if (this._runtimeEnvironmentVariables !== undefined) { hasAnyValues = true; internalValueResult.runtimeEnvironmentVariables = this._runtimeEnvironmentVariables; } if (this._startCommand !== undefined) { hasAnyValues = true; internalValueResult.startCommand = this._startCommand; } return hasAnyValues ? internalValueResult : undefined; } public set internalValue(value: ApprunnerServiceSourceConfigurationCodeRepositoryCodeConfigurationCodeConfigurationValues | undefined) { if (value === undefined) { this.isEmptyObject = false; this._buildCommand = undefined; this._port = undefined; this._runtime = undefined; this._runtimeEnvironmentVariables = undefined; this._startCommand = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._buildCommand = value.buildCommand; this._port = value.port; this._runtime = value.runtime; this._runtimeEnvironmentVariables = value.runtimeEnvironmentVariables; this._startCommand = value.startCommand; } } // build_command - computed: false, optional: true, required: false private _buildCommand?: string; public get buildCommand() { return this.getStringAttribute('build_command'); } public set buildCommand(value: string) { this._buildCommand = value; } public resetBuildCommand() { this._buildCommand = undefined; } // Temporarily expose input value. Use with caution. public get buildCommandInput() { return this._buildCommand; } // port - computed: false, optional: true, required: false private _port?: string; public get port() { return this.getStringAttribute('port'); } public set port(value: string) { this._port = value; } public resetPort() { this._port = undefined; } // Temporarily expose input value. Use with caution. public get portInput() { return this._port; } // runtime - computed: false, optional: false, required: true private _runtime?: string; public get runtime() { return this.getStringAttribute('runtime'); } public set runtime(value: string) { this._runtime = value; } // Temporarily expose input value. Use with caution. public get runtimeInput() { return this._runtime; } // runtime_environment_variables - computed: false, optional: true, required: false private _runtimeEnvironmentVariables?: { [key: string]: string } | cdktf.IResolvable; public get runtimeEnvironmentVariables() { // Getting the computed value is not yet implemented return this.interpolationForAttribute('runtime_environment_variables') as any; } public set runtimeEnvironmentVariables(value: { [key: string]: string } | cdktf.IResolvable) { this._runtimeEnvironmentVariables = value; } public resetRuntimeEnvironmentVariables() { this._runtimeEnvironmentVariables = undefined; } // Temporarily expose input value. Use with caution. public get runtimeEnvironmentVariablesInput() { return this._runtimeEnvironmentVariables; } // start_command - computed: false, optional: true, required: false private _startCommand?: string; public get startCommand() { return this.getStringAttribute('start_command'); } public set startCommand(value: string) { this._startCommand = value; } public resetStartCommand() { this._startCommand = undefined; } // Temporarily expose input value. Use with caution. public get startCommandInput() { return this._startCommand; } } export interface ApprunnerServiceSourceConfigurationCodeRepositoryCodeConfiguration { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/apprunner_service.html#configuration_source ApprunnerService#configuration_source} */ readonly configurationSource: string; /** * code_configuration_values block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/apprunner_service.html#code_configuration_values ApprunnerService#code_configuration_values} */ readonly codeConfigurationValues?: ApprunnerServiceSourceConfigurationCodeRepositoryCodeConfigurationCodeConfigurationValues; } export function apprunnerServiceSourceConfigurationCodeRepositoryCodeConfigurationToTerraform(struct?: ApprunnerServiceSourceConfigurationCodeRepositoryCodeConfigurationOutputReference | ApprunnerServiceSourceConfigurationCodeRepositoryCodeConfiguration): any { if (!cdktf.canInspect(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 { configuration_source: cdktf.stringToTerraform(struct!.configurationSource), code_configuration_values: apprunnerServiceSourceConfigurationCodeRepositoryCodeConfigurationCodeConfigurationValuesToTerraform(struct!.codeConfigurationValues), } } export class ApprunnerServiceSourceConfigurationCodeRepositoryCodeConfigurationOutputReference extends cdktf.ComplexObject { private isEmptyObject = false; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param isSingleItem True if this is a block, false if it's a list */ public constructor(terraformResource: cdktf.ITerraformResource, terraformAttribute: string, isSingleItem: boolean) { super(terraformResource, terraformAttribute, isSingleItem); } public get internalValue(): ApprunnerServiceSourceConfigurationCodeRepositoryCodeConfiguration | undefined { let hasAnyValues = this.isEmptyObject; const internalValueResult: any = {}; if (this._configurationSource !== undefined) { hasAnyValues = true; internalValueResult.configurationSource = this._configurationSource; } if (this._codeConfigurationValues?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.codeConfigurationValues = this._codeConfigurationValues?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } public set internalValue(value: ApprunnerServiceSourceConfigurationCodeRepositoryCodeConfiguration | undefined) { if (value === undefined) { this.isEmptyObject = false; this._configurationSource = undefined; this._codeConfigurationValues.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._configurationSource = value.configurationSource; this._codeConfigurationValues.internalValue = value.codeConfigurationValues; } } // configuration_source - computed: false, optional: false, required: true private _configurationSource?: string; public get configurationSource() { return this.getStringAttribute('configuration_source'); } public set configurationSource(value: string) { this._configurationSource = value; } // Temporarily expose input value. Use with caution. public get configurationSourceInput() { return this._configurationSource; } // code_configuration_values - computed: false, optional: true, required: false private _codeConfigurationValues = new ApprunnerServiceSourceConfigurationCodeRepositoryCodeConfigurationCodeConfigurationValuesOutputReference(this as any, "code_configuration_values", true); public get codeConfigurationValues() { return this._codeConfigurationValues; } public putCodeConfigurationValues(value: ApprunnerServiceSourceConfigurationCodeRepositoryCodeConfigurationCodeConfigurationValues) { this._codeConfigurationValues.internalValue = value; } public resetCodeConfigurationValues() { this._codeConfigurationValues.internalValue = undefined; } // Temporarily expose input value. Use with caution. public get codeConfigurationValuesInput() { return this._codeConfigurationValues.internalValue; } } export interface ApprunnerServiceSourceConfigurationCodeRepositorySourceCodeVersion { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/apprunner_service.html#type ApprunnerService#type} */ readonly type: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/apprunner_service.html#value ApprunnerService#value} */ readonly value: string; } export function apprunnerServiceSourceConfigurationCodeRepositorySourceCodeVersionToTerraform(struct?: ApprunnerServiceSourceConfigurationCodeRepositorySourceCodeVersionOutputReference | ApprunnerServiceSourceConfigurationCodeRepositorySourceCodeVersion): any { if (!cdktf.canInspect(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 { type: cdktf.stringToTerraform(struct!.type), value: cdktf.stringToTerraform(struct!.value), } } export class ApprunnerServiceSourceConfigurationCodeRepositorySourceCodeVersionOutputReference extends cdktf.ComplexObject { private isEmptyObject = false; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param isSingleItem True if this is a block, false if it's a list */ public constructor(terraformResource: cdktf.ITerraformResource, terraformAttribute: string, isSingleItem: boolean) { super(terraformResource, terraformAttribute, isSingleItem); } public get internalValue(): ApprunnerServiceSourceConfigurationCodeRepositorySourceCodeVersion | undefined { let hasAnyValues = this.isEmptyObject; const internalValueResult: any = {}; if (this._type !== undefined) { hasAnyValues = true; internalValueResult.type = this._type; } if (this._value !== undefined) { hasAnyValues = true; internalValueResult.value = this._value; } return hasAnyValues ? internalValueResult : undefined; } public set internalValue(value: ApprunnerServiceSourceConfigurationCodeRepositorySourceCodeVersion | undefined) { if (value === undefined) { this.isEmptyObject = false; this._type = undefined; this._value = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._type = value.type; this._value = value.value; } } // 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; } // value - computed: false, optional: false, required: true private _value?: string; public get value() { return this.getStringAttribute('value'); } public set value(value: string) { this._value = value; } // Temporarily expose input value. Use with caution. public get valueInput() { return this._value; } } export interface ApprunnerServiceSourceConfigurationCodeRepository { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/apprunner_service.html#repository_url ApprunnerService#repository_url} */ readonly repositoryUrl: string; /** * code_configuration block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/apprunner_service.html#code_configuration ApprunnerService#code_configuration} */ readonly codeConfiguration?: ApprunnerServiceSourceConfigurationCodeRepositoryCodeConfiguration; /** * source_code_version block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/apprunner_service.html#source_code_version ApprunnerService#source_code_version} */ readonly sourceCodeVersion: ApprunnerServiceSourceConfigurationCodeRepositorySourceCodeVersion; } export function apprunnerServiceSourceConfigurationCodeRepositoryToTerraform(struct?: ApprunnerServiceSourceConfigurationCodeRepositoryOutputReference | ApprunnerServiceSourceConfigurationCodeRepository): any { if (!cdktf.canInspect(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 { repository_url: cdktf.stringToTerraform(struct!.repositoryUrl), code_configuration: apprunnerServiceSourceConfigurationCodeRepositoryCodeConfigurationToTerraform(struct!.codeConfiguration), source_code_version: apprunnerServiceSourceConfigurationCodeRepositorySourceCodeVersionToTerraform(struct!.sourceCodeVersion), } } export class ApprunnerServiceSourceConfigurationCodeRepositoryOutputReference extends cdktf.ComplexObject { private isEmptyObject = false; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param isSingleItem True if this is a block, false if it's a list */ public constructor(terraformResource: cdktf.ITerraformResource, terraformAttribute: string, isSingleItem: boolean) { super(terraformResource, terraformAttribute, isSingleItem); } public get internalValue(): ApprunnerServiceSourceConfigurationCodeRepository | undefined { let hasAnyValues = this.isEmptyObject; const internalValueResult: any = {}; if (this._repositoryUrl !== undefined) { hasAnyValues = true; internalValueResult.repositoryUrl = this._repositoryUrl; } if (this._codeConfiguration?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.codeConfiguration = this._codeConfiguration?.internalValue; } if (this._sourceCodeVersion?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.sourceCodeVersion = this._sourceCodeVersion?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } public set internalValue(value: ApprunnerServiceSourceConfigurationCodeRepository | undefined) { if (value === undefined) { this.isEmptyObject = false; this._repositoryUrl = undefined; this._codeConfiguration.internalValue = undefined; this._sourceCodeVersion.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._repositoryUrl = value.repositoryUrl; this._codeConfiguration.internalValue = value.codeConfiguration; this._sourceCodeVersion.internalValue = value.sourceCodeVersion; } } // repository_url - computed: false, optional: false, required: true private _repositoryUrl?: string; public get repositoryUrl() { return this.getStringAttribute('repository_url'); } public set repositoryUrl(value: string) { this._repositoryUrl = value; } // Temporarily expose input value. Use with caution. public get repositoryUrlInput() { return this._repositoryUrl; } // code_configuration - computed: false, optional: true, required: false private _codeConfiguration = new ApprunnerServiceSourceConfigurationCodeRepositoryCodeConfigurationOutputReference(this as any, "code_configuration", true); public get codeConfiguration() { return this._codeConfiguration; } public putCodeConfiguration(value: ApprunnerServiceSourceConfigurationCodeRepositoryCodeConfiguration) { this._codeConfiguration.internalValue = value; } public resetCodeConfiguration() { this._codeConfiguration.internalValue = undefined; } // Temporarily expose input value. Use with caution. public get codeConfigurationInput() { return this._codeConfiguration.internalValue; } // source_code_version - computed: false, optional: false, required: true private _sourceCodeVersion = new ApprunnerServiceSourceConfigurationCodeRepositorySourceCodeVersionOutputReference(this as any, "source_code_version", true); public get sourceCodeVersion() { return this._sourceCodeVersion; } public putSourceCodeVersion(value: ApprunnerServiceSourceConfigurationCodeRepositorySourceCodeVersion) { this._sourceCodeVersion.internalValue = value; } // Temporarily expose input value. Use with caution. public get sourceCodeVersionInput() { return this._sourceCodeVersion.internalValue; } } export interface ApprunnerServiceSourceConfigurationImageRepositoryImageConfiguration { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/apprunner_service.html#port ApprunnerService#port} */ readonly port?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/apprunner_service.html#runtime_environment_variables ApprunnerService#runtime_environment_variables} */ readonly runtimeEnvironmentVariables?: { [key: string]: string } | cdktf.IResolvable; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/apprunner_service.html#start_command ApprunnerService#start_command} */ readonly startCommand?: string; } export function apprunnerServiceSourceConfigurationImageRepositoryImageConfigurationToTerraform(struct?: ApprunnerServiceSourceConfigurationImageRepositoryImageConfigurationOutputReference | ApprunnerServiceSourceConfigurationImageRepositoryImageConfiguration): any { if (!cdktf.canInspect(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 { port: cdktf.stringToTerraform(struct!.port), runtime_environment_variables: cdktf.hashMapper(cdktf.anyToTerraform)(struct!.runtimeEnvironmentVariables), start_command: cdktf.stringToTerraform(struct!.startCommand), } } export class ApprunnerServiceSourceConfigurationImageRepositoryImageConfigurationOutputReference extends cdktf.ComplexObject { private isEmptyObject = false; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param isSingleItem True if this is a block, false if it's a list */ public constructor(terraformResource: cdktf.ITerraformResource, terraformAttribute: string, isSingleItem: boolean) { super(terraformResource, terraformAttribute, isSingleItem); } public get internalValue(): ApprunnerServiceSourceConfigurationImageRepositoryImageConfiguration | undefined { let hasAnyValues = this.isEmptyObject; const internalValueResult: any = {}; if (this._port !== undefined) { hasAnyValues = true; internalValueResult.port = this._port; } if (this._runtimeEnvironmentVariables !== undefined) { hasAnyValues = true; internalValueResult.runtimeEnvironmentVariables = this._runtimeEnvironmentVariables; } if (this._startCommand !== undefined) { hasAnyValues = true; internalValueResult.startCommand = this._startCommand; } return hasAnyValues ? internalValueResult : undefined; } public set internalValue(value: ApprunnerServiceSourceConfigurationImageRepositoryImageConfiguration | undefined) { if (value === undefined) { this.isEmptyObject = false; this._port = undefined; this._runtimeEnvironmentVariables = undefined; this._startCommand = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._port = value.port; this._runtimeEnvironmentVariables = value.runtimeEnvironmentVariables; this._startCommand = value.startCommand; } } // port - computed: false, optional: true, required: false private _port?: string; public get port() { return this.getStringAttribute('port'); } public set port(value: string) { this._port = value; } public resetPort() { this._port = undefined; } // Temporarily expose input value. Use with caution. public get portInput() { return this._port; } // runtime_environment_variables - computed: false, optional: true, required: false private _runtimeEnvironmentVariables?: { [key: string]: string } | cdktf.IResolvable; public get runtimeEnvironmentVariables() { // Getting the computed value is not yet implemented return this.interpolationForAttribute('runtime_environment_variables') as any; } public set runtimeEnvironmentVariables(value: { [key: string]: string } | cdktf.IResolvable) { this._runtimeEnvironmentVariables = value; } public resetRuntimeEnvironmentVariables() { this._runtimeEnvironmentVariables = undefined; } // Temporarily expose input value. Use with caution. public get runtimeEnvironmentVariablesInput() { return this._runtimeEnvironmentVariables; } // start_command - computed: false, optional: true, required: false private _startCommand?: string; public get startCommand() { return this.getStringAttribute('start_command'); } public set startCommand(value: string) { this._startCommand = value; } public resetStartCommand() { this._startCommand = undefined; } // Temporarily expose input value. Use with caution. public get startCommandInput() { return this._startCommand; } } export interface ApprunnerServiceSourceConfigurationImageRepository { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/apprunner_service.html#image_identifier ApprunnerService#image_identifier} */ readonly imageIdentifier: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/apprunner_service.html#image_repository_type ApprunnerService#image_repository_type} */ readonly imageRepositoryType: string; /** * image_configuration block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/apprunner_service.html#image_configuration ApprunnerService#image_configuration} */ readonly imageConfiguration?: ApprunnerServiceSourceConfigurationImageRepositoryImageConfiguration; } export function apprunnerServiceSourceConfigurationImageRepositoryToTerraform(struct?: ApprunnerServiceSourceConfigurationImageRepositoryOutputReference | ApprunnerServiceSourceConfigurationImageRepository): any { if (!cdktf.canInspect(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 { image_identifier: cdktf.stringToTerraform(struct!.imageIdentifier), image_repository_type: cdktf.stringToTerraform(struct!.imageRepositoryType), image_configuration: apprunnerServiceSourceConfigurationImageRepositoryImageConfigurationToTerraform(struct!.imageConfiguration), } } export class ApprunnerServiceSourceConfigurationImageRepositoryOutputReference extends cdktf.ComplexObject { private isEmptyObject = false; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param isSingleItem True if this is a block, false if it's a list */ public constructor(terraformResource: cdktf.ITerraformResource, terraformAttribute: string, isSingleItem: boolean) { super(terraformResource, terraformAttribute, isSingleItem); } public get internalValue(): ApprunnerServiceSourceConfigurationImageRepository | undefined { let hasAnyValues = this.isEmptyObject; const internalValueResult: any = {}; if (this._imageIdentifier !== undefined) { hasAnyValues = true; internalValueResult.imageIdentifier = this._imageIdentifier; } if (this._imageRepositoryType !== undefined) { hasAnyValues = true; internalValueResult.imageRepositoryType = this._imageRepositoryType; } if (this._imageConfiguration?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.imageConfiguration = this._imageConfiguration?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } public set internalValue(value: ApprunnerServiceSourceConfigurationImageRepository | undefined) { if (value === undefined) { this.isEmptyObject = false; this._imageIdentifier = undefined; this._imageRepositoryType = undefined; this._imageConfiguration.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._imageIdentifier = value.imageIdentifier; this._imageRepositoryType = value.imageRepositoryType; this._imageConfiguration.internalValue = value.imageConfiguration; } } // image_identifier - computed: false, optional: false, required: true private _imageIdentifier?: string; public get imageIdentifier() { return this.getStringAttribute('image_identifier'); } public set imageIdentifier(value: string) { this._imageIdentifier = value; } // Temporarily expose input value. Use with caution. public get imageIdentifierInput() { return this._imageIdentifier; } // image_repository_type - computed: false, optional: false, required: true private _imageRepositoryType?: string; public get imageRepositoryType() { return this.getStringAttribute('image_repository_type'); } public set imageRepositoryType(value: string) { this._imageRepositoryType = value; } // Temporarily expose input value. Use with caution. public get imageRepositoryTypeInput() { return this._imageRepositoryType; } // image_configuration - computed: false, optional: true, required: false private _imageConfiguration = new ApprunnerServiceSourceConfigurationImageRepositoryImageConfigurationOutputReference(this as any, "image_configuration", true); public get imageConfiguration() { return this._imageConfiguration; } public putImageConfiguration(value: ApprunnerServiceSourceConfigurationImageRepositoryImageConfiguration) { this._imageConfiguration.internalValue = value; } public resetImageConfiguration() { this._imageConfiguration.internalValue = undefined; } // Temporarily expose input value. Use with caution. public get imageConfigurationInput() { return this._imageConfiguration.internalValue; } } export interface ApprunnerServiceSourceConfiguration { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/apprunner_service.html#auto_deployments_enabled ApprunnerService#auto_deployments_enabled} */ readonly autoDeploymentsEnabled?: boolean | cdktf.IResolvable; /** * authentication_configuration block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/apprunner_service.html#authentication_configuration ApprunnerService#authentication_configuration} */ readonly authenticationConfiguration?: ApprunnerServiceSourceConfigurationAuthenticationConfiguration; /** * code_repository block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/apprunner_service.html#code_repository ApprunnerService#code_repository} */ readonly codeRepository?: ApprunnerServiceSourceConfigurationCodeRepository; /** * image_repository block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/apprunner_service.html#image_repository ApprunnerService#image_repository} */ readonly imageRepository?: ApprunnerServiceSourceConfigurationImageRepository; } export function apprunnerServiceSourceConfigurationToTerraform(struct?: ApprunnerServiceSourceConfigurationOutputReference | ApprunnerServiceSourceConfiguration): any { if (!cdktf.canInspect(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 { auto_deployments_enabled: cdktf.booleanToTerraform(struct!.autoDeploymentsEnabled), authentication_configuration: apprunnerServiceSourceConfigurationAuthenticationConfigurationToTerraform(struct!.authenticationConfiguration), code_repository: apprunnerServiceSourceConfigurationCodeRepositoryToTerraform(struct!.codeRepository), image_repository: apprunnerServiceSourceConfigurationImageRepositoryToTerraform(struct!.imageRepository), } } export class ApprunnerServiceSourceConfigurationOutputReference extends cdktf.ComplexObject { private isEmptyObject = false; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param isSingleItem True if this is a block, false if it's a list */ public constructor(terraformResource: cdktf.ITerraformResource, terraformAttribute: string, isSingleItem: boolean) { super(terraformResource, terraformAttribute, isSingleItem); } public get internalValue(): ApprunnerServiceSourceConfiguration | undefined { let hasAnyValues = this.isEmptyObject; const internalValueResult: any = {}; if (this._autoDeploymentsEnabled !== undefined) { hasAnyValues = true; internalValueResult.autoDeploymentsEnabled = this._autoDeploymentsEnabled; } if (this._authenticationConfiguration?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.authenticationConfiguration = this._authenticationConfiguration?.internalValue; } if (this._codeRepository?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.codeRepository = this._codeRepository?.internalValue; } if (this._imageRepository?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.imageRepository = this._imageRepository?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } public set internalValue(value: ApprunnerServiceSourceConfiguration | undefined) { if (value === undefined) { this.isEmptyObject = false; this._autoDeploymentsEnabled = undefined; this._authenticationConfiguration.internalValue = undefined; this._codeRepository.internalValue = undefined; this._imageRepository.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._autoDeploymentsEnabled = value.autoDeploymentsEnabled; this._authenticationConfiguration.internalValue = value.authenticationConfiguration; this._codeRepository.internalValue = value.codeRepository; this._imageRepository.internalValue = value.imageRepository; } } // auto_deployments_enabled - computed: false, optional: true, required: false private _autoDeploymentsEnabled?: boolean | cdktf.IResolvable; public get autoDeploymentsEnabled() { return this.getBooleanAttribute('auto_deployments_enabled') as any; } public set autoDeploymentsEnabled(value: boolean | cdktf.IResolvable) { this._autoDeploymentsEnabled = value; } public resetAutoDeploymentsEnabled() { this._autoDeploymentsEnabled = undefined; } // Temporarily expose input value. Use with caution. public get autoDeploymentsEnabledInput() { return this._autoDeploymentsEnabled; } // authentication_configuration - computed: false, optional: true, required: false private _authenticationConfiguration = new ApprunnerServiceSourceConfigurationAuthenticationConfigurationOutputReference(this as any, "authentication_configuration", true); public get authenticationConfiguration() { return this._authenticationConfiguration; } public putAuthenticationConfiguration(value: ApprunnerServiceSourceConfigurationAuthenticationConfiguration) { this._authenticationConfiguration.internalValue = value; } public resetAuthenticationConfiguration() { this._authenticationConfiguration.internalValue = undefined; } // Temporarily expose input value. Use with caution. public get authenticationConfigurationInput() { return this._authenticationConfiguration.internalValue; } // code_repository - computed: false, optional: true, required: false private _codeRepository = new ApprunnerServiceSourceConfigurationCodeRepositoryOutputReference(this as any, "code_repository", true); public get codeRepository() { return this._codeRepository; } public putCodeRepository(value: ApprunnerServiceSourceConfigurationCodeRepository) { this._codeRepository.internalValue = value; } public resetCodeRepository() { this._codeRepository.internalValue = undefined; } // Temporarily expose input value. Use with caution. public get codeRepositoryInput() { return this._codeRepository.internalValue; } // image_repository - computed: false, optional: true, required: false private _imageRepository = new ApprunnerServiceSourceConfigurationImageRepositoryOutputReference(this as any, "image_repository", true); public get imageRepository() { return this._imageRepository; } public putImageRepository(value: ApprunnerServiceSourceConfigurationImageRepository) { this._imageRepository.internalValue = value; } public resetImageRepository() { this._imageRepository.internalValue = undefined; } // Temporarily expose input value. Use with caution. public get imageRepositoryInput() { return this._imageRepository.internalValue; } } /** * Represents a {@link https://www.terraform.io/docs/providers/aws/r/apprunner_service.html aws_apprunner_service} */ export class ApprunnerService extends cdktf.TerraformResource { // ================= // STATIC PROPERTIES // ================= public static readonly tfResourceType: string = "aws_apprunner_service"; // =========== // INITIALIZER // =========== /** * Create a new {@link https://www.terraform.io/docs/providers/aws/r/apprunner_service.html aws_apprunner_service} 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 ApprunnerServiceConfig */ public constructor(scope: Construct, id: string, config: ApprunnerServiceConfig) { super(scope, id, { terraformResourceType: 'aws_apprunner_service', terraformGeneratorMetadata: { providerName: 'aws' }, provider: config.provider, dependsOn: config.dependsOn, count: config.count, lifecycle: config.lifecycle }); this._autoScalingConfigurationArn = config.autoScalingConfigurationArn; this._serviceName = config.serviceName; this._tags = config.tags; this._tagsAll = config.tagsAll; this._encryptionConfiguration.internalValue = config.encryptionConfiguration; this._healthCheckConfiguration.internalValue = config.healthCheckConfiguration; this._instanceConfiguration.internalValue = config.instanceConfiguration; this._sourceConfiguration.internalValue = config.sourceConfiguration; } // ========== // ATTRIBUTES // ========== // arn - computed: true, optional: false, required: false public get arn() { return this.getStringAttribute('arn'); } // auto_scaling_configuration_arn - computed: true, optional: true, required: false private _autoScalingConfigurationArn?: string; public get autoScalingConfigurationArn() { return this.getStringAttribute('auto_scaling_configuration_arn'); } public set autoScalingConfigurationArn(value: string) { this._autoScalingConfigurationArn = value; } public resetAutoScalingConfigurationArn() { this._autoScalingConfigurationArn = undefined; } // Temporarily expose input value. Use with caution. public get autoScalingConfigurationArnInput() { return this._autoScalingConfigurationArn; } // id - computed: true, optional: true, required: false public get id() { return this.getStringAttribute('id'); } // service_id - computed: true, optional: false, required: false public get serviceId() { return this.getStringAttribute('service_id'); } // service_name - computed: false, optional: false, required: true private _serviceName?: string; public get serviceName() { return this.getStringAttribute('service_name'); } public set serviceName(value: string) { this._serviceName = value; } // Temporarily expose input value. Use with caution. public get serviceNameInput() { return this._serviceName; } // service_url - computed: true, optional: false, required: false public get serviceUrl() { return this.getStringAttribute('service_url'); } // status - computed: true, optional: false, required: false public get status() { return this.getStringAttribute('status'); } // tags - computed: false, optional: true, required: false private _tags?: { [key: string]: string } | cdktf.IResolvable; public get tags() { // Getting the computed value is not yet implemented return this.interpolationForAttribute('tags') as any; } public set tags(value: { [key: string]: string } | cdktf.IResolvable) { this._tags = value; } public resetTags() { this._tags = undefined; } // Temporarily expose input value. Use with caution. public get tagsInput() { return this._tags; } // tags_all - computed: true, optional: true, required: false private _tagsAll?: { [key: string]: string } | cdktf.IResolvable; public get tagsAll() { // Getting the computed value is not yet implemented return this.interpolationForAttribute('tags_all') as any; } public set tagsAll(value: { [key: string]: string } | cdktf.IResolvable) { this._tagsAll = value; } public resetTagsAll() { this._tagsAll = undefined; } // Temporarily expose input value. Use with caution. public get tagsAllInput() { return this._tagsAll; } // encryption_configuration - computed: false, optional: true, required: false private _encryptionConfiguration = new ApprunnerServiceEncryptionConfigurationOutputReference(this as any, "encryption_configuration", true); public get encryptionConfiguration() { return this._encryptionConfiguration; } public putEncryptionConfiguration(value: ApprunnerServiceEncryptionConfiguration) { this._encryptionConfiguration.internalValue = value; } public resetEncryptionConfiguration() { this._encryptionConfiguration.internalValue = undefined; } // Temporarily expose input value. Use with caution. public get encryptionConfigurationInput() { return this._encryptionConfiguration.internalValue; } // health_check_configuration - computed: false, optional: true, required: false private _healthCheckConfiguration = new ApprunnerServiceHealthCheckConfigurationOutputReference(this as any, "health_check_configuration", true); public get healthCheckConfiguration() { return this._healthCheckConfiguration; } public putHealthCheckConfiguration(value: ApprunnerServiceHealthCheckConfiguration) { this._healthCheckConfiguration.internalValue = value; } public resetHealthCheckConfiguration() { this._healthCheckConfiguration.internalValue = undefined; } // Temporarily expose input value. Use with caution. public get healthCheckConfigurationInput() { return this._healthCheckConfiguration.internalValue; } // instance_configuration - computed: false, optional: true, required: false private _instanceConfiguration = new ApprunnerServiceInstanceConfigurationOutputReference(this as any, "instance_configuration", true); public get instanceConfiguration() { return this._instanceConfiguration; } public putInstanceConfiguration(value: ApprunnerServiceInstanceConfiguration) { this._instanceConfiguration.internalValue = value; } public resetInstanceConfiguration() { this._instanceConfiguration.internalValue = undefined; } // Temporarily expose input value. Use with caution. public get instanceConfigurationInput() { return this._instanceConfiguration.internalValue; } // source_configuration - computed: false, optional: false, required: true private _sourceConfiguration = new ApprunnerServiceSourceConfigurationOutputReference(this as any, "source_configuration", true); public get sourceConfiguration() { return this._sourceConfiguration; } public putSourceConfiguration(value: ApprunnerServiceSourceConfiguration) { this._sourceConfiguration.internalValue = value; } // Temporarily expose input value. Use with caution. public get sourceConfigurationInput() { return this._sourceConfiguration.internalValue; } // ========= // SYNTHESIS // ========= protected synthesizeAttributes(): { [name: string]: any } { return { auto_scaling_configuration_arn: cdktf.stringToTerraform(this._autoScalingConfigurationArn), service_name: cdktf.stringToTerraform(this._serviceName), tags: cdktf.hashMapper(cdktf.anyToTerraform)(this._tags), tags_all: cdktf.hashMapper(cdktf.anyToTerraform)(this._tagsAll), encryption_configuration: apprunnerServiceEncryptionConfigurationToTerraform(this._encryptionConfiguration.internalValue), health_check_configuration: apprunnerServiceHealthCheckConfigurationToTerraform(this._healthCheckConfiguration.internalValue), instance_configuration: apprunnerServiceInstanceConfigurationToTerraform(this._instanceConfiguration.internalValue), source_configuration: apprunnerServiceSourceConfigurationToTerraform(this._sourceConfiguration.internalValue), }; } }