cdktn 0.25.0.dev26__tar.gz → 0.25.0.dev28__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cdktn
3
- Version: 0.25.0.dev26
3
+ Version: 0.25.0.dev28
4
4
  Summary: Cloud Development Kit for Terraform
5
5
  Home-page: https://github.com/open-constructs/cdk-terrain
6
6
  Author: OpenConstructs
@@ -5,7 +5,7 @@ kwargs = json.loads(
5
5
  """
6
6
  {
7
7
  "name": "cdktn",
8
- "version": "0.25.0.dev26",
8
+ "version": "0.25.0.dev28",
9
9
  "description": "Cloud Development Kit for Terraform",
10
10
  "license": "MPL-2.0",
11
11
  "url": "https://github.com/open-constructs/cdk-terrain",
@@ -27,7 +27,7 @@ kwargs = json.loads(
27
27
  ],
28
28
  "package_data": {
29
29
  "cdktn._jsii": [
30
- "cdktn@0.25.0-pre.26.jsii.tgz"
30
+ "cdktn@0.25.0-pre.28.jsii.tgz"
31
31
  ],
32
32
  "cdktn": [
33
33
  "py.typed"
@@ -782,6 +782,182 @@ class AssetPackaging(metaclass=jsii.JSIIMeta, jsii_type="cdktn.AssetPackaging"):
782
782
  return typing.cast("IAssetPackaging", jsii.sget(cls, "ZIP"))
783
783
 
784
784
 
785
+ @jsii.data_type(
786
+ jsii_type="cdktn.AssetStagingOptions",
787
+ jsii_struct_bases=[AssetOptions],
788
+ name_mapping={
789
+ "asset_hash": "assetHash",
790
+ "asset_hash_type": "assetHashType",
791
+ "packaging": "packaging",
792
+ "source_path": "sourcePath",
793
+ "exclude": "exclude",
794
+ "extra_hash": "extraHash",
795
+ "ignore_strategy": "ignoreStrategy",
796
+ },
797
+ )
798
+ class AssetStagingOptions(AssetOptions):
799
+ def __init__(
800
+ self,
801
+ *,
802
+ asset_hash: typing.Optional[builtins.str] = None,
803
+ asset_hash_type: typing.Optional["AssetHashType"] = None,
804
+ packaging: "IAssetPackaging",
805
+ source_path: builtins.str,
806
+ exclude: typing.Optional[typing.Sequence[builtins.str]] = None,
807
+ extra_hash: typing.Optional[builtins.str] = None,
808
+ ignore_strategy: typing.Optional["IIgnoreStrategy"] = None,
809
+ ) -> None:
810
+ '''(experimental) Options for {@link AssetStaging}.
811
+
812
+ :param asset_hash: (experimental) Specify a custom hash for this asset. If ``assetHashType`` is set it must be set to ``AssetHashType.CUSTOM``. The value is used verbatim as the asset hash, and because it names the staged asset file it may only contain letters, digits, ``_``, ``.`` and ``-``. NOTE: the hash is used in order to identify a specific revision of the asset, and used for optimizing and caching deployment activities related to this asset such as packaging, uploading to cloud storage, etc. If you chose to customize the hash, you will need to make sure it is updated every time the asset changes, or otherwise it is possible that some deployments will not be invalidated. Default: - based on ``assetHashType``
813
+ :param asset_hash_type: (experimental) Specifies the type of hash to calculate for this asset. If ``assetHash`` is configured, this option must be ``undefined`` or ``AssetHashType.CUSTOM``. Default: - the default is ``AssetHashType.SOURCE``, but if ``assetHash`` is explicitly specified this value defaults to ``AssetHashType.CUSTOM``.
814
+ :param packaging: (experimental) How the staged result is produced and shaped. The caller decides this (e.g. from its own ``AssetType``) — ``AssetStaging`` never infers or changes it based on ``exclude``/``extraHash``.
815
+ :param source_path: (experimental) Absolute path to the source file or directory. Resolving a relative path against ``cdktf.json`` is the caller's responsibility.
816
+ :param exclude: (experimental) Paths to exclude, relative to ``sourcePath``. Cannot be combined with ``ignoreStrategy``, which replaces this matcher rather than layering on top of it. Default: - nothing is excluded
817
+ :param extra_hash: (experimental) Extra information to fold into the hash (e.g. build instructions and other inputs). Default: - no extra hash
818
+ :param ignore_strategy: (experimental) Exclusion matching, for callers that need ``.gitignore`` / ``.dockerignore`` parity rather than the built-in exact-path / suffix / directory matcher. Default: - ``exclude`` is used with the built-in matcher
819
+
820
+ :stability: experimental
821
+ '''
822
+ if __debug__:
823
+ type_hints = cached_type_hints(_typecheckingstub__5026244ff290924dad88f65421d8025b8bcb105d693dec43cd93a0c7d8d0e7ba)
824
+ check_type(argname="argument asset_hash", value=asset_hash, expected_type=type_hints["asset_hash"])
825
+ check_type(argname="argument asset_hash_type", value=asset_hash_type, expected_type=type_hints["asset_hash_type"])
826
+ check_type(argname="argument packaging", value=packaging, expected_type=type_hints["packaging"])
827
+ check_type(argname="argument source_path", value=source_path, expected_type=type_hints["source_path"])
828
+ check_type(argname="argument exclude", value=exclude, expected_type=type_hints["exclude"])
829
+ check_type(argname="argument extra_hash", value=extra_hash, expected_type=type_hints["extra_hash"])
830
+ check_type(argname="argument ignore_strategy", value=ignore_strategy, expected_type=type_hints["ignore_strategy"])
831
+ self._values: typing.Dict[builtins.str, typing.Any] = {
832
+ "packaging": packaging,
833
+ "source_path": source_path,
834
+ }
835
+ if asset_hash is not None:
836
+ self._values["asset_hash"] = asset_hash
837
+ if asset_hash_type is not None:
838
+ self._values["asset_hash_type"] = asset_hash_type
839
+ if exclude is not None:
840
+ self._values["exclude"] = exclude
841
+ if extra_hash is not None:
842
+ self._values["extra_hash"] = extra_hash
843
+ if ignore_strategy is not None:
844
+ self._values["ignore_strategy"] = ignore_strategy
845
+
846
+ @builtins.property
847
+ def asset_hash(self) -> typing.Optional[builtins.str]:
848
+ '''(experimental) Specify a custom hash for this asset.
849
+
850
+ If ``assetHashType`` is set it must
851
+ be set to ``AssetHashType.CUSTOM``. The value is used verbatim as the asset
852
+ hash, and because it names the staged asset file it may only contain
853
+ letters, digits, ``_``, ``.`` and ``-``.
854
+
855
+ NOTE: the hash is used in order to identify a specific revision of the asset, and
856
+ used for optimizing and caching deployment activities related to this asset such as
857
+ packaging, uploading to cloud storage, etc. If you chose to customize the hash, you will
858
+ need to make sure it is updated every time the asset changes, or otherwise it is
859
+ possible that some deployments will not be invalidated.
860
+
861
+ :default: - based on ``assetHashType``
862
+
863
+ :stability: experimental
864
+ '''
865
+ result = self._values.get("asset_hash")
866
+ return typing.cast(typing.Optional[builtins.str], result)
867
+
868
+ @builtins.property
869
+ def asset_hash_type(self) -> typing.Optional["AssetHashType"]:
870
+ '''(experimental) Specifies the type of hash to calculate for this asset.
871
+
872
+ If ``assetHash`` is configured, this option must be ``undefined`` or
873
+ ``AssetHashType.CUSTOM``.
874
+
875
+ :default:
876
+
877
+ - the default is ``AssetHashType.SOURCE``, but if ``assetHash`` is
878
+ explicitly specified this value defaults to ``AssetHashType.CUSTOM``.
879
+
880
+ :stability: experimental
881
+ '''
882
+ result = self._values.get("asset_hash_type")
883
+ return typing.cast(typing.Optional["AssetHashType"], result)
884
+
885
+ @builtins.property
886
+ def packaging(self) -> "IAssetPackaging":
887
+ '''(experimental) How the staged result is produced and shaped.
888
+
889
+ The caller decides this
890
+ (e.g. from its own ``AssetType``) — ``AssetStaging`` never infers or changes
891
+ it based on ``exclude``/``extraHash``.
892
+
893
+ :stability: experimental
894
+ '''
895
+ result = self._values.get("packaging")
896
+ assert result is not None, "Required property 'packaging' is missing"
897
+ return typing.cast("IAssetPackaging", result)
898
+
899
+ @builtins.property
900
+ def source_path(self) -> builtins.str:
901
+ '''(experimental) Absolute path to the source file or directory.
902
+
903
+ Resolving a relative path
904
+ against ``cdktf.json`` is the caller's responsibility.
905
+
906
+ :stability: experimental
907
+ '''
908
+ result = self._values.get("source_path")
909
+ assert result is not None, "Required property 'source_path' is missing"
910
+ return typing.cast(builtins.str, result)
911
+
912
+ @builtins.property
913
+ def exclude(self) -> typing.Optional[typing.List[builtins.str]]:
914
+ '''(experimental) Paths to exclude, relative to ``sourcePath``.
915
+
916
+ Cannot be combined with
917
+ ``ignoreStrategy``, which replaces this matcher rather than layering on
918
+ top of it.
919
+
920
+ :default: - nothing is excluded
921
+
922
+ :stability: experimental
923
+ '''
924
+ result = self._values.get("exclude")
925
+ return typing.cast(typing.Optional[typing.List[builtins.str]], result)
926
+
927
+ @builtins.property
928
+ def extra_hash(self) -> typing.Optional[builtins.str]:
929
+ '''(experimental) Extra information to fold into the hash (e.g. build instructions and other inputs).
930
+
931
+ :default: - no extra hash
932
+
933
+ :stability: experimental
934
+ '''
935
+ result = self._values.get("extra_hash")
936
+ return typing.cast(typing.Optional[builtins.str], result)
937
+
938
+ @builtins.property
939
+ def ignore_strategy(self) -> typing.Optional["IIgnoreStrategy"]:
940
+ '''(experimental) Exclusion matching, for callers that need ``.gitignore`` / ``.dockerignore`` parity rather than the built-in exact-path / suffix / directory matcher.
941
+
942
+ :default: - ``exclude`` is used with the built-in matcher
943
+
944
+ :stability: experimental
945
+ '''
946
+ result = self._values.get("ignore_strategy")
947
+ return typing.cast(typing.Optional["IIgnoreStrategy"], result)
948
+
949
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
950
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
951
+
952
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
953
+ return not (rhs == self)
954
+
955
+ def __repr__(self) -> str:
956
+ return "AssetStagingOptions(%s)" % ", ".join(
957
+ k + "=" + repr(v) for k, v in self._values.items()
958
+ )
959
+
960
+
785
961
  @jsii.enum(jsii_type="cdktn.AssetType")
786
962
  class AssetType(enum.Enum):
787
963
  '''
@@ -5217,6 +5393,24 @@ class IAssetPackaging(typing_extensions.Protocol):
5217
5393
  '''
5218
5394
  ...
5219
5395
 
5396
+ @builtins.property
5397
+ @jsii.member(jsii_name="omitsDirectoryEntries")
5398
+ def omits_directory_entries(self) -> builtins.bool:
5399
+ '''(experimental) Whether ``pack`` emits an artifact with no directory entries of its own — only the ignore-strategy-aware source walk.
5400
+
5401
+ ``hashPath``'s ``archive`` frame
5402
+ must agree with this or the hash and the artifact describe different
5403
+ file sets.
5404
+
5405
+ ``ZipPackaging`` sets this because ``archiveSync`` never emits ZIP directory
5406
+ entries. A directory-producing packaging that mirrors the source tree
5407
+ (e.g. ``DirectoryPackaging``) leaves this false, since its directories are
5408
+ real entries on disk.
5409
+
5410
+ :stability: experimental
5411
+ '''
5412
+ ...
5413
+
5220
5414
  @builtins.property
5221
5415
  @jsii.member(jsii_name="producesDirectory")
5222
5416
  def produces_directory(self) -> builtins.bool:
@@ -5271,6 +5465,24 @@ class _IAssetPackagingProxy:
5271
5465
  '''
5272
5466
  return typing.cast(builtins.str, jsii.get(self, "extension"))
5273
5467
 
5468
+ @builtins.property
5469
+ @jsii.member(jsii_name="omitsDirectoryEntries")
5470
+ def omits_directory_entries(self) -> builtins.bool:
5471
+ '''(experimental) Whether ``pack`` emits an artifact with no directory entries of its own — only the ignore-strategy-aware source walk.
5472
+
5473
+ ``hashPath``'s ``archive`` frame
5474
+ must agree with this or the hash and the artifact describe different
5475
+ file sets.
5476
+
5477
+ ``ZipPackaging`` sets this because ``archiveSync`` never emits ZIP directory
5478
+ entries. A directory-producing packaging that mirrors the source tree
5479
+ (e.g. ``DirectoryPackaging``) leaves this false, since its directories are
5480
+ real entries on disk.
5481
+
5482
+ :stability: experimental
5483
+ '''
5484
+ return typing.cast(builtins.bool, jsii.get(self, "omitsDirectoryEntries"))
5485
+
5274
5486
  @builtins.property
5275
5487
  @jsii.member(jsii_name="producesDirectory")
5276
5488
  def produces_directory(self) -> builtins.bool:
@@ -12933,6 +13145,8 @@ class TerraformAsset(
12933
13145
  path: builtins.str,
12934
13146
  asset_hash: typing.Optional[builtins.str] = None,
12935
13147
  asset_hash_type: typing.Optional["AssetHashType"] = None,
13148
+ exclude: typing.Optional[typing.Sequence[builtins.str]] = None,
13149
+ extra_hash: typing.Optional[builtins.str] = None,
12936
13150
  type: typing.Optional["AssetType"] = None,
12937
13151
  ) -> None:
12938
13152
  '''(experimental) A Terraform Asset takes a file or directory outside of the CDK Terrain context and moves it into it.
@@ -12943,7 +13157,9 @@ class TerraformAsset(
12943
13157
  :param id: -
12944
13158
  :param path:
12945
13159
  :param asset_hash:
12946
- :param asset_hash_type: (experimental) How the ``assetHash`` is derived. ``SOURCE`` (the default) hashes the source path. ``CUSTOM`` uses the ``assetHash`` value verbatim and requires it to be set. ``OUTPUT`` is not supported yet — there is no bundling step to produce an output to hash — and throws if requested. If ``assetHash`` is set, this must be ``undefined`` or ``AssetHashType.CUSTOM``. Default: AssetHashType.SOURCE
13160
+ :param asset_hash_type: (experimental) How the ``assetHash`` is derived. ``SOURCE`` (the default) hashes the source path. ``CUSTOM`` uses the ``assetHash`` value verbatim and requires it to be set. ``OUTPUT`` also hashes the source path today — there is no bundling step yet, so the "output" of an asset is its source verbatim — but will hash the bundler's output once bundling is introduced. If ``assetHash`` is set, this must be ``undefined`` or ``AssetHashType.CUSTOM``. Default: AssetHashType.SOURCE
13161
+ :param exclude: (experimental) Paths to exclude from the asset, relative to ``path``. See ``AssetStagingOptions.exclude`` for the accepted forms. Both the computed hash and the staged/packed content honor the exclusion. Default: - nothing is excluded
13162
+ :param extra_hash: (experimental) Extra information to fold into the hash (e.g. build instructions and other inputs). Default: - no extra hash
12947
13163
  :param type:
12948
13164
 
12949
13165
  :stability: experimental
@@ -12956,6 +13172,8 @@ class TerraformAsset(
12956
13172
  path=path,
12957
13173
  asset_hash=asset_hash,
12958
13174
  asset_hash_type=asset_hash_type,
13175
+ exclude=exclude,
13176
+ extra_hash=extra_hash,
12959
13177
  type=type,
12960
13178
  )
12961
13179
 
@@ -13015,6 +13233,8 @@ class TerraformAsset(
13015
13233
  "path": "path",
13016
13234
  "asset_hash": "assetHash",
13017
13235
  "asset_hash_type": "assetHashType",
13236
+ "exclude": "exclude",
13237
+ "extra_hash": "extraHash",
13018
13238
  "type": "type",
13019
13239
  },
13020
13240
  )
@@ -13025,12 +13245,16 @@ class TerraformAssetConfig:
13025
13245
  path: builtins.str,
13026
13246
  asset_hash: typing.Optional[builtins.str] = None,
13027
13247
  asset_hash_type: typing.Optional["AssetHashType"] = None,
13248
+ exclude: typing.Optional[typing.Sequence[builtins.str]] = None,
13249
+ extra_hash: typing.Optional[builtins.str] = None,
13028
13250
  type: typing.Optional["AssetType"] = None,
13029
13251
  ) -> None:
13030
13252
  '''
13031
13253
  :param path:
13032
13254
  :param asset_hash:
13033
- :param asset_hash_type: (experimental) How the ``assetHash`` is derived. ``SOURCE`` (the default) hashes the source path. ``CUSTOM`` uses the ``assetHash`` value verbatim and requires it to be set. ``OUTPUT`` is not supported yet — there is no bundling step to produce an output to hash — and throws if requested. If ``assetHash`` is set, this must be ``undefined`` or ``AssetHashType.CUSTOM``. Default: AssetHashType.SOURCE
13255
+ :param asset_hash_type: (experimental) How the ``assetHash`` is derived. ``SOURCE`` (the default) hashes the source path. ``CUSTOM`` uses the ``assetHash`` value verbatim and requires it to be set. ``OUTPUT`` also hashes the source path today — there is no bundling step yet, so the "output" of an asset is its source verbatim — but will hash the bundler's output once bundling is introduced. If ``assetHash`` is set, this must be ``undefined`` or ``AssetHashType.CUSTOM``. Default: AssetHashType.SOURCE
13256
+ :param exclude: (experimental) Paths to exclude from the asset, relative to ``path``. See ``AssetStagingOptions.exclude`` for the accepted forms. Both the computed hash and the staged/packed content honor the exclusion. Default: - nothing is excluded
13257
+ :param extra_hash: (experimental) Extra information to fold into the hash (e.g. build instructions and other inputs). Default: - no extra hash
13034
13258
  :param type:
13035
13259
 
13036
13260
  :stability: experimental
@@ -13040,6 +13264,8 @@ class TerraformAssetConfig:
13040
13264
  check_type(argname="argument path", value=path, expected_type=type_hints["path"])
13041
13265
  check_type(argname="argument asset_hash", value=asset_hash, expected_type=type_hints["asset_hash"])
13042
13266
  check_type(argname="argument asset_hash_type", value=asset_hash_type, expected_type=type_hints["asset_hash_type"])
13267
+ check_type(argname="argument exclude", value=exclude, expected_type=type_hints["exclude"])
13268
+ check_type(argname="argument extra_hash", value=extra_hash, expected_type=type_hints["extra_hash"])
13043
13269
  check_type(argname="argument type", value=type, expected_type=type_hints["type"])
13044
13270
  self._values: typing.Dict[builtins.str, typing.Any] = {
13045
13271
  "path": path,
@@ -13048,6 +13274,10 @@ class TerraformAssetConfig:
13048
13274
  self._values["asset_hash"] = asset_hash
13049
13275
  if asset_hash_type is not None:
13050
13276
  self._values["asset_hash_type"] = asset_hash_type
13277
+ if exclude is not None:
13278
+ self._values["exclude"] = exclude
13279
+ if extra_hash is not None:
13280
+ self._values["extra_hash"] = extra_hash
13051
13281
  if type is not None:
13052
13282
  self._values["type"] = type
13053
13283
 
@@ -13073,9 +13303,10 @@ class TerraformAssetConfig:
13073
13303
  '''(experimental) How the ``assetHash`` is derived.
13074
13304
 
13075
13305
  ``SOURCE`` (the default) hashes the source path. ``CUSTOM`` uses the
13076
- ``assetHash`` value verbatim and requires it to be set. ``OUTPUT`` is not
13077
- supported yet — there is no bundling step to produce an output to hash —
13078
- and throws if requested.
13306
+ ``assetHash`` value verbatim and requires it to be set. ``OUTPUT`` also
13307
+ hashes the source path today — there is no bundling step yet, so the
13308
+ "output" of an asset is its source verbatim — but will hash the
13309
+ bundler's output once bundling is introduced.
13079
13310
 
13080
13311
  If ``assetHash`` is set, this must be ``undefined`` or ``AssetHashType.CUSTOM``.
13081
13312
 
@@ -13086,6 +13317,32 @@ class TerraformAssetConfig:
13086
13317
  result = self._values.get("asset_hash_type")
13087
13318
  return typing.cast(typing.Optional["AssetHashType"], result)
13088
13319
 
13320
+ @builtins.property
13321
+ def exclude(self) -> typing.Optional[typing.List[builtins.str]]:
13322
+ '''(experimental) Paths to exclude from the asset, relative to ``path``.
13323
+
13324
+ See
13325
+ ``AssetStagingOptions.exclude`` for the accepted forms. Both the computed
13326
+ hash and the staged/packed content honor the exclusion.
13327
+
13328
+ :default: - nothing is excluded
13329
+
13330
+ :stability: experimental
13331
+ '''
13332
+ result = self._values.get("exclude")
13333
+ return typing.cast(typing.Optional[typing.List[builtins.str]], result)
13334
+
13335
+ @builtins.property
13336
+ def extra_hash(self) -> typing.Optional[builtins.str]:
13337
+ '''(experimental) Extra information to fold into the hash (e.g. build instructions and other inputs).
13338
+
13339
+ :default: - no extra hash
13340
+
13341
+ :stability: experimental
13342
+ '''
13343
+ result = self._values.get("extra_hash")
13344
+ return typing.cast(typing.Optional[builtins.str], result)
13345
+
13089
13346
  @builtins.property
13090
13347
  def type(self) -> typing.Optional["AssetType"]:
13091
13348
  '''
@@ -19568,6 +19825,121 @@ class AnyMapMap(metaclass=jsii.JSIIMeta, jsii_type="cdktn.AnyMapMap"):
19568
19825
  jsii.set(self, "terraformResource", value) # pyright: ignore[reportArgumentType]
19569
19826
 
19570
19827
 
19828
+ @jsii.implements(IAsset)
19829
+ class AssetStaging(
19830
+ _constructs_77d1e7e8.Construct,
19831
+ metaclass=jsii.JSIIMeta,
19832
+ jsii_type="cdktn.AssetStaging",
19833
+ ):
19834
+ '''(experimental) Resolves an asset's identity (``SOURCE``/``OUTPUT``/``CUSTOM`` hashing, with ``exclude``/``extraHash``) and stages it to disk.
19835
+
19836
+ Hashing happens eagerly in the constructor; staging the content to
19837
+ ``targetPath`` only happens when ``stage()`` is called, which callers do from
19838
+ their own ``onSynthesize`` hook. This keeps the filesystem side effect in the
19839
+ one window where it is safe to run, and keeps this class skippable once a
19840
+ bundler is introduced.
19841
+
19842
+ ``SOURCE`` and ``OUTPUT`` compute identically here: without a bundler, the
19843
+ "output" of an asset is its source verbatim. A future bundler changes what
19844
+ ``OUTPUT`` hashes, not this class.
19845
+
19846
+ The source-tree walk behind ``SOURCE``/``OUTPUT`` is cached per synth (see
19847
+ {@link hashCachesByRoot}), so referencing the same asset from more than one
19848
+ resource or stack hashes it once. ``ASSET_HASH_SALT_CONTEXT_KEY`` folds an
19849
+ app-wide value into every computed hash, for bulk cache-busting across an
19850
+ entire tree rather than one asset's ``extraHash``.
19851
+
19852
+ :stability: experimental
19853
+ '''
19854
+
19855
+ def __init__(
19856
+ self,
19857
+ scope: "_constructs_77d1e7e8.Construct",
19858
+ id: builtins.str,
19859
+ *,
19860
+ packaging: "IAssetPackaging",
19861
+ source_path: builtins.str,
19862
+ exclude: typing.Optional[typing.Sequence[builtins.str]] = None,
19863
+ extra_hash: typing.Optional[builtins.str] = None,
19864
+ ignore_strategy: typing.Optional["IIgnoreStrategy"] = None,
19865
+ asset_hash: typing.Optional[builtins.str] = None,
19866
+ asset_hash_type: typing.Optional["AssetHashType"] = None,
19867
+ ) -> None:
19868
+ '''
19869
+ :param scope: -
19870
+ :param id: -
19871
+ :param packaging: (experimental) How the staged result is produced and shaped. The caller decides this (e.g. from its own ``AssetType``) — ``AssetStaging`` never infers or changes it based on ``exclude``/``extraHash``.
19872
+ :param source_path: (experimental) Absolute path to the source file or directory. Resolving a relative path against ``cdktf.json`` is the caller's responsibility.
19873
+ :param exclude: (experimental) Paths to exclude, relative to ``sourcePath``. Cannot be combined with ``ignoreStrategy``, which replaces this matcher rather than layering on top of it. Default: - nothing is excluded
19874
+ :param extra_hash: (experimental) Extra information to fold into the hash (e.g. build instructions and other inputs). Default: - no extra hash
19875
+ :param ignore_strategy: (experimental) Exclusion matching, for callers that need ``.gitignore`` / ``.dockerignore`` parity rather than the built-in exact-path / suffix / directory matcher. Default: - ``exclude`` is used with the built-in matcher
19876
+ :param asset_hash: (experimental) Specify a custom hash for this asset. If ``assetHashType`` is set it must be set to ``AssetHashType.CUSTOM``. The value is used verbatim as the asset hash, and because it names the staged asset file it may only contain letters, digits, ``_``, ``.`` and ``-``. NOTE: the hash is used in order to identify a specific revision of the asset, and used for optimizing and caching deployment activities related to this asset such as packaging, uploading to cloud storage, etc. If you chose to customize the hash, you will need to make sure it is updated every time the asset changes, or otherwise it is possible that some deployments will not be invalidated. Default: - based on ``assetHashType``
19877
+ :param asset_hash_type: (experimental) Specifies the type of hash to calculate for this asset. If ``assetHash`` is configured, this option must be ``undefined`` or ``AssetHashType.CUSTOM``. Default: - the default is ``AssetHashType.SOURCE``, but if ``assetHash`` is explicitly specified this value defaults to ``AssetHashType.CUSTOM``.
19878
+
19879
+ :stability: experimental
19880
+ '''
19881
+ if __debug__:
19882
+ type_hints = cached_type_hints(_typecheckingstub__a694062800c2f527dfda0d5a21ceaa0607085c2bef7277ea0a32170587d80fac)
19883
+ check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
19884
+ check_type(argname="argument id", value=id, expected_type=type_hints["id"])
19885
+ props = AssetStagingOptions(
19886
+ packaging=packaging,
19887
+ source_path=source_path,
19888
+ exclude=exclude,
19889
+ extra_hash=extra_hash,
19890
+ ignore_strategy=ignore_strategy,
19891
+ asset_hash=asset_hash,
19892
+ asset_hash_type=asset_hash_type,
19893
+ )
19894
+
19895
+ jsii.create(self.__class__, self, [scope, id, props])
19896
+
19897
+ @jsii.member(jsii_name="stage")
19898
+ def stage(self, target_path: builtins.str) -> None:
19899
+ '''(experimental) Write the staged content to ``targetPath``.
19900
+
19901
+ Called from the owning
19902
+ construct's ``onSynthesize`` hook, once the target path is known.
19903
+
19904
+ :param target_path: - path the packaged result should be written to.
19905
+
19906
+ :stability: experimental
19907
+ '''
19908
+ if __debug__:
19909
+ type_hints = cached_type_hints(_typecheckingstub__6e5f7b43a804b26df0e67b9684d7b357c04b21cffadbaed5c7f0681097e7a8b0)
19910
+ check_type(argname="argument target_path", value=target_path, expected_type=type_hints["target_path"])
19911
+ return typing.cast(None, jsii.invoke(self, "stage", [target_path]))
19912
+
19913
+ @builtins.property
19914
+ @jsii.member(jsii_name="assetHash")
19915
+ def asset_hash(self) -> builtins.str:
19916
+ '''(experimental) A hash of this asset, which is available at construction time.
19917
+
19918
+ As this is a plain string, it
19919
+ can be used in construct IDs in order to enforce creation of a new resource when the content
19920
+ hash has changed.
19921
+
19922
+ :stability: experimental
19923
+ '''
19924
+ return typing.cast(builtins.str, jsii.get(self, "assetHash"))
19925
+
19926
+ @builtins.property
19927
+ @jsii.member(jsii_name="isDirectory")
19928
+ def is_directory(self) -> builtins.bool:
19929
+ '''
19930
+ :stability: experimental
19931
+ '''
19932
+ return typing.cast(builtins.bool, jsii.get(self, "isDirectory"))
19933
+
19934
+ @builtins.property
19935
+ @jsii.member(jsii_name="packaging")
19936
+ def packaging(self) -> "IAssetPackaging":
19937
+ '''
19938
+ :stability: experimental
19939
+ '''
19940
+ return typing.cast("IAssetPackaging", jsii.get(self, "packaging"))
19941
+
19942
+
19571
19943
  @jsii.implements(ITerraformAddressable, IResolvable)
19572
19944
  class BooleanMap(metaclass=jsii.JSIIMeta, jsii_type="cdktn.BooleanMap"):
19573
19945
  '''
@@ -28861,6 +29233,8 @@ __all__ = [
28861
29233
  "AssetHashType",
28862
29234
  "AssetOptions",
28863
29235
  "AssetPackaging",
29236
+ "AssetStaging",
29237
+ "AssetStagingOptions",
28864
29238
  "AssetType",
28865
29239
  "AzurermBackend",
28866
29240
  "AzurermBackendConfig",
@@ -29175,6 +29549,19 @@ def _typecheckingstub__b971ff06f951bbd97e185f053a7332b738b2ccfe46cb213fb9ce66163
29175
29549
  """Type checking stubs"""
29176
29550
  pass
29177
29551
 
29552
+ def _typecheckingstub__5026244ff290924dad88f65421d8025b8bcb105d693dec43cd93a0c7d8d0e7ba(
29553
+ *,
29554
+ asset_hash: typing.Optional[builtins.str] = None,
29555
+ asset_hash_type: typing.Optional[AssetHashType] = None,
29556
+ packaging: IAssetPackaging,
29557
+ source_path: builtins.str,
29558
+ exclude: typing.Optional[typing.Sequence[builtins.str]] = None,
29559
+ extra_hash: typing.Optional[builtins.str] = None,
29560
+ ignore_strategy: typing.Optional[IIgnoreStrategy] = None,
29561
+ ) -> None:
29562
+ """Type checking stubs"""
29563
+ pass
29564
+
29178
29565
  def _typecheckingstub__912173407c419eae209032e0ac104680f082bb5aad4825d0e858e8efc0f9fa76(
29179
29566
  *,
29180
29567
  container_name: builtins.str,
@@ -31143,6 +31530,8 @@ def _typecheckingstub__6f29998a5dacee0da3977e8d51379662670eb6942990ac7e6e052ab5e
31143
31530
  path: builtins.str,
31144
31531
  asset_hash: typing.Optional[builtins.str] = None,
31145
31532
  asset_hash_type: typing.Optional[AssetHashType] = None,
31533
+ exclude: typing.Optional[typing.Sequence[builtins.str]] = None,
31534
+ extra_hash: typing.Optional[builtins.str] = None,
31146
31535
  type: typing.Optional[AssetType] = None,
31147
31536
  ) -> None:
31148
31537
  """Type checking stubs"""
@@ -31159,6 +31548,8 @@ def _typecheckingstub__e7a613b39a707470fb3fa76a5d5d750aa8285bec8b92786190d69d5b7
31159
31548
  path: builtins.str,
31160
31549
  asset_hash: typing.Optional[builtins.str] = None,
31161
31550
  asset_hash_type: typing.Optional[AssetHashType] = None,
31551
+ exclude: typing.Optional[typing.Sequence[builtins.str]] = None,
31552
+ extra_hash: typing.Optional[builtins.str] = None,
31162
31553
  type: typing.Optional[AssetType] = None,
31163
31554
  ) -> None:
31164
31555
  """Type checking stubs"""
@@ -32543,6 +32934,27 @@ def _typecheckingstub__e05f43129af3028ae44938231937cc6abd778cc24ebddc1d1db7a1806
32543
32934
  """Type checking stubs"""
32544
32935
  pass
32545
32936
 
32937
+ def _typecheckingstub__a694062800c2f527dfda0d5a21ceaa0607085c2bef7277ea0a32170587d80fac(
32938
+ scope: _constructs_77d1e7e8.Construct,
32939
+ id: builtins.str,
32940
+ *,
32941
+ packaging: IAssetPackaging,
32942
+ source_path: builtins.str,
32943
+ exclude: typing.Optional[typing.Sequence[builtins.str]] = None,
32944
+ extra_hash: typing.Optional[builtins.str] = None,
32945
+ ignore_strategy: typing.Optional[IIgnoreStrategy] = None,
32946
+ asset_hash: typing.Optional[builtins.str] = None,
32947
+ asset_hash_type: typing.Optional[AssetHashType] = None,
32948
+ ) -> None:
32949
+ """Type checking stubs"""
32950
+ pass
32951
+
32952
+ def _typecheckingstub__6e5f7b43a804b26df0e67b9684d7b357c04b21cffadbaed5c7f0681097e7a8b0(
32953
+ target_path: builtins.str,
32954
+ ) -> None:
32955
+ """Type checking stubs"""
32956
+ pass
32957
+
32546
32958
  def _typecheckingstub__b4cbbedf36a8746a1d5c9c145d7b08835c4ba037baf7c170a739d514ac054c5d(
32547
32959
  terraform_resource: IInterpolatingParent,
32548
32960
  terraform_attribute: builtins.str,
@@ -21,7 +21,7 @@ _SUBMODULE_FQN_MAP = {
21
21
  }
22
22
 
23
23
  __jsii_assembly__ = jsii.JSIIAssembly.load(
24
- "cdktn", "0.25.0-pre.26", __name__[0:-6], "cdktn@0.25.0-pre.26.jsii.tgz"
24
+ "cdktn", "0.25.0-pre.28", __name__[0:-6], "cdktn@0.25.0-pre.28.jsii.tgz"
25
25
  )
26
26
 
27
27
  __all__ = [
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cdktn
3
- Version: 0.25.0.dev26
3
+ Version: 0.25.0.dev28
4
4
  Summary: Cloud Development Kit for Terraform
5
5
  Home-page: https://github.com/open-constructs/cdk-terrain
6
6
  Author: OpenConstructs
@@ -11,5 +11,5 @@ src/cdktn.egg-info/dependency_links.txt
11
11
  src/cdktn.egg-info/requires.txt
12
12
  src/cdktn.egg-info/top_level.txt
13
13
  src/cdktn/_jsii/__init__.py
14
- src/cdktn/_jsii/cdktn@0.25.0-pre.26.jsii.tgz
14
+ src/cdktn/_jsii/cdktn@0.25.0-pre.28.jsii.tgz
15
15
  src/cdktn/testing_matchers/__init__.py
File without changes
File without changes
File without changes
File without changes