@webiny/pulumi-aws 0.0.0-ee-vpcs.549378cf03
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.
- package/LICENSE +21 -0
- package/README.md +328 -0
- package/apps/admin/createAdminPulumiApp.d.ts +24 -0
- package/apps/admin/createAdminPulumiApp.js +21 -0
- package/apps/admin/createAdminPulumiApp.js.map +1 -0
- package/apps/admin/index.d.ts +1 -0
- package/apps/admin/index.js +18 -0
- package/apps/admin/index.js.map +1 -0
- package/apps/api/ApiApwScheduler.d.ts +20 -0
- package/apps/api/ApiApwScheduler.js +246 -0
- package/apps/api/ApiApwScheduler.js.map +1 -0
- package/apps/api/ApiCloudfront.d.ts +3 -0
- package/apps/api/ApiCloudfront.js +101 -0
- package/apps/api/ApiCloudfront.js.map +1 -0
- package/apps/api/ApiFileManager.d.ts +10 -0
- package/apps/api/ApiFileManager.js +166 -0
- package/apps/api/ApiFileManager.js.map +1 -0
- package/apps/api/ApiGateway.d.ts +18 -0
- package/apps/api/ApiGateway.js +88 -0
- package/apps/api/ApiGateway.js.map +1 -0
- package/apps/api/ApiGraphql.d.ts +26 -0
- package/apps/api/ApiGraphql.js +167 -0
- package/apps/api/ApiGraphql.js.map +1 -0
- package/apps/api/ApiHeadlessCMS.d.ts +13 -0
- package/apps/api/ApiHeadlessCMS.js +94 -0
- package/apps/api/ApiHeadlessCMS.js.map +1 -0
- package/apps/api/ApiOutput.d.ts +15 -0
- package/apps/api/ApiOutput.js +43 -0
- package/apps/api/ApiOutput.js.map +1 -0
- package/apps/api/ApiPageBuilder.d.ts +24 -0
- package/apps/api/ApiPageBuilder.js +248 -0
- package/apps/api/ApiPageBuilder.js.map +1 -0
- package/apps/api/createApiPulumiApp.d.ts +71 -0
- package/apps/api/createApiPulumiApp.js +188 -0
- package/apps/api/createApiPulumiApp.js.map +1 -0
- package/apps/api/index.d.ts +9 -0
- package/apps/api/index.js +122 -0
- package/apps/api/index.js.map +1 -0
- package/apps/awsUtils.d.ts +3 -0
- package/apps/awsUtils.js +23 -0
- package/apps/awsUtils.js.map +1 -0
- package/apps/common/CoreOutput.d.ts +21 -0
- package/apps/common/CoreOutput.js +50 -0
- package/apps/common/CoreOutput.js.map +1 -0
- package/apps/common/VpcConfig.d.ts +8 -0
- package/apps/common/VpcConfig.js +37 -0
- package/apps/common/VpcConfig.js.map +1 -0
- package/apps/common/index.d.ts +2 -0
- package/apps/common/index.js +31 -0
- package/apps/common/index.js.map +1 -0
- package/apps/core/CoreCognito.d.ts +10 -0
- package/apps/core/CoreCognito.js +100 -0
- package/apps/core/CoreCognito.js.map +1 -0
- package/apps/core/CoreDynamo.d.ts +5 -0
- package/apps/core/CoreDynamo.js +51 -0
- package/apps/core/CoreDynamo.js.map +1 -0
- package/apps/core/CoreElasticSearch.d.ts +16 -0
- package/apps/core/CoreElasticSearch.js +286 -0
- package/apps/core/CoreElasticSearch.js.map +1 -0
- package/apps/core/CoreEventBus.d.ts +1 -0
- package/apps/core/CoreEventBus.js +25 -0
- package/apps/core/CoreEventBus.js.map +1 -0
- package/apps/core/CoreFileManager.d.ts +8 -0
- package/apps/core/CoreFileManager.js +55 -0
- package/apps/core/CoreFileManager.js.map +1 -0
- package/apps/core/CoreVpc.d.ts +13 -0
- package/apps/core/CoreVpc.js +148 -0
- package/apps/core/CoreVpc.js.map +1 -0
- package/apps/core/createCorePulumiApp.d.ts +64 -0
- package/apps/core/createCorePulumiApp.js +104 -0
- package/apps/core/createCorePulumiApp.js.map +1 -0
- package/apps/core/index.d.ts +6 -0
- package/apps/core/index.js +83 -0
- package/apps/core/index.js.map +1 -0
- package/apps/createAppBucket.d.ts +13 -0
- package/apps/createAppBucket.js +106 -0
- package/apps/createAppBucket.js.map +1 -0
- package/apps/customDomain.d.ts +9 -0
- package/apps/customDomain.js +14 -0
- package/apps/customDomain.js.map +1 -0
- package/apps/index.d.ts +7 -0
- package/apps/index.js +100 -0
- package/apps/index.js.map +1 -0
- package/apps/lambdaUtils.d.ts +10 -0
- package/apps/lambdaUtils.js +82 -0
- package/apps/lambdaUtils.js.map +1 -0
- package/apps/react/createReactPulumiApp.d.ts +33 -0
- package/apps/react/createReactPulumiApp.js +144 -0
- package/apps/react/createReactPulumiApp.js.map +1 -0
- package/apps/react/index.d.ts +1 -0
- package/apps/react/index.js +18 -0
- package/apps/react/index.js.map +1 -0
- package/apps/tenantRouter.d.ts +3 -0
- package/apps/tenantRouter.js +115 -0
- package/apps/tenantRouter.js.map +1 -0
- package/apps/website/WebsitePrerendering.d.ts +39 -0
- package/apps/website/WebsitePrerendering.js +300 -0
- package/apps/website/WebsitePrerendering.js.map +1 -0
- package/apps/website/createWebsitePulumiApp.d.ts +74 -0
- package/apps/website/createWebsitePulumiApp.js +246 -0
- package/apps/website/createWebsitePulumiApp.js.map +1 -0
- package/apps/website/deliveryViewerRequest.d.ts +2 -0
- package/apps/website/deliveryViewerRequest.js +32 -0
- package/apps/website/deliveryViewerRequest.js.map +1 -0
- package/apps/website/index.d.ts +1 -0
- package/apps/website/index.js +18 -0
- package/apps/website/index.js.map +1 -0
- package/components/tenantRouter/WebsiteTenantRouter.d.ts +11 -0
- package/components/tenantRouter/WebsiteTenantRouter.js +98 -0
- package/components/tenantRouter/WebsiteTenantRouter.js.map +1 -0
- package/components/tenantRouter/functions/origin/request.d.ts +1 -0
- package/components/tenantRouter/functions/origin/request.js +129 -0
- package/components/tenantRouter/functions/origin/request.js.map +1 -0
- package/enterprise/createAdminPulumiApp.d.ts +1 -0
- package/enterprise/createAdminPulumiApp.js +25 -0
- package/enterprise/createAdminPulumiApp.js.map +1 -0
- package/enterprise/createApiPulumiApp.d.ts +61 -0
- package/enterprise/createApiPulumiApp.js +68 -0
- package/enterprise/createApiPulumiApp.js.map +1 -0
- package/enterprise/createCorePulumiApp.d.ts +42 -0
- package/enterprise/createCorePulumiApp.js +137 -0
- package/enterprise/createCorePulumiApp.js.map +1 -0
- package/enterprise/createWebsitePulumiApp.d.ts +56 -0
- package/enterprise/createWebsitePulumiApp.js +68 -0
- package/enterprise/createWebsitePulumiApp.js.map +1 -0
- package/enterprise/index.d.ts +4 -0
- package/enterprise/index.js +57 -0
- package/enterprise/index.js.map +1 -0
- package/index.d.ts +3 -0
- package/index.js +44 -0
- package/index.js.map +1 -0
- package/package.json +53 -0
- package/utils/crawlDirectory.d.ts +1 -0
- package/utils/crawlDirectory.js +33 -0
- package/utils/crawlDirectory.js.map +1 -0
- package/utils/getPresignedPost.d.ts +11 -0
- package/utils/getPresignedPost.js +46 -0
- package/utils/getPresignedPost.js.map +1 -0
- package/utils/index.d.ts +3 -0
- package/utils/index.js +51 -0
- package/utils/index.js.map +1 -0
- package/utils/lambdaEnvVariables.d.ts +20 -0
- package/utils/lambdaEnvVariables.js +78 -0
- package/utils/lambdaEnvVariables.js.map +1 -0
- package/utils/storageMigrate.d.ts +0 -0
- package/utils/storageMigrate.js +292 -0
- package/utils/storageMigrate.js.map +1 -0
- package/utils/tagResources.d.ts +5 -0
- package/utils/tagResources.js +43 -0
- package/utils/tagResources.js.map +1 -0
- package/utils/uploadFolderToS3.d.ts +26 -0
- package/utils/uploadFolderToS3.js +188 -0
- package/utils/uploadFolderToS3.js.map +1 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Webiny
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
# `@webiny/pulumi-aws`
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@webiny/pulumi-aws)
|
|
4
|
+
[](https://www.npmjs.com/package/@webiny/pulumi-aws)
|
|
5
|
+
[](https://github.com/prettier/prettier)
|
|
6
|
+
[](http://makeapullrequest.com)
|
|
7
|
+
|
|
8
|
+
A set of Pulumi apps that deploy Webiny CMS into Amazon Web Services (AWS).
|
|
9
|
+
|
|
10
|
+
## Table of Contents
|
|
11
|
+
|
|
12
|
+
- [Installation](#installation)
|
|
13
|
+
- [Overview](#overview)
|
|
14
|
+
- [Examples](#examples)
|
|
15
|
+
- [Reference](#reference)
|
|
16
|
+
- [Apps](#functions)
|
|
17
|
+
- [`createCoreApp`](#createCoreApp)
|
|
18
|
+
- [`createApiApp`](#createApiApp)
|
|
19
|
+
- [`createAdminApp`](#createAdminApp)
|
|
20
|
+
- [`createWebsiteApp`](#createWebsiteApp)
|
|
21
|
+
|
|
22
|
+
## Installation
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
npm install --save @webiny/pulumi-aws
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Or if you prefer yarn:
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
yarn add @webiny/pulumi-aws
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Overview
|
|
35
|
+
|
|
36
|
+
A set of Pulumi apps that deploy Webiny CMS into Amazon Web Services (AWS).
|
|
37
|
+
|
|
38
|
+
> 💡 **TIP**
|
|
39
|
+
>
|
|
40
|
+
> Pulumi apps included in this package are automatically included in every Webiny project that's configured to be deployed into Amazon Web Services (AWS).
|
|
41
|
+
|
|
42
|
+
## Examples
|
|
43
|
+
|
|
44
|
+
| Example | Description |
|
|
45
|
+
| --------------------------------- | --------------------------------------------------------------- |
|
|
46
|
+
| [Initialization and Running the Apps](./docs/examples/initializationAndRunningTheApps.md) | Shows how the included apps are initialized and run. |
|
|
47
|
+
|
|
48
|
+
## Reference
|
|
49
|
+
|
|
50
|
+
### Apps
|
|
51
|
+
|
|
52
|
+
#### `createCoreApp`
|
|
53
|
+
|
|
54
|
+
<details>
|
|
55
|
+
<summary>Type Declaration</summary>
|
|
56
|
+
<p>
|
|
57
|
+
|
|
58
|
+
```ts
|
|
59
|
+
export interface CreateCoreAppParams {
|
|
60
|
+
/**
|
|
61
|
+
* Secures against deleting database by accident.
|
|
62
|
+
* By default enabled in production environments.
|
|
63
|
+
*/
|
|
64
|
+
protect?: PulumiAppParam<boolean>;
|
|
65
|
+
/**
|
|
66
|
+
* Enables ElasticSearch infrastructure.
|
|
67
|
+
* Note that it requires also changes in application code.
|
|
68
|
+
*/
|
|
69
|
+
elasticSearch?: PulumiAppParam<boolean>;
|
|
70
|
+
/**
|
|
71
|
+
* Enables VPC for the application.
|
|
72
|
+
* By default enabled in production environments.
|
|
73
|
+
*/
|
|
74
|
+
vpc?: PulumiAppParam<boolean>;
|
|
75
|
+
/**
|
|
76
|
+
* Additional settings for backwards compatibility.
|
|
77
|
+
*/
|
|
78
|
+
legacy?: PulumiAppParam<CoreAppLegacyConfig>;
|
|
79
|
+
|
|
80
|
+
pulumi?: (app: ReturnType<typeof createStoragePulumiApp>) => void;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export interface CoreAppLegacyConfig {
|
|
84
|
+
useEmailAsUsername?: boolean;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export declare function createCoreApp(projectAppParams?: CreateCoreAppParams): import("@webiny/pulumi").PulumiApp<{
|
|
88
|
+
fileManagerBucket: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/s3").Bucket>;
|
|
89
|
+
eventBus: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/cloudwatch").EventBus>;
|
|
90
|
+
elasticSearch: {
|
|
91
|
+
domain: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/elasticsearch").Domain>;
|
|
92
|
+
domainPolicy: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/elasticsearch").DomainPolicy>;
|
|
93
|
+
table: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/dynamodb").Table>;
|
|
94
|
+
dynamoToElastic: {
|
|
95
|
+
role: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/iam").Role>;
|
|
96
|
+
policy: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/iam").Policy>;
|
|
97
|
+
lambda: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/lambda").Function>;
|
|
98
|
+
eventSourceMapping: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/lambda").EventSourceMapping>;
|
|
99
|
+
};
|
|
100
|
+
} | null;
|
|
101
|
+
userPool: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/cognito").UserPool>;
|
|
102
|
+
userPoolClient: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/cognito").UserPoolClient>;
|
|
103
|
+
dynamoDbTable: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/dynamodb").Table>;
|
|
104
|
+
vpc: {
|
|
105
|
+
vpc: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/ec2").Vpc>;
|
|
106
|
+
subnets: {
|
|
107
|
+
public: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/ec2").Subnet>[];
|
|
108
|
+
private: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/ec2").Subnet>[];
|
|
109
|
+
};
|
|
110
|
+
} | null;
|
|
111
|
+
}>;
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
</p>
|
|
115
|
+
</details>
|
|
116
|
+
|
|
117
|
+
Creates Storage Pulumi app.
|
|
118
|
+
|
|
119
|
+
```ts
|
|
120
|
+
// This is imported in our Pulumi program's entrypoint file (index.ts).
|
|
121
|
+
import { createStoragePulumiApp } from "@webiny/pulumi-aws";
|
|
122
|
+
|
|
123
|
+
export = async () => {
|
|
124
|
+
const coreApp = createCoreApp();
|
|
125
|
+
|
|
126
|
+
return coreApp.run();
|
|
127
|
+
};
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
#### `createApiApp`
|
|
131
|
+
|
|
132
|
+
<details>
|
|
133
|
+
<summary>Type Declaration</summary>
|
|
134
|
+
<p>
|
|
135
|
+
|
|
136
|
+
```ts
|
|
137
|
+
export interface CreateApiAppParams {
|
|
138
|
+
/**
|
|
139
|
+
* Enables or disables VPC for the API.
|
|
140
|
+
* For VPC to work you also have to enable it in the Storage application.
|
|
141
|
+
*/
|
|
142
|
+
vpc?: PulumiAppParam<boolean>;
|
|
143
|
+
/** Custom domain configuration */
|
|
144
|
+
domain?(app: PulumiApp): CustomDomainParams | undefined | void;
|
|
145
|
+
pulumi?: (app: ReturnType<typeof createApiPulumiApp>) => void;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
export declare const createApiPulumiApp: (projectAppParams?: CreateApiAppParams) => PulumiApp<{
|
|
149
|
+
fileManager: {
|
|
150
|
+
functions: {
|
|
151
|
+
transform: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/lambda").Function>;
|
|
152
|
+
manage: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/lambda").Function>;
|
|
153
|
+
download: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/lambda").Function>;
|
|
154
|
+
};
|
|
155
|
+
bucketNotification: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/s3").BucketNotification>;
|
|
156
|
+
};
|
|
157
|
+
graphql: {
|
|
158
|
+
role: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/iam").Role>;
|
|
159
|
+
policy: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/iam").Policy>;
|
|
160
|
+
functions: {
|
|
161
|
+
graphql: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/lambda").Function>;
|
|
162
|
+
};
|
|
163
|
+
};
|
|
164
|
+
headlessCms: {
|
|
165
|
+
role: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/iam").Role>;
|
|
166
|
+
policy: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/iam").Policy>;
|
|
167
|
+
functions: {
|
|
168
|
+
graphql: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/lambda").Function>;
|
|
169
|
+
};
|
|
170
|
+
};
|
|
171
|
+
apiGateway: {
|
|
172
|
+
api: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/apigatewayv2").Api>;
|
|
173
|
+
stage: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/apigatewayv2").Stage>;
|
|
174
|
+
routes: Record<string, {
|
|
175
|
+
integration: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/apigatewayv2").Integration>;
|
|
176
|
+
route: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/apigatewayv2").Route>;
|
|
177
|
+
permission: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/lambda").Permission>;
|
|
178
|
+
}>;
|
|
179
|
+
addRoute: (name: string, params: import("..").ApiRouteParams) => void;
|
|
180
|
+
};
|
|
181
|
+
cloudfront: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/cloudfront").Distribution>;
|
|
182
|
+
apwScheduler: {
|
|
183
|
+
executeAction: {
|
|
184
|
+
role: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/iam").Role>;
|
|
185
|
+
policy: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/iam").Policy>;
|
|
186
|
+
lambda: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/lambda").Function>;
|
|
187
|
+
};
|
|
188
|
+
scheduleAction: {
|
|
189
|
+
role: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/iam").Role>;
|
|
190
|
+
policy: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/iam").Policy>;
|
|
191
|
+
lambda: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/lambda").Function>;
|
|
192
|
+
};
|
|
193
|
+
eventRule: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/cloudwatch").EventRule>;
|
|
194
|
+
eventTarget: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/cloudwatch").EventTarget>;
|
|
195
|
+
};
|
|
196
|
+
}>;
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
</p>
|
|
200
|
+
</details>
|
|
201
|
+
|
|
202
|
+
Creates API Pulumi app.
|
|
203
|
+
|
|
204
|
+
```ts
|
|
205
|
+
// This is imported in our Pulumi program's entrypoint file (index.ts).
|
|
206
|
+
import { createApiPulumiApp } from "@webiny/pulumi-aws";
|
|
207
|
+
|
|
208
|
+
export = async () => {
|
|
209
|
+
const apiApp = createApiApp();
|
|
210
|
+
|
|
211
|
+
return apiApp.run();
|
|
212
|
+
};
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
#### `createAdminApp`
|
|
216
|
+
|
|
217
|
+
<details>
|
|
218
|
+
<summary>Type Declaration</summary>
|
|
219
|
+
<p>
|
|
220
|
+
|
|
221
|
+
```ts
|
|
222
|
+
import * as aws from "@pulumi/aws";
|
|
223
|
+
import { PulumiApp } from "@webiny/pulumi";
|
|
224
|
+
import { CustomDomainParams } from "../customDomain";
|
|
225
|
+
|
|
226
|
+
export interface CreateAdminAppParams {
|
|
227
|
+
/** Custom domain configuration */
|
|
228
|
+
domain?(app: PulumiApp): CustomDomainParams | undefined | void;
|
|
229
|
+
pulumi?: (app: ReturnType<typeof createAdminPulumiApp>) => void;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
export declare const createAdminPulumiApp: (projectAppParams: CreateAdminAppParams) => PulumiApp<{
|
|
233
|
+
cloudfront: import("@webiny/pulumi").PulumiAppResource<typeof aws.cloudfront.Distribution>;
|
|
234
|
+
bucket: import("@webiny/pulumi").PulumiAppResource<typeof aws.s3.Bucket>;
|
|
235
|
+
origin: aws.types.input.cloudfront.DistributionOrigin;
|
|
236
|
+
}>;
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
</p>
|
|
240
|
+
</details>
|
|
241
|
+
|
|
242
|
+
Creates Admin Pulumi app.
|
|
243
|
+
|
|
244
|
+
```ts
|
|
245
|
+
// This is imported in our Pulumi program's entrypoint file (index.ts).
|
|
246
|
+
import { createAdminPulumiApp } from "@webiny/pulumi-aws";
|
|
247
|
+
|
|
248
|
+
export = async () => {
|
|
249
|
+
const adminApp = createAdminApp();
|
|
250
|
+
|
|
251
|
+
return adminApp.run();
|
|
252
|
+
};
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
#### `createWebsiteApp`
|
|
256
|
+
|
|
257
|
+
<details>
|
|
258
|
+
<summary>Type Declaration</summary>
|
|
259
|
+
<p>
|
|
260
|
+
|
|
261
|
+
```ts
|
|
262
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
263
|
+
import * as aws from "@pulumi/aws";
|
|
264
|
+
import { PulumiApp, PulumiAppParam } from "@webiny/pulumi";
|
|
265
|
+
import { CustomDomainParams } from "../customDomain";
|
|
266
|
+
export interface CreateWebsiteAppParams {
|
|
267
|
+
/** Custom domain configuration */
|
|
268
|
+
domain?(app: PulumiApp): CustomDomainParams | undefined | void;
|
|
269
|
+
/**
|
|
270
|
+
* Enables or disables VPC for the API.
|
|
271
|
+
* For VPC to work you also have to enable it in the `storage` application.
|
|
272
|
+
*/
|
|
273
|
+
vpc?: PulumiAppParam<boolean | undefined>;
|
|
274
|
+
pulumi?: (app: ReturnType<typeof createWebsitePulumiApp>) => void;
|
|
275
|
+
}
|
|
276
|
+
export declare const createWebsitePulumiApp: (projectAppParams?: CreateWebsiteAppParams) => PulumiApp<{
|
|
277
|
+
prerendering: {
|
|
278
|
+
subscriber: {
|
|
279
|
+
policy: pulumi.Output<aws.iam.Policy>;
|
|
280
|
+
role: import("@webiny/pulumi").PulumiAppResource<typeof aws.iam.Role>;
|
|
281
|
+
lambda: import("@webiny/pulumi").PulumiAppResource<typeof aws.lambda.Function>;
|
|
282
|
+
eventRule: import("@webiny/pulumi").PulumiAppResource<typeof aws.cloudwatch.EventRule>;
|
|
283
|
+
eventPermission: import("@webiny/pulumi").PulumiAppResource<typeof aws.lambda.Permission>;
|
|
284
|
+
eventTarget: import("@webiny/pulumi").PulumiAppResource<typeof aws.cloudwatch.EventTarget>;
|
|
285
|
+
};
|
|
286
|
+
renderer: {
|
|
287
|
+
policy: pulumi.Output<aws.iam.Policy>;
|
|
288
|
+
role: import("@webiny/pulumi").PulumiAppResource<typeof aws.iam.Role>;
|
|
289
|
+
lambda: import("@webiny/pulumi").PulumiAppResource<typeof aws.lambda.Function>;
|
|
290
|
+
eventSourceMapping: import("@webiny/pulumi").PulumiAppResource<typeof aws.lambda.EventSourceMapping>;
|
|
291
|
+
};
|
|
292
|
+
flush: {
|
|
293
|
+
policy: pulumi.Output<aws.iam.Policy>;
|
|
294
|
+
role: import("@webiny/pulumi").PulumiAppResource<typeof aws.iam.Role>;
|
|
295
|
+
lambda: import("@webiny/pulumi").PulumiAppResource<typeof aws.lambda.Function>;
|
|
296
|
+
eventRule: import("@webiny/pulumi").PulumiAppResource<typeof aws.cloudwatch.EventRule>;
|
|
297
|
+
eventPermission: import("@webiny/pulumi").PulumiAppResource<typeof aws.lambda.Permission>;
|
|
298
|
+
eventTarget: import("@webiny/pulumi").PulumiAppResource<typeof aws.cloudwatch.EventTarget>;
|
|
299
|
+
};
|
|
300
|
+
};
|
|
301
|
+
app: {
|
|
302
|
+
cloudfront: import("@webiny/pulumi").PulumiAppResource<typeof aws.cloudfront.Distribution>;
|
|
303
|
+
bucket: import("@webiny/pulumi").PulumiAppResource<typeof aws.s3.Bucket>;
|
|
304
|
+
origin: aws.types.input.cloudfront.DistributionOrigin;
|
|
305
|
+
};
|
|
306
|
+
delivery: {
|
|
307
|
+
cloudfront: import("@webiny/pulumi").PulumiAppResource<typeof aws.cloudfront.Distribution>;
|
|
308
|
+
bucket: import("@webiny/pulumi").PulumiAppResource<typeof aws.s3.Bucket>;
|
|
309
|
+
origin: aws.types.input.cloudfront.DistributionOrigin;
|
|
310
|
+
};
|
|
311
|
+
}>;
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
</p>
|
|
315
|
+
</details>
|
|
316
|
+
|
|
317
|
+
Creates Website Pulumi app.
|
|
318
|
+
|
|
319
|
+
```ts
|
|
320
|
+
// This is imported in our Pulumi program's entrypoint file (index.ts).
|
|
321
|
+
import { createWebsitePulumiApp } from "@webiny/pulumi-aws";
|
|
322
|
+
|
|
323
|
+
export = async () => {
|
|
324
|
+
const websiteApp = createWebsiteApp();
|
|
325
|
+
|
|
326
|
+
return websiteApp.run();
|
|
327
|
+
};
|
|
328
|
+
```
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { PulumiAppParam, PulumiAppParamCallback } from "@webiny/pulumi";
|
|
2
|
+
import { createReactPulumiApp, CustomDomainParams } from "..";
|
|
3
|
+
export declare type AdminPulumiApp = ReturnType<typeof createReactPulumiApp>;
|
|
4
|
+
export interface CreateAdminPulumiAppParams {
|
|
5
|
+
/** Custom domain configuration */
|
|
6
|
+
domains?: PulumiAppParamCallback<CustomDomainParams>;
|
|
7
|
+
/**
|
|
8
|
+
* Provides a way to adjust existing Pulumi code (cloud infrastructure resources)
|
|
9
|
+
* or add additional ones into the mix.
|
|
10
|
+
*/
|
|
11
|
+
pulumi?: (app: AdminPulumiApp) => void | Promise<void>;
|
|
12
|
+
/**
|
|
13
|
+
* Prefixes names of all Pulumi cloud infrastructure resource with given prefix.
|
|
14
|
+
*/
|
|
15
|
+
pulumiResourceNamePrefix?: PulumiAppParam<string>;
|
|
16
|
+
}
|
|
17
|
+
export declare const createAdminPulumiApp: (projectAppParams: CreateAdminPulumiAppParams) => import("@webiny/pulumi").PulumiApp<{
|
|
18
|
+
cloudfront: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/cloudfront/distribution").Distribution>;
|
|
19
|
+
bucket: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/s3/bucket").Bucket>;
|
|
20
|
+
originIdentity: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/cloudfront/originAccessIdentity").OriginAccessIdentity>;
|
|
21
|
+
origin: import("@pulumi/aws/types/input").cloudfront.DistributionOrigin;
|
|
22
|
+
bucketPublicAccessBlock: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/s3/bucketPublicAccessBlock").BucketPublicAccessBlock>;
|
|
23
|
+
bucketPolicy: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/s3/bucketPolicy").BucketPolicy>;
|
|
24
|
+
}>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.createAdminPulumiApp = void 0;
|
|
9
|
+
|
|
10
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
11
|
+
|
|
12
|
+
var _ = require("./..");
|
|
13
|
+
|
|
14
|
+
const createAdminPulumiApp = projectAppParams => {
|
|
15
|
+
return (0, _.createReactPulumiApp)((0, _objectSpread2.default)({
|
|
16
|
+
name: "admin",
|
|
17
|
+
folder: "apps/admin"
|
|
18
|
+
}, projectAppParams));
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
exports.createAdminPulumiApp = createAdminPulumiApp;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createAdminPulumiApp","projectAppParams","createReactPulumiApp","name","folder"],"sources":["createAdminPulumiApp.ts"],"sourcesContent":["import { PulumiAppParam, PulumiAppParamCallback } from \"@webiny/pulumi\";\nimport { createReactPulumiApp, CustomDomainParams } from \"~/apps\";\n\nexport type AdminPulumiApp = ReturnType<typeof createReactPulumiApp>;\n\nexport interface CreateAdminPulumiAppParams {\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: AdminPulumiApp) => void | Promise<void>;\n\n /**\n * Prefixes names of all Pulumi cloud infrastructure resource with given prefix.\n */\n pulumiResourceNamePrefix?: PulumiAppParam<string>;\n}\n\nexport const createAdminPulumiApp = (projectAppParams: CreateAdminPulumiAppParams) => {\n return createReactPulumiApp({\n name: \"admin\",\n folder: \"apps/admin\",\n ...projectAppParams\n });\n};\n"],"mappings":";;;;;;;;;;;AACA;;AAoBO,MAAMA,oBAAoB,GAAIC,gBAAD,IAAkD;EAClF,OAAO,IAAAC,sBAAA;IACHC,IAAI,EAAE,OADH;IAEHC,MAAM,EAAE;EAFL,GAGAH,gBAHA,EAAP;AAKH,CANM"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./createAdminPulumiApp";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var _createAdminPulumiApp = require("./createAdminPulumiApp");
|
|
8
|
+
|
|
9
|
+
Object.keys(_createAdminPulumiApp).forEach(function (key) {
|
|
10
|
+
if (key === "default" || key === "__esModule") return;
|
|
11
|
+
if (key in exports && exports[key] === _createAdminPulumiApp[key]) return;
|
|
12
|
+
Object.defineProperty(exports, key, {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _createAdminPulumiApp[key];
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./createAdminPulumiApp\";\n"],"mappings":";;;;;;AAAA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { PulumiAppModule } from "@webiny/pulumi";
|
|
2
|
+
interface ScheduleActionParams {
|
|
3
|
+
env: Record<string, any>;
|
|
4
|
+
}
|
|
5
|
+
export declare type ApiApwScheduler = PulumiAppModule<typeof ApiApwScheduler>;
|
|
6
|
+
export declare const ApiApwScheduler: import("@webiny/pulumi").PulumiAppModuleDefinition<{
|
|
7
|
+
executeAction: {
|
|
8
|
+
role: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/iam/role").Role>;
|
|
9
|
+
policy: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/iam/policy").Policy>;
|
|
10
|
+
lambda: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/lambda/function").Function>;
|
|
11
|
+
};
|
|
12
|
+
scheduleAction: {
|
|
13
|
+
role: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/iam/role").Role>;
|
|
14
|
+
policy: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/iam/policy").Policy>;
|
|
15
|
+
lambda: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/lambda/function").Function>;
|
|
16
|
+
};
|
|
17
|
+
eventRule: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/cloudwatch/eventRule").EventRule>;
|
|
18
|
+
eventTarget: import("@webiny/pulumi").PulumiAppResource<typeof import("@pulumi/aws/cloudwatch/eventTarget").EventTarget>;
|
|
19
|
+
}, ScheduleActionParams>;
|
|
20
|
+
export {};
|