Skip to content

Commit

Permalink
refactor: separate files
Browse files Browse the repository at this point in the history
  • Loading branch information
woowahan-neo committed Jan 9, 2025
1 parent cc924ee commit 9ff12ca
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 26 deletions.
9 changes: 9 additions & 0 deletions terraform/environments/dev/backend.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
terraform {
cloud {
organization = "cholog"

workspaces {
name = "cholog-dev"
}
}
}
26 changes: 0 additions & 26 deletions terraform/environments/dev/main.tf
Original file line number Diff line number Diff line change
@@ -1,29 +1,3 @@
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "5.54.1"
}
}

cloud {
organization = "cholog"

workspaces {
name = "cholog-dev"
}
}
}

provider "aws" {
region = var.region

/** Note: access_key와 secret_key는 환경변수를 통해 설정하면 된다.
export AWS_ACCESS_KEY_ID="your-access-key"
export AWS_SECRET_ACCESS_KEY="your-secret-key"
*/
}

module "tags" {
source = "../../modules/tags"

Expand Down
22 changes: 22 additions & 0 deletions terraform/environments/dev/provider.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "5.54.1"
}
}
}

provider "aws" {
region = var.region

/** Note:
AWS_ACCESS_KEY_ID와 AWS_SECRET_ACCESS_KEY는 환경변수를 통해 설정해야 합니다.
아래와 같이 환경 변수를 설정하세요:
export AWS_ACCESS_KEY_ID="your-access-key"
export AWS_SECRET_ACCESS_KEY="your-secret-key"
GitHub Actions에서는 환경 변수를 Secrets에 저장하여 사용해야 합니다.
*/
}

0 comments on commit 9ff12ca

Please sign in to comment.