Skip to content

Commit 45f4e2a

Browse files
chore: add lacework_metric_module datasource (#30)
Signed-off-by: Darren Murray <darren.murray@lacework.net>
1 parent c8cb93f commit 45f4e2a

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ A Terraform Module for configuring an integration with Lacework and AWS for Clou
1414
|------|---------|
1515
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.15.1 |
1616
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 3.0 |
17-
| <a name="requirement_lacework"></a> [lacework](#requirement\_lacework) | ~> 1.0 |
17+
| <a name="requirement_lacework"></a> [lacework](#requirement\_lacework) | ~> 1.18 |
1818
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 2.1 |
1919
| <a name="requirement_time"></a> [time](#requirement\_time) | ~> 0.6 |
2020

@@ -24,7 +24,7 @@ A Terraform Module for configuring an integration with Lacework and AWS for Clou
2424
|------|---------|
2525
| <a name="provider_aws.audit"></a> [aws.audit](#provider\_aws.audit) | >= 3.0 |
2626
| <a name="provider_aws.log_archive"></a> [aws.log\_archive](#provider\_aws.log\_archive) | >= 3.0 |
27-
| <a name="provider_lacework"></a> [lacework](#provider\_lacework) | ~> 1.0 |
27+
| <a name="provider_lacework"></a> [lacework](#provider\_lacework) | ~> 1.18 |
2828
| <a name="provider_random"></a> [random](#provider\_random) | >= 2.1 |
2929
| <a name="provider_time"></a> [time](#provider\_time) | ~> 0.6 |
3030

@@ -50,6 +50,7 @@ A Terraform Module for configuring an integration with Lacework and AWS for Clou
5050
| [aws_iam_policy_document.kms_decrypt](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |
5151
| [aws_iam_policy_document.read_logs](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |
5252
| [aws_organizations_organization.main](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/organizations_organization) | data source |
53+
| [lacework_metric_module.lwmetrics](https://registry.terraform.io/providers/lacework/lacework/latest/docs/data-sources/metric_module) | data source |
5354

5455
## Inputs
5556

main.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ locals {
99
iam_role_name = var.use_existing_iam_role ? var.iam_role_name : (
1010
length(var.iam_role_name) > 0 ? var.iam_role_name : "${var.prefix}-iam-${random_id.uniq.hex}"
1111
)
12+
version_file = "${abspath(path.module)}/VERSION"
13+
module_name = basename(abspath(path.module))
14+
module_version = fileexists(local.version_file) ? file(local.version_file) : ""
1215
}
1316

1417
data "aws_organizations_organization" "main" {
@@ -217,3 +220,8 @@ resource "lacework_integration_aws_ct" "default" {
217220

218221
depends_on = [time_sleep.wait_time]
219222
}
223+
224+
data "lacework_metric_module" "lwmetrics" {
225+
name = local.module_name
226+
version = local.module_version
227+
}

versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ terraform {
1111
time = "~> 0.6"
1212
lacework = {
1313
source = "lacework/lacework"
14-
version = "~> 1.0"
14+
version = "~> 1.18"
1515
}
1616
}
1717
}

0 commit comments

Comments
 (0)