@webiny/pulumi-aws 5.41.2 → 5.41.3-beta.1
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.
|
@@ -105,6 +105,21 @@ const ApiCloudfront = exports.ApiCloudfront = (0, _pulumi.createAppModule)({
|
|
|
105
105
|
viewerCertificate: {
|
|
106
106
|
cloudfrontDefaultCertificate: true
|
|
107
107
|
}
|
|
108
|
+
},
|
|
109
|
+
opts: {
|
|
110
|
+
// We are ignoring changes to the "staging" property. This is because of the following.
|
|
111
|
+
// With the 5.41.0 release of Webiny, we also upgraded Pulumi to v6. This introduced a change
|
|
112
|
+
// with how Cloudfront distributions are deployed, where Pulumi now also controls the new
|
|
113
|
+
// `staging` property.
|
|
114
|
+
// If not set, Pulumi will default it to `false`. Which is fine, but, the problem is
|
|
115
|
+
// that, because this property did not exist before, it will always be considered as a change
|
|
116
|
+
// upon deployment.
|
|
117
|
+
// We might think this is fine, but, the problem is that a change in this property causes
|
|
118
|
+
// a full replacement of the Cloudfront distribution, which is not acceptable. Especially
|
|
119
|
+
// if a custom domain has already been associated with the distribution. This then would
|
|
120
|
+
// require the user to disassociate the domain, wait for the distribution to be replaced,
|
|
121
|
+
// and then re-associate the domain. This is not a good experience.
|
|
122
|
+
ignoreChanges: ["staging"]
|
|
108
123
|
}
|
|
109
124
|
});
|
|
110
125
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["aws","_interopRequireWildcard","require","_pulumi","_ApiGateway","ApiCloudfront","exports","createAppModule","name","config","app","gateway","getModule","ApiGateway","cookies","forward","whitelistedNames","forwardHeaders","addResource","cloudfront","Distribution","waitForDeployment","isIpv6Enabled","enabled","defaultCacheBehavior","compress","allowedMethods","cachedMethods","forwardedValues","headers","queryString","minTtl","defaultTtl","maxTtl","targetOriginId","api","output","viewerProtocolPolicy","orderedCacheBehaviors","pathPattern","origins","domainName","stage","invokeUrl","apply","url","URL","hostname","originPath","pathname","originId","customOriginConfig","httpPort","httpsPort","originProtocolPolicy","originSslProtocols","restrictions","geoRestriction","restrictionType","viewerCertificate","cloudfrontDefaultCertificate"],"sources":["ApiCloudfront.ts"],"sourcesContent":["import * as aws from \"@pulumi/aws\";\nimport { createAppModule, PulumiApp, PulumiAppModule } from \"@webiny/pulumi\";\n\nimport { ApiGateway } from \"./ApiGateway\";\n\nexport type ApiCloudfront = PulumiAppModule<typeof ApiCloudfront>;\n\nexport const ApiCloudfront = createAppModule({\n name: \"ApiCloudfront\",\n config(app: PulumiApp) {\n const gateway = app.getModule(ApiGateway);\n\n const cookies = {\n forward: \"whitelist\",\n whitelistedNames: [\"wby-id-token\"]\n };\n\n const forwardHeaders = [\"Origin\", \"Accept\", \"Accept-Language\"];\n\n return app.addResource(aws.cloudfront.Distribution, {\n name: \"api-cloudfront\",\n config: {\n waitForDeployment: false,\n isIpv6Enabled: true,\n enabled: true,\n defaultCacheBehavior: {\n compress: true,\n allowedMethods: [\"GET\", \"HEAD\", \"OPTIONS\", \"PUT\", \"POST\", \"PATCH\", \"DELETE\"],\n cachedMethods: [\"GET\", \"HEAD\", \"OPTIONS\"],\n forwardedValues: {\n cookies,\n headers: forwardHeaders,\n queryString: true\n },\n // MinTTL <= DefaultTTL <= MaxTTL\n minTtl: 0,\n defaultTtl: 0,\n maxTtl: 86400,\n targetOriginId: gateway.api.output.name,\n viewerProtocolPolicy: \"allow-all\"\n },\n orderedCacheBehaviors: [\n {\n compress: true,\n allowedMethods: [\n \"GET\",\n \"HEAD\",\n \"OPTIONS\",\n \"PUT\",\n \"POST\",\n \"PATCH\",\n \"DELETE\"\n ],\n cachedMethods: [\"GET\", \"HEAD\", \"OPTIONS\"],\n forwardedValues: {\n cookies: {\n forward: \"none\"\n },\n headers: [\"Accept\", \"Accept-Language\"],\n queryString: true\n },\n pathPattern: \"/cms*\",\n viewerProtocolPolicy: \"allow-all\",\n targetOriginId: gateway.api.output.name\n },\n {\n allowedMethods: [\"HEAD\", \"GET\", \"OPTIONS\"],\n cachedMethods: [\"HEAD\", \"GET\", \"OPTIONS\"],\n forwardedValues: {\n cookies: {\n forward: \"none\"\n },\n headers: forwardHeaders,\n queryString: true\n },\n // MinTTL <= DefaultTTL <= MaxTTL\n minTtl: 0,\n defaultTtl: 0,\n maxTtl: 2592000,\n pathPattern: \"/files/*\",\n viewerProtocolPolicy: \"allow-all\",\n targetOriginId: gateway.api.output.name\n },\n {\n allowedMethods: [\"HEAD\", \"GET\", \"OPTIONS\"],\n cachedMethods: [\"HEAD\", \"GET\", \"OPTIONS\"],\n forwardedValues: {\n cookies: cookies,\n headers: forwardHeaders,\n queryString: true\n },\n // MinTTL <= DefaultTTL <= MaxTTL\n minTtl: 0,\n defaultTtl: 0,\n maxTtl: 2592000,\n pathPattern: \"/private/*\",\n viewerProtocolPolicy: \"allow-all\",\n targetOriginId: gateway.api.output.name\n }\n ],\n origins: [\n {\n domainName: gateway.stage.output.invokeUrl.apply(\n (url: string) => new URL(url).hostname\n ),\n originPath: gateway.stage.output.invokeUrl.apply(\n (url: string) => new URL(url).pathname\n ),\n originId: gateway.api.output.name,\n customOriginConfig: {\n httpPort: 80,\n httpsPort: 443,\n originProtocolPolicy: \"https-only\",\n originSslProtocols: [\"TLSv1.2\"]\n }\n }\n ],\n restrictions: {\n geoRestriction: {\n restrictionType: \"none\"\n }\n },\n viewerCertificate: {\n cloudfrontDefaultCertificate: true\n }\n }\n });\n }\n});\n"],"mappings":";;;;;;;AAAA,IAAAA,GAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAEA,IAAAE,WAAA,GAAAF,OAAA;AAIO,MAAMG,aAAa,GAAAC,OAAA,CAAAD,aAAA,GAAG,IAAAE,uBAAe,EAAC;EACzCC,IAAI,EAAE,eAAe;EACrBC,MAAMA,CAACC,GAAc,EAAE;IACnB,MAAMC,OAAO,GAAGD,GAAG,CAACE,SAAS,CAACC,sBAAU,CAAC;IAEzC,MAAMC,OAAO,GAAG;M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CC,GAAW,IAAK,IAAIC,GAAG,CAACD,GAAG,CAAC,CAACI,QAClC,CAAC;UACDC,QAAQ,EAAEvC,OAAO,CAACwB,GAAG,CAACC,MAAM,CAAC5B,IAAI;UACjC2C,kBAAkB,EAAE;YAChBC,QAAQ,EAAE,EAAE;YACZC,SAAS,EAAE,GAAG;YACdC,oBAAoB,EAAE,YAAY;YAClCC,kBAAkB,EAAE,CAAC,SAAS;UAClC;QACJ,CAAC,CACJ;QACDC,YAAY,EAAE;UACVC,cAAc,EAAE;YACZC,eAAe,EAAE;UACrB;QACJ,CAAC;QACDC,iBAAiB,EAAE;UACfC,4BAA4B,EAAE;QAClC;MACJ;IACJ,CAAC,CAAC;EACN;AACJ,CAAC,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["aws","_interopRequireWildcard","require","_pulumi","_ApiGateway","ApiCloudfront","exports","createAppModule","name","config","app","gateway","getModule","ApiGateway","cookies","forward","whitelistedNames","forwardHeaders","addResource","cloudfront","Distribution","waitForDeployment","isIpv6Enabled","enabled","defaultCacheBehavior","compress","allowedMethods","cachedMethods","forwardedValues","headers","queryString","minTtl","defaultTtl","maxTtl","targetOriginId","api","output","viewerProtocolPolicy","orderedCacheBehaviors","pathPattern","origins","domainName","stage","invokeUrl","apply","url","URL","hostname","originPath","pathname","originId","customOriginConfig","httpPort","httpsPort","originProtocolPolicy","originSslProtocols","restrictions","geoRestriction","restrictionType","viewerCertificate","cloudfrontDefaultCertificate","opts","ignoreChanges"],"sources":["ApiCloudfront.ts"],"sourcesContent":["import * as aws from \"@pulumi/aws\";\nimport { createAppModule, PulumiApp, PulumiAppModule } from \"@webiny/pulumi\";\n\nimport { ApiGateway } from \"./ApiGateway\";\n\nexport type ApiCloudfront = PulumiAppModule<typeof ApiCloudfront>;\n\nexport const ApiCloudfront = createAppModule({\n name: \"ApiCloudfront\",\n config(app: PulumiApp) {\n const gateway = app.getModule(ApiGateway);\n\n const cookies = {\n forward: \"whitelist\",\n whitelistedNames: [\"wby-id-token\"]\n };\n\n const forwardHeaders = [\"Origin\", \"Accept\", \"Accept-Language\"];\n\n return app.addResource(aws.cloudfront.Distribution, {\n name: \"api-cloudfront\",\n config: {\n waitForDeployment: false,\n isIpv6Enabled: true,\n enabled: true,\n defaultCacheBehavior: {\n compress: true,\n allowedMethods: [\"GET\", \"HEAD\", \"OPTIONS\", \"PUT\", \"POST\", \"PATCH\", \"DELETE\"],\n cachedMethods: [\"GET\", \"HEAD\", \"OPTIONS\"],\n forwardedValues: {\n cookies,\n headers: forwardHeaders,\n queryString: true\n },\n // MinTTL <= DefaultTTL <= MaxTTL\n minTtl: 0,\n defaultTtl: 0,\n maxTtl: 86400,\n targetOriginId: gateway.api.output.name,\n viewerProtocolPolicy: \"allow-all\"\n },\n orderedCacheBehaviors: [\n {\n compress: true,\n allowedMethods: [\n \"GET\",\n \"HEAD\",\n \"OPTIONS\",\n \"PUT\",\n \"POST\",\n \"PATCH\",\n \"DELETE\"\n ],\n cachedMethods: [\"GET\", \"HEAD\", \"OPTIONS\"],\n forwardedValues: {\n cookies: {\n forward: \"none\"\n },\n headers: [\"Accept\", \"Accept-Language\"],\n queryString: true\n },\n pathPattern: \"/cms*\",\n viewerProtocolPolicy: \"allow-all\",\n targetOriginId: gateway.api.output.name\n },\n {\n allowedMethods: [\"HEAD\", \"GET\", \"OPTIONS\"],\n cachedMethods: [\"HEAD\", \"GET\", \"OPTIONS\"],\n forwardedValues: {\n cookies: {\n forward: \"none\"\n },\n headers: forwardHeaders,\n queryString: true\n },\n // MinTTL <= DefaultTTL <= MaxTTL\n minTtl: 0,\n defaultTtl: 0,\n maxTtl: 2592000,\n pathPattern: \"/files/*\",\n viewerProtocolPolicy: \"allow-all\",\n targetOriginId: gateway.api.output.name\n },\n {\n allowedMethods: [\"HEAD\", \"GET\", \"OPTIONS\"],\n cachedMethods: [\"HEAD\", \"GET\", \"OPTIONS\"],\n forwardedValues: {\n cookies: cookies,\n headers: forwardHeaders,\n queryString: true\n },\n // MinTTL <= DefaultTTL <= MaxTTL\n minTtl: 0,\n defaultTtl: 0,\n maxTtl: 2592000,\n pathPattern: \"/private/*\",\n viewerProtocolPolicy: \"allow-all\",\n targetOriginId: gateway.api.output.name\n }\n ],\n origins: [\n {\n domainName: gateway.stage.output.invokeUrl.apply(\n (url: string) => new URL(url).hostname\n ),\n originPath: gateway.stage.output.invokeUrl.apply(\n (url: string) => new URL(url).pathname\n ),\n originId: gateway.api.output.name,\n customOriginConfig: {\n httpPort: 80,\n httpsPort: 443,\n originProtocolPolicy: \"https-only\",\n originSslProtocols: [\"TLSv1.2\"]\n }\n }\n ],\n restrictions: {\n geoRestriction: {\n restrictionType: \"none\"\n }\n },\n viewerCertificate: {\n cloudfrontDefaultCertificate: true\n }\n },\n opts: {\n // We are ignoring changes to the \"staging\" property. This is because of the following.\n // With the 5.41.0 release of Webiny, we also upgraded Pulumi to v6. This introduced a change\n // with how Cloudfront distributions are deployed, where Pulumi now also controls the new\n // `staging` property.\n // If not set, Pulumi will default it to `false`. Which is fine, but, the problem is\n // that, because this property did not exist before, it will always be considered as a change\n // upon deployment.\n // We might think this is fine, but, the problem is that a change in this property causes\n // a full replacement of the Cloudfront distribution, which is not acceptable. Especially\n // if a custom domain has already been associated with the distribution. This then would\n // require the user to disassociate the domain, wait for the distribution to be replaced,\n // and then re-associate the domain. This is not a good experience.\n ignoreChanges: [\"staging\"]\n }\n });\n }\n});\n"],"mappings":";;;;;;;AAAA,IAAAA,GAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAEA,IAAAE,WAAA,GAAAF,OAAA;AAIO,MAAMG,aAAa,GAAAC,OAAA,CAAAD,aAAA,GAAG,IAAAE,uBAAe,EAAC;EACzCC,IAAI,EAAE,eAAe;EACrBC,MAAMA,CAACC,GAAc,EAAE;IACnB,MAAMC,OAAO,GAAGD,GAAG,CAACE,SAAS,CAACC,sBAAU,CAAC;IAEzC,MAAMC,OAAO,GAAG;MACZC,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AAW,IAAK,IAAIC,GAAG,CAACD,GAAG,CAAC,CAACI,QAClC,CAAC;UACDC,QAAQ,EAAEvC,OAAO,CAACwB,GAAG,CAACC,MAAM,CAAC5B,IAAI;UACjC2C,kBAAkB,EAAE;YAChBC,QAAQ,EAAE,EAAE;YACZC,SAAS,EAAE,GAAG;YACdC,oBAAoB,EAAE,YAAY;YAClCC,kBAAkB,EAAE,CAAC,SAAS;UAClC;QACJ,CAAC,CACJ;QACDC,YAAY,EAAE;UACVC,cAAc,EAAE;YACZC,eAAe,EAAE;UACrB;QACJ,CAAC;QACDC,iBAAiB,EAAE;UACfC,4BAA4B,EAAE;QAClC;MACJ,CAAC;MACDC,IAAI,EAAE;QACF;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACAC,aAAa,EAAE,CAAC,SAAS;MAC7B;IACJ,CAAC,CAAC;EACN;AACJ,CAAC,CAAC","ignoreList":[]}
|
|
@@ -81,6 +81,21 @@ const createReactPulumiApp = projectAppParams => {
|
|
|
81
81
|
viewerCertificate: {
|
|
82
82
|
cloudfrontDefaultCertificate: true
|
|
83
83
|
}
|
|
84
|
+
},
|
|
85
|
+
opts: {
|
|
86
|
+
// We are ignoring changes to the "staging" property. This is because of the following.
|
|
87
|
+
// With the 5.41.0 release of Webiny, we also upgraded Pulumi to v6. This introduced a change
|
|
88
|
+
// with how Cloudfront distributions are deployed, where Pulumi now also controls the new
|
|
89
|
+
// `staging` property.
|
|
90
|
+
// If not set, Pulumi will default it to `false`. Which is fine, but, the problem is
|
|
91
|
+
// that, because this property did not exist before, it will always be considered as a change
|
|
92
|
+
// upon deployment.
|
|
93
|
+
// We might think this is fine, but, the problem is that a change in this property causes
|
|
94
|
+
// a full replacement of the Cloudfront distribution, which is not acceptable. Especially
|
|
95
|
+
// if a custom domain has already been associated with the distribution. This then would
|
|
96
|
+
// require the user to disassociate the domain, wait for the distribution to be replaced,
|
|
97
|
+
// and then re-associate the domain. This is not a good experience.
|
|
98
|
+
ignoreChanges: ["staging"]
|
|
84
99
|
}
|
|
85
100
|
});
|
|
86
101
|
const domains = app.getParam(projectAppParams.domains);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["aws","_interopRequireWildcard","require","pulumi","_pulumi2","_utils","_createAppBucket","_customDomain","_withServiceManifest","_","createReactPulumiApp","projectAppParams","app","createPulumiApp","name","path","folder","config","program","pulumiResourceNamePrefix","getParam","onResource","resource","startsWith","core","addModule","CoreOutput","ApiOutput","addHandler","bucket","createPrivateAppBucket","cloudfront","addResource","Distribution","enabled","waitForDeployment","origins","origin","defaultRootObject","defaultCacheBehavior","compress","targetOriginId","originId","viewerProtocolPolicy","allowedMethods","cachedMethods","forwardedValues","cookies","forward","queryString","minTtl","defaultTtl","maxTtl","priceClass","customErrorResponses","errorCode","responseCode","responsePagePath","restrictions","geoRestriction","restrictionType","viewerCertificate","cloudfrontDefaultCertificate","domains","applyCustomDomain","addOutput","output","id","addDomainsUrlsOutputs","cloudfrontDistribution","map","distributionDomain","distributionUrl","usedDomain","usedUrl","tagResources","WbyAppName","WbyProjectName","String","process","env","WbyEnvironment","dynamodb","TableItem","tableName","primaryDynamodbTableName","hashKey","primaryDynamodbTableHashKey","rangeKey","primaryDynamodbTableRangeKey","apply","key","item","interpolate","params","run","variant","domainName","value","withServiceManifest","exports"],"sources":["createReactPulumiApp.ts"],"sourcesContent":["import * as aws from \"@pulumi/aws\";\nimport * as pulumi from \"@pulumi/pulumi\";\nimport { createPulumiApp, PulumiAppParam, PulumiAppParamCallback } from \"@webiny/pulumi\";\nimport { addDomainsUrlsOutputs, tagResources } from \"~/utils\";\nimport { createPrivateAppBucket } from \"../createAppBucket\";\nimport { applyCustomDomain, CustomDomainParams } from \"../customDomain\";\nimport { withServiceManifest } from \"~/utils/withServiceManifest\";\nimport { ApiOutput, CoreOutput } from \"~/apps\";\n\nexport type ReactPulumiApp = ReturnType<typeof createReactPulumiApp>;\n\nexport interface CreateReactPulumiAppParams {\n /**\n * A name of the app, e.g., \"user-area\"\n */\n name: string;\n\n /**\n * A folder where the app is located, e.g., \"apps/user-area\"\n */\n folder: string;\n\n /** Custom domain configuration */\n domains?: PulumiAppParamCallback<CustomDomainParams>;\n\n /**\n * Provides a way to adjust existing Pulumi code (cloud infrastructure resources)\n * or add additional ones into the mix.\n */\n pulumi?: (app: ReactPulumiApp) => void | Promise<void>;\n\n /**\n * Prefixes names of all Pulumi cloud infrastructure resource with given prefix.\n */\n pulumiResourceNamePrefix?: PulumiAppParam<string>;\n\n /**\n * Treats provided environments as production environments, which\n * are deployed in production deployment mode.\n * https://www.webiny.com/docs/architecture/deployment-modes/production\n */\n productionEnvironments?: PulumiAppParam<string[]>;\n}\n\nexport const createReactPulumiApp = (projectAppParams: CreateReactPulumiAppParams) => {\n const app = createPulumiApp({\n name: projectAppParams.name,\n path: projectAppParams.folder,\n config: projectAppParams,\n program: async app => {\n const pulumiResourceNamePrefix = app.getParam(\n projectAppParams.pulumiResourceNamePrefix\n );\n if (pulumiResourceNamePrefix) {\n app.onResource(resource => {\n if (!resource.name.startsWith(pulumiResourceNamePrefix)) {\n resource.name = `${pulumiResourceNamePrefix}${resource.name}`;\n }\n });\n }\n\n const { name } = projectAppParams;\n\n // Register core output as a module available for all other modules\n const core = app.addModule(CoreOutput);\n app.addModule(ApiOutput);\n\n // Overrides must be applied via a handler, registered at the very start of the program.\n // By doing this, we're ensuring user's adjustments are not applied to late.\n if (projectAppParams.pulumi) {\n app.addHandler(() => {\n return projectAppParams.pulumi!(app as unknown as ReactPulumiApp);\n });\n }\n\n const bucket = createPrivateAppBucket(app, `${name}-app`);\n\n const cloudfront = app.addResource(aws.cloudfront.Distribution, {\n name: `${name}-app-cdn`,\n config: {\n enabled: true,\n waitForDeployment: false,\n origins: [bucket.origin],\n defaultRootObject: \"index.html\",\n defaultCacheBehavior: {\n compress: true,\n targetOriginId: bucket.origin.originId,\n viewerProtocolPolicy: \"redirect-to-https\",\n allowedMethods: [\"GET\", \"HEAD\", \"OPTIONS\"],\n cachedMethods: [\"GET\", \"HEAD\", \"OPTIONS\"],\n forwardedValues: {\n cookies: { forward: \"none\" },\n queryString: false\n },\n // MinTTL <= DefaultTTL <= MaxTTL\n minTtl: 0,\n defaultTtl: 600,\n maxTtl: 600\n },\n priceClass: \"PriceClass_100\",\n customErrorResponses: [\n { errorCode: 404, responseCode: 404, responsePagePath: \"/index.html\" }\n ],\n restrictions: {\n geoRestriction: {\n restrictionType: \"none\"\n }\n },\n viewerCertificate: {\n cloudfrontDefaultCertificate: true\n }\n }\n });\n\n const domains = app.getParam(projectAppParams.domains);\n if (domains) {\n applyCustomDomain(cloudfront, domains);\n }\n\n app.addOutput(\"appStorage\", bucket.bucket.output.id);\n\n app.addHandler(() => {\n addDomainsUrlsOutputs({\n app,\n cloudfrontDistribution: cloudfront,\n map: {\n distributionDomain: \"cloudfrontAppDomain\",\n distributionUrl: \"cloudfrontAppUrl\",\n usedDomain: \"appDomain\",\n usedUrl: \"appUrl\"\n }\n });\n });\n\n tagResources({\n WbyAppName: name,\n WbyProjectName: String(process.env[\"WEBINY_PROJECT_NAME\"]),\n WbyEnvironment: String(process.env[\"WEBINY_ENV\"])\n });\n\n /**\n * We need to store the appUrl to the admin settings item in the dynamodb\n */\n app.addResource(aws.dynamodb.TableItem, {\n name: \"adminSettings\",\n config: {\n tableName: core.primaryDynamodbTableName,\n hashKey: core.primaryDynamodbTableHashKey,\n rangeKey: pulumi\n .output(core.primaryDynamodbTableRangeKey)\n .apply(key => key || \"SK\"),\n item: pulumi.interpolate`{\n \"PK\": {\"S\": \"ADMIN#SETTINGS\"},\n \"SK\": {\"S\": \"${app.params.run.variant || \"default\"}\"},\n \"data\": {\n \"M\": {\n \"appUrl\": {\n \"S\": \"${cloudfront.output.domainName.apply(\n value => `https://${value}`\n )}\"\n }\n }\n }\n }`\n }\n });\n\n return {\n ...bucket,\n cloudfront\n };\n }\n });\n\n return withServiceManifest(app);\n};\n"],"mappings":";;;;;;;AAAA,IA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C,CAAC;MAEF,OAAO;QACH,GAAGrE,MAAM;QACTE;MACJ,CAAC;IACL;EACJ,CAAC,CAAC;EAEF,OAAO,IAAAoE,wCAAmB,EAACvF,GAAG,CAAC;AACnC,CAAC;AAACwF,OAAA,CAAA1F,oBAAA,GAAAA,oBAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["aws","_interopRequireWildcard","require","pulumi","_pulumi2","_utils","_createAppBucket","_customDomain","_withServiceManifest","_","createReactPulumiApp","projectAppParams","app","createPulumiApp","name","path","folder","config","program","pulumiResourceNamePrefix","getParam","onResource","resource","startsWith","core","addModule","CoreOutput","ApiOutput","addHandler","bucket","createPrivateAppBucket","cloudfront","addResource","Distribution","enabled","waitForDeployment","origins","origin","defaultRootObject","defaultCacheBehavior","compress","targetOriginId","originId","viewerProtocolPolicy","allowedMethods","cachedMethods","forwardedValues","cookies","forward","queryString","minTtl","defaultTtl","maxTtl","priceClass","customErrorResponses","errorCode","responseCode","responsePagePath","restrictions","geoRestriction","restrictionType","viewerCertificate","cloudfrontDefaultCertificate","opts","ignoreChanges","domains","applyCustomDomain","addOutput","output","id","addDomainsUrlsOutputs","cloudfrontDistribution","map","distributionDomain","distributionUrl","usedDomain","usedUrl","tagResources","WbyAppName","WbyProjectName","String","process","env","WbyEnvironment","dynamodb","TableItem","tableName","primaryDynamodbTableName","hashKey","primaryDynamodbTableHashKey","rangeKey","primaryDynamodbTableRangeKey","apply","key","item","interpolate","params","run","variant","domainName","value","withServiceManifest","exports"],"sources":["createReactPulumiApp.ts"],"sourcesContent":["import * as aws from \"@pulumi/aws\";\nimport * as pulumi from \"@pulumi/pulumi\";\nimport { createPulumiApp, PulumiAppParam, PulumiAppParamCallback } from \"@webiny/pulumi\";\nimport { addDomainsUrlsOutputs, tagResources } from \"~/utils\";\nimport { createPrivateAppBucket } from \"../createAppBucket\";\nimport { applyCustomDomain, CustomDomainParams } from \"../customDomain\";\nimport { withServiceManifest } from \"~/utils/withServiceManifest\";\nimport { ApiOutput, CoreOutput } from \"~/apps\";\n\nexport type ReactPulumiApp = ReturnType<typeof createReactPulumiApp>;\n\nexport interface CreateReactPulumiAppParams {\n /**\n * A name of the app, e.g., \"user-area\"\n */\n name: string;\n\n /**\n * A folder where the app is located, e.g., \"apps/user-area\"\n */\n folder: string;\n\n /** Custom domain configuration */\n domains?: PulumiAppParamCallback<CustomDomainParams>;\n\n /**\n * Provides a way to adjust existing Pulumi code (cloud infrastructure resources)\n * or add additional ones into the mix.\n */\n pulumi?: (app: ReactPulumiApp) => void | Promise<void>;\n\n /**\n * Prefixes names of all Pulumi cloud infrastructure resource with given prefix.\n */\n pulumiResourceNamePrefix?: PulumiAppParam<string>;\n\n /**\n * Treats provided environments as production environments, which\n * are deployed in production deployment mode.\n * https://www.webiny.com/docs/architecture/deployment-modes/production\n */\n productionEnvironments?: PulumiAppParam<string[]>;\n}\n\nexport const createReactPulumiApp = (projectAppParams: CreateReactPulumiAppParams) => {\n const app = createPulumiApp({\n name: projectAppParams.name,\n path: projectAppParams.folder,\n config: projectAppParams,\n program: async app => {\n const pulumiResourceNamePrefix = app.getParam(\n projectAppParams.pulumiResourceNamePrefix\n );\n if (pulumiResourceNamePrefix) {\n app.onResource(resource => {\n if (!resource.name.startsWith(pulumiResourceNamePrefix)) {\n resource.name = `${pulumiResourceNamePrefix}${resource.name}`;\n }\n });\n }\n\n const { name } = projectAppParams;\n\n // Register core output as a module available for all other modules\n const core = app.addModule(CoreOutput);\n app.addModule(ApiOutput);\n\n // Overrides must be applied via a handler, registered at the very start of the program.\n // By doing this, we're ensuring user's adjustments are not applied to late.\n if (projectAppParams.pulumi) {\n app.addHandler(() => {\n return projectAppParams.pulumi!(app as unknown as ReactPulumiApp);\n });\n }\n\n const bucket = createPrivateAppBucket(app, `${name}-app`);\n\n const cloudfront = app.addResource(aws.cloudfront.Distribution, {\n name: `${name}-app-cdn`,\n config: {\n enabled: true,\n waitForDeployment: false,\n origins: [bucket.origin],\n defaultRootObject: \"index.html\",\n defaultCacheBehavior: {\n compress: true,\n targetOriginId: bucket.origin.originId,\n viewerProtocolPolicy: \"redirect-to-https\",\n allowedMethods: [\"GET\", \"HEAD\", \"OPTIONS\"],\n cachedMethods: [\"GET\", \"HEAD\", \"OPTIONS\"],\n forwardedValues: {\n cookies: { forward: \"none\" },\n queryString: false\n },\n // MinTTL <= DefaultTTL <= MaxTTL\n minTtl: 0,\n defaultTtl: 600,\n maxTtl: 600\n },\n priceClass: \"PriceClass_100\",\n customErrorResponses: [\n { errorCode: 404, responseCode: 404, responsePagePath: \"/index.html\" }\n ],\n restrictions: {\n geoRestriction: {\n restrictionType: \"none\"\n }\n },\n viewerCertificate: {\n cloudfrontDefaultCertificate: true\n }\n },\n opts: {\n // We are ignoring changes to the \"staging\" property. This is because of the following.\n // With the 5.41.0 release of Webiny, we also upgraded Pulumi to v6. This introduced a change\n // with how Cloudfront distributions are deployed, where Pulumi now also controls the new\n // `staging` property.\n // If not set, Pulumi will default it to `false`. Which is fine, but, the problem is\n // that, because this property did not exist before, it will always be considered as a change\n // upon deployment.\n // We might think this is fine, but, the problem is that a change in this property causes\n // a full replacement of the Cloudfront distribution, which is not acceptable. Especially\n // if a custom domain has already been associated with the distribution. This then would\n // require the user to disassociate the domain, wait for the distribution to be replaced,\n // and then re-associate the domain. This is not a good experience.\n ignoreChanges: [\"staging\"]\n }\n });\n\n const domains = app.getParam(projectAppParams.domains);\n if (domains) {\n applyCustomDomain(cloudfront, domains);\n }\n\n app.addOutput(\"appStorage\", bucket.bucket.output.id);\n\n app.addHandler(() => {\n addDomainsUrlsOutputs({\n app,\n cloudfrontDistribution: cloudfront,\n map: {\n distributionDomain: \"cloudfrontAppDomain\",\n distributionUrl: \"cloudfrontAppUrl\",\n usedDomain: \"appDomain\",\n usedUrl: \"appUrl\"\n }\n });\n });\n\n tagResources({\n WbyAppName: name,\n WbyProjectName: String(process.env[\"WEBINY_PROJECT_NAME\"]),\n WbyEnvironment: String(process.env[\"WEBINY_ENV\"])\n });\n\n /**\n * We need to store the appUrl to the admin settings item in the dynamodb\n */\n app.addResource(aws.dynamodb.TableItem, {\n name: \"adminSettings\",\n config: {\n tableName: core.primaryDynamodbTableName,\n hashKey: core.primaryDynamodbTableHashKey,\n rangeKey: pulumi\n .output(core.primaryDynamodbTableRangeKey)\n .apply(key => key || \"SK\"),\n item: pulumi.interpolate`{\n \"PK\": {\"S\": \"ADMIN#SETTINGS\"},\n \"SK\": {\"S\": \"${app.params.run.variant || \"default\"}\"},\n \"data\": {\n \"M\": {\n \"appUrl\": {\n \"S\": \"${cloudfront.output.domainName.apply(\n value => `https://${value}`\n )}\"\n }\n }\n }\n }`\n }\n });\n\n return {\n ...bucket,\n cloudfront\n };\n }\n });\n\n return withServiceManifest(app);\n};\n"],"mappings":";;;;;;;AAAA,IAAAA,GAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAF,uBAAA,CAAAC,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,gBAAA,GAAAJ,OAAA;AACA,IAAAK,aAAA,GAAAL,OAAA;AACA,IAAAM,oBAAA,GAAAN,OAAA;AACA,IAAAO,CAAA,GAAAP,OAAA;AAqCO,MAAMQ,oBAAoB,GAAIC,gBAA4C,IAAK;EAClF,MAAMC,GAAG,GAAG,IAAAC,wBAAe,EAAC;IACxBC,IAAI,EAAEH,gBAAgB,CAACG,IAAI;IAC3BC,IAAI,EAAEJ,gBAAgB,CAACK,MAAM;IAC7BC,MAAM,EAAEN,gBAAgB;IACxBO,OAAO,EAAE,MAAMN,GAAG,IAAI;MAClB,MAAMO,wBAAwB,GAAGP,GAAG,CAACQ,QAAQ,CACzCT,gBAAgB,CAACQ,wBACrB,CAAC;MACD,IAAIA,wBAAwB,EAAE;QAC1BP,GAAG,CAACS,UAAU,CAACC,QAAQ,IAAI;UACvB,IAAI,CAACA,QAAQ,CAACR,IAAI,CAACS,UAAU,CAACJ,wBAAw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AACoB,WAAW,CAAChC,GAAG,CAACoF,QAAQ,CAACC,SAAS,EAAE;QACpCvE,IAAI,EAAE,eAAe;QACrBG,MAAM,EAAE;UACJqE,SAAS,EAAE9D,IAAI,CAAC+D,wBAAwB;UACxCC,OAAO,EAAEhE,IAAI,CAACiE,2BAA2B;UACzCC,QAAQ,EAAEvF,MAAM,CACXiE,MAAM,CAAC5C,IAAI,CAACmE,4BAA4B,CAAC,CACzCC,KAAK,CAACC,GAAG,IAAIA,GAAG,IAAI,IAAI,CAAC;UAC9BC,IAAI,EAAE3F,MAAM,CAAC4F,WAAY;AAC7C;AACA,yCAAyCnF,GAAG,CAACoF,MAAM,CAACC,GAAG,CAACC,OAAO,IAAI,SAAU;AAC7E;AACA;AACA;AACA,wCAAwCnE,UAAU,CAACqC,MAAM,CAAC+B,UAAU,CAACP,KAAK,CACtCQ,KAAK,IAAK,WAAUA,KAAM,EAC9B,CAAE;AAClC;AACA;AACA;AACA;QACgB;MACJ,CAAC,CAAC;MAEF,OAAO;QACH,GAAGvE,MAAM;QACTE;MACJ,CAAC;IACL;EACJ,CAAC,CAAC;EAEF,OAAO,IAAAsE,wCAAmB,EAACzF,GAAG,CAAC;AACnC,CAAC;AAAC0F,OAAA,CAAA5F,oBAAA,GAAAA,oBAAA","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/pulumi-aws",
|
|
3
|
-
"version": "5.41.
|
|
3
|
+
"version": "5.41.3-beta.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/webiny/webiny-js.git"
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
"@pulumi/aws": "^6.55.0",
|
|
17
17
|
"@pulumi/pulumi": "^3.136.1",
|
|
18
18
|
"@pulumi/random": "4.16.3",
|
|
19
|
-
"@webiny/aws-sdk": "5.41.
|
|
20
|
-
"@webiny/cli-plugin-deploy-pulumi": "5.41.
|
|
21
|
-
"@webiny/pulumi": "5.41.
|
|
19
|
+
"@webiny/aws-sdk": "5.41.3-beta.1",
|
|
20
|
+
"@webiny/cli-plugin-deploy-pulumi": "5.41.3-beta.1",
|
|
21
|
+
"@webiny/pulumi": "5.41.3-beta.1",
|
|
22
22
|
"form-data": "4.0.0",
|
|
23
23
|
"node-fetch": "2.7.0"
|
|
24
24
|
},
|
|
@@ -28,11 +28,11 @@
|
|
|
28
28
|
"@babel/preset-env": "7.24.3",
|
|
29
29
|
"@babel/preset-typescript": "7.24.1",
|
|
30
30
|
"@babel/runtime": "7.24.1",
|
|
31
|
-
"@webiny/api-page-builder": "5.41.
|
|
32
|
-
"@webiny/aws-layers": "5.41.
|
|
33
|
-
"@webiny/cli": "5.41.
|
|
34
|
-
"@webiny/feature-flags": "5.41.
|
|
35
|
-
"@webiny/project-utils": "5.41.
|
|
31
|
+
"@webiny/api-page-builder": "5.41.3-beta.1",
|
|
32
|
+
"@webiny/aws-layers": "5.41.3-beta.1",
|
|
33
|
+
"@webiny/cli": "5.41.3-beta.1",
|
|
34
|
+
"@webiny/feature-flags": "5.41.3-beta.1",
|
|
35
|
+
"@webiny/project-utils": "5.41.3-beta.1",
|
|
36
36
|
"chalk": "4.1.2",
|
|
37
37
|
"lodash": "4.17.21",
|
|
38
38
|
"mime": "2.6.0",
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
]
|
|
57
57
|
}
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "bfa3f6004eee91e9e0721e105f5135eb637d3698"
|
|
60
60
|
}
|