Skip to content

Commit 34225c3

Browse files
committed
docs: polish readme
1 parent 757e441 commit 34225c3

File tree

1 file changed

+59
-35
lines changed

1 file changed

+59
-35
lines changed

README.md

Lines changed: 59 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ You can install the Fastly VCL proxy integration [manually](https://dev.fingerpr
4343
4444
## 1. Install the Terraform module
4545

46-
- Create your own terraform folder and create main.tf file
47-
- Fill the file like this:
46+
1. Add the module to your Terraform file (for example, `main.tf`).
47+
2. Configure it with your Fastly API token, Fingerprint proxy secret, integration domain, and other required values.
4848

4949
```terraform
5050
terraform {
@@ -53,13 +53,13 @@ terraform {
5353
5454
module "fingerprint_fastly_vcl_integration" {
5555
source = "github.com/fingerprintjs/temp-fastly-vcl-terraform"
56-
fastly_api_token = "<your fastly api token>"
57-
integration_domain = "<your domain to serve fingerprint integration>"
58-
agent_script_download_path = "<random path like this: qwe123>"
59-
get_result_path = "<random path like this: asd987>"
60-
integration_path = "<random path like this: xyz456>"
61-
main_host = "<your origin domain to serve your website>"
62-
proxy_secret = "<your proxy secret>"
56+
fastly_api_token = "FASTLY_API_TOKEN"
57+
proxy_secret = "FINGERPRINT_PROXY_SECRET"
58+
integration_path = "INTEGRATION_PATH"
59+
agent_script_download_path = "AGENT_SCRIPT_DOWNLOAD_PATH"
60+
get_result_path = "GET_RESULT_PATH"
61+
integration_domain = "metrics.yourwebsite.com"
62+
main_host = "yourwebsite.com"
6363
}
6464
```
6565

@@ -68,47 +68,71 @@ You can see the full list of the Terraform module's variables below:
6868
| Variable | Description | Required | Example |
6969
| ---------------------------- | --------------------------------------------------------- | -------- | ---------------------------------------------- |
7070
| `fastly_api_token` | Your Fastly API token | Required | `"ABC123...xyz"` |
71-
| `integration_domain` | Domain used for the proxy integration | Required | `"metrics.yourwebsite.com"` |
72-
| `main_host` | Your origin server domain | Required | `"yourwebsite.com"` |
7371
| `proxy_secret` | Your Fingerprint proxy secret | Required | `"9h7jk2s1"` |
7472
| `integration_path` | Path prefix for proxy requests | Required | `"kyfy7t0a"` |
7573
| `agent_script_download_path` | Path for serving the JavaScript agent | Required | `"cc7bu2o8"` |
7674
| `get_result_path` | Path for identification requests | Required | `"sy5k3279"` |
75+
| `integration_domain` | Domain used for the proxy integration | Required | `"metrics.yourwebsite.com"` |
76+
| `main_host` | Your origin server domain | Required | `"yourwebsite.com"` |
7777
| `dictionary_name` | Name of the Fastly Dictionary for config values | Optional | `"fingerprint_config"` |
7878
| `integration_name` | Name of the Fastly CDN service | Optional | `"fingerprint-fastly-vcl-proxy-integration"` |
7979
| `download_asset` | Whether to auto-download the latest VCL release | Optional | `true` |
8080
| `vcl_asset_name` | Custom VCL asset file if not downloading the official one | Optional | `"fingerprint-pro-fastly-vcl-integration.vcl"` |
8181
| `asset_version` | GitHub release version used for the VCL asset | Optional | `"latest"` |
8282

83-
* Run `terraform init`
84-
8583
## 2. Deploy your Terraform changes
8684

87-
Run these commands in order:
88-
```shell
89-
terraform init
90-
```
85+
1. Initialize the Terraform module:
86+
87+
```shell
88+
terraform init
89+
```
9190

92-
```shell
93-
terraform apply -target=module.fingerprint_fastly_vcl_integration.module.vcl_asset
94-
```
91+
2. Apply the VCL asset:
9592

96-
```shell
97-
terraform apply
98-
```
93+
```shell
94+
terraform apply -target=module.fingerprint_fastly_vcl_integration.module.vcl_asset
95+
```
9996

100-
## Using a custom VCL asset
97+
3. Apply the changes to your Fastly service:
10198

102-
If you want to use your own asset instead of downloading latest follow these steps:
99+
```shell
100+
terraform apply
101+
```
103102

104-
Place your custom asset in `<your_module_root>/assets/custom-asset.vcl` and then edit your `main.tf` file, and add these 2 variables inside "vcl" module block:
105-
```terraform
106-
download_asset = false
107-
vcl_asset_name = "custom-asset.vcl"
108-
```
103+
## Using a custom VCL asset (optional)
104+
105+
You can use your own VCL asset instead of downloading the official one:
106+
107+
1. Place your custom asset in `<your_module_root>/assets/custom-asset.vcl`
108+
2. In your `main.tf` file, add these 2 variables to the module configuration:
109+
110+
```diff
111+
module "fingerprint_fastly_vcl_integration" {
112+
# ...
113+
+ download_asset = false
114+
+ vcl_asset_name = "custom-asset.vcl"
115+
}
116+
```
117+
118+
3. Run `terraform init`.
119+
4. Run `terraform apply`.
120+
121+
## Examples
122+
123+
This repository also includes an example Terraform project. Use this example only as a reference, and make sure to follow best practices when provisioning Fastly services:
124+
125+
- [Minimal example](./examples/minimal/)
126+
127+
## How to update
128+
129+
The Terraform module does include any mechanism for automatic updates. To keep your integration up to date, please run `terraform apply` regularly.
130+
131+
## More resources
132+
133+
- [Documentation](https://dev.fingerprint.com/docs/fastly-vcl-proxy-integration)
134+
135+
## License
136+
137+
This project is licensed under the MIT license. See the [LICENSE](/LICENSE) file for more info.
109138

110-
Run these commands:
111-
```shell
112-
terraform init
113-
terraform apply
114-
```

0 commit comments

Comments
 (0)