-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restructured repo and brought tf examples (#3)
* Restructured repo and brought tf examples * reworked based on feedback * corrected a few minor things per review --------- Co-authored-by: John Dewey <john.dewey@corelight.com>
- Loading branch information
Showing
24 changed files
with
811 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Terraform | ||
|
||
This directory contains **Terraform** modules used to deploy Corelight solutions | ||
across multiple cloud providers. | ||
|
||
#### Subdirectories | ||
|
||
- **`aws-autoscaling-sensor/`**: Contains Terraform files for deploying an | ||
autoscaling sensor within AWS, including `main.tf` and `versions.tf` files for configuration. | ||
- **`aws-cloud-enrichment/`**: A Terraform module for setting up cloud enrichment | ||
services on AWS. | ||
- **`azure-cloud-enrichment/`**: Module to configure cloud enrichment capabilities | ||
on Azure. | ||
- **`azure-scaleset-sensor/`**: Azure Terraform configuration to deploy Corelight | ||
sensors on a Virtual Machine Scale Set. | ||
- **`gcp-mig-sensor/`**: A Terraform module for deploying a sensor with GCP’s | ||
Managed Instance Groups (MIG). | ||
- **`gcp-cloud-enrichment/`**: GCP-specific Terraform module for configuring cloud | ||
enrichment services. | ||
- **`integrations/`**: Subdirectories for integrating Corelight products with | ||
partner solutions. | ||
|
||
## How to Use | ||
|
||
Navigate into the appropriate directory and follow the instructions provided in | ||
the `README.md` for each module. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Corelight Sensor Deployment - AWS | ||
|
||
This directory provides Terraform code for deploying Corelight's Cloud Sensor | ||
on **AWS**. | ||
|
||
## Overview | ||
|
||
This deployment uses the [terraform-aws-sensor][] module, which simplifies the | ||
setup of Corelight Sensors by automating the provisioning of AWS resources. | ||
|
||
[terraform-aws-sensor]: https://github.com/corelight/terraform-aws-sensor/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
locals { | ||
vpc_id = "<vpc where resources are deployed>" | ||
monitoring_subnet = "<monitoring subnet id>" | ||
management_subnet = "<management subnet id>" | ||
sensor_ssh_key_pair_name = "<name of the ssh key in AWS used to access the sensor EC2 instances>" | ||
sensor_ami_id = "<sensor ami id from Corelight>" | ||
license = "<your corelight sensor license key>" | ||
tags = { | ||
terraform : true, | ||
purpose : "Corelight" | ||
} | ||
fleet_token = "b1cd099ff22ed8a41abc63929d1db126" | ||
fleet_url = "https://fleet.example.com:1443/fleet/v1/internal/softsensor/websocket" | ||
} | ||
|
||
data "aws_subnet" "management" { | ||
id = local.management_subnet | ||
} | ||
|
||
module "asg_lambda_role" { | ||
source = "github.com/corelight/terraform-aws-sensor//modules/iam/lambda" | ||
|
||
lambda_cloudwatch_log_group_arn = module.sensor.cloudwatch_log_group_arn | ||
security_group_arn = module.sensor.management_security_group_arn | ||
sensor_autoscaling_group_name = module.sensor.autoscaling_group_name | ||
subnet_arn = data.aws_subnet.management.arn | ||
|
||
tags = local.tags | ||
} | ||
|
||
module "sensor" { | ||
source = "github.com/corelight/terraform-aws-sensor" | ||
|
||
auto_scaling_availability_zones = ["us-east-1a"] | ||
aws_key_pair_name = local.sensor_ssh_key_pair_name | ||
corelight_sensor_ami_id = local.sensor_ami_id | ||
license_key = local.license | ||
management_subnet_id = local.management_subnet | ||
monitoring_subnet_id = local.monitoring_subnet | ||
community_string = "<password for the sensor api>" | ||
vpc_id = local.vpc_id | ||
asg_lambda_iam_role_arn = module.asg_lambda_role.role_arn | ||
fleet_token = local.fleet_token | ||
fleet_url = local.fleet_url | ||
|
||
tags = local.tags | ||
} | ||
|
||
module "bastion" { | ||
source = "github.com/corelight/terraform-aws-sensor//modules/bastion" | ||
|
||
bastion_key_pair_name = "<AWS ssh key pair name for the bastion host>" | ||
subnet_id = data.aws_subnet.management.id | ||
management_security_group_id = module.sensor.management_security_group_id | ||
vpc_id = local.vpc_id | ||
public_ssh_allow_cidr_blocks = ["0.0.0.0/0"] | ||
|
||
tags = local.tags | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
terraform { | ||
required_version = ">=1.3.2" | ||
|
||
required_providers { | ||
aws = { | ||
source = "hashicorp/aws" | ||
version = ">= 5" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Corelight Cloud Enrichment Service Deployment - AWS | ||
|
||
This directory provides Terraform code for deploying Corelight's Cloud Enrichment | ||
on **AWS**. | ||
|
||
## Overview | ||
|
||
This deployment uses the [terraform-aws-enrichment][] module, which simplifies the | ||
setup of Corelight Cloud Enrichment by automating the provisioning of AWS resources. | ||
|
||
[terraform-aws-enrichment]: https://github.com/corelight/terraform-aws-enrichment/ |
Oops, something went wrong.