import * as core from "@terrascript/core"; export interface LayerVersionArgs extends core.ResourceArgs { /** * (Optional) List of [Architectures][4] this layer is compatible with. Currently `x86_64` and `arm64` * can be specified. */ compatibleArchitectures?: core.Array | core.ArrayOut; /** * (Optional) List of [Runtimes][2] this layer is compatible with. Up to 5 runtimes can be specified. */ compatibleRuntimes?: core.Array | core.ArrayOut; /** * (Optional) Description of what your Lambda Layer does. */ description?: string | core.StringOut; filename?: string | core.StringOut; /** * (Required) Unique name for your Lambda Layer */ layerName: string | core.StringOut; /** * (Optional) License info for your Lambda Layer. See [License Info][3]. */ licenseInfo?: string | core.StringOut; /** * (Optional) S3 bucket location containing the function's deployment package. Conflicts with `filename * . This bucket must reside in the same AWS region where you are creating the Lambda function. */ s3Bucket?: string | core.StringOut; /** * (Optional) S3 key of an object containing the function's deployment package. Conflicts with `filenam * e`. */ s3Key?: string | core.StringOut; /** * (Optional) Object version containing the function's deployment package. Conflicts with `filename`. */ s3ObjectVersion?: string | core.StringOut; /** * (Optional) Whether to retain the old version of a previously deployed Lambda Layer. Default is `fals * e`. When this is not set to `true`, changing any of `compatible_architectures`, `compatible_runtimes * , `description`, `filename`, `layer_name`, `license_info`, `s3_bucket`, `s3_key`, `s3_object_versio * n`, or `source_code_hash` forces deletion of the existing layer version and creation of a new layer * version. */ skipDestroy?: boolean | core.BooleanOut; /** * (Optional) Used to trigger updates. Must be set to a base64-encoded SHA256 hash of the package file * specified with either `filename` or `s3_key`. The usual way to set this is `${filebase64sha256("file * .zip")}` (Terraform 0.11.12 or later) or `${base64sha256(file("file.zip"))}` (Terraform 0.11.11 and * earlier), where "file.zip" is the local filename of the lambda layer source archive. */ sourceCodeHash?: string | core.StringOut; } export class LayerVersion extends core.Resource { /** * ARN of the Lambda Layer with version. */ @core.attr(String, { computed: true }) public arn!: string | core.StringOut; /** * (Optional) List of [Architectures][4] this layer is compatible with. Currently `x86_64` and `arm64` * can be specified. */ @core.attr(String, { kind: "array" }) public compatibleArchitectures?: | core.Array | core.ArrayOut; /** * (Optional) List of [Runtimes][2] this layer is compatible with. Up to 5 runtimes can be specified. */ @core.attr(String, { kind: "array" }) public compatibleRuntimes?: | core.Array | core.ArrayOut; /** * Date this resource was created. */ @core.attr(String, { computed: true }) public createdDate!: string | core.StringOut; /** * (Optional) Description of what your Lambda Layer does. */ @core.attr(String) public description?: string | core.StringOut; @core.attr(String) public filename?: string | core.StringOut; @core.attr(String, { computed: true }) public id!: string | core.StringOut; /** * ARN of the Lambda Layer without version. */ @core.attr(String, { computed: true }) public layerArn!: string | core.StringOut; /** * (Required) Unique name for your Lambda Layer */ @core.attr(String) public layerName!: string | core.StringOut; /** * (Optional) License info for your Lambda Layer. See [License Info][3]. */ @core.attr(String) public licenseInfo?: string | core.StringOut; /** * (Optional) S3 bucket location containing the function's deployment package. Conflicts with `filename * . This bucket must reside in the same AWS region where you are creating the Lambda function. */ @core.attr(String) public s3Bucket?: string | core.StringOut; /** * (Optional) S3 key of an object containing the function's deployment package. Conflicts with `filenam * e`. */ @core.attr(String) public s3Key?: string | core.StringOut; /** * (Optional) Object version containing the function's deployment package. Conflicts with `filename`. */ @core.attr(String) public s3ObjectVersion?: string | core.StringOut; /** * ARN of a signing job. */ @core.attr(String, { computed: true }) public signingJobArn!: string | core.StringOut; /** * ARN for a signing profile version. */ @core.attr(String, { computed: true }) public signingProfileVersionArn!: string | core.StringOut; /** * (Optional) Whether to retain the old version of a previously deployed Lambda Layer. Default is `fals * e`. When this is not set to `true`, changing any of `compatible_architectures`, `compatible_runtimes * , `description`, `filename`, `layer_name`, `license_info`, `s3_bucket`, `s3_key`, `s3_object_versio * n`, or `source_code_hash` forces deletion of the existing layer version and creation of a new layer * version. */ @core.attr(Boolean) public skipDestroy?: boolean | core.BooleanOut; /** * (Optional) Used to trigger updates. Must be set to a base64-encoded SHA256 hash of the package file * specified with either `filename` or `s3_key`. The usual way to set this is `${filebase64sha256("file * .zip")}` (Terraform 0.11.12 or later) or `${base64sha256(file("file.zip"))}` (Terraform 0.11.11 and * earlier), where "file.zip" is the local filename of the lambda layer source archive. */ @core.attr(String, { computed: true }) public sourceCodeHash?: string | core.StringOut; /** * Size in bytes of the function .zip file. */ @core.attr(Number, { computed: true }) public sourceCodeSize!: number | core.NumberOut; /** * Lambda Layer version. */ @core.attr(String, { computed: true }) public version!: string | core.StringOut; constructor(name: string, args?: LayerVersionArgs) { super(name, "aws_lambda_layer_version", args); } public override getNamespace(): string { return "aws_lambda"; } }