Skip to content

Commit 0bd757a

Browse files
committed
Follow the official TF module structure
1 parent 89592fc commit 0bd757a

File tree

6 files changed

+15
-6
lines changed

6 files changed

+15
-6
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on: push
44

55
defaults:
66
run:
7-
working-directory: test
7+
working-directory: examples
88

99
jobs:
1010
check:

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
*.zip
55
*tfstate
66
*tfstate.backup
7-
test/functionbeat-*
7+
examples/functionbeat-*
88
*.lock.hcl
99
*.info
10+
functionbeat.yml

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ module "functionbeat" {
5151

5252
## Advanced example ##
5353

54-
Head over to `test/main.tf` to get an more advanced example.
54+
Head over to `example/main.tf` to get an more advanced example.
5555

5656
## Usage ##
5757

test/main.tf renamed to examples/main.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ resource "aws_subnet" "subnet" {
1919
}
2020
}
2121

22+
resource "aws_cloudwatch_log_group" "example_logs" {
23+
name = "MyExampleService"
24+
retention_in_days = 1
25+
}
26+
2227
resource "aws_security_group" "functionbeat_securitygroup" {
2328
name = "Functionbeat"
2429
vpc_id = aws_vpc.vpc.id
@@ -55,6 +60,8 @@ module "functionbeat" {
5560
}
5661
}
5762

63+
loggroup_name = aws_cloudwatch_log_group.example_logs.name
64+
5865
fb_extra_configuration = {
5966
fields = {
6067
env = "test",

functionbeat.tf renamed to main.tf

File renamed without changes.

variables.tf

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
# ================================== Required =====================================
22

33
variable "application_name" {
4-
type = string
54
description = "This value is added to any log in Kibana as a tag for filtering"
5+
type = string
66
}
77

88
variable "functionbeat_version" {
9+
description = "Funtionbeat version to deploy"
910
type = string
10-
description = "Funtionbeat version"
1111
}
1212

1313
variable "lambda_config" {
14+
description = "Minimal required configuration for Functionbeat lambda"
1415
type = object({
1516
name = string
1617
vpc_config = object({
@@ -57,7 +58,7 @@ variable "lambda_write_arn_to_ssm" {
5758
# ============================== Extra Functionbeat ===============================
5859

5960
variable "fb_extra_configuration" {
60-
description = "Tags to add to the resources"
61+
description = "All valid Functionbeat configuration passed as valid HCL object. For configuration options head over to Functionbeat documentation."
6162
type = any
6263
default = {}
6364
}

0 commit comments

Comments
 (0)