diff --git a/README.md b/README.md index d51c48c..ed3b3fb 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ essentialcontacts.googleapis.com |------|---------| | [terraform](#requirement\_terraform) | >= 0.14.0 | | [google](#requirement\_google) | >= 4.4.0 | -| [lacework](#requirement\_lacework) | ~> 1.0 | +| [lacework](#requirement\_lacework) | ~> 1.18 | | [time](#requirement\_time) | ~> 0.6 | ## Providers @@ -66,7 +66,7 @@ essentialcontacts.googleapis.com | Name | Version | |------|---------| | [google](#provider\_google) | >= 4.4.0 | -| [lacework](#provider\_lacework) | ~> 1.0 | +| [lacework](#provider\_lacework) | ~> 1.18 | | [random](#provider\_random) | n/a | | [time](#provider\_time) | ~> 0.6 | @@ -95,6 +95,7 @@ essentialcontacts.googleapis.com | [google_folders.my-org-folders](https://registry.terraform.io/providers/hashicorp/google/latest/docs/data-sources/folders) | data source | | [google_project.selected](https://registry.terraform.io/providers/hashicorp/google/latest/docs/data-sources/project) | data source | | [google_projects.my-org-projects](https://registry.terraform.io/providers/hashicorp/google/latest/docs/data-sources/projects) | data source | +| [lacework_metric_module.lwmetrics](https://registry.terraform.io/providers/lacework/lacework/latest/docs/data-sources/metric_module) | data source | ## Inputs diff --git a/main.tf b/main.tf index 72a938e..4263d4b 100644 --- a/main.tf +++ b/main.tf @@ -86,6 +86,10 @@ locals { ) : ( [] ) + + version_file = "${abspath(path.module)}/VERSION" + module_name = basename(abspath(path.module)) + module_version = fileexists(local.version_file) ? file(local.version_file) : "" } resource "random_id" "uniq" { @@ -212,3 +216,8 @@ resource "lacework_integration_gcp_cfg" "default" { } depends_on = [time_sleep.wait_time] } + +data "lacework_metric_module" "lwmetrics" { + name = local.module_name + version = local.module_version +} diff --git a/versions.tf b/versions.tf index 26a1722..186153d 100644 --- a/versions.tf +++ b/versions.tf @@ -6,7 +6,7 @@ terraform { time = "~> 0.6" lacework = { source = "lacework/lacework" - version = "~> 1.0" + version = "~> 1.18" } } }