@anvil-cloud/sdk 0.0.13 → 0.0.15
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/aws/cognitoAuth.ts +70 -0
- package/aws/cognitoUserPool.ts +132 -0
- package/aws/dynamoDB.ts +176 -0
- package/aws/eventBus.ts +91 -0
- package/aws/httpApi.ts +108 -0
- package/aws/index.ts +63 -0
- package/aws/lambda.ts +9 -3
- package/aws/oauthAuthorizer.ts +70 -0
- package/aws/queue.ts +156 -0
- package/aws/svelteKitSite.ts +14 -0
- package/aws/vpc.ts +159 -0
- package/aws/vpcEndpoint.ts +98 -0
- package/bin/aws/cognitoAuth.d.ts +36 -0
- package/bin/aws/cognitoAuth.js +53 -0
- package/bin/aws/cognitoAuth.js.map +1 -0
- package/bin/aws/cognitoUserPool.d.ts +82 -0
- package/bin/aws/cognitoUserPool.js +65 -0
- package/bin/aws/cognitoUserPool.js.map +1 -0
- package/bin/aws/dynamoDB.d.ts +115 -0
- package/bin/aws/dynamoDB.js +121 -0
- package/bin/aws/dynamoDB.js.map +1 -0
- package/bin/aws/eventBus.d.ts +47 -0
- package/bin/aws/eventBus.js +63 -0
- package/bin/aws/eventBus.js.map +1 -0
- package/bin/aws/httpApi.d.ts +66 -0
- package/bin/aws/httpApi.js +60 -0
- package/bin/aws/httpApi.js.map +1 -0
- package/bin/aws/index.d.ts +27 -0
- package/bin/aws/index.js +37 -1
- package/bin/aws/index.js.map +1 -1
- package/bin/aws/lambda.d.ts +7 -3
- package/bin/aws/lambda.js +2 -0
- package/bin/aws/lambda.js.map +1 -1
- package/bin/aws/oauthAuthorizer.d.ts +36 -0
- package/bin/aws/oauthAuthorizer.js +53 -0
- package/bin/aws/oauthAuthorizer.js.map +1 -0
- package/bin/aws/queue.d.ts +83 -0
- package/bin/aws/queue.js +103 -0
- package/bin/aws/queue.js.map +1 -0
- package/bin/aws/svelteKitSite.d.ts +9 -0
- package/bin/aws/svelteKitSite.js +3 -0
- package/bin/aws/svelteKitSite.js.map +1 -1
- package/bin/aws/vpc.d.ts +98 -0
- package/bin/aws/vpc.js +94 -0
- package/bin/aws/vpc.js.map +1 -0
- package/bin/aws/vpcEndpoint.d.ts +53 -0
- package/bin/aws/vpcEndpoint.js +62 -0
- package/bin/aws/vpcEndpoint.js.map +1 -0
- package/bin/grants.d.ts +0 -10
- package/bin/grants.js +5 -10
- package/bin/grants.js.map +1 -1
- package/bin/package.json +1 -1
- package/bin/types/enums/aws/index.d.ts +211 -7
- package/bin/types/enums/aws/index.js +192 -8
- package/bin/types/enums/aws/index.js.map +1 -1
- package/bin/types/input.d.ts +1040 -0
- package/bin/types/output.d.ts +13 -0
- package/grants.ts +7 -22
- package/package.json +1 -1
- package/tsconfig.json +9 -0
- package/types/enums/aws/index.ts +239 -7
- package/types/input.ts +1079 -0
- package/types/output.ts +14 -0
package/aws/lambda.ts
CHANGED
|
@@ -44,6 +44,10 @@ export class Lambda extends pulumi.ComponentResource {
|
|
|
44
44
|
* The ARN of the Lambda's IAM execution role.
|
|
45
45
|
*/
|
|
46
46
|
declare public /*out*/ readonly roleArn: pulumi.Output<string>;
|
|
47
|
+
/**
|
|
48
|
+
* The ID of the dedicated security group created for this Lambda. Only populated when vpc is set. Use this to grant other resources access to this Lambda via the grant system.
|
|
49
|
+
*/
|
|
50
|
+
declare public /*out*/ readonly securityGroupId: pulumi.Output<string | undefined>;
|
|
47
51
|
|
|
48
52
|
/**
|
|
49
53
|
* Create a Lambda resource with the given unique name, arguments, and options.
|
|
@@ -80,11 +84,13 @@ export class Lambda extends pulumi.ComponentResource {
|
|
|
80
84
|
resourceInputs["functionName"] = undefined /*out*/;
|
|
81
85
|
resourceInputs["functionUrl"] = undefined /*out*/;
|
|
82
86
|
resourceInputs["roleArn"] = undefined /*out*/;
|
|
87
|
+
resourceInputs["securityGroupId"] = undefined /*out*/;
|
|
83
88
|
} else {
|
|
84
89
|
resourceInputs["arn"] = undefined /*out*/;
|
|
85
90
|
resourceInputs["functionName"] = undefined /*out*/;
|
|
86
91
|
resourceInputs["functionUrl"] = undefined /*out*/;
|
|
87
92
|
resourceInputs["roleArn"] = undefined /*out*/;
|
|
93
|
+
resourceInputs["securityGroupId"] = undefined /*out*/;
|
|
88
94
|
}
|
|
89
95
|
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
90
96
|
super(Lambda.__pulumiType, name, resourceInputs, opts, true /*remote*/);
|
|
@@ -165,11 +171,11 @@ export interface LambdaArgs {
|
|
|
165
171
|
tracing?: pulumi.Input<boolean>;
|
|
166
172
|
transform?: pulumi.Input<inputs.aws.LambdaTransformArgsArgs>;
|
|
167
173
|
/**
|
|
168
|
-
* Enable a direct HTTPS endpoint for the function. Auth mode is AWS_IAM
|
|
174
|
+
* Enable a direct HTTPS endpoint for the function. Auth mode is AWS_IAM - never public. Default: false.
|
|
169
175
|
*/
|
|
170
176
|
url?: pulumi.Input<boolean>;
|
|
171
177
|
/**
|
|
172
|
-
*
|
|
178
|
+
* Places the Lambda inside a VPC for access to private resources such as RDS or ElastiCache. Anvil creates a dedicated security group with zero inbound and zero outbound rules. Nothing is reachable until explicitly granted via the grant system.
|
|
173
179
|
*/
|
|
174
|
-
vpc?: pulumi.Input<
|
|
180
|
+
vpc?: pulumi.Input<inputs.aws.LambdaVpcArgsArgs>;
|
|
175
181
|
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
|
|
2
|
+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
3
|
+
|
|
4
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
5
|
+
import * as utilities from "../utilities";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* An Anvil-managed JWT authorizer for HTTP API Gateway. Works with any OIDC-compliant identity provider — Auth0, Clerk, Google, Okta, Cognito. API Gateway verifies the JWT signature, issuer, audience, and expiry on every request natively — no Lambda or custom code required. Pass authorizerId to HttpApi defaultAuthorizerId to protect your routes.
|
|
9
|
+
*/
|
|
10
|
+
export class OAuthAuthorizer extends pulumi.ComponentResource {
|
|
11
|
+
/** @internal */
|
|
12
|
+
public static readonly __pulumiType = 'anvil:aws:OAuthAuthorizer';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Returns true if the given object is an instance of OAuthAuthorizer. This is designed to work even
|
|
16
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
17
|
+
*/
|
|
18
|
+
public static isInstance(obj: any): obj is OAuthAuthorizer {
|
|
19
|
+
if (obj === undefined || obj === null) {
|
|
20
|
+
return false;
|
|
21
|
+
}
|
|
22
|
+
return obj['__pulumiType'] === OAuthAuthorizer.__pulumiType;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* The API Gateway authorizer ID. Pass this to HttpApi defaultAuthorizerId to protect your API routes.
|
|
27
|
+
*/
|
|
28
|
+
declare public /*out*/ readonly authorizerId: pulumi.Output<string>;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Create a OAuthAuthorizer resource with the given unique name, arguments, and options.
|
|
32
|
+
*
|
|
33
|
+
* @param name The _unique_ name of the resource.
|
|
34
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
35
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
36
|
+
*/
|
|
37
|
+
constructor(name: string, args: OAuthAuthorizerArgs, opts?: pulumi.ComponentResourceOptions) {
|
|
38
|
+
let resourceInputs: pulumi.Inputs = {};
|
|
39
|
+
opts = opts || {};
|
|
40
|
+
if (!opts.id) {
|
|
41
|
+
if (args?.audience === undefined && !opts.urn) {
|
|
42
|
+
throw new Error("Missing required property 'audience'");
|
|
43
|
+
}
|
|
44
|
+
if (args?.issuer === undefined && !opts.urn) {
|
|
45
|
+
throw new Error("Missing required property 'issuer'");
|
|
46
|
+
}
|
|
47
|
+
resourceInputs["audience"] = args?.audience;
|
|
48
|
+
resourceInputs["issuer"] = args?.issuer;
|
|
49
|
+
resourceInputs["authorizerId"] = undefined /*out*/;
|
|
50
|
+
} else {
|
|
51
|
+
resourceInputs["authorizerId"] = undefined /*out*/;
|
|
52
|
+
}
|
|
53
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
54
|
+
super(OAuthAuthorizer.__pulumiType, name, resourceInputs, opts, true /*remote*/);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* The set of arguments for constructing a OAuthAuthorizer resource.
|
|
60
|
+
*/
|
|
61
|
+
export interface OAuthAuthorizerArgs {
|
|
62
|
+
/**
|
|
63
|
+
* The intended recipients of the JWT. API Gateway rejects tokens whose 'aud' claim does not match one of these values. Typically your API's client ID registered with the identity provider.
|
|
64
|
+
*/
|
|
65
|
+
audience: pulumi.Input<pulumi.Input<string>[]>;
|
|
66
|
+
/**
|
|
67
|
+
* The OIDC issuer URL of your identity provider. API Gateway fetches public signing keys from {issuer}/.well-known/jwks.json to verify token signatures. Examples: Auth0: 'https://your-tenant.auth0.com/', Clerk: 'https://your-instance.clerk.accounts.dev', Google: 'https://accounts.google.com'.
|
|
68
|
+
*/
|
|
69
|
+
issuer: pulumi.Input<string>;
|
|
70
|
+
}
|
package/aws/queue.ts
ADDED
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
|
|
2
|
+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
3
|
+
|
|
4
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
5
|
+
import * as inputs from "../types/input";
|
|
6
|
+
import * as outputs from "../types/output";
|
|
7
|
+
import * as enums from "../types/enums";
|
|
8
|
+
import * as utilities from "../utilities";
|
|
9
|
+
import * as grants from "../grants";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* An Anvil-managed SQS queue. A dead letter queue is always provisioned to prevent silent message loss. SSE-SQS encryption is enabled by default at no cost.
|
|
13
|
+
*/
|
|
14
|
+
export class Queue extends pulumi.ComponentResource {
|
|
15
|
+
/** @internal */
|
|
16
|
+
public static readonly __pulumiType = 'anvil:aws:Queue';
|
|
17
|
+
|
|
18
|
+
/** @internal Logical resource name for grant policy naming. */
|
|
19
|
+
private __name: string;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Returns true if the given object is an instance of Queue. This is designed to work even
|
|
23
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
24
|
+
*/
|
|
25
|
+
public static isInstance(obj: any): obj is Queue {
|
|
26
|
+
if (obj === undefined || obj === null) {
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
return obj['__pulumiType'] === Queue.__pulumiType;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* The ARN of the SQS queue.
|
|
34
|
+
*/
|
|
35
|
+
declare public /*out*/ readonly arn: pulumi.Output<string>;
|
|
36
|
+
/**
|
|
37
|
+
* The ARN of the dead letter queue.
|
|
38
|
+
*/
|
|
39
|
+
declare public /*out*/ readonly dlqArn: pulumi.Output<string>;
|
|
40
|
+
/**
|
|
41
|
+
* The URL of the dead letter queue.
|
|
42
|
+
*/
|
|
43
|
+
declare public /*out*/ readonly dlqUrl: pulumi.Output<string>;
|
|
44
|
+
/**
|
|
45
|
+
* The physical name of the SQS queue.
|
|
46
|
+
*/
|
|
47
|
+
declare public /*out*/ readonly name: pulumi.Output<string>;
|
|
48
|
+
/**
|
|
49
|
+
* The URL of the SQS queue. Use this to send and receive messages.
|
|
50
|
+
*/
|
|
51
|
+
declare public /*out*/ readonly url: pulumi.Output<string>;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Create a Queue resource with the given unique name, arguments, and options.
|
|
55
|
+
*
|
|
56
|
+
* @param name The _unique_ name of the resource.
|
|
57
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
58
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
59
|
+
*/
|
|
60
|
+
constructor(name: string, args?: QueueArgs, opts?: pulumi.ComponentResourceOptions) {
|
|
61
|
+
let resourceInputs: pulumi.Inputs = {};
|
|
62
|
+
opts = opts || {};
|
|
63
|
+
if (!opts.id) {
|
|
64
|
+
resourceInputs["consumer"] = args?.consumer;
|
|
65
|
+
resourceInputs["dlq"] = args?.dlq;
|
|
66
|
+
resourceInputs["fifo"] = args?.fifo;
|
|
67
|
+
resourceInputs["transform"] = args?.transform;
|
|
68
|
+
resourceInputs["arn"] = undefined /*out*/;
|
|
69
|
+
resourceInputs["dlqArn"] = undefined /*out*/;
|
|
70
|
+
resourceInputs["dlqUrl"] = undefined /*out*/;
|
|
71
|
+
resourceInputs["name"] = undefined /*out*/;
|
|
72
|
+
resourceInputs["url"] = undefined /*out*/;
|
|
73
|
+
} else {
|
|
74
|
+
resourceInputs["arn"] = undefined /*out*/;
|
|
75
|
+
resourceInputs["dlqArn"] = undefined /*out*/;
|
|
76
|
+
resourceInputs["dlqUrl"] = undefined /*out*/;
|
|
77
|
+
resourceInputs["name"] = undefined /*out*/;
|
|
78
|
+
resourceInputs["url"] = undefined /*out*/;
|
|
79
|
+
}
|
|
80
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
81
|
+
super(Queue.__pulumiType, name, resourceInputs, opts, true /*remote*/);
|
|
82
|
+
this.__name = name;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Grants sendmessage access (sqs:SendMessage) on this queue
|
|
87
|
+
* to the target compute resource's execution role.
|
|
88
|
+
*
|
|
89
|
+
* @param target - The compute resource to grant access to.
|
|
90
|
+
* @param opts - Optional grant options (justification for audit trail).
|
|
91
|
+
*/
|
|
92
|
+
public grantSendMessage(target: grants.GrantTarget, opts?: grants.GrantOptions): void {
|
|
93
|
+
const name = `${this.__name}-${target.grantName()}-sendmessage`;
|
|
94
|
+
const arns = grants.buildResourceArns(this.arn, undefined);
|
|
95
|
+
grants.createGrant(this, name, target, ["sqs:SendMessage"], arns, opts);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Grants consumemessages access (sqs:ReceiveMessage, sqs:DeleteMessage, sqs:GetQueueAttributes) on this queue
|
|
100
|
+
* to the target compute resource's execution role.
|
|
101
|
+
*
|
|
102
|
+
* @param target - The compute resource to grant access to.
|
|
103
|
+
* @param opts - Optional grant options (justification for audit trail).
|
|
104
|
+
*/
|
|
105
|
+
public grantConsumeMessages(target: grants.GrantTarget, opts?: grants.GrantOptions): void {
|
|
106
|
+
const name = `${this.__name}-${target.grantName()}-consumemessages`;
|
|
107
|
+
const arns = grants.buildResourceArns(this.arn, undefined);
|
|
108
|
+
grants.createGrant(this, name, target, ["sqs:ReceiveMessage", "sqs:DeleteMessage", "sqs:GetQueueAttributes"], arns, opts);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Grants full access (sqs:SendMessage, sqs:ReceiveMessage, sqs:DeleteMessage, sqs:GetQueueAttributes, sqs:ChangeMessageVisibility, sqs:PurgeQueue) on this queue
|
|
113
|
+
* to the target compute resource's execution role.
|
|
114
|
+
*
|
|
115
|
+
* This is an escape hatch — prefer scoped grants (grantRead, grantWrite, etc.).
|
|
116
|
+
* A warning is logged if no justification is provided.
|
|
117
|
+
*/
|
|
118
|
+
public grantFullAccess(target: grants.GrantTarget, opts?: grants.GrantOptions): void {
|
|
119
|
+
if (!opts?.justification) {
|
|
120
|
+
pulumi.log.warn(
|
|
121
|
+
`⚠ ${this.__name} → ${target.grantName()}: full access granted with no justification. ` +
|
|
122
|
+
`Consider scoping with grantRead, grantWrite, or grantDelete, ` +
|
|
123
|
+
`or add a justification.`,
|
|
124
|
+
this,
|
|
125
|
+
);
|
|
126
|
+
} else {
|
|
127
|
+
pulumi.log.info(
|
|
128
|
+
`ℹ ${this.__name} → ${target.grantName()}: full access granted. Justification: "${opts.justification}"`,
|
|
129
|
+
this,
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
const name = `${this.__name}-${target.grantName()}-fullaccess`;
|
|
133
|
+
const arns = grants.buildResourceArns(this.arn, undefined);
|
|
134
|
+
grants.createGrant(this, name, target, ["sqs:SendMessage", "sqs:ReceiveMessage", "sqs:DeleteMessage", "sqs:GetQueueAttributes", "sqs:ChangeMessageVisibility", "sqs:PurgeQueue"], arns, opts);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* The set of arguments for constructing a Queue resource.
|
|
141
|
+
*/
|
|
142
|
+
export interface QueueArgs {
|
|
143
|
+
/**
|
|
144
|
+
* Wires a compute resource to consume messages from this queue. Creates the event source mapping (trigger) and grants the necessary IAM permissions automatically.
|
|
145
|
+
*/
|
|
146
|
+
consumer?: pulumi.Input<inputs.aws.QueueConsumerArgsArgs>;
|
|
147
|
+
/**
|
|
148
|
+
* Dead letter queue configuration. Always provisioned — messages that fail processing are moved here instead of being silently dropped. Omit to use defaults (managed DLQ, maxReceiveCount: 3). Set arn to reuse an existing queue.
|
|
149
|
+
*/
|
|
150
|
+
dlq?: pulumi.Input<inputs.aws.QueueDlqArgsArgs>;
|
|
151
|
+
/**
|
|
152
|
+
* Creates a FIFO queue when true. FIFO queues guarantee message ordering and exactly-once processing but have lower throughput (~3,000 msg/s vs unlimited for standard). Use for financial transactions, inventory updates, or any workflow where ordering or deduplication matters. Default: false.
|
|
153
|
+
*/
|
|
154
|
+
fifo?: pulumi.Input<boolean>;
|
|
155
|
+
transform?: pulumi.Input<inputs.aws.QueueTransformArgsArgs>;
|
|
156
|
+
}
|
package/aws/svelteKitSite.ts
CHANGED
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
3
3
|
|
|
4
4
|
import * as pulumi from "@pulumi/pulumi";
|
|
5
|
+
import * as inputs from "../types/input";
|
|
6
|
+
import * as outputs from "../types/output";
|
|
7
|
+
import * as enums from "../types/enums";
|
|
5
8
|
import * as utilities from "../utilities";
|
|
6
9
|
|
|
7
10
|
export class SvelteKitSite extends pulumi.ComponentResource {
|
|
@@ -23,6 +26,10 @@ export class SvelteKitSite extends pulumi.ComponentResource {
|
|
|
23
26
|
declare public /*out*/ readonly cloudFrontDistributionId: pulumi.Output<string | undefined>;
|
|
24
27
|
declare public /*out*/ readonly dnsRecords: pulumi.Output<string | undefined>;
|
|
25
28
|
declare public /*out*/ readonly functionName: pulumi.Output<string | undefined>;
|
|
29
|
+
/**
|
|
30
|
+
* OriginSecret is the x-origin-secret header value to configure in Cloudflare Transform Rules. Only populated when originProtection is set.
|
|
31
|
+
*/
|
|
32
|
+
declare public /*out*/ readonly originSecret: pulumi.Output<string | undefined>;
|
|
26
33
|
declare public /*out*/ readonly url: pulumi.Output<string | undefined>;
|
|
27
34
|
|
|
28
35
|
/**
|
|
@@ -38,6 +45,7 @@ export class SvelteKitSite extends pulumi.ComponentResource {
|
|
|
38
45
|
if (!opts.id) {
|
|
39
46
|
resourceInputs["domain"] = args?.domain;
|
|
40
47
|
resourceInputs["environment"] = args?.environment;
|
|
48
|
+
resourceInputs["originProtection"] = args?.originProtection;
|
|
41
49
|
resourceInputs["path"] = args?.path;
|
|
42
50
|
resourceInputs["runtimeEnvironment"] = args?.runtimeEnvironment;
|
|
43
51
|
resourceInputs["transform"] = args?.transform;
|
|
@@ -45,12 +53,14 @@ export class SvelteKitSite extends pulumi.ComponentResource {
|
|
|
45
53
|
resourceInputs["cloudFrontDistributionId"] = undefined /*out*/;
|
|
46
54
|
resourceInputs["dnsRecords"] = undefined /*out*/;
|
|
47
55
|
resourceInputs["functionName"] = undefined /*out*/;
|
|
56
|
+
resourceInputs["originSecret"] = undefined /*out*/;
|
|
48
57
|
resourceInputs["url"] = undefined /*out*/;
|
|
49
58
|
} else {
|
|
50
59
|
resourceInputs["bucketName"] = undefined /*out*/;
|
|
51
60
|
resourceInputs["cloudFrontDistributionId"] = undefined /*out*/;
|
|
52
61
|
resourceInputs["dnsRecords"] = undefined /*out*/;
|
|
53
62
|
resourceInputs["functionName"] = undefined /*out*/;
|
|
63
|
+
resourceInputs["originSecret"] = undefined /*out*/;
|
|
54
64
|
resourceInputs["url"] = undefined /*out*/;
|
|
55
65
|
}
|
|
56
66
|
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
@@ -67,6 +77,10 @@ export interface SvelteKitSiteArgs {
|
|
|
67
77
|
* Environment vars available at BOTH build time and runtime. Values must be string literals since they're needed before the build runs.
|
|
68
78
|
*/
|
|
69
79
|
environment?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;
|
|
80
|
+
/**
|
|
81
|
+
* OriginProtection enables WAF-based origin protection. When set, a WAF WebACL is created that blocks requests missing the x-origin-secret header. The secret value is output as originSecret. Requires domain to be set.
|
|
82
|
+
*/
|
|
83
|
+
originProtection?: pulumi.Input<inputs.aws.SiteOriginProtectionArgs>;
|
|
70
84
|
path?: pulumi.Input<string>;
|
|
71
85
|
/**
|
|
72
86
|
* Runtime-only environment vars set on the Lambda function. Supports Pulumi Output values (e.g. bucket.name, fn.arn). Only available at request time, NOT during build/prerendering.
|
package/aws/vpc.ts
ADDED
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
|
|
2
|
+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
3
|
+
|
|
4
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
5
|
+
import * as inputs from "../types/input";
|
|
6
|
+
import * as outputs from "../types/output";
|
|
7
|
+
import * as enums from "../types/enums";
|
|
8
|
+
import * as utilities from "../utilities";
|
|
9
|
+
|
|
10
|
+
export class Vpc extends pulumi.ComponentResource {
|
|
11
|
+
/** @internal */
|
|
12
|
+
public static readonly __pulumiType = 'anvil:aws:Vpc';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Returns true if the given object is an instance of Vpc. This is designed to work even
|
|
16
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
17
|
+
*/
|
|
18
|
+
public static isInstance(obj: any): obj is Vpc {
|
|
19
|
+
if (obj === undefined || obj === null) {
|
|
20
|
+
return false;
|
|
21
|
+
}
|
|
22
|
+
return obj['__pulumiType'] === Vpc.__pulumiType;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* The resolved Availability Zone names, e.g. ['ap-southeast-2a']. Consumed by RDS Multi-AZ, ECS spread, and other downstream components.
|
|
27
|
+
*/
|
|
28
|
+
declare public readonly availabilityZones: pulumi.Output<string[]>;
|
|
29
|
+
/**
|
|
30
|
+
* The EC2 instance ID of the bastion host. Use with: aws ssm start-session --target <bastionInstanceId>. Only populated when bastion is enabled.
|
|
31
|
+
*/
|
|
32
|
+
declare public /*out*/ readonly bastionInstanceId: pulumi.Output<string | undefined>;
|
|
33
|
+
/**
|
|
34
|
+
* The security group ID of the bastion host. Use to grant the bastion access to private resources, e.g. db.grant(network.bastion, { access: 'readWrite' }). Only populated when bastion is enabled.
|
|
35
|
+
*/
|
|
36
|
+
declare public /*out*/ readonly bastionSecurityGroupId: pulumi.Output<string | undefined>;
|
|
37
|
+
/**
|
|
38
|
+
* The ID of the VPC default security group. All rules removed — not used by Anvil components.
|
|
39
|
+
*/
|
|
40
|
+
declare public /*out*/ readonly defaultSecurityGroupId: pulumi.Output<string>;
|
|
41
|
+
/**
|
|
42
|
+
* The IDs of the private subnets, one per AZ. Used by Lambda, ECS tasks, EC2, and RDS.
|
|
43
|
+
*/
|
|
44
|
+
declare public /*out*/ readonly privateSubnetIds: pulumi.Output<string[]>;
|
|
45
|
+
/**
|
|
46
|
+
* The IDs of the public subnets, one per AZ. Used by load balancers, NAT Gateways, and the bastion host.
|
|
47
|
+
*/
|
|
48
|
+
declare public /*out*/ readonly publicSubnetIds: pulumi.Output<string[]>;
|
|
49
|
+
/**
|
|
50
|
+
* The ID of the VPC.
|
|
51
|
+
*/
|
|
52
|
+
declare public /*out*/ readonly vpcId: pulumi.Output<string>;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Create a Vpc resource with the given unique name, arguments, and options.
|
|
56
|
+
*
|
|
57
|
+
* @param name The _unique_ name of the resource.
|
|
58
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
59
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
60
|
+
*/
|
|
61
|
+
constructor(name: string, args?: VpcArgs, opts?: pulumi.ComponentResourceOptions) {
|
|
62
|
+
let resourceInputs: pulumi.Inputs = {};
|
|
63
|
+
opts = opts || {};
|
|
64
|
+
if (!opts.id) {
|
|
65
|
+
resourceInputs["availabilityZones"] = args?.availabilityZones;
|
|
66
|
+
resourceInputs["bastion"] = args?.bastion;
|
|
67
|
+
resourceInputs["cidr"] = args?.cidr;
|
|
68
|
+
resourceInputs["flowLogs"] = args?.flowLogs;
|
|
69
|
+
resourceInputs["nat"] = args?.nat;
|
|
70
|
+
resourceInputs["bastionInstanceId"] = undefined /*out*/;
|
|
71
|
+
resourceInputs["bastionSecurityGroupId"] = undefined /*out*/;
|
|
72
|
+
resourceInputs["defaultSecurityGroupId"] = undefined /*out*/;
|
|
73
|
+
resourceInputs["privateSubnetIds"] = undefined /*out*/;
|
|
74
|
+
resourceInputs["publicSubnetIds"] = undefined /*out*/;
|
|
75
|
+
resourceInputs["vpcId"] = undefined /*out*/;
|
|
76
|
+
} else {
|
|
77
|
+
resourceInputs["availabilityZones"] = undefined /*out*/;
|
|
78
|
+
resourceInputs["bastionInstanceId"] = undefined /*out*/;
|
|
79
|
+
resourceInputs["bastionSecurityGroupId"] = undefined /*out*/;
|
|
80
|
+
resourceInputs["defaultSecurityGroupId"] = undefined /*out*/;
|
|
81
|
+
resourceInputs["privateSubnetIds"] = undefined /*out*/;
|
|
82
|
+
resourceInputs["publicSubnetIds"] = undefined /*out*/;
|
|
83
|
+
resourceInputs["vpcId"] = undefined /*out*/;
|
|
84
|
+
}
|
|
85
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
86
|
+
super(Vpc.__pulumiType, name, resourceInputs, opts, true /*remote*/);
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Imports an existing Vpc into Anvil without managing or modifying it.
|
|
90
|
+
* Returns an identical output shape to `new Vpc()`.
|
|
91
|
+
*
|
|
92
|
+
* Flow logs, NAT, and bastion are not available on an imported VPC.
|
|
93
|
+
*
|
|
94
|
+
* If subnet IDs are omitted, Anvil auto-discovers them by inspecting
|
|
95
|
+
* route tables. Provide IDs explicitly if auto-discovery fails.
|
|
96
|
+
*
|
|
97
|
+
* @example
|
|
98
|
+
* const network = Vpc.fromId("existing", {
|
|
99
|
+
* vpcId: "vpc-0abc123def456",
|
|
100
|
+
* });
|
|
101
|
+
*/
|
|
102
|
+
static fromId(
|
|
103
|
+
name: string,
|
|
104
|
+
args: {
|
|
105
|
+
vpcId: string;
|
|
106
|
+
privateSubnetIds?: string[];
|
|
107
|
+
publicSubnetIds?: string[];
|
|
108
|
+
},
|
|
109
|
+
opts?: pulumi.ComponentResourceOptions
|
|
110
|
+
): Vpc {
|
|
111
|
+
return new Vpc(name, args as any, {
|
|
112
|
+
...opts,
|
|
113
|
+
id: args.vpcId,
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* The set of arguments for constructing a Vpc resource.
|
|
121
|
+
*/
|
|
122
|
+
export interface VpcArgs {
|
|
123
|
+
/**
|
|
124
|
+
* Number of Availability Zones to deploy subnets into. Valid values: 1, 2, 3. Defaults to 1. Inherits from App.defaults.availability — 'high' maps to 3, 'low' maps to 1.
|
|
125
|
+
*/
|
|
126
|
+
availabilityZones?: pulumi.Input<number>;
|
|
127
|
+
/**
|
|
128
|
+
* Optional SSM bastion host for private network access. No SSH, no port 22 — access via AWS SSM Session Manager only. Use to connect to RDS, ElastiCache, and other private resources locally.
|
|
129
|
+
*/
|
|
130
|
+
bastion?: pulumi.Input<boolean | inputs.aws.VpcBastionArgsArgs>;
|
|
131
|
+
/**
|
|
132
|
+
* The IPv4 CIDR block for the VPC. Default: '10.0.0.0/16'. Public subnets carved from offset 0 (/24 each), private subnets from offset 10 (/24 each).
|
|
133
|
+
*/
|
|
134
|
+
cidr?: pulumi.Input<string>;
|
|
135
|
+
/**
|
|
136
|
+
* Optional VPC Flow Log configuration. Opt-in only. Either or both destinations can be enabled simultaneously. CloudWatch for active debugging, S3 for long-term compliance retention.
|
|
137
|
+
*/
|
|
138
|
+
flowLogs?: pulumi.Input<inputs.aws.VpcFlowLogsArgsArgs>;
|
|
139
|
+
/**
|
|
140
|
+
* Optional NAT configuration for outbound internet access from private subnets. Omit for a fully private VPC.
|
|
141
|
+
*/
|
|
142
|
+
nat?: pulumi.Input<inputs.aws.VpcNatArgsArgs>;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Normalises the `bastion` shorthand so the Pulumi provider
|
|
147
|
+
* always receives an object, never a raw boolean.
|
|
148
|
+
*
|
|
149
|
+
* bastion: true // enable with all defaults
|
|
150
|
+
* bastion: {} // identical to true
|
|
151
|
+
* bastion: { ... } // enable with custom config
|
|
152
|
+
*/
|
|
153
|
+
export function normaliseBastion(
|
|
154
|
+
val: boolean | inputs.aws.VpcBastionArgsArgs | undefined
|
|
155
|
+
): inputs.aws.VpcBastionArgsArgs | undefined {
|
|
156
|
+
if (val === undefined || val === false) return undefined;
|
|
157
|
+
if (val === true) return {};
|
|
158
|
+
return val;
|
|
159
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
|
|
2
|
+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
3
|
+
|
|
4
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
5
|
+
import * as inputs from "../types/input";
|
|
6
|
+
import * as outputs from "../types/output";
|
|
7
|
+
import * as enums from "../types/enums";
|
|
8
|
+
import * as utilities from "../utilities";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* An Anvil-managed AWS Interface VPC Endpoint. Creates one ENI per private subnet with private DNS enabled. The endpoint security group uses a self-referencing ingress rule on port 443 — only compute resources that have been explicitly granted access can reach the endpoint at the network layer. Access is enforced at three layers: network (self-referencing SG), IAM role policy (scoped per compute resource), and endpoint policy (blanket ceiling on allowed actions for all compute principals — Lambda, ECS, EC2).
|
|
12
|
+
*/
|
|
13
|
+
export class VpcEndpoint extends pulumi.ComponentResource {
|
|
14
|
+
/** @internal */
|
|
15
|
+
public static readonly __pulumiType = 'anvil:aws:VpcEndpoint';
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Returns true if the given object is an instance of VpcEndpoint. This is designed to work even
|
|
19
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
20
|
+
*/
|
|
21
|
+
public static isInstance(obj: any): obj is VpcEndpoint {
|
|
22
|
+
if (obj === undefined || obj === null) {
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
return obj['__pulumiType'] === VpcEndpoint.__pulumiType;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* The first DNS name assigned to the endpoint, e.g. vpce-xxx.sqs.ap-southeast-2.vpce.amazonaws.com. With private DNS enabled, normal consumers use the standard AWS SDK hostname — this is exposed for debugging and multi-VPC architectures only.
|
|
30
|
+
*/
|
|
31
|
+
declare public /*out*/ readonly dnsName: pulumi.Output<string>;
|
|
32
|
+
/**
|
|
33
|
+
* The ID of the VPC endpoint, e.g. vpce-0abc1234567890abc. Use this to reference the endpoint in IAM condition keys such as aws:SourceVpce.
|
|
34
|
+
*/
|
|
35
|
+
declare public /*out*/ readonly endpointId: pulumi.Output<string>;
|
|
36
|
+
/**
|
|
37
|
+
* The ID of the dedicated security group attached to this endpoint. Uses a self-referencing ingress rule on port 443 — only compute resources with this SG explicitly attached can reach the endpoint at the network layer.
|
|
38
|
+
*/
|
|
39
|
+
declare public /*out*/ readonly securityGroupId: pulumi.Output<string>;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Create a VpcEndpoint resource with the given unique name, arguments, and options.
|
|
43
|
+
*
|
|
44
|
+
* @param name The _unique_ name of the resource.
|
|
45
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
46
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
47
|
+
*/
|
|
48
|
+
constructor(name: string, args: VpcEndpointArgs, opts?: pulumi.ComponentResourceOptions) {
|
|
49
|
+
let resourceInputs: pulumi.Inputs = {};
|
|
50
|
+
opts = opts || {};
|
|
51
|
+
if (!opts.id) {
|
|
52
|
+
if (args?.privateSubnetIds === undefined && !opts.urn) {
|
|
53
|
+
throw new Error("Missing required property 'privateSubnetIds'");
|
|
54
|
+
}
|
|
55
|
+
if (args?.service === undefined && !opts.urn) {
|
|
56
|
+
throw new Error("Missing required property 'service'");
|
|
57
|
+
}
|
|
58
|
+
if (args?.vpcId === undefined && !opts.urn) {
|
|
59
|
+
throw new Error("Missing required property 'vpcId'");
|
|
60
|
+
}
|
|
61
|
+
resourceInputs["overridePermissions"] = args?.overridePermissions;
|
|
62
|
+
resourceInputs["privateSubnetIds"] = args?.privateSubnetIds;
|
|
63
|
+
resourceInputs["service"] = args?.service;
|
|
64
|
+
resourceInputs["vpcId"] = args?.vpcId;
|
|
65
|
+
resourceInputs["dnsName"] = undefined /*out*/;
|
|
66
|
+
resourceInputs["endpointId"] = undefined /*out*/;
|
|
67
|
+
resourceInputs["securityGroupId"] = undefined /*out*/;
|
|
68
|
+
} else {
|
|
69
|
+
resourceInputs["dnsName"] = undefined /*out*/;
|
|
70
|
+
resourceInputs["endpointId"] = undefined /*out*/;
|
|
71
|
+
resourceInputs["securityGroupId"] = undefined /*out*/;
|
|
72
|
+
}
|
|
73
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
74
|
+
super(VpcEndpoint.__pulumiType, name, resourceInputs, opts, true /*remote*/);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* The set of arguments for constructing a VpcEndpoint resource.
|
|
80
|
+
*/
|
|
81
|
+
export interface VpcEndpointArgs {
|
|
82
|
+
/**
|
|
83
|
+
* Explicit Allow and Deny permission statements for the endpoint policy. When omitted, the endpoint policy allows all actions (*) for all Anvil compute principals (Lambda, ECS, EC2). When set, only the declared actions are permitted — the caller is responsible for declaring every action their compute resources need. Supports both Allow and Deny effects. Resource defaults to "*" if omitted on a permission entry.
|
|
84
|
+
*/
|
|
85
|
+
overridePermissions?: pulumi.Input<pulumi.Input<inputs.aws.VpcEndpointPermissionArgs>[]>;
|
|
86
|
+
/**
|
|
87
|
+
* The IDs of the private subnets to attach the endpoint to. AWS places one ENI per subnet. Pass all private subnet IDs from your VPC — typically one per AZ.
|
|
88
|
+
*/
|
|
89
|
+
privateSubnetIds: pulumi.Input<pulumi.Input<string>[]>;
|
|
90
|
+
/**
|
|
91
|
+
* The AWS service to route privately. The full com.amazonaws.{region}.{service} name is constructed at deploy time from the resolved region — you never write it manually.
|
|
92
|
+
*/
|
|
93
|
+
service: pulumi.Input<string>;
|
|
94
|
+
/**
|
|
95
|
+
* The ID of the VPC to create the endpoint in. Accepts both Anvil-managed VPC IDs and imported VPC IDs.
|
|
96
|
+
*/
|
|
97
|
+
vpcId: pulumi.Input<string>;
|
|
98
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
/**
|
|
3
|
+
* An Anvil-managed JWT authorizer backed by a Cognito user pool. Derives the issuer URL automatically from the user pool ID — no manual Cognito endpoint construction required. Creates a native API Gateway JWT authorizer; verification is handled entirely by API Gateway with no Lambda or custom code. Pass authorizerId to HttpApi defaultAuthorizerId to protect your API routes.
|
|
4
|
+
*/
|
|
5
|
+
export declare class CognitoAuth extends pulumi.ComponentResource {
|
|
6
|
+
/**
|
|
7
|
+
* Returns true if the given object is an instance of CognitoAuth. This is designed to work even
|
|
8
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
9
|
+
*/
|
|
10
|
+
static isInstance(obj: any): obj is CognitoAuth;
|
|
11
|
+
/**
|
|
12
|
+
* The API Gateway authorizer ID. Pass this to HttpApi defaultAuthorizerId to protect your API routes.
|
|
13
|
+
*/
|
|
14
|
+
readonly authorizerId: pulumi.Output<string>;
|
|
15
|
+
/**
|
|
16
|
+
* Create a CognitoAuth resource with the given unique name, arguments, and options.
|
|
17
|
+
*
|
|
18
|
+
* @param name The _unique_ name of the resource.
|
|
19
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
20
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
21
|
+
*/
|
|
22
|
+
constructor(name: string, args: CognitoAuthArgs, opts?: pulumi.ComponentResourceOptions);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The set of arguments for constructing a CognitoAuth resource.
|
|
26
|
+
*/
|
|
27
|
+
export interface CognitoAuthArgs {
|
|
28
|
+
/**
|
|
29
|
+
* The Cognito app client IDs allowed to access this API. API Gateway rejects tokens whose 'aud' claim does not match one of these values. Pass your Cognito app client ID(s) here.
|
|
30
|
+
*/
|
|
31
|
+
audience: pulumi.Input<pulumi.Input<string>[]>;
|
|
32
|
+
/**
|
|
33
|
+
* The Cognito user pool ID. Pass pool.userPoolId directly. Accepts Output<string>. Anvil derives the issuer URL automatically: https://cognito-idp.{region}.amazonaws.com/{userPoolId}.
|
|
34
|
+
*/
|
|
35
|
+
userPoolId: any;
|
|
36
|
+
}
|