Skip to content

Commit

Permalink
Add AWS STS v2
Browse files Browse the repository at this point in the history
  • Loading branch information
wellyfrs committed Aug 9, 2024
1 parent 3baef16 commit bb3a5ec
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@
<groupId>io.awspring.cloud</groupId>
<artifactId>spring-cloud-aws-starter</artifactId>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>sts</artifactId>
</dependency>
<dependency>
<groupId>io.awspring.cloud</groupId>
<artifactId>spring-cloud-aws-starter-sns</artifactId>
Expand Down
10 changes: 10 additions & 0 deletions terraform/rds.tf
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ module "db" {
backup_retention_period = 0
skip_final_snapshot = true
deletion_protection = false

tags = var.tags
}

module "security_group" {
Expand All @@ -61,6 +63,8 @@ module "security_group" {
cidr_blocks = data.terraform_remote_state.tech-challenge.outputs.vpc_cidr_block
},
]

tags = var.tags
}

module "rds_params" {
Expand All @@ -73,6 +77,8 @@ module "rds_params" {
endpoint : module.db.db_instance_endpoint,
port : local.port
})

tags = var.tags
}

resource "aws_iam_policy" "rds_secrets_read_only_policy" {
Expand All @@ -91,6 +97,8 @@ resource "aws_iam_policy" "rds_secrets_read_only_policy" {
}
]
})

tags = var.tags
}

resource "aws_iam_policy" "rds_params_read_only_policy" {
Expand All @@ -109,4 +117,6 @@ resource "aws_iam_policy" "rds_params_read_only_policy" {
}
]
})

tags = var.tags
}

0 comments on commit bb3a5ec

Please sign in to comment.