|
| 1 | +<p align="center"> |
| 2 | + <a href="https://fingerprint.com"> |
| 3 | + <picture> |
| 4 | + <source media="(prefers-color-scheme: dark)" srcset="https://fingerprintjs.github.io/home/resources/logo_light.svg" /> |
| 5 | + <source media="(prefers-color-scheme: light)" srcset=https://fingerprintjs.github.io/home/resources/logo_dark.svg" /> |
| 6 | + <img src="https://fingerprintjs.github.io/home/resources/logo_dark.svg" alt="Fingerprint logo" width="312px" /> |
| 7 | + </picture> |
| 8 | + </a> |
| 9 | +</p> |
| 10 | + |
| 11 | +<p align="center"> |
| 12 | +<a href="https://github.com/fingerprintjs/terraform-aws-fingerprint-cloudfront-proxy-integration"><img src="https://img.shields.io/github/v/release/fingerprintjs/terraform-aws-fingerprint-cloudfront-proxy-integration" alt="Current version"></a> |
| 13 | +<a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/:license-mit-blue.svg" alt="MIT license"></a> |
| 14 | +<a href="https://discord.gg/39EpE2neBg"><img src="https://img.shields.io/discord/852099967190433792?style=logo&label=Discord&logo=Discord&logoColor=white" alt="Discord server"></a> |
| 15 | +</p> |
| 16 | + |
| 17 | +> **Warning** |
| 18 | +> This project is in the Private Beta phase. For more information, reach out |
| 19 | + |
| 20 | +
|
1 | 21 | ## How to Install
|
2 | 22 |
|
3 | 23 | ### Using a new CloudFront distribution
|
4 | 24 |
|
5 | 25 | 1. Create a new directory `mkdir fingerprint_integration` and go inside `cd fingerprint_integration`
|
6 |
| -2. Create a file `touch fingerprint.tf` and add below content, do not forget to replace placeholders (`AGENT_DOWNLOAD_PATH_HERE`, `RESULT_PATH_HERE`, `PROXY_SECRET_HERE`): |
| 26 | +2. Create a file `touch fingerprint.tf` and add below content, do not forget to replace |
| 27 | + placeholders (`AGENT_DOWNLOAD_PATH_HERE`, `RESULT_PATH_HERE`, `PROXY_SECRET_HERE`): |
7 | 28 | ```terraform
|
8 | 29 | module "fingerprint_cloudfront_integration" {
|
9 | 30 | source = "[email protected]:necipallef/terraform-module-proxy-lambda.git/?ref=v0.7.1"
|
|
13 | 34 | fpjs_shared_secret = "PROXY_SECRET_HERE"
|
14 | 35 | }
|
15 | 36 | ```
|
16 |
| -3. Create a file called `cloudfront_distribution.tf` and add below content (feel free to make any changes that makes sense for your setup): |
| 37 | +3. Create a file called `cloudfront_distribution.tf` and add below content (feel free to make any changes that makes |
| 38 | + sense for your setup): |
17 | 39 | ```terraform
|
18 | 40 |
|
19 | 41 | resource "aws_cloudfront_distribution" "fpjs_cloudfront_distribution" {
|
|
67 | 89 | }
|
68 | 90 | }
|
69 | 91 | ```
|
70 |
| - If you wish to connect a custom domain for first-party benefits, consider changing `viewer_certificate` field accordingly. Refer to [official documentation](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudfront_distribution) by HashiCorp for further customization. |
| 92 | + If you wish to connect a custom domain for first-party benefits, consider changing `viewer_certificate` field |
| 93 | + accordingly. Refer |
| 94 | + to [official documentation](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudfront_distribution) |
| 95 | + by HashiCorp for further customization. |
71 | 96 | 4. Run `terraform init`
|
72 | 97 | 5. Run `terraform plan`, if all looks good run `terraform apply`
|
73 | 98 |
|
74 | 99 | ### Using existing CloudFront distribution
|
75 | 100 |
|
76 |
| -1. Create a file called `fingerprint.tf` and add below content, do not forget to replace placeholders (`AGENT_DOWNLOAD_PATH_HERE`, `RESULT_PATH_HERE`, `PROXY_SECRET_HERE`): |
| 101 | +1. Create a file called `fingerprint.tf` and add below content, do not forget to replace |
| 102 | + placeholders (`AGENT_DOWNLOAD_PATH_HERE`, `RESULT_PATH_HERE`, `PROXY_SECRET_HERE`): |
77 | 103 | ```terraform
|
78 | 104 | module "fingerprint_cloudfront_integration" {
|
79 | 105 | source = "[email protected]:necipallef/terraform-module-proxy-lambda.git/?ref=v0.7.1"
|
|
83 | 109 | fpjs_shared_secret = "PROXY_SECRET_HERE"
|
84 | 110 | }
|
85 | 111 | ```
|
86 |
| -2. Go to your CloudFront distribution block and add below content, do not forget to replace placeholders (`YOUR_INTEGRATION_PATH_HERE`): |
| 112 | +2. Go to your CloudFront distribution block and add below content, do not forget to replace |
| 113 | + placeholders (`YOUR_INTEGRATION_PATH_HERE`): |
87 | 114 | ```terraform
|
88 | 115 | resource "aws_cloudfront_distribution" "cloudfront_dist" {
|
89 | 116 | // more code here
|
|
134 | 161 | > If your project doesn't use `hashicorp/random` module, then you will need to run `terraform init -upgrade`.
|
135 | 162 |
|
136 | 163 | ## Todo
|
| 164 | +
|
137 | 165 | - [ ] create a public repo on company account with name `terraform-aws-fingerprint-cloudfront-integration`
|
138 | 166 | - [ ] publish on Hashicorp account
|
0 commit comments