pulumi-webflow 0.0.0__tar.gz
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.
- pulumi_webflow-0.0.0/PKG-INFO +602 -0
- pulumi_webflow-0.0.0/README.md +584 -0
- pulumi_webflow-0.0.0/pulumi_webflow/__init__.py +76 -0
- pulumi_webflow-0.0.0/pulumi_webflow/_inputs.py +254 -0
- pulumi_webflow-0.0.0/pulumi_webflow/_utilities.py +331 -0
- pulumi_webflow-0.0.0/pulumi_webflow/asset.py +334 -0
- pulumi_webflow-0.0.0/pulumi_webflow/asset_folder.py +225 -0
- pulumi_webflow-0.0.0/pulumi_webflow/collection.py +235 -0
- pulumi_webflow-0.0.0/pulumi_webflow/collection_field.py +322 -0
- pulumi_webflow-0.0.0/pulumi_webflow/collection_item.py +283 -0
- pulumi_webflow-0.0.0/pulumi_webflow/config/__init__.py +9 -0
- pulumi_webflow-0.0.0/pulumi_webflow/config/__init__.pyi +21 -0
- pulumi_webflow-0.0.0/pulumi_webflow/config/vars.py +29 -0
- pulumi_webflow-0.0.0/pulumi_webflow/ecommerce_settings.py +146 -0
- pulumi_webflow-0.0.0/pulumi_webflow/get_authorized_user.py +109 -0
- pulumi_webflow-0.0.0/pulumi_webflow/get_token_info.py +82 -0
- pulumi_webflow-0.0.0/pulumi_webflow/outputs.py +455 -0
- pulumi_webflow-0.0.0/pulumi_webflow/page_content.py +172 -0
- pulumi_webflow-0.0.0/pulumi_webflow/page_custom_code.py +178 -0
- pulumi_webflow-0.0.0/pulumi_webflow/page_data.py +256 -0
- pulumi_webflow-0.0.0/pulumi_webflow/provider.py +106 -0
- pulumi_webflow-0.0.0/pulumi_webflow/pulumi-plugin.json +4 -0
- pulumi_webflow-0.0.0/pulumi_webflow/py.typed +0 -0
- pulumi_webflow-0.0.0/pulumi_webflow/redirect.py +226 -0
- pulumi_webflow-0.0.0/pulumi_webflow/registered_script.py +295 -0
- pulumi_webflow-0.0.0/pulumi_webflow/robots_txt.py +166 -0
- pulumi_webflow-0.0.0/pulumi_webflow/site.py +361 -0
- pulumi_webflow-0.0.0/pulumi_webflow/site_custom_code.py +178 -0
- pulumi_webflow-0.0.0/pulumi_webflow/user.py +284 -0
- pulumi_webflow-0.0.0/pulumi_webflow/webhook.py +235 -0
- pulumi_webflow-0.0.0/pulumi_webflow.egg-info/PKG-INFO +602 -0
- pulumi_webflow-0.0.0/pulumi_webflow.egg-info/SOURCES.txt +36 -0
- pulumi_webflow-0.0.0/pulumi_webflow.egg-info/dependency_links.txt +1 -0
- pulumi_webflow-0.0.0/pulumi_webflow.egg-info/not-zip-safe +1 -0
- pulumi_webflow-0.0.0/pulumi_webflow.egg-info/requires.txt +6 -0
- pulumi_webflow-0.0.0/pulumi_webflow.egg-info/top_level.txt +1 -0
- pulumi_webflow-0.0.0/setup.cfg +4 -0
- pulumi_webflow-0.0.0/setup.py +41 -0
|
@@ -0,0 +1,602 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pulumi_webflow
|
|
3
|
+
Version: 0.0.0
|
|
4
|
+
Summary: Unofficial community-maintained Pulumi provider for managing Webflow sites, redirects, and robots.txt. Not affiliated with Pulumi Corporation or Webflow, Inc.
|
|
5
|
+
Home-page: https://github.com/jdetmar/pulumi-webflow
|
|
6
|
+
Requires-Python: >=3.9
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
Requires-Dist: parver>=0.2.1
|
|
9
|
+
Requires-Dist: pulumi<4.0.0,>=3.165.0
|
|
10
|
+
Requires-Dist: semver>=2.8.1
|
|
11
|
+
Requires-Dist: typing-extensions<5,>=4.11; python_version < "3.11"
|
|
12
|
+
Dynamic: description
|
|
13
|
+
Dynamic: description-content-type
|
|
14
|
+
Dynamic: home-page
|
|
15
|
+
Dynamic: requires-dist
|
|
16
|
+
Dynamic: requires-python
|
|
17
|
+
Dynamic: summary
|
|
18
|
+
|
|
19
|
+
# Webflow Pulumi Provider
|
|
20
|
+
|
|
21
|
+
[](https://github.com/jdetmar/pulumi-webflow/actions)
|
|
22
|
+
[](https://opensource.org/licenses/MIT)
|
|
23
|
+
|
|
24
|
+
> **⚠️ Unofficial Community Provider**
|
|
25
|
+
>
|
|
26
|
+
> This is an **unofficial, community-maintained** Pulumi provider for Webflow. It is **not affiliated with, endorsed by, or supported by Pulumi Corporation or Webflow, Inc.** This project is an independent effort to bring infrastructure-as-code capabilities to Webflow using Pulumi.
|
|
27
|
+
>
|
|
28
|
+
> - **Not an official product** - Created and maintained by the community
|
|
29
|
+
> - **No warranties** - Provided "as-is" under the MIT License
|
|
30
|
+
> - **Community support only** - Issues and questions via [GitHub](https://github.com/jdetmar/pulumi-webflow/issues)
|
|
31
|
+
|
|
32
|
+
**Manage your Webflow sites and resources as code using Pulumi**
|
|
33
|
+
|
|
34
|
+
The Webflow Pulumi Provider lets you programmatically manage Webflow resources (sites, redirects, robots.txt, and more) using the same Pulumi infrastructure-as-code approach you use for cloud resources. Deploy, preview, and destroy Webflow infrastructure alongside your other cloud deployments.
|
|
35
|
+
|
|
36
|
+
## What You Can Do
|
|
37
|
+
|
|
38
|
+
- **Deploy Webflow resources as code** - Define sites, redirects, robots.txt and other resources in TypeScript, Python, Go, C#, or Java
|
|
39
|
+
- **Preview before deploying** - Use `pulumi preview` to see exactly what will change
|
|
40
|
+
- **Manage multiple environments** - Create separate stacks for dev, staging, and production
|
|
41
|
+
- **Version control your infrastructure** - Track all changes in Git
|
|
42
|
+
- **Integrate with CI/CD** - Automate deployments in your GitHub Actions, GitLab CI, or other pipelines
|
|
43
|
+
|
|
44
|
+
## Table of Contents
|
|
45
|
+
|
|
46
|
+
1. [Prerequisites](#prerequisites)
|
|
47
|
+
2. [Installation](#installation)
|
|
48
|
+
3. [Quick Start](#quick-start) ← **Start here** (20 minutes to your first deployment)
|
|
49
|
+
4. [Authentication](#authentication)
|
|
50
|
+
5. [Verification](#verification)
|
|
51
|
+
6. [Troubleshooting](#troubleshooting)
|
|
52
|
+
7. [Version Control & Audit Trail](#version-control--audit-trail)
|
|
53
|
+
8. [Multi-Language Examples](#multi-language-examples)
|
|
54
|
+
9. [Next Steps](#next-steps)
|
|
55
|
+
10. [Contributing](#contributing)
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Prerequisites
|
|
60
|
+
|
|
61
|
+
Before you begin, make sure you have:
|
|
62
|
+
|
|
63
|
+
### 1. **Pulumi CLI**
|
|
64
|
+
- Download and install from [pulumi.com/docs/install](https://www.pulumi.com/docs/install/)
|
|
65
|
+
- Verify installation: `pulumi version` (requires v3.0 or later)
|
|
66
|
+
|
|
67
|
+
### 2. **Programming Language Runtime** (choose at least one)
|
|
68
|
+
- **TypeScript**: [Node.js](https://nodejs.org/) 14.x or later
|
|
69
|
+
- **Python**: [Python](https://www.python.org/downloads/) 3.8 or later
|
|
70
|
+
- **Go**: [Go](https://golang.org/dl/) 1.21 or later
|
|
71
|
+
- **C#**: [.NET](https://dotnet.microsoft.com/download) 6.0 or later
|
|
72
|
+
- **Java**: [Java](https://adoptopenjdk.net/) 11 or later
|
|
73
|
+
|
|
74
|
+
### 3. **Webflow Account**
|
|
75
|
+
- A Webflow account with API access enabled
|
|
76
|
+
- Access to at least one Webflow site (where you'll deploy your first resource)
|
|
77
|
+
|
|
78
|
+
### 4. **Webflow API Token**
|
|
79
|
+
- Your Webflow API token (see [Authentication](#authentication) section below)
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## Installation
|
|
84
|
+
|
|
85
|
+
The Webflow provider installs automatically when you first run `pulumi up`. For manual installation:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
# Automatic installation (recommended - happens on first pulumi up/preview)
|
|
89
|
+
# Just run the Quick Start below, and the provider will install automatically
|
|
90
|
+
|
|
91
|
+
# OR manual installation if you prefer
|
|
92
|
+
pulumi plugin install resource webflow
|
|
93
|
+
|
|
94
|
+
# Verify installation
|
|
95
|
+
pulumi plugin ls | grep webflow
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## Quick Start
|
|
101
|
+
|
|
102
|
+
### Deploy Your First Webflow Resource in Under 20 Minutes
|
|
103
|
+
|
|
104
|
+
This quick start walks you through deploying a robots.txt resource to your Webflow site using TypeScript. The entire process takes about 5 minutes once prerequisites are met.
|
|
105
|
+
|
|
106
|
+
### Step 1: Create a New Pulumi Project (2 minutes)
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
# Create a new directory for your Pulumi project
|
|
110
|
+
mkdir my-webflow-project
|
|
111
|
+
cd my-webflow-project
|
|
112
|
+
|
|
113
|
+
# Initialize a new Pulumi project
|
|
114
|
+
pulumi new --template typescript
|
|
115
|
+
|
|
116
|
+
# When prompted:
|
|
117
|
+
# - Enter a project name: my-webflow-project
|
|
118
|
+
# - Enter a stack name: dev
|
|
119
|
+
# - Enter a passphrase (or leave empty for no encryption): <press enter>
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
This creates:
|
|
123
|
+
- `Pulumi.yaml` - Project configuration
|
|
124
|
+
- `Pulumi.dev.yaml` - Stack-specific settings
|
|
125
|
+
- `index.ts` - Your infrastructure code
|
|
126
|
+
- `package.json` - Node.js dependencies
|
|
127
|
+
|
|
128
|
+
### Step 2: Configure Webflow Authentication (3 minutes)
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
# Get your Webflow API token (see Authentication section below if you don't have one)
|
|
132
|
+
|
|
133
|
+
# Set your token in Pulumi config (encrypted in Pulumi.dev.yaml)
|
|
134
|
+
pulumi config set webflow:apiToken --secret
|
|
135
|
+
|
|
136
|
+
# When prompted, paste your Webflow API token and press Enter
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
**What's happening:** Your token is encrypted and stored locally in `Pulumi.dev.yaml` (which is in .gitignore). It's never stored in plain text.
|
|
140
|
+
|
|
141
|
+
### Step 3: Write Your First Resource (5 minutes)
|
|
142
|
+
|
|
143
|
+
Replace the contents of `index.ts` with:
|
|
144
|
+
|
|
145
|
+
```typescript
|
|
146
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
147
|
+
import * as webflow from "pulumi-webflow";
|
|
148
|
+
|
|
149
|
+
// Get config values
|
|
150
|
+
const config = new pulumi.Config();
|
|
151
|
+
const siteId = config.requireSecret("siteId"); // We'll set this next
|
|
152
|
+
|
|
153
|
+
// Deploy a robots.txt resource
|
|
154
|
+
const robotsTxt = new webflow.RobotsTxt("my-robots", {
|
|
155
|
+
siteId: siteId,
|
|
156
|
+
content: `User-agent: *
|
|
157
|
+
Allow: /
|
|
158
|
+
|
|
159
|
+
User-agent: Googlebot
|
|
160
|
+
Allow: /
|
|
161
|
+
`, // Standard robots.txt allowing all crawlers
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
// Export the site ID for reference
|
|
165
|
+
export const deployedSiteId = siteId;
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
### Step 4: Configure Your Site ID (2 minutes)
|
|
169
|
+
|
|
170
|
+
```bash
|
|
171
|
+
# Find your Webflow site ID (24-character hex string) from Webflow Designer
|
|
172
|
+
# You can find it in: Project Settings > API & Webhooks > Site ID
|
|
173
|
+
|
|
174
|
+
# Set it in your Pulumi config
|
|
175
|
+
pulumi config set siteId --secret
|
|
176
|
+
|
|
177
|
+
# When prompted, paste your 24-character site ID and press Enter
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
**Need help finding your site ID?**
|
|
181
|
+
- In Webflow Designer, go to **Project Settings** (bottom of sidebar)
|
|
182
|
+
- Click **API & Webhooks**
|
|
183
|
+
- Your **Site ID** is displayed as a 24-character hex string (e.g., `5f0c8c9e1c9d440000e8d8c3`)
|
|
184
|
+
|
|
185
|
+
### Step 5: Preview Your Deployment (2 minutes)
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
# Install dependencies
|
|
189
|
+
npm install
|
|
190
|
+
|
|
191
|
+
# Preview the changes Pulumi will make
|
|
192
|
+
pulumi preview
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
Expected output:
|
|
196
|
+
```
|
|
197
|
+
Previewing update (dev):
|
|
198
|
+
|
|
199
|
+
Type Name Plan Info
|
|
200
|
+
+ webflow:RobotsTxt my-robots create
|
|
201
|
+
|
|
202
|
+
Resources:
|
|
203
|
+
+ 1 to create
|
|
204
|
+
|
|
205
|
+
Do you want to perform this update?
|
|
206
|
+
> yes
|
|
207
|
+
no
|
|
208
|
+
details
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
### Step 6: Deploy! (2 minutes)
|
|
212
|
+
|
|
213
|
+
```bash
|
|
214
|
+
# Deploy to your Webflow site
|
|
215
|
+
pulumi up
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
When prompted, select **yes** to confirm the deployment.
|
|
219
|
+
|
|
220
|
+
Expected output:
|
|
221
|
+
```
|
|
222
|
+
Type Name Plan Status
|
|
223
|
+
+ webflow:RobotsTxt my-robots create created
|
|
224
|
+
|
|
225
|
+
Outputs:
|
|
226
|
+
deployedSiteId: "5f0c8c9e1c9d440000e8d8c3"
|
|
227
|
+
|
|
228
|
+
Resources:
|
|
229
|
+
+ 1 created
|
|
230
|
+
|
|
231
|
+
Duration: 3s
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
### Step 7: Verify in Webflow (2 minutes)
|
|
235
|
+
|
|
236
|
+
1. Open Webflow Designer
|
|
237
|
+
2. Go to **Project Settings** → **SEO** → **robots.txt**
|
|
238
|
+
3. You should see the robots.txt content you deployed!
|
|
239
|
+
|
|
240
|
+
### Step 8: Clean Up (Optional)
|
|
241
|
+
|
|
242
|
+
```bash
|
|
243
|
+
# Remove the resource from Webflow
|
|
244
|
+
pulumi destroy
|
|
245
|
+
|
|
246
|
+
# When prompted, select 'yes' to confirm
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
**Congratulations!** You've successfully deployed your first Webflow resource using Pulumi! 🎉
|
|
250
|
+
|
|
251
|
+
---
|
|
252
|
+
|
|
253
|
+
## Authentication
|
|
254
|
+
|
|
255
|
+
### Getting Your Webflow API Token
|
|
256
|
+
|
|
257
|
+
1. Log in to [Webflow](https://webflow.com)
|
|
258
|
+
2. Go to **Account Settings** (bottom left of screen)
|
|
259
|
+
3. Click **API Tokens** in the left sidebar
|
|
260
|
+
4. Click **Create New Token**
|
|
261
|
+
5. Name it something descriptive (e.g., "Pulumi Provider")
|
|
262
|
+
6. Grant the following permissions:
|
|
263
|
+
- **Sites**: Read & Write
|
|
264
|
+
- **Redirects**: Read & Write (if using Redirect resources)
|
|
265
|
+
- **Robots.txt**: Read & Write (if using RobotsTxt resources)
|
|
266
|
+
7. Click **Create Token**
|
|
267
|
+
8. **Copy the token immediately** - Webflow won't show it again
|
|
268
|
+
|
|
269
|
+
### Setting Up Your Token in Pulumi
|
|
270
|
+
|
|
271
|
+
```bash
|
|
272
|
+
# Option 1: Pulumi config (recommended - encrypted in Pulumi.dev.yaml)
|
|
273
|
+
pulumi config set webflow:apiToken --secret
|
|
274
|
+
|
|
275
|
+
# Option 2: Environment variable
|
|
276
|
+
export WEBFLOW_API_TOKEN="your-token-here"
|
|
277
|
+
|
|
278
|
+
# Option 3: Code (NOT RECOMMENDED for production - security risk)
|
|
279
|
+
# Don't do this in production code!
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
### Security Best Practices
|
|
283
|
+
|
|
284
|
+
- ✅ **DO** use Pulumi config with `--secret` flag (encrypts locally)
|
|
285
|
+
- ✅ **DO** use environment variables in CI/CD pipelines
|
|
286
|
+
- ✅ **DO** keep tokens in `.env` files (never commit to Git)
|
|
287
|
+
- ❌ **DON'T** commit tokens to Git
|
|
288
|
+
- ❌ **DON'T** hardcode tokens in your Pulumi program
|
|
289
|
+
- ❌ **DON'T** share tokens via email or chat
|
|
290
|
+
- 🔐 **Rotate tokens regularly** - Create new tokens and retire old ones monthly
|
|
291
|
+
|
|
292
|
+
### CI/CD Configuration
|
|
293
|
+
|
|
294
|
+
For GitHub Actions or other CI/CD:
|
|
295
|
+
|
|
296
|
+
```yaml
|
|
297
|
+
# .github/workflows/deploy.yml
|
|
298
|
+
env:
|
|
299
|
+
WEBFLOW_API_TOKEN: ${{ secrets.WEBFLOW_API_TOKEN }}
|
|
300
|
+
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
|
|
301
|
+
|
|
302
|
+
jobs:
|
|
303
|
+
deploy:
|
|
304
|
+
runs-on: ubuntu-latest
|
|
305
|
+
steps:
|
|
306
|
+
- uses: actions/checkout@v3
|
|
307
|
+
- uses: pulumi/actions@v4
|
|
308
|
+
with:
|
|
309
|
+
command: up
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
---
|
|
313
|
+
|
|
314
|
+
## Verification
|
|
315
|
+
|
|
316
|
+
### Confirm Your Installation
|
|
317
|
+
|
|
318
|
+
```bash
|
|
319
|
+
# Check Pulumi is installed
|
|
320
|
+
pulumi version
|
|
321
|
+
|
|
322
|
+
# Check the Webflow provider is available
|
|
323
|
+
pulumi plugin ls | grep webflow
|
|
324
|
+
|
|
325
|
+
# Should output something like:
|
|
326
|
+
# resource webflow 1.0.0-alpha.0+dev
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
### Verify Authentication Works
|
|
330
|
+
|
|
331
|
+
```bash
|
|
332
|
+
# Inside a Pulumi project directory:
|
|
333
|
+
pulumi preview
|
|
334
|
+
|
|
335
|
+
# If authentication fails, you'll see an error like:
|
|
336
|
+
# Error: Unauthorized - Check your Webflow API token
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
### After Deployment
|
|
340
|
+
|
|
341
|
+
1. **In Webflow Designer:**
|
|
342
|
+
- Check that your resource appears in the appropriate settings (robots.txt, redirects, etc.)
|
|
343
|
+
- Verify the configuration matches what you deployed
|
|
344
|
+
|
|
345
|
+
2. **Via Pulumi:**
|
|
346
|
+
```bash
|
|
347
|
+
pulumi stack output deployedSiteId
|
|
348
|
+
# Should output your 24-character site ID
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
3. **Via Command Line:**
|
|
352
|
+
```bash
|
|
353
|
+
# View your stack's resources
|
|
354
|
+
pulumi stack select dev
|
|
355
|
+
pulumi stack
|
|
356
|
+
|
|
357
|
+
# View detailed resource information
|
|
358
|
+
pulumi stack export | jq .
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
---
|
|
362
|
+
|
|
363
|
+
## Troubleshooting
|
|
364
|
+
|
|
365
|
+
### Installation Issues
|
|
366
|
+
|
|
367
|
+
**Problem: "Plugin not found: webflow" error**
|
|
368
|
+
|
|
369
|
+
```
|
|
370
|
+
Error: Plugin webflow not found. Run `pulumi plugin install` to make sure the plugin is installed.
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
**Solution:**
|
|
374
|
+
```bash
|
|
375
|
+
# Manual plugin installation
|
|
376
|
+
pulumi plugin install resource webflow
|
|
377
|
+
|
|
378
|
+
# Or just run pulumi up - it will install automatically
|
|
379
|
+
pulumi up
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
---
|
|
383
|
+
|
|
384
|
+
### Authentication Issues
|
|
385
|
+
|
|
386
|
+
**Problem: "Unauthorized" error during pulumi up**
|
|
387
|
+
|
|
388
|
+
```
|
|
389
|
+
Error: Unauthorized - Invalid or expired Webflow API token
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
**Solutions:**
|
|
393
|
+
1. Verify your token was set correctly:
|
|
394
|
+
```bash
|
|
395
|
+
pulumi config get webflow:apiToken --show-secrets
|
|
396
|
+
# Should show your actual token (masked normally, shown with --show-secrets)
|
|
397
|
+
```
|
|
398
|
+
|
|
399
|
+
2. Check if token is expired - regenerate it in Webflow:
|
|
400
|
+
- Account Settings → API Tokens
|
|
401
|
+
- Click the refresh icon next to your token
|
|
402
|
+
- Update Pulumi: `pulumi config set webflow:apiToken --secret`
|
|
403
|
+
|
|
404
|
+
3. Verify token permissions:
|
|
405
|
+
- Go to Webflow Account Settings → API Tokens
|
|
406
|
+
- Check that the token has "Sites: Read & Write" permission
|
|
407
|
+
|
|
408
|
+
---
|
|
409
|
+
|
|
410
|
+
### Configuration Issues
|
|
411
|
+
|
|
412
|
+
**Problem: "Invalid site ID" error**
|
|
413
|
+
|
|
414
|
+
```
|
|
415
|
+
Error: Invalid or malformed siteId. Must be a 24-character hex string.
|
|
416
|
+
```
|
|
417
|
+
|
|
418
|
+
**Solutions:**
|
|
419
|
+
1. Get the correct site ID:
|
|
420
|
+
- Open Webflow Designer
|
|
421
|
+
- Go to Project Settings → API & Webhooks
|
|
422
|
+
- Copy your Site ID (24-character hex string)
|
|
423
|
+
|
|
424
|
+
2. Update your config:
|
|
425
|
+
```bash
|
|
426
|
+
pulumi config set siteId --secret
|
|
427
|
+
# Paste your correct site ID
|
|
428
|
+
```
|
|
429
|
+
|
|
430
|
+
3. Verify it was set:
|
|
431
|
+
```bash
|
|
432
|
+
pulumi config get siteId --show-secrets
|
|
433
|
+
```
|
|
434
|
+
|
|
435
|
+
---
|
|
436
|
+
|
|
437
|
+
### Network Issues
|
|
438
|
+
|
|
439
|
+
**Problem: "Connection timeout" or "Connection refused"**
|
|
440
|
+
|
|
441
|
+
**Solutions:**
|
|
442
|
+
1. Check your internet connection
|
|
443
|
+
2. Check if Webflow API is accessible:
|
|
444
|
+
```bash
|
|
445
|
+
curl -H "Authorization: Bearer YOUR_TOKEN" https://api.webflow.com/v2/sites
|
|
446
|
+
```
|
|
447
|
+
3. Check for corporate firewalls or proxy issues
|
|
448
|
+
4. Try again - may be temporary API issue
|
|
449
|
+
|
|
450
|
+
---
|
|
451
|
+
|
|
452
|
+
### Get Help
|
|
453
|
+
|
|
454
|
+
- 📖 **Full Troubleshooting Guide**: [docs/troubleshooting.md](./docs/troubleshooting.md) - Comprehensive error reference and diagnostic procedures
|
|
455
|
+
- ❓ **FAQ**: [docs/faq.md](./docs/faq.md) - Answers to common questions
|
|
456
|
+
- 📚 **Full Documentation**: [docs/](./docs/)
|
|
457
|
+
- 🔧 **Examples**: Check [examples/](./examples/) for comprehensive examples
|
|
458
|
+
- 🐛 **Report Bugs**: [GitHub Issues](https://github.com/jdetmar/pulumi-webflow/issues)
|
|
459
|
+
- 💬 **Ask Questions**: [GitHub Discussions](https://github.com/jdetmar/pulumi-webflow/discussions)
|
|
460
|
+
|
|
461
|
+
---
|
|
462
|
+
|
|
463
|
+
## Version Control & Audit Trail
|
|
464
|
+
|
|
465
|
+
All infrastructure changes can be tracked in Git to create an immutable audit trail for compliance.
|
|
466
|
+
|
|
467
|
+
### Key Features
|
|
468
|
+
|
|
469
|
+
- ✅ **Automatic Audit Trail** - Every change tracked with author, timestamp, and reason
|
|
470
|
+
- ✅ **Code Review Process** - Pull requests enable peer review before deployment
|
|
471
|
+
- ✅ **Compliance Ready** - Generate audit reports for SOC 2, HIPAA, GDPR compliance
|
|
472
|
+
- ✅ **CI/CD Integration** - GitHub Actions validates changes before merge
|
|
473
|
+
- ✅ **Multi-Environment** - Separate tracking for dev, staging, production
|
|
474
|
+
|
|
475
|
+
### Quick Example
|
|
476
|
+
|
|
477
|
+
```bash
|
|
478
|
+
# Create a feature branch for your change
|
|
479
|
+
git checkout -b feat/add-redirects
|
|
480
|
+
|
|
481
|
+
# Make infrastructure changes
|
|
482
|
+
# ... update your Pulumi code ...
|
|
483
|
+
|
|
484
|
+
# Preview the changes
|
|
485
|
+
pulumi preview
|
|
486
|
+
|
|
487
|
+
# Commit with a clear message
|
|
488
|
+
git commit -m "feat(redirects): add GDPR-compliant redirect rules
|
|
489
|
+
|
|
490
|
+
- Redirect /privacy to privacy-policy.webflow.io
|
|
491
|
+
- Redirect /terms to terms-of-service.webflow.io
|
|
492
|
+
- Requires approval before deployment
|
|
493
|
+
|
|
494
|
+
Story: 2.2 - Redirect CRUD Operations"
|
|
495
|
+
|
|
496
|
+
# Push and create a Pull Request for code review
|
|
497
|
+
git push origin feat/add-redirects
|
|
498
|
+
```
|
|
499
|
+
|
|
500
|
+
### Compliance Documentation
|
|
501
|
+
|
|
502
|
+
- 📖 **[Version Control Integration Guide](./docs/version-control.md)** - Complete Git workflow guide with best practices
|
|
503
|
+
|
|
504
|
+
### Generating Audit Reports
|
|
505
|
+
|
|
506
|
+
```bash
|
|
507
|
+
# View recent changes
|
|
508
|
+
git log --oneline -- Pulumi.*.yaml
|
|
509
|
+
|
|
510
|
+
# Generate detailed audit report for a time period
|
|
511
|
+
git log --since="2025-12-01" --until="2025-12-31" \
|
|
512
|
+
--format="%ai | %an | %s" \
|
|
513
|
+
-- Pulumi.*.yaml
|
|
514
|
+
|
|
515
|
+
# Export audit trail for compliance review
|
|
516
|
+
git log -p -- Pulumi.*.yaml > audit-report.txt
|
|
517
|
+
```
|
|
518
|
+
|
|
519
|
+
See the [Version Control guide](./docs/version-control.md) for complete instructions on setting up Git workflows and compliance reporting.
|
|
520
|
+
|
|
521
|
+
---
|
|
522
|
+
|
|
523
|
+
## Multi-Language Examples
|
|
524
|
+
|
|
525
|
+
The quickstart above uses TypeScript. Complete examples for other languages are in the [examples/quickstart/](./examples/quickstart/) directory:
|
|
526
|
+
|
|
527
|
+
- **TypeScript**: [examples/quickstart/typescript/](./examples/quickstart/typescript/) - Recommended for quick onboarding
|
|
528
|
+
- **Python**: [examples/quickstart/python/](./examples/quickstart/python/) - Pythonic approach
|
|
529
|
+
- **Go**: [examples/quickstart/go/](./examples/quickstart/go/) - High-performance deployment
|
|
530
|
+
|
|
531
|
+
Each example includes:
|
|
532
|
+
- Complete, copy-pasteable code
|
|
533
|
+
- Language-specific setup instructions
|
|
534
|
+
- Pulumi.yaml configuration
|
|
535
|
+
- Package manager files (package.json, requirements.txt, go.mod)
|
|
536
|
+
- Comprehensive README
|
|
537
|
+
|
|
538
|
+
---
|
|
539
|
+
|
|
540
|
+
## Next Steps
|
|
541
|
+
|
|
542
|
+
Once you've completed the Quick Start:
|
|
543
|
+
|
|
544
|
+
### 1. **Explore More Resources**
|
|
545
|
+
- Deploy multiple resource types (Redirects, Sites, etc.)
|
|
546
|
+
- Use the [examples/](./examples/) directory for real-world patterns
|
|
547
|
+
- Check [docs/](./docs/) for comprehensive reference documentation
|
|
548
|
+
|
|
549
|
+
### 2. **Multi-Environment Setup**
|
|
550
|
+
- Create separate stacks for dev, staging, and production
|
|
551
|
+
- Use different site IDs for each environment
|
|
552
|
+
- See: [examples/stack-config/](./examples/stack-config/)
|
|
553
|
+
|
|
554
|
+
### 3. **Advanced Patterns**
|
|
555
|
+
- Multi-site management: [examples/multi-site/](./examples/multi-site/)
|
|
556
|
+
- CI/CD integration: [examples/ci-cd/](./examples/ci-cd/)
|
|
557
|
+
- Logging and troubleshooting: [examples/troubleshooting-logs/](./examples/troubleshooting-logs/)
|
|
558
|
+
|
|
559
|
+
### 4. **Learn Pulumi Concepts**
|
|
560
|
+
- [Pulumi Documentation](https://www.pulumi.com/docs/)
|
|
561
|
+
- [Getting Started with Pulumi](https://www.pulumi.com/docs/iac/getting-started/)
|
|
562
|
+
- [Pulumi Best Practices](https://www.pulumi.com/docs/using-pulumi/best-practices/)
|
|
563
|
+
|
|
564
|
+
### 5. **Connect with the Community**
|
|
565
|
+
- [Pulumi Community Slack](https://pulumi-community.slack.com/)
|
|
566
|
+
- [Pulumi GitHub Discussions](https://github.com/pulumi/pulumi/discussions)
|
|
567
|
+
|
|
568
|
+
---
|
|
569
|
+
|
|
570
|
+
## Contributing
|
|
571
|
+
|
|
572
|
+
We welcome contributions! Please see [CONTRIBUTING.md](./CONTRIBUTING.md) for guidelines.
|
|
573
|
+
|
|
574
|
+
### Ways to Contribute
|
|
575
|
+
|
|
576
|
+
- **Report bugs** - Found an issue? [Create a GitHub issue](https://github.com/jdetmar/pulumi-webflow/issues)
|
|
577
|
+
- **Submit improvements** - Have an idea? [Create a discussion](https://github.com/jdetmar/pulumi-webflow/discussions)
|
|
578
|
+
- **Contribute code** - Fork the repo, make changes, and submit a pull request
|
|
579
|
+
- **Improve documentation** - Help us document features and patterns
|
|
580
|
+
|
|
581
|
+
---
|
|
582
|
+
|
|
583
|
+
## License
|
|
584
|
+
|
|
585
|
+
This project is licensed under the MIT License - see [LICENSE](./LICENSE) file for details.
|
|
586
|
+
|
|
587
|
+
---
|
|
588
|
+
|
|
589
|
+
## Troubleshooting Quick Reference
|
|
590
|
+
|
|
591
|
+
| Problem | Solution |
|
|
592
|
+
|---------|----------|
|
|
593
|
+
| Plugin not found | `pulumi plugin install resource webflow` |
|
|
594
|
+
| Invalid token | Check Webflow Account Settings → API Tokens |
|
|
595
|
+
| Invalid site ID | Verify in Webflow Designer → Project Settings → API & Webhooks |
|
|
596
|
+
| Deployment times out | Check internet connection, try again |
|
|
597
|
+
| Token format error | Ensure you're using the full API token (not just a prefix) |
|
|
598
|
+
| Site not found | Verify site ID matches the site where you want to deploy |
|
|
599
|
+
|
|
600
|
+
---
|
|
601
|
+
|
|
602
|
+
**Ready to get started?** Jump to [Quick Start](#quick-start) above! 🚀
|