diff --git a/packages/@aws-cdk/assets/lib/api.ts b/packages/@aws-cdk/assets/lib/api.ts index c06f3295ad5ba..75966e57d5af8 100644 --- a/packages/@aws-cdk/assets/lib/api.ts +++ b/packages/@aws-cdk/assets/lib/api.ts @@ -8,13 +8,4 @@ export interface IAsset { * the content hash has changed. */ readonly sourceHash: string; - - /** - * A hash of the bundle for of this asset, which is only available at deployment time. As this is - * a late-bound token, it may not be used in construct IDs, but can be passed as a resource - * property in order to force a change on a resource when an asset is effectively updated. This is - * more reliable than `sourceHash` in particular for assets which bundling phase involve external - * resources that can change over time (such as Docker image builds). - */ - readonly artifactHash: string; } diff --git a/packages/@aws-cdk/aws-ecr-assets/lib/image-asset.ts b/packages/@aws-cdk/aws-ecr-assets/lib/image-asset.ts index 83b4133973cc5..dde960bce475c 100644 --- a/packages/@aws-cdk/aws-ecr-assets/lib/image-asset.ts +++ b/packages/@aws-cdk/aws-ecr-assets/lib/image-asset.ts @@ -54,7 +54,6 @@ export class DockerImageAsset extends cdk.Construct implements assets.IAsset { public repository: ecr.IRepository; public readonly sourceHash: string; - public readonly artifactHash: string; /** * Directory where the source files are stored @@ -115,7 +114,6 @@ export class DockerImageAsset extends cdk.Construct implements assets.IAsset { // haven't already started using the image. this.repository = new AdoptedRepository(this, 'AdoptRepository', { repositoryName }); this.imageUri = `${this.repository.repositoryUri}@sha256:${imageSha}`; - this.artifactHash = imageSha; } } diff --git a/packages/@aws-cdk/aws-ecr-assets/test/integ.assets-docker.expected.json b/packages/@aws-cdk/aws-ecr-assets/test/integ.assets-docker.expected.json index 64fba508faa44..900b9db64236f 100644 --- a/packages/@aws-cdk/aws-ecr-assets/test/integ.assets-docker.expected.json +++ b/packages/@aws-cdk/aws-ecr-assets/test/integ.assets-docker.expected.json @@ -196,21 +196,6 @@ } }, "Outputs": { - "ArtifactHash": { - "Value": { - "Fn::Select": [ - 1, - { - "Fn::Split": [ - "@sha256:", - { - "Ref": "DockerImageImageName266E5998" - } - ] - } - ] - } - }, "ImageUri": { "Value": { "Fn::Join": [ @@ -319,4 +304,4 @@ } } } -} \ No newline at end of file +} diff --git a/packages/@aws-cdk/aws-ecr-assets/test/integ.assets-docker.ts b/packages/@aws-cdk/aws-ecr-assets/test/integ.assets-docker.ts index 31e95c8515c35..e6351556da9cd 100644 --- a/packages/@aws-cdk/aws-ecr-assets/test/integ.assets-docker.ts +++ b/packages/@aws-cdk/aws-ecr-assets/test/integ.assets-docker.ts @@ -9,7 +9,6 @@ const asset = new assets.DockerImageAsset(stack, 'DockerImage', { directory: path.join(__dirname, 'demo-image'), }); -new cdk.CfnOutput(stack, 'ArtifactHash', { value: asset.artifactHash }); new cdk.CfnOutput(stack, 'ImageUri', { value: asset.imageUri }); app.synth(); diff --git a/packages/@aws-cdk/aws-s3-assets/lib/asset.ts b/packages/@aws-cdk/aws-s3-assets/lib/asset.ts index 708ab1249cbda..14a35bf8cee2f 100644 --- a/packages/@aws-cdk/aws-s3-assets/lib/asset.ts +++ b/packages/@aws-cdk/aws-s3-assets/lib/asset.ts @@ -68,7 +68,6 @@ export class Asset extends cdk.Construct implements assets.IAsset { public readonly isZipArchive: boolean; public readonly sourceHash: string; - public readonly artifactHash: string; /** * The S3 prefix where all different versions of this asset are stored @@ -117,7 +116,6 @@ export class Asset extends cdk.Construct implements assets.IAsset { this.s3Prefix = cdk.Fn.select(0, cdk.Fn.split(cxapi.ASSET_PREFIX_SEPARATOR, keyParam.valueAsString)).toString(); const s3Filename = cdk.Fn.select(1, cdk.Fn.split(cxapi.ASSET_PREFIX_SEPARATOR, keyParam.valueAsString)).toString(); this.s3ObjectKey = `${this.s3Prefix}${s3Filename}`; - this.artifactHash = hashParam.valueAsString; this.bucket = s3.Bucket.fromBucketName(this, 'AssetBucket', this.s3BucketName);