Generates an archive from content, a file, or directory of files.
# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug
from constructs import Construct
from cdktf import TerraformStack
#
# Provider bindings are generated by running `cdktf get`.
# See https://cdk.tf/provider-generation for more details.
#
from imports.archive.data_archive_file import DataArchiveFile
class MyConvertedCode(TerraformStack):
def __init__(self, scope, name):
super().__init__(scope, name)
DataArchiveFile(self, "init",
output_path="${path.module}/files/init.zip",
source_file="${path.module}/init.tpl",
type="zip"
)
# 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.archive.data_archive_file import DataArchiveFile
class MyConvertedCode(TerraformStack):
def __init__(self, scope, name):
super().__init__(scope, name)
DataArchiveFile(self, "dotfiles",
excludes=["${path.module}/unwanted.zip"],
output_path="${path.module}/files/dotfiles.zip",
source=[DataArchiveFileSource(
content=Token.as_string(vimrc.rendered),
filename=".vimrc"
), DataArchiveFileSource(
content=Token.as_string(ssh_config.rendered),
filename=".ssh/config"
)
],
type="zip"
)
# DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug
from constructs import Construct
from cdktf import TerraformStack
#
# Provider bindings are generated by running `cdktf get`.
# See https://cdk.tf/provider-generation for more details.
#
from imports.archive.data_archive_file import DataArchiveFile
class MyConvertedCode(TerraformStack):
def __init__(self, scope, name):
super().__init__(scope, name)
DataArchiveFile(self, "lambda_my_function",
output_file_mode="0666",
output_path="${path.module}/files/lambda-my-function.js.zip",
source_file="${path.module}/../lambda/my-function/index.js",
type="zip"
)
output_path
(String) The output of the archive file.type
(String) The type of archive to generate. NOTE: zip
is supported.exclude_symlink_directories
(Boolean) Boolean flag indicating whether symbolically linked directories should be excluded during the creation of the archive. Defaults to false
.excludes
(Set of String) Specify files to ignore when reading the source_dir
.output_file_mode
(String) String that specifies the octal file mode for all archived files. For example: "0666"
. Setting this will ensure that cross platform usage of this module will not vary the modes of archived files (and ultimately checksums) resulting in more deterministic behavior.source
(Block Set) Specifies attributes of a single source file to include into the archive. One and only one of source
, source_content_filename
(with source_content
), source_file
, or source_dir
must be specified. (see below for nested schema)source_content
(String) Add only this content to the archive with source_content_filename
as the filename. One and only one of source
, source_content_filename
(with source_content
), source_file
, or source_dir
must be specified.source_content_filename
(String) Set this as the filename when using source_content
. One and only one of source
, source_content_filename
(with source_content
), source_file
, or source_dir
must be specified.source_dir
(String) Package entire contents of this directory into the archive. One and only one of source
, source_content_filename
(with source_content
), source_file
, or source_dir
must be specified.source_file
(String) Package this file into the archive. One and only one of source
, source_content_filename
(with source_content
), source_file
, or source_dir
must be specified.id
(String) The sha1 checksum hash of the output.output_base64sha256
(String) Base64 Encoded SHA256 checksum of output fileoutput_base64sha512
(String) Base64 Encoded SHA512 checksum of output fileoutput_md5
(String) MD5 of output fileoutput_sha
(String) SHA1 checksum of output fileoutput_sha256
(String) SHA256 checksum of output fileoutput_sha512
(String) SHA512 checksum of output fileoutput_size
(Number) The byte size of the output archive file.source
Required:
content
(String) Add this content to the archive with filename
as the filename.filename
(String) Set this as the filename when declaring a source
.