Reads a file that contains sensitive data, from the local filesystem.
The attributes exposed by this data source are marked as sensitive.
// 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 { DataLocalSensitiveFile } from "./.gen/providers/local/data-local-sensitive-file";
class MyConvertedCode extends TerraformStack {
constructor(scope: Construct, name: string) {
super(scope, name);
const foo = new DataLocalSensitiveFile(this, "foo", {
filename: "${path.module}/foo.bar",
});
new S3Object(this, "shared_zip", {
bucket: "my-bucket",
content: Token.asString(foo.content),
key: "my-key",
});
}
}
filename
(String) Path to the file that will be read. The data source will return an error if the file does not exist.content
(String, Sensitive) Raw content of the file that was read, as UTF-8 encoded string. Files that do not contain UTF-8 text will have invalid UTF-8 sequences in content
replaced with the Unicode replacement character.contentBase64
(String, Sensitive) Base64 encoded version of the file content (use this when dealing with binary data).contentBase64Sha256
(String) Base64 encoded SHA256 checksum of file content.contentBase64Sha512
(String) Base64 encoded SHA512 checksum of file content.contentMd5
(String) MD5 checksum of file content.contentSha1
(String) SHA1 checksum of file content.contentSha256
(String) SHA256 checksum of file content.contentSha512
(String) SHA512 checksum of file content.id
(String) The hexadecimal encoding of the SHA1 checksum of the file content.