From a414b46f8ce11bfcd0ff30e29787340259c0e06b Mon Sep 17 00:00:00 2001 From: John Dewey Date: Wed, 6 Nov 2024 10:25:35 -0800 Subject: [PATCH] reworked based on feedback --- .github/workflows/dev.yaml | 2 +- .github/workflows/prod.yaml | 2 +- README.md | 28 +++++----- cloud-native-iac/README.md | 21 ------- .../sensor/aws => cloudformation}/README.md | 13 +++-- .../autoscaling-sensor.yaml | 0 terraform/README.md | 55 +++++++------------ .../aws => aws-autoscaling-sensor}/README.md | 6 -- .../main.tf | 0 .../versions.tf | 0 .../aws => aws-cloud-enrichment}/README.md | 6 -- .../main.tf | 0 .../versions.tf | 0 .../README.md | 6 -- .../main.tf | 0 .../versions.tf | 0 .../azure => azure-scaleset-sensor}/README.md | 6 -- .../main.tf | 0 .../gcp => gcp-cloud-enrichment}/README.md | 6 -- .../main.tf | 0 .../versions.tf | 0 .../{sensor/gcp => gcp-mig-sensor}/README.md | 6 -- .../deployment => gcp-mig-sensor}/main.tf | 0 .../deployment => gcp-mig-sensor}/versions.tf | 0 terraform/integrations/README.md | 11 ++++ .../azure/examples/deployment/versions.tf | 16 ------ 26 files changed, 55 insertions(+), 129 deletions(-) delete mode 100644 cloud-native-iac/README.md rename {cloud-native-iac/sensor/aws => cloudformation}/README.md (86%) rename cloud-native-iac/sensor/aws/cfn.yaml => cloudformation/autoscaling-sensor.yaml (100%) rename terraform/{sensor/aws => aws-autoscaling-sensor}/README.md (65%) rename terraform/{sensor/aws/examples/deployment => aws-autoscaling-sensor}/main.tf (100%) rename terraform/{sensor/aws/examples/deployment => aws-autoscaling-sensor}/versions.tf (100%) rename terraform/{cloud-enrichment/aws => aws-cloud-enrichment}/README.md (67%) rename terraform/{cloud-enrichment/aws/examples/deployment => aws-cloud-enrichment}/main.tf (100%) rename terraform/{cloud-enrichment/aws/examples/deployment => aws-cloud-enrichment}/versions.tf (100%) rename terraform/{cloud-enrichment/azure => azure-cloud-enrichment}/README.md (68%) rename terraform/{cloud-enrichment/azure/examples/deployment => azure-cloud-enrichment}/main.tf (100%) rename terraform/{cloud-enrichment/azure/examples/deployment => azure-cloud-enrichment}/versions.tf (100%) rename terraform/{sensor/azure => azure-scaleset-sensor}/README.md (66%) rename terraform/{sensor/azure/examples/deployment => azure-scaleset-sensor}/main.tf (100%) rename terraform/{cloud-enrichment/gcp => gcp-cloud-enrichment}/README.md (67%) rename terraform/{cloud-enrichment/gcp/examples/deployment => gcp-cloud-enrichment}/main.tf (100%) rename terraform/{cloud-enrichment/gcp/examples/deployment => gcp-cloud-enrichment}/versions.tf (100%) rename terraform/{sensor/gcp => gcp-mig-sensor}/README.md (65%) rename terraform/{sensor/gcp/examples/deployment => gcp-mig-sensor}/main.tf (100%) rename terraform/{sensor/gcp/examples/deployment => gcp-mig-sensor}/versions.tf (100%) create mode 100644 terraform/integrations/README.md delete mode 100644 terraform/sensor/azure/examples/deployment/versions.tf diff --git a/.github/workflows/dev.yaml b/.github/workflows/dev.yaml index 5155edd..d38b22f 100644 --- a/.github/workflows/dev.yaml +++ b/.github/workflows/dev.yaml @@ -20,7 +20,7 @@ jobs: role-duration-seconds: 1200 - name: Push Files run: | - aws s3 cp cloud-native-iac/sensor/aws/*.yaml s3://${{ env.S3_BUCKET }} + aws s3 cp cloudformation/*.yaml s3://${{ env.S3_BUCKET }} permissions: id-token: write contents: read diff --git a/.github/workflows/prod.yaml b/.github/workflows/prod.yaml index ea298b9..a4b77dd 100644 --- a/.github/workflows/prod.yaml +++ b/.github/workflows/prod.yaml @@ -20,7 +20,7 @@ jobs: role-duration-seconds: 1200 - name: Push Files run: | - aws s3 cp cloud-native-iac/sensor/aws/*.yaml s3://${{ env.S3_BUCKET }} + aws s3 cp cloudformation/*.yaml s3://${{ env.S3_BUCKET }} permissions: id-token: write contents: read diff --git a/README.md b/README.md index 52611e4..cf4c51f 100644 --- a/README.md +++ b/README.md @@ -2,26 +2,28 @@ This repository provides sample configurations for deploying Corelight products across AWS, Azure, and Google Cloud Platform (GCP). The examples offer both -**Terraform-based** and **cloud-native IaC solutions**, allowing users to -choose based on their preferences and platform requirements. +**Terraform-based** and **native IaC solutions**, allowing users to choose +the approach that best fits their platform requirements and preferences. -## Directory Structure +## Directory Structure Overview -### `terraform/` +### `cloudformation/` -Contains **Terraform** modules for deploying Corelight products with consistent -configurations across multiple clouds. +This directory includes **AWS CloudFormation templates** for deploying Corelight +solutions within AWS environments using native AWS IaC. Each template provides +configurations tailored for Corelight. -- **`aws/`**: Terraform modules for AWS deployments. -- **`azure/`**: Terraform modules for Azure deployments. -- **`gcp/`**: Terraform modules for GCP deployments. +### `terraform/` -### `cloud-native-iac/` +The `terraform/` directory contains **Terraform modules** structured by cloud +provider. Each subdirectory under `terraform/` is organized by provider and +service, with individual `README.md` files for specific guidance on deploying +Corelight products within that cloud. -Includes cloud provider-native infrastructure-as-code (IaC) templates for deeper -integration with specific cloud services. +#### Integrations -- **`aws/`**: CloudFormation templates for AWS deployments. +Within `terraform/integrations/`, you’ll find subdirectories for integrating +Corelight products with partner solutions. ## License diff --git a/cloud-native-iac/README.md b/cloud-native-iac/README.md deleted file mode 100644 index 313e2de..0000000 --- a/cloud-native-iac/README.md +++ /dev/null @@ -1,21 +0,0 @@ -# Cloud-Native IaC - -This directory contains **cloud provider-native IaC templates** used to deploy -Corelight products across multiple cloud providers. These templates leverage -the native infrastructure-as-code tools for each platform, such as AWS -CloudFormation, Azure Resource Manager (ARM), and Google Deployment Manager. - -## Corelight Sensor - -Cloud-native templates for deploying Corelight Sensors in the following environments: - -- **AWS** - - - [CloudFormation Template](./sensor/aws/README.md) - - -## How to Use - -Navigate into the appropriate cloud provider's directory and follow the -instructions provided in the `README.md` for each module or template. Each -template aligns with the native IaC approach for the respective cloud platform. diff --git a/cloud-native-iac/sensor/aws/README.md b/cloudformation/README.md similarity index 86% rename from cloud-native-iac/sensor/aws/README.md rename to cloudformation/README.md index 79d65e2..0885f71 100644 --- a/cloud-native-iac/sensor/aws/README.md +++ b/cloudformation/README.md @@ -1,7 +1,12 @@ -# Corelight Sensor Deployment - AWS +# Corelight CloudFormation Templates -This directory provides Cloud Formation code for deploying Corelight's Sensor -on **AWS**. +This directory contains AWS CloudFormation templates for deploying Corelight +solutions within AWS environments. + +## Templates + +- **`autoscaling-sensor.yaml`**: Sets up an Auto Scaling group for Corelight Sensors, + enabling automatic scaling based on demand. ## Usage @@ -43,5 +48,3 @@ aws cloudformation update-stack --region \ ParameterKey=KeyPairName,ParameterValue= \ --template-body file://cfn.yaml ``` - -[awscli]: https://aws.amazon.com/cli/ diff --git a/cloud-native-iac/sensor/aws/cfn.yaml b/cloudformation/autoscaling-sensor.yaml similarity index 100% rename from cloud-native-iac/sensor/aws/cfn.yaml rename to cloudformation/autoscaling-sensor.yaml diff --git a/terraform/README.md b/terraform/README.md index 71e4fa2..90f5ded 100644 --- a/terraform/README.md +++ b/terraform/README.md @@ -1,43 +1,26 @@ # Terraform -This directory contains **Terraform** modules used to deploy Corelight products +This directory contains **Terraform** modules used to deploy Corelight solutions across multiple cloud providers. -## Corelight Sensor - -Terraform modules for deploying Corelight Sensors in the following cloud -environments: - -- **AWS** - - - [Terraform Module](./sensor/aws/README.md) - -- **Azure** - - - [Terraform Module](./sensor/azure/README.md) - -- **GCP** - - - [Terraform Module](./sensor/gcp/README.md) - -## Cloud Enrichment Service - -Modules for deploying Corelight's Cloud Enrichment services, enabling data -enrichment across cloud ecosystems: - -- **AWS** - - - [Terraform Module](./cloud-enrichment/aws/README.md) - -- **Azure** - - - [Terraform Module](./cloud-enrichment/azure/README.md) - -- **GCP** - - - [Terraform Module](./cloud-enrichment/gcp/README.md) +#### 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 cloud provider's directory and follow the -instructions provided in the `README.md` for each module. +Navigate into the appropriate directory and follow the instructions provided in +the `README.md` for each module. diff --git a/terraform/sensor/aws/README.md b/terraform/aws-autoscaling-sensor/README.md similarity index 65% rename from terraform/sensor/aws/README.md rename to terraform/aws-autoscaling-sensor/README.md index 5a7868b..7def6da 100644 --- a/terraform/sensor/aws/README.md +++ b/terraform/aws-autoscaling-sensor/README.md @@ -9,9 +9,3 @@ 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/ - -## Examples Directory - -The `examples/` directory demonstrates how to use the Terraform module with -various configurations. These examples showcase best practices and common -deployment scenarios. diff --git a/terraform/sensor/aws/examples/deployment/main.tf b/terraform/aws-autoscaling-sensor/main.tf similarity index 100% rename from terraform/sensor/aws/examples/deployment/main.tf rename to terraform/aws-autoscaling-sensor/main.tf diff --git a/terraform/sensor/aws/examples/deployment/versions.tf b/terraform/aws-autoscaling-sensor/versions.tf similarity index 100% rename from terraform/sensor/aws/examples/deployment/versions.tf rename to terraform/aws-autoscaling-sensor/versions.tf diff --git a/terraform/cloud-enrichment/aws/README.md b/terraform/aws-cloud-enrichment/README.md similarity index 67% rename from terraform/cloud-enrichment/aws/README.md rename to terraform/aws-cloud-enrichment/README.md index bdfd2a9..725e361 100644 --- a/terraform/cloud-enrichment/aws/README.md +++ b/terraform/aws-cloud-enrichment/README.md @@ -9,9 +9,3 @@ This deployment uses the [terraform-aws-enrichment][] module, which simplifies t setup of Corelight Cloud Enrichment by automating the provisioning of AWS resources. [terraform-aws-enrichment]: https://github.com/corelight/terraform-aws-enrichment/ - -## Examples Directory - -The `examples/` directory demonstrates how to use the Terraform module with -various configurations. These examples showcase best practices and common -deployment scenarios. diff --git a/terraform/cloud-enrichment/aws/examples/deployment/main.tf b/terraform/aws-cloud-enrichment/main.tf similarity index 100% rename from terraform/cloud-enrichment/aws/examples/deployment/main.tf rename to terraform/aws-cloud-enrichment/main.tf diff --git a/terraform/cloud-enrichment/aws/examples/deployment/versions.tf b/terraform/aws-cloud-enrichment/versions.tf similarity index 100% rename from terraform/cloud-enrichment/aws/examples/deployment/versions.tf rename to terraform/aws-cloud-enrichment/versions.tf diff --git a/terraform/cloud-enrichment/azure/README.md b/terraform/azure-cloud-enrichment/README.md similarity index 68% rename from terraform/cloud-enrichment/azure/README.md rename to terraform/azure-cloud-enrichment/README.md index c317189..c093332 100644 --- a/terraform/cloud-enrichment/azure/README.md +++ b/terraform/azure-cloud-enrichment/README.md @@ -9,9 +9,3 @@ This deployment uses the [terraform-azure-enrichment][] module, which simplifies setup of Corelight Cloud Enrichment by automating the provisioning of Azure resources. [terraform-azure-enrichment]: https://github.com/corelight/terraform-azure-enrichment/ - -## Examples Directory - -The `examples/` directory demonstrates how to use the Terraform module with -various configurations. These examples showcase best practices and common -deployment scenarios. diff --git a/terraform/cloud-enrichment/azure/examples/deployment/main.tf b/terraform/azure-cloud-enrichment/main.tf similarity index 100% rename from terraform/cloud-enrichment/azure/examples/deployment/main.tf rename to terraform/azure-cloud-enrichment/main.tf diff --git a/terraform/cloud-enrichment/azure/examples/deployment/versions.tf b/terraform/azure-cloud-enrichment/versions.tf similarity index 100% rename from terraform/cloud-enrichment/azure/examples/deployment/versions.tf rename to terraform/azure-cloud-enrichment/versions.tf diff --git a/terraform/sensor/azure/README.md b/terraform/azure-scaleset-sensor/README.md similarity index 66% rename from terraform/sensor/azure/README.md rename to terraform/azure-scaleset-sensor/README.md index 115b153..b016309 100644 --- a/terraform/sensor/azure/README.md +++ b/terraform/azure-scaleset-sensor/README.md @@ -9,9 +9,3 @@ This deployment uses the [terraform-azure-sensor][] module, which simplifies the setup of Corelight Sensors by automating the provisioning of AWS resources. [terraform-azure-sensor]: https://github.com/corelight/terraform-azure-sensor/ - -## Examples Directory - -The `examples/` directory demonstrates how to use the Terraform module with -various configurations. These examples showcase best practices and common -deployment scenarios. diff --git a/terraform/sensor/azure/examples/deployment/main.tf b/terraform/azure-scaleset-sensor/main.tf similarity index 100% rename from terraform/sensor/azure/examples/deployment/main.tf rename to terraform/azure-scaleset-sensor/main.tf diff --git a/terraform/cloud-enrichment/gcp/README.md b/terraform/gcp-cloud-enrichment/README.md similarity index 67% rename from terraform/cloud-enrichment/gcp/README.md rename to terraform/gcp-cloud-enrichment/README.md index f67298c..2649ed8 100644 --- a/terraform/cloud-enrichment/gcp/README.md +++ b/terraform/gcp-cloud-enrichment/README.md @@ -9,9 +9,3 @@ This deployment uses the [terraform-gcp-enrichment][] module, which simplifies t setup of Corelight Cloud Enrichment by automating the provisioning of GCP resources. [terraform-gcp-enrichment]: https://github.com/corelight/terraform-gcp-enrichment/ - -## Examples Directory - -The `examples/` directory demonstrates how to use the Terraform module with -various configurations. These examples showcase best practices and common -deployment scenarios. diff --git a/terraform/cloud-enrichment/gcp/examples/deployment/main.tf b/terraform/gcp-cloud-enrichment/main.tf similarity index 100% rename from terraform/cloud-enrichment/gcp/examples/deployment/main.tf rename to terraform/gcp-cloud-enrichment/main.tf diff --git a/terraform/cloud-enrichment/gcp/examples/deployment/versions.tf b/terraform/gcp-cloud-enrichment/versions.tf similarity index 100% rename from terraform/cloud-enrichment/gcp/examples/deployment/versions.tf rename to terraform/gcp-cloud-enrichment/versions.tf diff --git a/terraform/sensor/gcp/README.md b/terraform/gcp-mig-sensor/README.md similarity index 65% rename from terraform/sensor/gcp/README.md rename to terraform/gcp-mig-sensor/README.md index 7a0f33c..0f84bd4 100644 --- a/terraform/sensor/gcp/README.md +++ b/terraform/gcp-mig-sensor/README.md @@ -9,9 +9,3 @@ This deployment uses the [terraform-gcp-sensor][] module, which simplifies the setup of Corelight Sensors by automating the provisioning of AWS resources. [terraform-gcp-sensor]: https://github.com/corelight/terraform-gcp-sensor/ - -## Examples Directory - -The `examples/` directory demonstrates how to use the Terraform module with -various configurations. These examples showcase best practices and common -deployment scenarios. diff --git a/terraform/sensor/gcp/examples/deployment/main.tf b/terraform/gcp-mig-sensor/main.tf similarity index 100% rename from terraform/sensor/gcp/examples/deployment/main.tf rename to terraform/gcp-mig-sensor/main.tf diff --git a/terraform/sensor/gcp/examples/deployment/versions.tf b/terraform/gcp-mig-sensor/versions.tf similarity index 100% rename from terraform/sensor/gcp/examples/deployment/versions.tf rename to terraform/gcp-mig-sensor/versions.tf diff --git a/terraform/integrations/README.md b/terraform/integrations/README.md new file mode 100644 index 0000000..89962b3 --- /dev/null +++ b/terraform/integrations/README.md @@ -0,0 +1,11 @@ +# Integrations + +This directory contains Terraform modules designed to integrate Corelight +solutions with third-party platforms. + +## Available Integrations + +## How to Use + +Navigate into the appropriate directory and follow the instructions provided in +the `README.md` for each module. diff --git a/terraform/sensor/azure/examples/deployment/versions.tf b/terraform/sensor/azure/examples/deployment/versions.tf deleted file mode 100644 index 7a8b113..0000000 --- a/terraform/sensor/azure/examples/deployment/versions.tf +++ /dev/null @@ -1,16 +0,0 @@ -terraform { - required_version = ">=1.3.2" - - required_providers { - azurerm = { - source = "hashicorp/azurerm" - version = ">=3.97.1" - } - } -} - -provider "azurerm" { - features {} - subscription_id = local.subscription_id -} -