Skip to content

Commit

Permalink
Automated Release - 2024-07-28 22:51:05 (#41)
Browse files Browse the repository at this point in the history
* 初回だけエラーが発生するようなので、再度実行してい見る
InvalidParameterException: Unable to assume the service linked role. Please verify that the ECS service linked role exists

* serviceロール名を変更

* policyも自前で作成

* iam_roleを追加

* 一度リソースを削除してみる

* ストリームの構成を変更

* タグを共通化

* タグの定義参照をリバイス

* バケット定義を追加

* ECSタスクの修正

* ECSタスクの修正

* kinesisの定義修正

* 一旦firehoseを除外

* ecs定義の再修正

* main.tfのフォーマット修正

* ECSの定義を再修正

* ネットワーク設定を変更

* ECS定義修正

* ECS定義修正

* ECSタスク修正

* メモリ、CPUの指定を元に戻す

* container nameを修正

* ネットワーク設定を追加、ポートを動的に割当

* logdriverの設定を追加

* log groupを作成

* タスクを停止した際の強制デプロイオプションを追加

* initial commit

* 既存のストリームを使用するよう修正

* 出力も変更

---------

Co-authored-by: XxxKMSxxX <[email protected]>
Co-authored-by: k6s <[email protected]>
  • Loading branch information
3 people authored Jul 28, 2024
1 parent fe8715e commit f5f2d3a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
17 changes: 4 additions & 13 deletions modules/firehose/main.tf
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
resource "aws_kinesis_stream" "kinesis_stream" {
name = var.stream_name
shard_count = 1
retention_period = 24

tags = var.tags
data "aws_kinesis_stream" "existing_kinesis_stream" {
name = var.stream_name
}

resource "aws_kinesis_firehose_delivery_stream" "extended_s3_stream" {
name = "${var.project_name}-kinesis-firehose-extended-s3-stream"
destination = "extended_s3"

kinesis_source_configuration {
kinesis_stream_arn = aws_kinesis_stream.kinesis_stream.arn
kinesis_stream_arn = data.aws_kinesis_stream.existing_kinesis_stream.arn
role_arn = aws_iam_role.firehose_role.arn
}

Expand Down Expand Up @@ -153,11 +149,6 @@ resource "aws_s3_bucket" "bucket" {
bucket = "${var.project_name}-collector"
}

resource "aws_s3_bucket_acl" "bucket_acl" {
bucket = aws_s3_bucket.bucket.id
acl = "private"
}

data "aws_iam_policy_document" "firehose_assume_role" {
statement {
effect = "Allow"
Expand Down Expand Up @@ -202,7 +193,7 @@ resource "aws_iam_role_policy" "firehose_policy" {
"kinesis:GetShardIterator",
"kinesis:GetRecords"
],
Resource = aws_kinesis_stream.kinesis_stream.arn
Resource = data.aws_kinesis_stream.existing_kinesis_stream.arn
},
{
Effect = "Allow",
Expand Down
2 changes: 1 addition & 1 deletion modules/firehose/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ output "firehose_role_arn" {

output "kinesis_stream_arn" {
description = "The ARN of the Kinesis Stream used as the source"
value = aws_kinesis_stream.kinesis_stream.arn
value = data.aws_kinesis_stream.existing_kinesis_stream.arn
}

0 comments on commit f5f2d3a

Please sign in to comment.