Skip to content
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
2 changes: 2 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
INFRACOST_TERRAFORM_CLI_WRAPPER: false
TF_VAR_slack_webhook_url: ${{ secrets.TF_VAR_slack_webhook_url }}
TF_VAR_operation_account_id: ${{ secrets.TF_VAR_operation_account_id }}
TF_VAR_prod_account_id: ${{ secrets.TF_VAR_prod_account_id }}

steps:
- name: Checkout Code
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,6 @@ jobs:
env:
TF_VAR_slack_webhook_url: ${{ secrets.TF_VAR_slack_webhook_url }}
TF_VAR_allowed_source_ips: ${{ secrets.TF_VAR_allowed_source_ips }}
TF_VAR_operation_account_id: ${{ secrets.TF_VAR_operation_account_id }}
TF_VAR_prod_account_id: ${{ secrets.TF_VAR_prod_account_id }}

2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ ehthumbs.db # Windows
.vscode/

# OpenSearch alert 생성 시 생기는 임시 파일
modules/opensearch/slack_response.json
modules/opensearch/slack_response.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,6 @@ provider "aws" {
region = "ap-northeast-2"
}

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

data "aws_caller_identity" "operation" {
provider = aws.operation
}

resource "aws_inspector2_delegated_admin_account" "this" {
account_id = data.aws_caller_identity.operation.account_id
account_id = var.operation_account_id
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
variable "operation_account_id" {
description = "operation account"
type = string
sensitive = true
}
10 changes: 1 addition & 9 deletions operation-team-account/runtime-verification/inspector/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,6 @@ provider "aws" {
region = "ap-northeast-2"
}

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

data "aws_caller_identity" "prod" {
provider = aws.prod
}

data "aws_caller_identity" "current" {}

Expand All @@ -29,5 +21,5 @@ resource "aws_inspector2_enabler" "this" {
}

resource "aws_inspector2_delegated_admin_account" "prod_account" {
account_id = data.aws_caller_identity.prod.account_id
account_id = var.prod_account_id
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
variable "prod_account_id" {
description = "prod account"
type = string
sensitive = true
}