pulumi-bunnynet 0.14.2 → 0.14.3

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 CHANGED
@@ -81,33 +81,57 @@ const provider = new bunnynet.Provider('bunnynet-provider', {
81
81
  ```typescript
82
82
  import * as bunnynet from 'pulumi-bunnynet'
83
83
 
84
- // Create a pull zone for CDN
84
+ // Create a pull zone with a URL origin
85
85
  const pullZone = new bunnynet.Pullzone('my-cdn', {
86
86
  name: 'my-website-cdn',
87
- originUrl: 'https://my-website.com',
88
- type: 'standard',
89
- storageZoneId: 12345,
90
- cacheControlMaxAge: 3600,
91
- cacheControlPublicMaxAge: 86400,
87
+ origin: {
88
+ type: 'OriginUrl',
89
+ url: 'https://my-website.com',
90
+ },
92
91
  addCanonicalHeader: true,
93
- enableGeoipCountryCode: true,
94
- enableOriginShield: true,
92
+ originshieldEnabled: true,
95
93
  })
96
94
 
95
+ // Create a pull zone backed by a storage zone
96
+ const storageZone = new bunnynet.StorageZone('assets', {
97
+ name: 'my-assets',
98
+ region: 'NY',
99
+ zoneTier: 'Standard',
100
+ })
101
+
102
+ const storagePullZone = new bunnynet.Pullzone(
103
+ 'storage-cdn',
104
+ {
105
+ name: 'my-assets-cdn',
106
+ origin: {
107
+ type: 'StorageZone',
108
+ storagezone: storageZone.storageZoneId,
109
+ },
110
+ },
111
+ { dependsOn: [storageZone] },
112
+ )
113
+
97
114
  // Add a custom hostname
98
115
  const hostname = new bunnynet.PullzoneHostname('custom-domain', {
99
- pullzoneId: pullZone.id,
100
- hostname: 'cdn.my-website.com',
101
- certificateId: 67890,
116
+ pullzone: pullZone.pullzoneId,
117
+ name: 'cdn.my-website.com',
102
118
  })
103
119
 
104
120
  // Create edge rules
105
121
  const edgeRule = new bunnynet.PullzoneEdgerule('cache-rule', {
106
- pullzoneId: pullZone.id,
107
- actionType: 'SetCacheTime',
108
- triggerType: 'RequestHeader',
109
- triggerValue: 'X-Cache-Control',
122
+ pullzone: pullZone.pullzoneId,
123
+ enabled: true,
124
+ action: 'OverrideCacheTime',
110
125
  actionParameter1: '3600',
126
+ triggers: [
127
+ {
128
+ type: 'Url',
129
+ matchType: 'MatchAny',
130
+ patterns: ['*'],
131
+ parameter1: '',
132
+ parameter2: '',
133
+ },
134
+ ],
111
135
  })
112
136
  ```
113
137
 
@@ -120,12 +144,13 @@ import * as bunnynet from 'pulumi-bunnynet'
120
144
  const storageZone = new bunnynet.StorageZone('media-storage', {
121
145
  name: 'media-files',
122
146
  region: 'NY', // New York region
147
+ zoneTier: 'Standard',
123
148
  replicationRegions: ['LA', 'SG'], // Los Angeles and Singapore replicas
124
149
  })
125
150
 
126
151
  // Upload files to storage
127
152
  const file = new bunnynet.StorageFile('logo', {
128
- storageZoneName: storageZone.name,
153
+ zone: storageZone.storageZoneId,
129
154
  path: '/images/logo.png',
130
155
  source: './assets/logo.png',
131
156
  contentType: 'image/png',
@@ -140,12 +165,11 @@ import * as bunnynet from 'pulumi-bunnynet'
140
165
  // Create DNS zone
141
166
  const dnsZone = new bunnynet.DnsZone('my-domain', {
142
167
  domain: 'example.com',
143
- soaEmail: 'admin@example.com',
144
168
  })
145
169
 
146
170
  // Add DNS records
147
171
  const aRecord = new bunnynet.DnsRecord('www-record', {
148
- zoneId: dnsZone.id,
172
+ zone: dnsZone.dnsZoneId,
149
173
  type: 'A',
150
174
  name: 'www',
151
175
  value: '203.0.113.1',
@@ -153,7 +177,7 @@ const aRecord = new bunnynet.DnsRecord('www-record', {
153
177
  })
154
178
 
155
179
  const cnameRecord = new bunnynet.DnsRecord('cdn-record', {
156
- zoneId: dnsZone.id,
180
+ zone: dnsZone.dnsZoneId,
157
181
  type: 'CNAME',
158
182
  name: 'cdn',
159
183
  value: 'b-cdn.net',
@@ -168,28 +192,25 @@ import * as bunnynet from 'pulumi-bunnynet'
168
192
 
169
193
  // Create container image registry
170
194
  const registry = new bunnynet.ComputeContainerImageregistry('my-registry', {
171
- name: 'my-app-registry',
172
- imageUrl: 'docker.io/myorg/myapp:latest',
195
+ registry: 'DockerHub',
173
196
  username: 'myusername',
174
- password: 'mypassword',
197
+ token: 'my-token',
175
198
  })
176
199
 
177
200
  // Deploy container app
178
201
  const containerApp = new bunnynet.ComputeContainerApp('edge-app', {
179
202
  name: 'my-edge-app',
180
- imageRegistryId: registry.id,
181
- environmentVariables: [
203
+ regionsAlloweds: ['ny'],
204
+ regionsRequireds: ['ny'],
205
+ containers: [
182
206
  {
183
- name: 'NODE_ENV',
184
- value: 'production',
185
- },
186
- {
187
- name: 'API_URL',
188
- value: 'https://api.example.com',
207
+ name: 'app',
208
+ imageRegistry: registry.computeContainerImageregistryId,
209
+ imageNamespace: 'myorg',
210
+ imageName: 'myapp',
211
+ imageTag: 'latest',
189
212
  },
190
213
  ],
191
- cpu: 0.1,
192
- memory: 128,
193
214
  })
194
215
  ```
195
216
 
@@ -198,11 +219,16 @@ const containerApp = new bunnynet.ComputeContainerApp('edge-app', {
198
219
  ```typescript
199
220
  import * as bunnynet from 'pulumi-bunnynet'
200
221
 
222
+ const videoStorage = new bunnynet.StorageZone('video-storage', {
223
+ name: 'video-files',
224
+ region: 'NY',
225
+ zoneTier: 'Standard',
226
+ })
227
+
201
228
  // Create video library
202
229
  const videoLibrary = new bunnynet.StreamLibrary('video-content', {
203
230
  name: 'my-video-library',
204
- storageZoneId: 12345,
205
- replicationRegions: ['NY', 'LA', 'SG'],
231
+ storageZone: videoStorage.storageZoneId,
206
232
  watermarkPositionLeft: 10,
207
233
  watermarkPositionTop: 10,
208
234
  watermarkWidth: 100,
@@ -211,16 +237,14 @@ const videoLibrary = new bunnynet.StreamLibrary('video-content', {
211
237
 
212
238
  // Create video collection
213
239
  const collection = new bunnynet.StreamCollection('tutorials', {
214
- libraryId: videoLibrary.id,
240
+ library: videoLibrary.streamLibraryId,
215
241
  name: 'Tutorial Videos',
216
242
  })
217
243
 
218
- // Upload video
244
+ // Create a video entry (upload content separately via API or dashboard)
219
245
  const video = new bunnynet.StreamVideo('intro-video', {
220
- libraryId: videoLibrary.id,
246
+ library: videoLibrary.streamLibraryId,
221
247
  title: 'Introduction Tutorial',
222
- collectionId: collection.id,
223
- // Video will be uploaded separately via API or dashboard
224
248
  })
225
249
  ```
226
250
 
@@ -232,22 +256,21 @@ import * as bunnynet from 'pulumi-bunnynet'
232
256
  // Create compute script
233
257
  const script = new bunnynet.ComputeScript('edge-function', {
234
258
  name: 'my-edge-function',
235
- scriptType: 'standalone',
236
- code: `
259
+ type: 'standalone',
260
+ content: `
237
261
  async function handleRequest(request) {
238
262
  const response = await fetch(request);
239
263
  const body = await response.text();
240
-
241
- // Add custom header
264
+
242
265
  const headers = new Headers(response.headers);
243
266
  headers.set('X-Processed-By', 'Bunny-Edge');
244
-
267
+
245
268
  return new Response(body, {
246
269
  status: response.status,
247
270
  headers: headers
248
271
  });
249
272
  }
250
-
273
+
251
274
  addEventListener('fetch', event => {
252
275
  event.respondWith(handleRequest(event.request));
253
276
  });
@@ -256,14 +279,15 @@ const script = new bunnynet.ComputeScript('edge-function', {
256
279
 
257
280
  // Add script variables
258
281
  const scriptVar = new bunnynet.ComputeScriptVariable('api-endpoint', {
259
- scriptId: script.id,
282
+ script: script.computeScriptId,
260
283
  name: 'API_ENDPOINT',
261
- value: 'https://api.example.com/v1',
284
+ defaultValue: 'https://api.example.com/v1',
285
+ required: true,
262
286
  })
263
287
 
264
288
  // Add script secrets
265
289
  const scriptSecret = new bunnynet.ComputeScriptSecret('api-key', {
266
- scriptId: script.id,
290
+ script: script.computeScriptId,
267
291
  name: 'API_KEY',
268
292
  value: 'secret-api-key-value',
269
293
  })
package/bin/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pulumi-bunnynet",
3
3
  "description": "A Pulumi provider for managing Bunny.net CDN and edge computing resources, dynamically bridged from the Terraform Bunnynet provider with support for pull zones, storage, DNS, compute containers, and video streaming.",
4
- "version": "0.14.2",
4
+ "version": "0.14.3",
5
5
  "homepage": "https://pulumi.khanh.id/docs/providers/bunnynet",
6
6
  "repository": {
7
7
  "type": "git",
@@ -21,8 +21,8 @@
21
21
  "async-mutex": "0.5.0"
22
22
  },
23
23
  "devDependencies": {
24
- "@pulumi/pulumi": "3.243.0",
25
- "@types/node": "24.12.4",
24
+ "@pulumi/pulumi": "3.246.0",
25
+ "@types/node": "24.13.2",
26
26
  "typescript": "5.9.3"
27
27
  },
28
28
  "peerDependencies": {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pulumi-bunnynet",
3
3
  "description": "A Pulumi provider for managing Bunny.net CDN and edge computing resources, dynamically bridged from the Terraform Bunnynet provider with support for pull zones, storage, DNS, compute containers, and video streaming.",
4
- "version": "0.14.2",
4
+ "version": "0.14.3",
5
5
  "homepage": "https://pulumi.khanh.id/docs/providers/bunnynet",
6
6
  "repository": {
7
7
  "type": "git",
@@ -21,8 +21,8 @@
21
21
  "async-mutex": "0.5.0"
22
22
  },
23
23
  "devDependencies": {
24
- "@pulumi/pulumi": "3.243.0",
25
- "@types/node": "24.12.4",
24
+ "@pulumi/pulumi": "3.246.0",
25
+ "@types/node": "24.13.2",
26
26
  "typescript": "5.9.3"
27
27
  },
28
28
  "peerDependencies": {