Dan Van Brunt
01/06/2022, 9:39 PMresolve
inside one of my own custom constructs.
*MY CONSTRUCT (extends StaticSite)*
inside, I am trying to add more origins and an origin group
OUTSIDE MY CONSTRUCT (where I’m using the construct)
outside, I’m trying to addBehavior
but since its already resolved it does not get added.Dan Van Brunt
01/06/2022, 9:39 PMDan Van Brunt
01/06/2022, 9:42 PMDan Van Brunt
01/06/2022, 9:45 PMsuper
in my construct, since I need the this.deployId
in order to create the originDan Van Brunt
01/06/2022, 9:46 PMsst.StaticSite
I imagineDan Van Brunt
01/06/2022, 9:49 PMDan Van Brunt
01/06/2022, 9:58 PMsst.StaticSite
for being able to affect origins/origin-groupDan Van Brunt
01/06/2022, 10:03 PMthis.deployId
in order to setup the origins properly. I may just have to for Static site? 🤷♂️ So that ours handles cross-site replica buckets and custom headers for deployIdDan Van Brunt
01/06/2022, 10:08 PMBaseSite
and, Construct
are not exported. ☹️Dan Van Brunt
01/06/2022, 10:10 PMFrank
Dan Van Brunt
01/06/2022, 10:22 PMFrank
Frank
Dan Van Brunt
01/07/2022, 2:17 PMDan Van Brunt
01/07/2022, 5:17 PMsst.StaticSite
?Dan Van Brunt
01/07/2022, 5:21 PMnew StaticSite(this, "Site", {
path: "path/to/src",
replicaRegions: ['us-west-1', 'af-south-1', 'ap-south-1]
});
Dan Van Brunt
01/14/2022, 7:16 PMDan Van Brunt
01/19/2022, 2:00 PMFrank
Frank
Frank
Dan Van Brunt
01/24/2022, 10:39 PMDan Van Brunt
01/24/2022, 10:40 PMDan Van Brunt
01/24/2022, 10:40 PMFrank
new StaticSite(this, "Site", {
path: "path/to/src",
callback: {
beforeCloudFrontDistributionCreated: ({ props: cloudfront.DistributionProps, deployId, s3Bucket }) => {
// make changes to props
// return the updated props used to create the distribution
},
},
});
Dan Van Brunt
01/24/2022, 10:55 PMDan Van Brunt
01/24/2022, 10:56 PMDan Van Brunt
01/24/2022, 10:59 PM