Skip to content

Commit

Permalink
Use community_string variable for consistency (#3)
Browse files Browse the repository at this point in the history
Co-authored-by: John Dewey <john.dewey@corelight.com>
  • Loading branch information
retr0h and John Dewey authored Jun 5, 2024
1 parent 6b1e567 commit 44f48de
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module "sensor" {
virtual_network_resource_group = "<virtual network resource group>"
virtual_network_address_space = "<virtual network address space (CIDR) used to create subnet>"
corelight_sensor_image_id = "<image resource id from Corelight>"
sensor_api_password = "<password for the sensor api>"
community_string = "<the community string (api string) often times referenced by Fleet>"
sensor_ssh_public_key = "<path to ssh public key>"
# (Optional) Cloud Enrichment Variables
Expand Down
6 changes: 3 additions & 3 deletions data.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ data "cloudinit_config" "config" {
content_type = "text/cloud-config"
content = templatefile("${path.module}/templates/sensor_init.tpl",
{
api_password = var.sensor_api_password
api_password = var.community_string
sensor_license = var.license_key
mgmt_int = "eth0"
mon_int = "eth1"
Expand All @@ -24,7 +24,7 @@ data "cloudinit_config" "config_with_enrichment" {
content_type = "text/cloud-config"
content = templatefile("${path.module}/templates/sensor_init_with_enrichment.tpl",
{
api_password = var.sensor_api_password
api_password = var.community_string
sensor_license = var.license_key
mgmt_int = "eth0"
mon_int = "eth1"
Expand All @@ -34,4 +34,4 @@ data "cloudinit_config" "config_with_enrichment" {
)
filename = "sensor-build.yaml"
}
}
}
2 changes: 1 addition & 1 deletion examples/deployment/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ module "sensor" {
virtual_network_resource_group = "<vnet resource group>"
virtual_network_address_space = "<vnet address space (CIDR)>"
corelight_sensor_image_id = "<image resource id from Corelight>"
sensor_api_password = "<password for the sensor api>"
community_string = "<the community string (api string) often times referenced by Fleet>"
sensor_ssh_public_key = "<path to ssh public key>"

# (Optional) Cloud Enrichment Variables
Expand Down
8 changes: 4 additions & 4 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ variable "corelight_sensor_image_id" {
type = string
}

variable "sensor_api_password" {
description = "The password that should be used for the Corelight sensor API"
sensitive = true
variable "community_string" {
type = string
sensitive = true
description = "the community string (api string) often times referenced by Fleet"
}

variable "sensor_ssh_public_key" {
Expand Down Expand Up @@ -165,4 +165,4 @@ variable "tags" {
description = "Any tags that should be applied to resources deployed by the module"
type = object({})
default = {}
}
}

0 comments on commit 44f48de

Please sign in to comment.