Skip to content
Open
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
9 changes: 9 additions & 0 deletions dev-team-account/guardduty-detector/backend.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
terraform {
backend "s3" {
bucket = "cloudfence-dev-state"
key = "guardduty-detector/guardduty.tfstate"
region = "ap-northeast-2"
encrypt = true
dynamodb_table = "guardduty-dev-lock"
}
}
17 changes: 17 additions & 0 deletions dev-team-account/guardduty-detector/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
}
}
}

provider "aws" {
alias = "operation"
region = "ap-northeast-2"
}

module "guardduty-detector" {
source = "../../modules/guardduty-detector"
enable = true
}
3 changes: 2 additions & 1 deletion dev-team-account/state/dynamodb/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ locals {
"ssm",
"cloudwatch",
"dynamodb",
"s3"
"s3",
"guardduty"
]
}

Expand Down
9 changes: 9 additions & 0 deletions identity-team-account/guardduty-detector/backend.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
terraform {
backend "s3" {
bucket = "cloudfence-identity-state"
key = "guardduty-detector/guardduty.tfstate"
region = "ap-northeast-2"
encrypt = true
dynamodb_table = "guardduty-identity-lock"
}
}
17 changes: 17 additions & 0 deletions identity-team-account/guardduty-detector/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
}
}
}

provider "aws" {
alias = "operation"
region = "ap-northeast-2"
}

module "guardduty-detector" {
source = "../../modules/guardduty-detector"
enable = true
}
3 changes: 2 additions & 1 deletion identity-team-account/state/dynamodb/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ locals {
"ssoadmin",
"identitystore",
"dynamodb",
"s3"
"s3",
"guardduty"
]
}

Expand Down
9 changes: 9 additions & 0 deletions management-team-account/guardduty-detector/backend.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
terraform {
backend "s3" {
bucket = "cloudfence-management-state"
key = "guardduty-detector/guardduty.tfstate"
region = "ap-northeast-2"
encrypt = true
dynamodb_table = "guardduty-management-lock"
}
}
17 changes: 17 additions & 0 deletions management-team-account/guardduty-detector/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
}
}
}

provider "aws" {
alias = "operation"
region = "ap-northeast-2"
}

module "guardduty-detector" {
source = "../../modules/guardduty-detector"
enable = true
}
3 changes: 2 additions & 1 deletion management-team-account/state/dynamodb/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ locals {
resources = [
"cloudtrail",
"dynamodb",
"s3"
"s3",
"guardduty"
]
}

Expand Down
3 changes: 3 additions & 0 deletions modules/guardduty-detector/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
resource "aws_guardduty_detector" "this" {
enable = var.enable
}
4 changes: 4 additions & 0 deletions modules/guardduty-detector/outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
output "guardduty_detector_id" {
description = "The ID of the GuardDuty detector"
value = aws_guardduty_detector.this.id
}
5 changes: 5 additions & 0 deletions modules/guardduty-detector/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
variable "enable" {
type = bool
description = "Whether to enable GuardDuty"
default = true
}
9 changes: 9 additions & 0 deletions operation-team-account/guardduty-detector/backend.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
terraform {
backend "s3" {
bucket = "cloudfence-operation-state"
key = "guardduty-detector/guardduty.tfstate"
region = "ap-northeast-2"
encrypt = true
dynamodb_table = "guardduty-operation-lock"
}
}
17 changes: 17 additions & 0 deletions operation-team-account/guardduty-detector/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
}
}
}

provider "aws" {
alias = "operation"
region = "ap-northeast-2"
}

module "guardduty-detector" {
source = "../../modules/guardduty-detector"
enable = true
}
3 changes: 2 additions & 1 deletion operation-team-account/state/dynamodb/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ locals {
"eventbridge",
"lambda",
"dynamodb",
"s3"
"s3",
"guardduty"
]
}

Expand Down
9 changes: 9 additions & 0 deletions prod-team-account/guardduty-detector/backend.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
terraform {
backend "s3" {
bucket = "cloudfence-prod-state"
key = "guardduty-detector/guardduty.tfstate"
region = "ap-northeast-2"
encrypt = true
dynamodb_table = "guardduty-prod-lock"
}
}
17 changes: 17 additions & 0 deletions prod-team-account/guardduty-detector/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
}
}
}

provider "aws" {
alias = "operation"
region = "ap-northeast-2"
}

module "guardduty-detector" {
source = "../../modules/guardduty-detector"
enable = true
}
3 changes: 2 additions & 1 deletion prod-team-account/state/dynamodb/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ locals {
"codedeploy",
"deploy",
"dynamodb",
"s3"
"s3",
"guardduty"
]
}

Expand Down
9 changes: 9 additions & 0 deletions security-team-account/guardduty-detector/backend.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
terraform {
backend "s3" {
bucket = "cloudfence-security-state"
key = "guardduty-detector/guardduty.tfstate"
region = "ap-northeast-2"
encrypt = true
dynamodb_table = "guardduty-security-lock"
}
}
17 changes: 17 additions & 0 deletions security-team-account/guardduty-detector/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
}
}
}

provider "aws" {
alias = "operation"
region = "ap-northeast-2"
}

module "guardduty-detector" {
source = "../../modules/guardduty-detector"
enable = true
}
3 changes: 2 additions & 1 deletion security-team-account/state/dynamodb/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ locals {
"securityhub",
"config",
"dynamodb",
"s3"
"s3",
"guardduty"
]
}

Expand Down
9 changes: 9 additions & 0 deletions stage-team-account/guardduty-detector/backend.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
terraform {
backend "s3" {
bucket = "cloudfence-stage-state"
key = "guardduty-detector/guardduty.tfstate"
region = "ap-northeast-2"
encrypt = true
dynamodb_table = "guardduty-stage-lock"
}
}
17 changes: 17 additions & 0 deletions stage-team-account/guardduty-detector/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
}
}
}

provider "aws" {
alias = "operation"
region = "ap-northeast-2"
}

module "guardduty-detector" {
source = "../../modules/guardduty-detector"
enable = true
}
3 changes: 2 additions & 1 deletion stage-team-account/state/dynamodb/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ locals {
"codedeploy",
"deploy",
"dynamodb",
"s3"
"s3",
"guardduty"
]
}

Expand Down
Loading