Reads a file from the local filesystem.
# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug
from constructs import Construct
from cdktf import Token, TerraformStack
#
# Provider bindings are generated by running `cdktf get`.
# See https://cdk.tf/provider-generation for more details.
#
from imports.aws.s3_object import S3Object
from imports.local.data_local_file import DataLocalFile
class MyConvertedCode(TerraformStack):
def __init__(self, scope, name):
super().__init__(scope, name)
foo = DataLocalFile(self, "foo",
filename="${path.module}/foo.bar"
)
S3Object(self, "shared_zip",
bucket="my-bucket",
content=Token.as_string(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) 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.content_base64
(String) Base64 encoded version of the file content (use this when dealing with binary data).content_base64sha256
(String) Base64 encoded SHA256 checksum of file content.content_base64sha512
(String) Base64 encoded SHA512 checksum of file content.content_md5
(String) MD5 checksum of file content.content_sha1
(String) SHA1 checksum of file content.content_sha256
(String) SHA256 checksum of file content.content_sha512
(String) SHA512 checksum of file content.id
(String) The hexadecimal encoding of the SHA1 checksum of the file content.