local_file (Data Source)

Reads a file from the local filesystem.

Example Usage

// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug
import { Construct } from "constructs";
import { Token, TerraformStack } from "cdktf";
/*
 * Provider bindings are generated by running `cdktf get`.
 * See https://cdk.tf/provider-generation for more details.
 */
import { S3Object } from "./.gen/providers/aws/s3-object";
import { DataLocalFile } from "./.gen/providers/local/data-local-file";
class MyConvertedCode extends TerraformStack {
  constructor(scope: Construct, name: string) {
    super(scope, name);
    const foo = new DataLocalFile(this, "foo", {
      filename: "${path.module}/foo.bar",
    });
    new S3Object(this, "shared_zip", {
      bucket: "my-bucket",
      content: Token.asString(foo.content),
      key: "my-key",
    });
  }
}

Schema

Required

Read-Only