Skip to content

Commit

Permalink
refactor(terraform): emr studio (#12493)
Browse files Browse the repository at this point in the history
  • Loading branch information
hongbo-miao authored Nov 8, 2023
1 parent 294600a commit 4325e29
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 26 deletions.
16 changes: 6 additions & 10 deletions terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -156,16 +156,12 @@ module "hm_sedona_emr_managed_scaling_policy" {
max_capacity_units = 10
}
module "hm_sedona_emr_studio" {
source = "./modules/hm_amazon_emr_studio"
amazon_emr_studio_name = "hm-sedona-emr-studio"
s3_bucket = "hongbomiao-bucket"
s3_uri = "s3://hongbomiao-bucket/amazon-emr/studio/hm-sedona-emr-studio"
engine_security_group_id = "sg-xxxxxxxxxxxxxxxxx"
workspace_security_group_id = "sg-xxxxxxxxxxxxxxxxx"
vpc_id = "vpc-xxxxxxxxxxxxxxxxx"
subnet_ids = ["subnet-xxxxxxxxxxxxxxxxx"]
environment = var.environment
team = var.team
source = "./modules/hm_amazon_emr_studio"
amazon_emr_studio_name = "hm-sedona-emr-studio"
s3_bucket = "hongbomiao-bucket"
s3_uri = "s3://hongbomiao-bucket/amazon-emr/studio/hm-sedona-emr-studio"
environment = var.environment
team = var.team
}

# AWS Glue DataBrew job
Expand Down
8 changes: 4 additions & 4 deletions terraform/modules/hm_amazon_emr_studio/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ resource "aws_emr_studio" "hm_amazon_emr_studio" {
name = var.amazon_emr_studio_name
auth_mode = "IAM"
default_s3_location = var.s3_uri
engine_security_group_id = var.engine_security_group_id
workspace_security_group_id = var.workspace_security_group_id
vpc_id = var.vpc_id
subnet_ids = var.subnet_ids
service_role = aws_iam_role.hm_amazon_emr_studio_iam_role.arn
engine_security_group_id = "sg-xxxxxxxxxxxxxxxxx"
workspace_security_group_id = "sg-xxxxxxxxxxxxxxxxx"
vpc_id = "vpc-xxxxxxxxxxxxxxxxx"
subnet_ids = ["subnet-xxxxxxxxxxxxxxxxx"]
tags = {
Environment = var.environment
Team = var.team
Expand Down
12 changes: 0 additions & 12 deletions terraform/modules/hm_amazon_emr_studio/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,6 @@ variable "s3_bucket" {
variable "s3_uri" {
type = string
}
variable "engine_security_group_id" {
type = string
}
variable "subnet_ids" {
type = list(string)
}
variable "vpc_id" {
type = string
}
variable "workspace_security_group_id" {
type = string
}
variable "environment" {
type = string
}
Expand Down

0 comments on commit 4325e29

Please sign in to comment.