pulumi-bunnynet 0.6.2
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/README.md +348 -0
- package/bin/_virtual/rolldown_runtime.mjs +37 -0
- package/bin/computeContainerApp.d.mts +128 -0
- package/bin/computeContainerApp.mjs +97 -0
- package/bin/computeContainerImageregistry.d.mts +86 -0
- package/bin/computeContainerImageregistry.mjs +82 -0
- package/bin/computeScript.d.mts +102 -0
- package/bin/computeScript.mjs +91 -0
- package/bin/computeScriptSecret.d.mts +86 -0
- package/bin/computeScriptSecret.mjs +81 -0
- package/bin/computeScriptVariable.d.mts +98 -0
- package/bin/computeScriptVariable.mjs +86 -0
- package/bin/config/index.d.mts +8 -0
- package/bin/config/index.mjs +9 -0
- package/bin/config/vars.d.mts +19 -0
- package/bin/config/vars.mjs +36 -0
- package/bin/dnsRecord.d.mts +289 -0
- package/bin/dnsRecord.mjs +183 -0
- package/bin/dnsZone.d.mts +146 -0
- package/bin/dnsZone.mjs +108 -0
- package/bin/getComputeContainerAppContainer.d.mts +29 -0
- package/bin/getComputeContainerAppContainer.mjs +31 -0
- package/bin/getComputeContainerAppContainerEndpoint.d.mts +39 -0
- package/bin/getComputeContainerAppContainerEndpoint.mjs +33 -0
- package/bin/getComputeContainerImageregistry.d.mts +29 -0
- package/bin/getComputeContainerImageregistry.mjs +31 -0
- package/bin/getDnsRecord.d.mts +51 -0
- package/bin/getDnsRecord.mjs +35 -0
- package/bin/getDnsZone.d.mts +33 -0
- package/bin/getDnsZone.mjs +25 -0
- package/bin/getRegion.d.mts +33 -0
- package/bin/getRegion.mjs +25 -0
- package/bin/getVideoLanguage.d.mts +33 -0
- package/bin/getVideoLanguage.mjs +25 -0
- package/bin/index.d.mts +80 -0
- package/bin/index.mjs +160 -0
- package/bin/package.json +61 -0
- package/bin/package.mjs +64 -0
- package/bin/provider.d.mts +66 -0
- package/bin/provider.mjs +60 -0
- package/bin/pullzone.d.mts +1079 -0
- package/bin/pullzone.mjs +580 -0
- package/bin/pullzoneEdgerule.d.mts +131 -0
- package/bin/pullzoneEdgerule.mjs +105 -0
- package/bin/pullzoneHostname.d.mts +142 -0
- package/bin/pullzoneHostname.mjs +106 -0
- package/bin/pullzoneOptimizerClass.d.mts +258 -0
- package/bin/pullzoneOptimizerClass.mjs +162 -0
- package/bin/storageFile.d.mts +137 -0
- package/bin/storageFile.mjs +110 -0
- package/bin/storageZone.d.mts +154 -0
- package/bin/storageZone.mjs +123 -0
- package/bin/streamCollection.d.mts +66 -0
- package/bin/streamCollection.mjs +66 -0
- package/bin/streamLibrary.d.mts +587 -0
- package/bin/streamLibrary.mjs +333 -0
- package/bin/streamVideo.d.mts +116 -0
- package/bin/streamVideo.mjs +91 -0
- package/bin/types/index.d.mts +9 -0
- package/bin/types/index.mjs +13 -0
- package/bin/types/input.d.mts +376 -0
- package/bin/types/input.mjs +5 -0
- package/bin/types/output.d.mts +381 -0
- package/bin/types/output.mjs +5 -0
- package/bin/utilities.mjs +61 -0
- package/package.json +61 -0
package/README.md
ADDED
|
@@ -0,0 +1,348 @@
|
|
|
1
|
+
# Pulumi Bunnynet Provider
|
|
2
|
+
|
|
3
|
+
A Pulumi provider for managing Bunny.net CDN and edge computing resources, dynamically bridged from the [Terraform Bunnynet Provider](https://github.com/bunnyway/terraform-provider-bunnynet).
|
|
4
|
+
|
|
5
|
+
## Introduction
|
|
6
|
+
|
|
7
|
+
This package provides a Pulumi provider that enables you to manage your Bunny.net CDN, storage, DNS, compute containers, and video streaming resources using TypeScript, JavaScript, Python, Go, or C#. The provider is automatically generated from the Terraform Bunnynet provider, giving you access to all its functionality within the Pulumi ecosystem.
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
- **Pull Zones (CDN)**: Create and manage CDN pull zones with edge rules, hostnames, and optimizer classes
|
|
12
|
+
- **Storage Management**: Manage storage zones and files for global content delivery
|
|
13
|
+
- **DNS Management**: Configure DNS zones and records for your domains
|
|
14
|
+
- **Compute Containers**: Deploy and manage container applications at the edge
|
|
15
|
+
- **Video Streaming**: Set up video libraries, collections, and streaming content
|
|
16
|
+
- **Edge Computing**: Configure compute scripts with variables and secrets
|
|
17
|
+
- **TypeScript Support**: Full type safety with comprehensive TypeScript definitions
|
|
18
|
+
|
|
19
|
+
## Installation
|
|
20
|
+
|
|
21
|
+
### npm
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm install pulumi-bunnynet
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### yarn
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
yarn add pulumi-bunnynet
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### pnpm
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
pnpm add pulumi-bunnynet
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Configuration
|
|
40
|
+
|
|
41
|
+
Before using the provider, you need to configure authentication with your Bunny.net API credentials.
|
|
42
|
+
|
|
43
|
+
### Required Configuration
|
|
44
|
+
|
|
45
|
+
- **API Key**: Your Bunny.net API key
|
|
46
|
+
- **Access Key**: Your storage access key (for storage operations)
|
|
47
|
+
|
|
48
|
+
### Setting Configuration
|
|
49
|
+
|
|
50
|
+
You can configure the provider in several ways:
|
|
51
|
+
|
|
52
|
+
#### 1. Using Pulumi Config
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
pulumi config set bunnynet:apiKey your-api-key
|
|
56
|
+
pulumi config set bunnynet:accessKey your-access-key
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
#### 2. Using Environment Variables
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
export BUNNYNET_API_KEY="your-api-key"
|
|
63
|
+
export BUNNYNET_ACCESS_KEY="your-access-key"
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
#### 3. Provider Constructor
|
|
67
|
+
|
|
68
|
+
```typescript
|
|
69
|
+
import * as bunnynet from 'pulumi-bunnynet'
|
|
70
|
+
|
|
71
|
+
const provider = new bunnynet.Provider('bunnynet-provider', {
|
|
72
|
+
apiKey: 'your-api-key',
|
|
73
|
+
accessKey: 'your-access-key',
|
|
74
|
+
})
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Usage
|
|
78
|
+
|
|
79
|
+
### Pull Zone Management
|
|
80
|
+
|
|
81
|
+
```typescript
|
|
82
|
+
import * as bunnynet from 'pulumi-bunnynet'
|
|
83
|
+
|
|
84
|
+
// Create a pull zone for CDN
|
|
85
|
+
const pullZone = new bunnynet.Pullzone('my-cdn', {
|
|
86
|
+
name: 'my-website-cdn',
|
|
87
|
+
originUrl: 'https://my-website.com',
|
|
88
|
+
type: 'standard',
|
|
89
|
+
storageZoneId: 12345,
|
|
90
|
+
cacheControlMaxAge: 3600,
|
|
91
|
+
cacheControlPublicMaxAge: 86400,
|
|
92
|
+
addCanonicalHeader: true,
|
|
93
|
+
enableGeoipCountryCode: true,
|
|
94
|
+
enableOriginShield: true,
|
|
95
|
+
})
|
|
96
|
+
|
|
97
|
+
// Add a custom hostname
|
|
98
|
+
const hostname = new bunnynet.PullzoneHostname('custom-domain', {
|
|
99
|
+
pullzoneId: pullZone.id,
|
|
100
|
+
hostname: 'cdn.my-website.com',
|
|
101
|
+
certificateId: 67890,
|
|
102
|
+
})
|
|
103
|
+
|
|
104
|
+
// Create edge rules
|
|
105
|
+
const edgeRule = new bunnynet.PullzoneEdgerule('cache-rule', {
|
|
106
|
+
pullzoneId: pullZone.id,
|
|
107
|
+
actionType: 'SetCacheTime',
|
|
108
|
+
triggerType: 'RequestHeader',
|
|
109
|
+
triggerValue: 'X-Cache-Control',
|
|
110
|
+
actionParameter1: '3600',
|
|
111
|
+
})
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Storage Management
|
|
115
|
+
|
|
116
|
+
```typescript
|
|
117
|
+
import * as bunnynet from 'pulumi-bunnynet'
|
|
118
|
+
|
|
119
|
+
// Create a storage zone
|
|
120
|
+
const storageZone = new bunnynet.StorageZone('media-storage', {
|
|
121
|
+
name: 'media-files',
|
|
122
|
+
region: 'NY', // New York region
|
|
123
|
+
replicationRegions: ['LA', 'SG'], // Los Angeles and Singapore replicas
|
|
124
|
+
})
|
|
125
|
+
|
|
126
|
+
// Upload files to storage
|
|
127
|
+
const file = new bunnynet.StorageFile('logo', {
|
|
128
|
+
storageZoneName: storageZone.name,
|
|
129
|
+
path: '/images/logo.png',
|
|
130
|
+
source: './assets/logo.png',
|
|
131
|
+
contentType: 'image/png',
|
|
132
|
+
})
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### DNS Management
|
|
136
|
+
|
|
137
|
+
```typescript
|
|
138
|
+
import * as bunnynet from 'pulumi-bunnynet'
|
|
139
|
+
|
|
140
|
+
// Create DNS zone
|
|
141
|
+
const dnsZone = new bunnynet.DnsZone('my-domain', {
|
|
142
|
+
domain: 'example.com',
|
|
143
|
+
soaEmail: 'admin@example.com',
|
|
144
|
+
})
|
|
145
|
+
|
|
146
|
+
// Add DNS records
|
|
147
|
+
const aRecord = new bunnynet.DnsRecord('www-record', {
|
|
148
|
+
zoneId: dnsZone.id,
|
|
149
|
+
type: 'A',
|
|
150
|
+
name: 'www',
|
|
151
|
+
value: '203.0.113.1',
|
|
152
|
+
ttl: 3600,
|
|
153
|
+
})
|
|
154
|
+
|
|
155
|
+
const cnameRecord = new bunnynet.DnsRecord('cdn-record', {
|
|
156
|
+
zoneId: dnsZone.id,
|
|
157
|
+
type: 'CNAME',
|
|
158
|
+
name: 'cdn',
|
|
159
|
+
value: 'b-cdn.net',
|
|
160
|
+
ttl: 3600,
|
|
161
|
+
})
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### Compute Container Applications
|
|
165
|
+
|
|
166
|
+
```typescript
|
|
167
|
+
import * as bunnynet from 'pulumi-bunnynet'
|
|
168
|
+
|
|
169
|
+
// Create container image registry
|
|
170
|
+
const registry = new bunnynet.ComputeContainerImageregistry('my-registry', {
|
|
171
|
+
name: 'my-app-registry',
|
|
172
|
+
imageUrl: 'docker.io/myorg/myapp:latest',
|
|
173
|
+
username: 'myusername',
|
|
174
|
+
password: 'mypassword',
|
|
175
|
+
})
|
|
176
|
+
|
|
177
|
+
// Deploy container app
|
|
178
|
+
const containerApp = new bunnynet.ComputeContainerApp('edge-app', {
|
|
179
|
+
name: 'my-edge-app',
|
|
180
|
+
imageRegistryId: registry.id,
|
|
181
|
+
environmentVariables: [
|
|
182
|
+
{
|
|
183
|
+
name: 'NODE_ENV',
|
|
184
|
+
value: 'production',
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
name: 'API_URL',
|
|
188
|
+
value: 'https://api.example.com',
|
|
189
|
+
},
|
|
190
|
+
],
|
|
191
|
+
cpu: 0.1,
|
|
192
|
+
memory: 128,
|
|
193
|
+
})
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
### Video Streaming
|
|
197
|
+
|
|
198
|
+
```typescript
|
|
199
|
+
import * as bunnynet from 'pulumi-bunnynet'
|
|
200
|
+
|
|
201
|
+
// Create video library
|
|
202
|
+
const videoLibrary = new bunnynet.StreamLibrary('video-content', {
|
|
203
|
+
name: 'my-video-library',
|
|
204
|
+
storageZoneId: 12345,
|
|
205
|
+
replicationRegions: ['NY', 'LA', 'SG'],
|
|
206
|
+
watermarkPositionLeft: 10,
|
|
207
|
+
watermarkPositionTop: 10,
|
|
208
|
+
watermarkWidth: 100,
|
|
209
|
+
watermarkHeight: 50,
|
|
210
|
+
})
|
|
211
|
+
|
|
212
|
+
// Create video collection
|
|
213
|
+
const collection = new bunnynet.StreamCollection('tutorials', {
|
|
214
|
+
libraryId: videoLibrary.id,
|
|
215
|
+
name: 'Tutorial Videos',
|
|
216
|
+
})
|
|
217
|
+
|
|
218
|
+
// Upload video
|
|
219
|
+
const video = new bunnynet.StreamVideo('intro-video', {
|
|
220
|
+
libraryId: videoLibrary.id,
|
|
221
|
+
title: 'Introduction Tutorial',
|
|
222
|
+
collectionId: collection.id,
|
|
223
|
+
// Video will be uploaded separately via API or dashboard
|
|
224
|
+
})
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
### Compute Scripts
|
|
228
|
+
|
|
229
|
+
```typescript
|
|
230
|
+
import * as bunnynet from 'pulumi-bunnynet'
|
|
231
|
+
|
|
232
|
+
// Create compute script
|
|
233
|
+
const script = new bunnynet.ComputeScript('edge-function', {
|
|
234
|
+
name: 'my-edge-function',
|
|
235
|
+
scriptType: 'standalone',
|
|
236
|
+
code: `
|
|
237
|
+
async function handleRequest(request) {
|
|
238
|
+
const response = await fetch(request);
|
|
239
|
+
const body = await response.text();
|
|
240
|
+
|
|
241
|
+
// Add custom header
|
|
242
|
+
const headers = new Headers(response.headers);
|
|
243
|
+
headers.set('X-Processed-By', 'Bunny-Edge');
|
|
244
|
+
|
|
245
|
+
return new Response(body, {
|
|
246
|
+
status: response.status,
|
|
247
|
+
headers: headers
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
addEventListener('fetch', event => {
|
|
252
|
+
event.respondWith(handleRequest(event.request));
|
|
253
|
+
});
|
|
254
|
+
`,
|
|
255
|
+
})
|
|
256
|
+
|
|
257
|
+
// Add script variables
|
|
258
|
+
const scriptVar = new bunnynet.ComputeScriptVariable('api-endpoint', {
|
|
259
|
+
scriptId: script.id,
|
|
260
|
+
name: 'API_ENDPOINT',
|
|
261
|
+
value: 'https://api.example.com/v1',
|
|
262
|
+
})
|
|
263
|
+
|
|
264
|
+
// Add script secrets
|
|
265
|
+
const scriptSecret = new bunnynet.ComputeScriptSecret('api-key', {
|
|
266
|
+
scriptId: script.id,
|
|
267
|
+
name: 'API_KEY',
|
|
268
|
+
value: 'secret-api-key-value',
|
|
269
|
+
})
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
## Resources
|
|
273
|
+
|
|
274
|
+
### Pull Zones
|
|
275
|
+
|
|
276
|
+
- **Pullzone**: Main CDN pull zone configuration
|
|
277
|
+
- **PullzoneHostname**: Custom domains for pull zones
|
|
278
|
+
- **PullzoneEdgerule**: Cache and routing rules
|
|
279
|
+
- **PullzoneOptimizerClass**: Image optimization settings
|
|
280
|
+
|
|
281
|
+
### Storage
|
|
282
|
+
|
|
283
|
+
- **StorageZone**: Global storage zones
|
|
284
|
+
- **StorageFile**: Individual file management
|
|
285
|
+
|
|
286
|
+
### DNS
|
|
287
|
+
|
|
288
|
+
- **DnsZone**: DNS zone management
|
|
289
|
+
- **DnsRecord**: Individual DNS records (A, AAAA, CNAME, MX, TXT, etc.)
|
|
290
|
+
|
|
291
|
+
### Compute
|
|
292
|
+
|
|
293
|
+
- **ComputeContainerApp**: Edge container applications
|
|
294
|
+
- **ComputeContainerImageregistry**: Container image registries
|
|
295
|
+
- **ComputeScript**: Edge computing scripts
|
|
296
|
+
- **ComputeScriptVariable**: Script environment variables
|
|
297
|
+
- **ComputeScriptSecret**: Script secrets
|
|
298
|
+
|
|
299
|
+
### Video Streaming
|
|
300
|
+
|
|
301
|
+
- **StreamLibrary**: Video libraries
|
|
302
|
+
- **StreamCollection**: Video collections
|
|
303
|
+
- **StreamVideo**: Individual videos
|
|
304
|
+
|
|
305
|
+
## API Reference
|
|
306
|
+
|
|
307
|
+
For detailed API documentation, see the generated documentation in your IDE or visit the [Pulumi Registry](https://www.pulumi.com/registry/).
|
|
308
|
+
|
|
309
|
+
## Authentication Setup
|
|
310
|
+
|
|
311
|
+
### Getting Your API Credentials
|
|
312
|
+
|
|
313
|
+
1. **Log in to Bunny.net**: Go to your Bunny.net dashboard
|
|
314
|
+
2. **Navigate to Account Settings**: Click on your profile → Account Settings
|
|
315
|
+
3. **Generate API Key**: Go to API section and create a new API key
|
|
316
|
+
4. **Storage Access Key**: For storage operations, get your access key from Storage → FTP & API Access
|
|
317
|
+
5. **Note Your Details**: Save your API key and access key securely
|
|
318
|
+
|
|
319
|
+
### Testing Your Setup
|
|
320
|
+
|
|
321
|
+
```typescript
|
|
322
|
+
import * as bunnynet from 'pulumi-bunnynet'
|
|
323
|
+
|
|
324
|
+
// Test with a simple resource query
|
|
325
|
+
const regions = bunnynet.getRegion({})
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
## Examples
|
|
329
|
+
|
|
330
|
+
You can find more examples in the [examples directory](./examples) or check out these common use cases:
|
|
331
|
+
|
|
332
|
+
- [Basic CDN Setup](./examples/basic-cdn)
|
|
333
|
+
- [Storage and File Management](./examples/storage-management)
|
|
334
|
+
- [DNS Configuration](./examples/dns-setup)
|
|
335
|
+
- [Edge Computing](./examples/edge-computing)
|
|
336
|
+
- [Video Streaming Platform](./examples/video-streaming)
|
|
337
|
+
|
|
338
|
+
## Support
|
|
339
|
+
|
|
340
|
+
This provider is a derived work of the [Terraform Provider](https://github.com/bunnyway/terraform-provider-bunnynet) distributed under [MPL 2.0](https://www.mozilla.org/en-US/MPL/2.0/).
|
|
341
|
+
|
|
342
|
+
If you encounter a bug or missing feature, please consult the source [`terraform-provider-bunnynet` repo](https://github.com/bunnyway/terraform-provider-bunnynet/issues).
|
|
343
|
+
|
|
344
|
+
For Pulumi-specific issues, please open an issue in the [pulumi-any-terraform repository](https://github.com/hckhanh/pulumi-any-terraform).
|
|
345
|
+
|
|
346
|
+
## License
|
|
347
|
+
|
|
348
|
+
This package is distributed under the MIT License. The underlying Terraform provider is distributed under MPL 2.0.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
//#region rolldown:runtime
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __esm = (fn, res) => function() {
|
|
9
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
10
|
+
};
|
|
11
|
+
var __commonJS = (cb, mod) => function() {
|
|
12
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
13
|
+
};
|
|
14
|
+
var __export = (target, all) => {
|
|
15
|
+
for (var name in all) __defProp(target, name, {
|
|
16
|
+
get: all[name],
|
|
17
|
+
enumerable: true
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
var __copyProps = (to, from, except, desc) => {
|
|
21
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
22
|
+
key = keys[i];
|
|
23
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
24
|
+
get: ((k) => from[k]).bind(null, key),
|
|
25
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
return to;
|
|
29
|
+
};
|
|
30
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
31
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
32
|
+
value: mod,
|
|
33
|
+
enumerable: true
|
|
34
|
+
}) : target, mod));
|
|
35
|
+
|
|
36
|
+
//#endregion
|
|
37
|
+
export { __commonJS, __esm, __export, __reExport, __toESM };
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { ComputeContainerAppContainer } from "./types/input.mjs";
|
|
2
|
+
import { ComputeContainerAppContainer as ComputeContainerAppContainer$1 } from "./types/output.mjs";
|
|
3
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
4
|
+
|
|
5
|
+
//#region computeContainerApp.d.ts
|
|
6
|
+
declare class ComputeContainerApp extends pulumi.CustomResource {
|
|
7
|
+
/**
|
|
8
|
+
* Get an existing ComputeContainerApp resource's state with the given name, ID, and optional extra
|
|
9
|
+
* properties used to qualify the lookup.
|
|
10
|
+
*
|
|
11
|
+
* @param name The _unique_ name of the resulting resource.
|
|
12
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
13
|
+
* @param state Any extra arguments used during the lookup.
|
|
14
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
15
|
+
*/
|
|
16
|
+
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ComputeContainerAppState, opts?: pulumi.CustomResourceOptions): ComputeContainerApp;
|
|
17
|
+
/** @internal */
|
|
18
|
+
static readonly __pulumiType: string;
|
|
19
|
+
/**
|
|
20
|
+
* Returns true if the given object is an instance of ComputeContainerApp. This is designed to work even
|
|
21
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
22
|
+
*/
|
|
23
|
+
static isInstance(obj: any): obj is ComputeContainerApp;
|
|
24
|
+
/**
|
|
25
|
+
* The maximum number of instances that will be provisioned per active region.
|
|
26
|
+
*/
|
|
27
|
+
readonly autoscalingMax!: pulumi.Output<number>;
|
|
28
|
+
/**
|
|
29
|
+
* The minimum number of instances that will be provisioned per active region.
|
|
30
|
+
*/
|
|
31
|
+
readonly autoscalingMin!: pulumi.Output<number>;
|
|
32
|
+
/**
|
|
33
|
+
* Defines a container for the application.
|
|
34
|
+
*/
|
|
35
|
+
readonly containers!: pulumi.Output<ComputeContainerAppContainer$1[] | undefined>;
|
|
36
|
+
/**
|
|
37
|
+
* The name of the application.
|
|
38
|
+
*/
|
|
39
|
+
readonly name!: pulumi.Output<string>;
|
|
40
|
+
/**
|
|
41
|
+
* The regions that will be dynamically provisionable based on the user latency.
|
|
42
|
+
*/
|
|
43
|
+
readonly regionsAlloweds!: pulumi.Output<string[]>;
|
|
44
|
+
/**
|
|
45
|
+
* The maximum amount of regions to be deployed at any given time.
|
|
46
|
+
*/
|
|
47
|
+
readonly regionsMaxAllowed!: pulumi.Output<number | undefined>;
|
|
48
|
+
/**
|
|
49
|
+
* The regions that will be statically provisioned and will always be running and available to users.
|
|
50
|
+
*/
|
|
51
|
+
readonly regionsRequireds!: pulumi.Output<string[]>;
|
|
52
|
+
/**
|
|
53
|
+
* Create a ComputeContainerApp resource with the given unique name, arguments, and options.
|
|
54
|
+
*
|
|
55
|
+
* @param name The _unique_ name of the resource.
|
|
56
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
57
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
58
|
+
*/
|
|
59
|
+
constructor(name: string, args: ComputeContainerAppArgs, opts?: pulumi.CustomResourceOptions);
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Input properties used for looking up and filtering ComputeContainerApp resources.
|
|
63
|
+
*/
|
|
64
|
+
interface ComputeContainerAppState {
|
|
65
|
+
/**
|
|
66
|
+
* The maximum number of instances that will be provisioned per active region.
|
|
67
|
+
*/
|
|
68
|
+
autoscalingMax?: pulumi.Input<number>;
|
|
69
|
+
/**
|
|
70
|
+
* The minimum number of instances that will be provisioned per active region.
|
|
71
|
+
*/
|
|
72
|
+
autoscalingMin?: pulumi.Input<number>;
|
|
73
|
+
/**
|
|
74
|
+
* Defines a container for the application.
|
|
75
|
+
*/
|
|
76
|
+
containers?: pulumi.Input<pulumi.Input<ComputeContainerAppContainer>[]>;
|
|
77
|
+
/**
|
|
78
|
+
* The name of the application.
|
|
79
|
+
*/
|
|
80
|
+
name?: pulumi.Input<string>;
|
|
81
|
+
/**
|
|
82
|
+
* The regions that will be dynamically provisionable based on the user latency.
|
|
83
|
+
*/
|
|
84
|
+
regionsAlloweds?: pulumi.Input<pulumi.Input<string>[]>;
|
|
85
|
+
/**
|
|
86
|
+
* The maximum amount of regions to be deployed at any given time.
|
|
87
|
+
*/
|
|
88
|
+
regionsMaxAllowed?: pulumi.Input<number>;
|
|
89
|
+
/**
|
|
90
|
+
* The regions that will be statically provisioned and will always be running and available to users.
|
|
91
|
+
*/
|
|
92
|
+
regionsRequireds?: pulumi.Input<pulumi.Input<string>[]>;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* The set of arguments for constructing a ComputeContainerApp resource.
|
|
96
|
+
*/
|
|
97
|
+
interface ComputeContainerAppArgs {
|
|
98
|
+
/**
|
|
99
|
+
* The maximum number of instances that will be provisioned per active region.
|
|
100
|
+
*/
|
|
101
|
+
autoscalingMax?: pulumi.Input<number>;
|
|
102
|
+
/**
|
|
103
|
+
* The minimum number of instances that will be provisioned per active region.
|
|
104
|
+
*/
|
|
105
|
+
autoscalingMin?: pulumi.Input<number>;
|
|
106
|
+
/**
|
|
107
|
+
* Defines a container for the application.
|
|
108
|
+
*/
|
|
109
|
+
containers?: pulumi.Input<pulumi.Input<ComputeContainerAppContainer>[]>;
|
|
110
|
+
/**
|
|
111
|
+
* The name of the application.
|
|
112
|
+
*/
|
|
113
|
+
name?: pulumi.Input<string>;
|
|
114
|
+
/**
|
|
115
|
+
* The regions that will be dynamically provisionable based on the user latency.
|
|
116
|
+
*/
|
|
117
|
+
regionsAlloweds: pulumi.Input<pulumi.Input<string>[]>;
|
|
118
|
+
/**
|
|
119
|
+
* The maximum amount of regions to be deployed at any given time.
|
|
120
|
+
*/
|
|
121
|
+
regionsMaxAllowed?: pulumi.Input<number>;
|
|
122
|
+
/**
|
|
123
|
+
* The regions that will be statically provisioned and will always be running and available to users.
|
|
124
|
+
*/
|
|
125
|
+
regionsRequireds: pulumi.Input<pulumi.Input<string>[]>;
|
|
126
|
+
}
|
|
127
|
+
//#endregion
|
|
128
|
+
export { ComputeContainerApp, ComputeContainerAppArgs, ComputeContainerAppState };
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { __esm, __export } from "./_virtual/rolldown_runtime.mjs";
|
|
2
|
+
import { getPackage, init_utilities, resourceOptsDefaults } from "./utilities.mjs";
|
|
3
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
4
|
+
|
|
5
|
+
//#region computeContainerApp.ts
|
|
6
|
+
var computeContainerApp_exports = {};
|
|
7
|
+
__export(computeContainerApp_exports, { ComputeContainerApp: () => ComputeContainerApp });
|
|
8
|
+
var ComputeContainerApp;
|
|
9
|
+
var init_computeContainerApp = __esm({ "computeContainerApp.ts": (() => {
|
|
10
|
+
init_utilities();
|
|
11
|
+
ComputeContainerApp = class ComputeContainerApp extends pulumi.CustomResource {
|
|
12
|
+
/**
|
|
13
|
+
* Get an existing ComputeContainerApp resource's state with the given name, ID, and optional extra
|
|
14
|
+
* properties used to qualify the lookup.
|
|
15
|
+
*
|
|
16
|
+
* @param name The _unique_ name of the resulting resource.
|
|
17
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
18
|
+
* @param state Any extra arguments used during the lookup.
|
|
19
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
20
|
+
*/
|
|
21
|
+
static get(name, id, state, opts) {
|
|
22
|
+
return new ComputeContainerApp(name, state, {
|
|
23
|
+
...opts,
|
|
24
|
+
id
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
/** @internal */
|
|
28
|
+
static __pulumiType = "bunnynet:index/computeContainerApp:ComputeContainerApp";
|
|
29
|
+
/**
|
|
30
|
+
* Returns true if the given object is an instance of ComputeContainerApp. This is designed to work even
|
|
31
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
32
|
+
*/
|
|
33
|
+
static isInstance(obj) {
|
|
34
|
+
if (obj === void 0 || obj === null) return false;
|
|
35
|
+
return obj["__pulumiType"] === ComputeContainerApp.__pulumiType;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* The maximum number of instances that will be provisioned per active region.
|
|
39
|
+
*/
|
|
40
|
+
autoscalingMax;
|
|
41
|
+
/**
|
|
42
|
+
* The minimum number of instances that will be provisioned per active region.
|
|
43
|
+
*/
|
|
44
|
+
autoscalingMin;
|
|
45
|
+
/**
|
|
46
|
+
* Defines a container for the application.
|
|
47
|
+
*/
|
|
48
|
+
containers;
|
|
49
|
+
/**
|
|
50
|
+
* The name of the application.
|
|
51
|
+
*/
|
|
52
|
+
name;
|
|
53
|
+
/**
|
|
54
|
+
* The regions that will be dynamically provisionable based on the user latency.
|
|
55
|
+
*/
|
|
56
|
+
regionsAlloweds;
|
|
57
|
+
/**
|
|
58
|
+
* The maximum amount of regions to be deployed at any given time.
|
|
59
|
+
*/
|
|
60
|
+
regionsMaxAllowed;
|
|
61
|
+
/**
|
|
62
|
+
* The regions that will be statically provisioned and will always be running and available to users.
|
|
63
|
+
*/
|
|
64
|
+
regionsRequireds;
|
|
65
|
+
constructor(name, argsOrState, opts) {
|
|
66
|
+
let resourceInputs = {};
|
|
67
|
+
opts = opts || {};
|
|
68
|
+
if (opts.id) {
|
|
69
|
+
const state = argsOrState;
|
|
70
|
+
resourceInputs["autoscalingMax"] = state ? state.autoscalingMax : void 0;
|
|
71
|
+
resourceInputs["autoscalingMin"] = state ? state.autoscalingMin : void 0;
|
|
72
|
+
resourceInputs["containers"] = state ? state.containers : void 0;
|
|
73
|
+
resourceInputs["name"] = state ? state.name : void 0;
|
|
74
|
+
resourceInputs["regionsAlloweds"] = state ? state.regionsAlloweds : void 0;
|
|
75
|
+
resourceInputs["regionsMaxAllowed"] = state ? state.regionsMaxAllowed : void 0;
|
|
76
|
+
resourceInputs["regionsRequireds"] = state ? state.regionsRequireds : void 0;
|
|
77
|
+
} else {
|
|
78
|
+
const args = argsOrState;
|
|
79
|
+
if ((!args || args.regionsAlloweds === void 0) && !opts.urn) throw new Error("Missing required property 'regionsAlloweds'");
|
|
80
|
+
if ((!args || args.regionsRequireds === void 0) && !opts.urn) throw new Error("Missing required property 'regionsRequireds'");
|
|
81
|
+
resourceInputs["autoscalingMax"] = args ? args.autoscalingMax : void 0;
|
|
82
|
+
resourceInputs["autoscalingMin"] = args ? args.autoscalingMin : void 0;
|
|
83
|
+
resourceInputs["containers"] = args ? args.containers : void 0;
|
|
84
|
+
resourceInputs["name"] = args ? args.name : void 0;
|
|
85
|
+
resourceInputs["regionsAlloweds"] = args ? args.regionsAlloweds : void 0;
|
|
86
|
+
resourceInputs["regionsMaxAllowed"] = args ? args.regionsMaxAllowed : void 0;
|
|
87
|
+
resourceInputs["regionsRequireds"] = args ? args.regionsRequireds : void 0;
|
|
88
|
+
}
|
|
89
|
+
opts = pulumi.mergeOptions(resourceOptsDefaults(), opts);
|
|
90
|
+
super(ComputeContainerApp.__pulumiType, name, resourceInputs, opts, false, getPackage());
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
}) });
|
|
94
|
+
|
|
95
|
+
//#endregion
|
|
96
|
+
init_computeContainerApp();
|
|
97
|
+
export { computeContainerApp_exports, init_computeContainerApp };
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
|
|
3
|
+
//#region computeContainerImageregistry.d.ts
|
|
4
|
+
declare class ComputeContainerImageregistry extends pulumi.CustomResource {
|
|
5
|
+
/**
|
|
6
|
+
* Get an existing ComputeContainerImageregistry resource's state with the given name, ID, and optional extra
|
|
7
|
+
* properties used to qualify the lookup.
|
|
8
|
+
*
|
|
9
|
+
* @param name The _unique_ name of the resulting resource.
|
|
10
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
11
|
+
* @param state Any extra arguments used during the lookup.
|
|
12
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
13
|
+
*/
|
|
14
|
+
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ComputeContainerImageregistryState, opts?: pulumi.CustomResourceOptions): ComputeContainerImageregistry;
|
|
15
|
+
/** @internal */
|
|
16
|
+
static readonly __pulumiType: string;
|
|
17
|
+
/**
|
|
18
|
+
* Returns true if the given object is an instance of ComputeContainerImageregistry. This is designed to work even
|
|
19
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
20
|
+
*/
|
|
21
|
+
static isInstance(obj: any): obj is ComputeContainerImageregistry;
|
|
22
|
+
/**
|
|
23
|
+
* The unique identifier for the image registry.
|
|
24
|
+
*/
|
|
25
|
+
readonly computeContainerImageregistryId!: pulumi.Output<number>;
|
|
26
|
+
/**
|
|
27
|
+
* Options: `DockerHub`, `GitHub`
|
|
28
|
+
*/
|
|
29
|
+
readonly registry!: pulumi.Output<string>;
|
|
30
|
+
/**
|
|
31
|
+
* The token used to authenticate to the registry. If you are importing a resource, declare the token as an empty string.
|
|
32
|
+
*/
|
|
33
|
+
readonly token!: pulumi.Output<string>;
|
|
34
|
+
/**
|
|
35
|
+
* The username used to authenticate to the registry.
|
|
36
|
+
*/
|
|
37
|
+
readonly username!: pulumi.Output<string>;
|
|
38
|
+
/**
|
|
39
|
+
* Create a ComputeContainerImageregistry resource with the given unique name, arguments, and options.
|
|
40
|
+
*
|
|
41
|
+
* @param name The _unique_ name of the resource.
|
|
42
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
43
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
44
|
+
*/
|
|
45
|
+
constructor(name: string, args: ComputeContainerImageregistryArgs, opts?: pulumi.CustomResourceOptions);
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Input properties used for looking up and filtering ComputeContainerImageregistry resources.
|
|
49
|
+
*/
|
|
50
|
+
interface ComputeContainerImageregistryState {
|
|
51
|
+
/**
|
|
52
|
+
* The unique identifier for the image registry.
|
|
53
|
+
*/
|
|
54
|
+
computeContainerImageregistryId?: pulumi.Input<number>;
|
|
55
|
+
/**
|
|
56
|
+
* Options: `DockerHub`, `GitHub`
|
|
57
|
+
*/
|
|
58
|
+
registry?: pulumi.Input<string>;
|
|
59
|
+
/**
|
|
60
|
+
* The token used to authenticate to the registry. If you are importing a resource, declare the token as an empty string.
|
|
61
|
+
*/
|
|
62
|
+
token?: pulumi.Input<string>;
|
|
63
|
+
/**
|
|
64
|
+
* The username used to authenticate to the registry.
|
|
65
|
+
*/
|
|
66
|
+
username?: pulumi.Input<string>;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* The set of arguments for constructing a ComputeContainerImageregistry resource.
|
|
70
|
+
*/
|
|
71
|
+
interface ComputeContainerImageregistryArgs {
|
|
72
|
+
/**
|
|
73
|
+
* Options: `DockerHub`, `GitHub`
|
|
74
|
+
*/
|
|
75
|
+
registry: pulumi.Input<string>;
|
|
76
|
+
/**
|
|
77
|
+
* The token used to authenticate to the registry. If you are importing a resource, declare the token as an empty string.
|
|
78
|
+
*/
|
|
79
|
+
token: pulumi.Input<string>;
|
|
80
|
+
/**
|
|
81
|
+
* The username used to authenticate to the registry.
|
|
82
|
+
*/
|
|
83
|
+
username: pulumi.Input<string>;
|
|
84
|
+
}
|
|
85
|
+
//#endregion
|
|
86
|
+
export { ComputeContainerImageregistry, ComputeContainerImageregistryArgs, ComputeContainerImageregistryState };
|