Skip to content

Commit 3be9a25

Browse files
committed
CAT-23836 Added log_delivery_configuration
1 parent e6efddf commit 3be9a25

18 files changed

+362
-0
lines changed

examples/logs-cloudwatch/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
backend.tf
2+
provider.tf

examples/logs-cloudwatch/.terraform.lock.hcl

Lines changed: 23 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/logs-cloudwatch/main.tf

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module "redis" {
2+
source = "../.."
3+
4+
create_dns = false
5+
create_log_group = true
6+
7+
organization = var.organization
8+
environment = var.environment
9+
product = var.product
10+
repo = var.repo
11+
}

examples/logs-cloudwatch/outputs.tf

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
output "name" {
2+
description = "The name of the ElastiCache replication group"
3+
value = module.redis.name
4+
}
5+
6+
output "arn" {
7+
description = "The ARN of the ElastiCache replication group"
8+
value = module.redis.arn
9+
}
10+
11+
output "sg_ids" {
12+
description = "The security group ids"
13+
value = module.redis.sg_ids
14+
}
15+
16+
output "engine_version_actual" {
17+
description = "Because ElastiCache pulls the latest minor or patch for a version, this attribute returns the running version of the cache engine."
18+
value = module.redis.engine_version_actual
19+
}
20+
21+
output "member_clusters" {
22+
description = "Identifiers of all the nodes that are part of this replication group."
23+
value = module.redis.member_clusters
24+
}
25+
26+
output "primary_endpoint_address" {
27+
description = "Address of the endpoint for the primary node in the replication group."
28+
value = module.redis.primary_endpoint_address
29+
}
30+
31+
output "reader_endpoint_address" {
32+
description = "Address of the endpoint for the reader node in the replication group."
33+
value = module.redis.reader_endpoint_address
34+
}
35+
36+
output "tags" {
37+
description = "The tags"
38+
value = module.redis.tags
39+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# terraform {
2+
# backend "s3" {
3+
# bucket = "my-bucket-tfstate"
4+
# key = "example-terraform-aws-elasticache-redis-standalone-no-dns"
5+
# profile = "my-profile"
6+
# region = "us-east-1"
7+
# dynamodb_table = "terraform-lock"
8+
# }
9+
# }
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# provider "aws" {
2+
# region = "us-east-1"
3+
# profile = "my-profile"
4+
# default_tags {
5+
# tags = {
6+
# product = var.product
7+
# environment = var.environment
8+
# repo = var.repo
9+
# organization = var.organization
10+
# }
11+
# }
12+
# }

examples/logs-cloudwatch/tags.tf

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
variable "environment" {
2+
description = "Environment (sharedtools, dev, staging, prod)"
3+
type = string
4+
5+
default = "sharedtools"
6+
7+
validation {
8+
condition = contains(["sharedtools", "dev", "staging", "prod"], var.environment)
9+
error_message = "The environment variable must be one of [sharedtools, dev, staging, prod]."
10+
}
11+
}
12+
13+
variable "product" {
14+
description = "Tag used to group resources according to application"
15+
16+
default = "ex-tf-redis-no-dns"
17+
18+
validation {
19+
condition = can(regex("[a-z\\-]+", var.product))
20+
error_message = "The product variable violates approved regex."
21+
}
22+
}
23+
24+
variable "repo" {
25+
description = "Tag used to point to the repo using this module"
26+
27+
default = "https://github.com/pbs/terraform-elasticache-redis-standalone-module.git"
28+
29+
validation {
30+
condition = can(regex("(?:git|ssh|https?|git@[-\\w.]+):(\\/\\/)?(.*?)(\\.git)(\\/?|\\#[-\\d\\w._]+?)$", var.repo))
31+
error_message = "The repo variable violates approved regex."
32+
}
33+
}
34+
35+
variable "organization" {
36+
description = "Organization using this module. Used to prefix tags so that they are easily identified as being from your organization"
37+
type = string
38+
39+
default = "example"
40+
41+
validation {
42+
condition = can(regex("[a-z\\-]+", var.organization))
43+
error_message = "The organization variable violates approved regex."
44+
}
45+
}

examples/logs-kinesis/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
backend.tf
2+
provider.tf

examples/logs-kinesis/.terraform.lock.hcl

Lines changed: 23 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/logs-kinesis/main.tf

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
module "redis" {
2+
source = "../.."
3+
4+
create_dns = false
5+
log_destination = "some-kinesis-stream-name"
6+
log_destination_type = "kinesis-firehose"
7+
log_format = "json"
8+
log_type = "engine-log"
9+
10+
organization = var.organization
11+
environment = var.environment
12+
product = var.product
13+
repo = var.repo
14+
}

0 commit comments

Comments
 (0)