Skip to content

Commit 1af5cea

Browse files
author
João Taveira Araújo
authored
feat: support OBSERVE_COLLECTION_ENDPOINT (#73)
This commit adds support for `collection_endpoint`, and deprecates both `customer` and `domain`.
1 parent 70b9e83 commit 1af5cea

File tree

20 files changed

+68
-94
lines changed

20 files changed

+68
-94
lines changed

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ Terraform module which sets up a Lambda to forward event data towards Observe.
88
module "observe_lambda" {
99
source = "observeinc/lambda/aws"
1010
11-
name = "observe-lambda"
12-
observe_customer = "<id>"
13-
observe_token = "<token>"
11+
name = "observe-lambda"
12+
observe_collection_endpoint = "https://<customerid>.collect.observeinc.com"
13+
observe_token = "<token>"
1414
}
1515
```
1616

@@ -76,8 +76,9 @@ No modules.
7676
| <a name="input_lambda_version"></a> [lambda\_version](#input\_lambda\_version) | Version of lambda binary to use | `string` | `"latest"` | no |
7777
| <a name="input_memory_size"></a> [memory\_size](#input\_memory\_size) | The amount of memory that your function has access to. Increasing the function's memory also increases its CPU allocation.<br>The default value is 128 MB. The value must be a multiple of 64 MB. | `number` | `128` | no |
7878
| <a name="input_name"></a> [name](#input\_name) | Name of Lambda resource | `string` | n/a | yes |
79-
| <a name="input_observe_customer"></a> [observe\_customer](#input\_observe\_customer) | Observe Customer ID | `string` | n/a | yes |
80-
| <a name="input_observe_domain"></a> [observe\_domain](#input\_observe\_domain) | Observe domain | `string` | `"observeinc.com"` | no |
79+
| <a name="input_observe_collection_endpoint"></a> [observe\_collection\_endpoint](#input\_observe\_collection\_endpoint) | Observe Collection Endpoint, e.g https://123456789012.collect.observeinc.com | `string` | `null` | no |
80+
| <a name="input_observe_customer"></a> [observe\_customer](#input\_observe\_customer) | Observe Customer ID. Deprecated, please use observe\_collection\_endpoint instead | `string` | `null` | no |
81+
| <a name="input_observe_domain"></a> [observe\_domain](#input\_observe\_domain) | Observe domain. Deprecated, please use observe\_collection\_endpoint instead | `string` | `"observeinc.com"` | no |
8182
| <a name="input_observe_token"></a> [observe\_token](#input\_observe\_token) | Observe Token | `string` | n/a | yes |
8283
| <a name="input_reserved_concurrent_executions"></a> [reserved\_concurrent\_executions](#input\_reserved\_concurrent\_executions) | The number of simultaneous executions to reserve for the function. | `number` | `100` | no |
8384
| <a name="input_retention_in_days"></a> [retention\_in\_days](#input\_retention\_in\_days) | Retention in days of cloudwatch log group | `number` | `14` | no |

examples/cloudtrail/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ Note that this will create AWS resources - once you are done, run `terraform des
5858

5959
| Name | Description | Type | Default | Required |
6060
|------|-------------|------|---------|:--------:|
61-
| <a name="input_observe_customer"></a> [observe\_customer](#input\_observe\_customer) | Observe Customer ID | `string` | n/a | yes |
62-
| <a name="input_observe_domain"></a> [observe\_domain](#input\_observe\_domain) | Observe Domain | `string` | `null` | no |
61+
| <a name="input_observe_collection_endpoint"></a> [observe\_collection\_endpoint](#input\_observe\_collection\_endpoint) | Observe Collection Endpoint, e.g https://123456789012.collect.observeinc.com | `string` | n/a | yes |
6362
| <a name="input_observe_token"></a> [observe\_token](#input\_observe\_token) | Observe token | `string` | n/a | yes |
6463

6564
## Outputs

examples/cloudtrail/main.tf

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,10 @@ module "cloudtrail" {
2323
}
2424

2525
module "observe_lambda" {
26-
source = "../.."
27-
observe_customer = var.observe_customer
28-
observe_token = var.observe_token
29-
observe_domain = var.observe_domain
30-
name = random_pet.run.id
26+
source = "../.."
27+
observe_collection_endpoint = var.observe_collection_endpoint
28+
observe_token = var.observe_token
29+
name = random_pet.run.id
3130
}
3231

3332
module "observe_lambda_s3_subscription" {

examples/cloudtrail/variables.tf

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,9 @@
1-
variable "observe_customer" {
2-
description = "Observe Customer ID"
1+
variable "observe_collection_endpoint" {
2+
description = "Observe Collection Endpoint, e.g https://123456789012.collect.observeinc.com"
33
type = string
44
}
55

66
variable "observe_token" {
77
description = "Observe token"
88
type = string
99
}
10-
11-
variable "observe_domain" {
12-
description = "Observe Domain"
13-
type = string
14-
default = null
15-
}

examples/s3_access_logs/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@ Note that this will create AWS resources - once you are done, run `terraform des
6060
| Name | Description | Type | Default | Required |
6161
|------|-------------|------|---------|:--------:|
6262
| <a name="input_name"></a> [name](#input\_name) | Lambda name | `string` | n/a | yes |
63-
| <a name="input_observe_customer"></a> [observe\_customer](#input\_observe\_customer) | Observe Customer ID | `string` | n/a | yes |
64-
| <a name="input_observe_domain"></a> [observe\_domain](#input\_observe\_domain) | Observe Domain | `string` | `null` | no |
63+
| <a name="input_observe_collection_endpoint"></a> [observe\_collection\_endpoint](#input\_observe\_collection\_endpoint) | Observe Collection Endpoint, e.g https://123456789012.collect.observeinc.com | `string` | n/a | yes |
6564
| <a name="input_observe_token"></a> [observe\_token](#input\_observe\_token) | Observe token | `string` | n/a | yes |
6665

6766
## Outputs

examples/s3_access_logs/main.tf

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,10 @@ resource "aws_s3_bucket_acl" "access_logs" {
2727
}
2828

2929
module "observe_lambda" {
30-
source = "../.."
31-
observe_customer = var.observe_customer
32-
observe_token = var.observe_token
33-
observe_domain = var.observe_domain
34-
name = var.name
30+
source = "../.."
31+
observe_collection_endpoint = var.observe_collection_endpoint
32+
observe_token = var.observe_token
33+
name = var.name
3534
}
3635

3736
module "observe_lambda_s3_subscription" {

examples/s3_access_logs/variables.tf

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
variable "observe_customer" {
2-
description = "Observe Customer ID"
1+
variable "observe_collection_endpoint" {
2+
description = "Observe Collection Endpoint, e.g https://123456789012.collect.observeinc.com"
33
type = string
44
}
55

@@ -8,12 +8,6 @@ variable "observe_token" {
88
type = string
99
}
1010

11-
variable "observe_domain" {
12-
description = "Observe Domain"
13-
type = string
14-
default = null
15-
}
16-
1711
variable "name" {
1812
description = "Lambda name"
1913
type = string

examples/s3_bucket/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ Note that this will create AWS resources - once you are done, run `terraform des
5858
| <a name="input_bucket_count"></a> [bucket\_count](#input\_bucket\_count) | Number of buckets to create and subscribe. | `number` | `1` | no |
5959
| <a name="input_filter_prefix"></a> [filter\_prefix](#input\_filter\_prefix) | Specifies object key name prefix on S3 bucket notifications. | `string` | `null` | no |
6060
| <a name="input_filter_suffix"></a> [filter\_suffix](#input\_filter\_suffix) | Specifies object key name suffix on S3 bucket notifications. | `string` | `null` | no |
61-
| <a name="input_observe_customer"></a> [observe\_customer](#input\_observe\_customer) | Observe Customer ID | `string` | n/a | yes |
62-
| <a name="input_observe_domain"></a> [observe\_domain](#input\_observe\_domain) | Observe Domain | `string` | `null` | no |
61+
| <a name="input_observe_collection_endpoint"></a> [observe\_collection\_endpoint](#input\_observe\_collection\_endpoint) | Observe Collection Endpoint, e.g https://123456789012.collect.observeinc.com | `string` | n/a | yes |
6362
| <a name="input_observe_token"></a> [observe\_token](#input\_observe\_token) | Observe token | `string` | n/a | yes |
6463

6564
## Outputs

examples/s3_bucket/main.tf

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,10 @@ module "observe_s3_bucket" {
99
}
1010

1111
module "observe_lambda" {
12-
source = "../.."
13-
observe_customer = var.observe_customer
14-
observe_token = var.observe_token
15-
observe_domain = var.observe_domain
16-
name = random_pet.run.id
12+
source = "../.."
13+
observe_collection_endpoint = var.observe_collection_endpoint
14+
observe_token = var.observe_token
15+
name = random_pet.run.id
1716
}
1817

1918
module "observe_lambda_s3_subscription" {

examples/s3_bucket/variables.tf

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
variable "observe_customer" {
2-
description = "Observe Customer ID"
1+
variable "observe_collection_endpoint" {
2+
description = "Observe Collection Endpoint, e.g https://123456789012.collect.observeinc.com"
33
type = string
44
}
55

@@ -8,12 +8,6 @@ variable "observe_token" {
88
type = string
99
}
1010

11-
variable "observe_domain" {
12-
description = "Observe Domain"
13-
type = string
14-
default = null
15-
}
16-
1711
variable "bucket_count" {
1812
description = "Number of buckets to create and subscribe."
1913
type = number

0 commit comments

Comments
 (0)