Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ap3 region to shipper and archive integrations #176

Merged
merged 2 commits into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Changelog

## v1.0.106
#### **msk-data-stream**
### 💡 Enhancements
- Update coralogix role from `arn:aws:iam::<account-id>:role/msk-access-<region>` to `arn:aws:iam::<account-id>:role/coralogix-archive-<region>`
- allow the module to run in AP3 region

#### **coralogix-aws-shipper**
### 💡 Enhancements
- Allow the module to be deployed in AP3

#### **S3-archive**
### 💡 Enhancements
- Allow the module to be deployed in ap-southeast-3 region


## v1.0.105
#### **firehose-metrics**
### 💡 Enhancements
Expand Down
4 changes: 2 additions & 2 deletions examples/coralogix-aws-shipper/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ variable "coralogix_region" {
description = "The Coralogix location region, possible options are [EU1, EU2, AP1, AP2, US1, US2]"
type = string
validation {
condition = contains(["EU1", "EU2", "AP1", "AP2", "US1", "US2", "Custom"], var.coralogix_region)
error_message = "The coralogix region must be one of these values: [EU1, EU2, AP1, AP2, US1, US2, Custom]."
condition = contains(["EU1", "EU2", "AP1", "AP2", "AP3", "US1", "US2", "Custom"], var.coralogix_region)
error_message = "The coralogix region must be one of these values: [EU1, EU2, AP1, AP2, AP3, US1, US2, Custom]."
}
}

Expand Down
4 changes: 4 additions & 0 deletions examples/msk-data-stream/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ output "security_group_id" {
output "cluster_arn" {
value = aws_msk_cluster.coralogix-msk-cluster.arn
}

output "msk_public_brokesrs" {
value = data.aws_msk_cluster.msk_public_brokers.bootstrap_brokers_public_sasl_iam
}
17 changes: 2 additions & 15 deletions examples/msk-data-stream/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ variable "aws_region" {
type = string
description = "The AWS region that you want to create the MSK in, Must be the same as the AWS region where your coralogix account is set"
validation {
condition = contains(["eu-west-1", "eu-north-1", "ap-southeast-1", "ap-south-1", "us-east-2", "us-west-2", "custom"], var.aws_region)
error_message = "The aws region must be one of these values: [eu-west-1, eu-north-1, ap-southeast-1, ap-south-1, us-east-2, us-west-2, custom]."
condition = contains(["eu-west-1", "eu-north-1", "ap-southeast-1", "ap-southeast-3", "ap-south-1", "us-east-2", "us-west-2", "custom"], var.aws_region)
error_message = "The aws region must be one of these values: [eu-west-1, eu-north-1, ap-southeast-1, ap-southeast-3, ap-south-1, us-east-2, us-west-2, custom]."
}
}

Expand Down Expand Up @@ -43,16 +43,3 @@ variable "custom_coralogix_arn" {
default = null

}

variable "coraloigx_roles_arn_mapping" {
type = map
default = {
"eu-west-1" = "arn:aws:iam::625240141681:role/msk-access-eu1"
"eu-north-1" = "arn:aws:iam::625240141681:role/msk-access-eu2"
"ap-southeast-1" = "arn:aws:iam::625240141681:role/msk-access-ap2"
"ap-south-1" = "arn:aws:iam::625240141681:role/msk-access-ap1"
"us-east-2" = "arn:aws:iam::625240141681:role/msk-access-us1"
"us-west-2" = "arn:aws:iam::739076534691:role/msk-access-us2"
"custom" = ""
}
}
4 changes: 2 additions & 2 deletions examples/s3-archive/varibales.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ variable "aws_region" {
description = "The AWS region that you want to create the S3 bucket, Must be the same as the AWS region where your coralogix account is set"
default = ""
validation {
condition = contains(["eu-west-1", "eu-north-1", "ap-southeast-1", "ap-south-1", "us-east-2", "us-west-2", ""], var.aws_region)
error_message = "The aws region must be one of these values: [eu-west-1, eu-north-1, ap-southeast-1, ap-south-1, us-east-2, us-west-2]."
condition = contains(["eu-west-1", "eu-north-1", "ap-southeast-1", "ap-southeast-3", "ap-south-1", "us-east-2", "us-west-2", ""], var.aws_region)
error_message = "The aws region must be one of these values: [eu-west-1, eu-north-1, ap-southeast-1, ap-southeast-3, ap-south-1, us-east-2, us-west-2]."
}
}

Expand Down
2 changes: 1 addition & 1 deletion modules/coralogix-aws-shipper/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ If you want to avoid this issue, you can deploy in other ways:

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_coralogix_region"></a> [coralogix\_region](#input\_coralogix\_region) | The Coralogix location region, possible options are [`EU1`, `EU2`, `AP1`, `AP2`, `US1`, `US2`, `Custom`] | `string` | n/a | yes |
| <a name="input_coralogix_region"></a> [coralogix\_region](#input\_coralogix\_region) | The Coralogix location region, possible options are [`EU1`, `EU2`, `AP1`, `AP2`, `AP3`, `US1`, `US2`, `Custom`] | `string` | n/a | yes |
| <a name="input_custom_domain"></a> [custom_domain](#input\_custom\_domain) | If you choose a custom domain name for your private cluster, Coralogix will send telemetry from the specified address (e.g. custom.coralogix.com) there is no need to add `ingress.` to the domain .| `string` | n/a | no |
| <a name="input_integration_type"></a> [integration_type](#input\_data\_type) | Choose the AWS service that you wish to integrate with Coralogix. Can be one of: S3, CloudTrail, VpcFlow, CloudWatch, S3Csv, SNS, SQS, Kinesis, CloudFront, MSK, Kafka, EcrScan. | `string` | n/a | yes |
| <a name="input_api_key"></a> [api\_key](#input\_api_\_key) | The Coralogix Send Your Data - [API Key](https://coralogix.com/docs/send-your-data-api-key/) validates your authenticity. This value can be a direct Coralogix API Key or an AWS Secret Manager ARN containing the API Key.| `string` | n/a | yes |
Expand Down
4 changes: 2 additions & 2 deletions modules/coralogix-aws-shipper/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ variable "coralogix_region" {
description = "The Coralogix location region, possible options are [EU1, EU2, AP1, AP2, US1, US2]"
type = string
validation {
condition = contains(["EU1", "EU2", "AP1", "AP2", "US1", "US2", "Custom"], var.coralogix_region)
error_message = "The coralogix region must be one of these values: [EU1, EU2, AP1, AP2, US1, US2, Custom]."
condition = contains(["EU1", "EU2", "AP1", "AP2", "AP3", "US1", "US2", "Custom"], var.coralogix_region)
error_message = "The coralogix region must be one of these values: [EU1, EU2, AP1, AP2, AP3, US1, US2, Custom]."
}
}

Expand Down
2 changes: 2 additions & 0 deletions modules/locals_variables/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ locals {
Singapore = "ingress.coralogixsg.com"
US = "ingress.coralogix.us"
US2 = "ingress.cx498.coralogix.com"
AP3 = "ap3.coralogix.com"
}

coralogix_domains = {
Expand All @@ -22,6 +23,7 @@ locals {
US = "coralogix.us"
US1 = "coralogix.us"
US2 = "cx498.coralogix.com"
AP3 = "ap3.coralogix.com"
}

coralogix_url_seffix = "/api/v1/logs"
Expand Down
5 changes: 4 additions & 1 deletion modules/provisioning/msk-data-stream/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -198,4 +198,7 @@ resource "null_resource" "enable-msk-public-access" {
}
}


data "aws_msk_cluster" "msk_public_brokers" {
depends_on = [ null_resource.enable-msk-public-access ]
cluster_name = var.cluster_name == "coralogix-msk-cluster" ? "coralogix-msk-cluster-${random_string.unique.result}" : var.cluster_name
}
4 changes: 4 additions & 0 deletions modules/provisioning/msk-data-stream/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,8 @@ output "security_group_id" {

output "cluster_arn" {
value = aws_msk_cluster.coralogix-msk-cluster.arn
}

output "msk_public_brokesrs" {
value = data.aws_msk_cluster.msk_public_brokers.bootstrap_brokers_public_sasl_iam
}
17 changes: 9 additions & 8 deletions modules/provisioning/msk-data-stream/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ variable "aws_region" {
type = string
description = "The AWS region that you want to create the MSK in, Must be the same as the AWS region where your coralogix account is set"
validation {
condition = contains(["eu-west-1", "eu-north-1", "ap-southeast-1", "ap-south-1", "us-east-2", "us-west-2", "custom"], var.aws_region)
error_message = "The aws region must be one of these values: [eu-west-1, eu-north-1, ap-southeast-1, ap-south-1, us-east-2, us-west-2, custom]."
condition = contains(["eu-west-1", "eu-north-1", "ap-southeast-1","ap-southeast-3", "ap-south-1", "us-east-2", "us-west-2", "custom"], var.aws_region)
error_message = "The aws region must be one of these values: [eu-west-1, eu-north-1, ap-southeast-1, ap-southeast-3, ap-south-1, us-east-2, us-west-2, custom]."
}
}

Expand Down Expand Up @@ -47,12 +47,13 @@ variable "custom_coralogix_arn" {
variable "coraloigx_roles_arn_mapping" {
type = map
default = {
"eu-west-1" = "arn:aws:iam::625240141681:role/msk-access-eu1"
"eu-north-1" = "arn:aws:iam::625240141681:role/msk-access-eu2"
"ap-southeast-1" = "arn:aws:iam::625240141681:role/msk-access-ap2"
"ap-south-1" = "arn:aws:iam::625240141681:role/msk-access-ap1"
"us-east-2" = "arn:aws:iam::625240141681:role/msk-access-us1"
"us-west-2" = "arn:aws:iam::739076534691:role/msk-access-us2"
"eu-west-1" = "arn:aws:iam::625240141681:role/coralogix-archive-eu1"
"eu-north-1" = "arn:aws:iam::625240141681:role/coralogix-archive-eu2"
"ap-southeast-1" = "arn:aws:iam::625240141681:role/coralogix-archive-ap2"
"ap-south-1" = "arn:aws:iam::625240141681:role/coralogix-archive-ap1"
"us-east-2" = "arn:aws:iam::625240141681:role/coralogix-archive-us1"
"us-west-2" = "arn:aws:iam::739076534691:role/coralogix-archive-us2"
"ap-southeast-3" = "arn:aws:iam::025066248247:role/coralogix-archive-ap3"
"custom" = ""
}
}
4 changes: 2 additions & 2 deletions modules/provisioning/s3-archive/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

The module s3-archive will create s3 buckets to archive your coralogix logs and metrics

The module can run only on the following regions eu-west-1,eu-north-1,ap-southeast-1,ap-south-1,us-east-2.
The module can run only on the following regions eu-west-1,eu-north-1,ap-southeast-1,ap-southeast-3,ap-south-1,us-east-2.

## Requirements

Expand All @@ -19,7 +19,7 @@ The module can run only on the following regions eu-west-1,eu-north-1,ap-southea

| Variable name | Description | Type | Default | Required |
|------|-------------|------|------|:--------:|
| aws_region | The AWS region that you want to create the S3 bucket, Must be the same as the AWS region where your [coralogix account](https://coralogix.com/docs/coralogix-domain/) is set. Allowd values: eu-west-1, eu-north-1, ap-southeast-1, ap-south-1, us-east-2, us-west-2 | `string` | n/a | :heavy_check_mark: |
| aws_region | The AWS region that you want to create the S3 bucket, Must be the same as the AWS region where your [coralogix account](https://coralogix.com/docs/coralogix-domain/) is set. Allowd values: eu-west-1, eu-north-1, ap-southeast-1,ap-southeast-1, ap-south-1, us-east-2, us-west-2 | `string` | n/a | :heavy_check_mark: |
| logs_bucket_name | The name of the S3 bucket to create for the logs archive (Leave empty if not needed), Note: bucket name must follow [AWS naming rules](https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html) | `string` | n/a | |
| metrics_bucket_name | The name of the S3 bucket to create for the metrics archive (Leave empty if not needed), Note: bucket name must follow [AWS naming rules](https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html) | `string` | n/a | |
| logs_kms_arn | The arn of your kms for the logs bucket , Note: make sure that the kms is in the same region as your bucket | `string` | n/a | |
Expand Down
6 changes: 4 additions & 2 deletions modules/provisioning/s3-archive/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ variable "aws_region" {
description = "The AWS region that you want to create the S3 bucket, Must be the same as the AWS region where your coralogix account is set"
default = ""
validation {
condition = contains(["eu-west-1", "eu-north-1", "ap-southeast-1", "ap-south-1", "us-east-2", "us-west-2", ""], var.aws_region)
error_message = "The aws region must be one of these values: [eu-west-1, eu-north-1, ap-southeast-1, ap-south-1, us-east-2, us-west-2]."
condition = contains(["eu-west-1", "eu-north-1", "ap-southeast-1", "ap-southeast-3", "ap-south-1", "us-east-2", "us-west-2", ""], var.aws_region)
error_message = "The aws region must be one of these values: [eu-west-1, eu-north-1, ap-southeast-1, ap-southeast-3, ap-south-1, us-east-2, us-west-2]."
}
}

Expand All @@ -26,6 +26,7 @@ variable "coralogix_arn_mapping" {
"eu-west-1" = "625240141681"
"eu-north-1" = "625240141681"
"ap-southeast-1" = "625240141681"
"ap-southeast-3" = "025066248247"
"ap-south-1" = "625240141681"
"us-east-2" = "625240141681"
"us-west-2" = "739076534691"
Expand Down Expand Up @@ -66,6 +67,7 @@ variable "aws_role_region" {
"ap-south-1"="ap1"
"us-east-2"="us1"
"us-west-2"="us2"
"ap-southeast-3"="ap3"
}
}

Loading