Skip to content

Commit

Permalink
Merge branch 'feature/create-pipeline' of https://github.com/XxxKMSxx…
Browse files Browse the repository at this point in the history
…X/Cryptra-Infra into feature/create-pipeline
  • Loading branch information
XxxKMSxxX committed Jul 28, 2024
2 parents 6e5736c + 1d4db86 commit 0cb85e0
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 0 deletions.
19 changes: 19 additions & 0 deletions environments/prod/tokyo/firehose/terragrunt.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
include "root" {
path = find_in_parent_folders()
expose = true
merge_strategy = "deep"
}

terraform {
source = "../../../../modules/firehose"
}

inputs = {
project_name = include.root.locals.conf.project_name
stream_name = "${include.root.locals.conf.project_name}-collector"
role_arn = "arn:aws:iam::123456789012:role/FirehoseDeliveryRole"
bucket_arn = "arn:aws:s3:::${include.root.locals.conf.project_name}-collector"
s3_prefix = "firehose"
environment = "prod"
tags = include.root.locals.tags
}
10 changes: 10 additions & 0 deletions modules/firehose/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
resource "aws_kinesis_firehose_delivery_stream" "this" {
name = var.stream_name
destination = "s3"

s3_configuration {
role_arn = var.role_arn
bucket_arn = var.bucket_arn
prefix = var.s3_prefix
}
}
7 changes: 7 additions & 0 deletions modules/firehose/outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
output "firehose_arn" {
value = aws_kinesis_firehose_delivery_stream.this.arn
}

output "firehose_name" {
value = aws_kinesis_firehose_delivery_stream.this.name
}
26 changes: 26 additions & 0 deletions modules/firehose/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
variable "stream_name" {
description = "The name of the Firehose stream"
type = string
}

variable "role_arn" {
description = "The ARN of the IAM role for Firehose"
type = string
}

variable "bucket_arn" {
description = "The ARN of the S3 bucket for Firehose to deliver data"
type = string
}

variable "s3_prefix" {
description = "The prefix for the S3 bucket"
type = string
default = ""
}

variable "tags" {
description = "A map of tags to assign to the repository"
type = map(string)
default = {}
}

0 comments on commit 0cb85e0

Please sign in to comment.