Skip to content

Commit

Permalink
add mike test user, force destroy iam users
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanandrews committed Dec 17, 2024
1 parent cb360ed commit 090b263
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 3 additions & 2 deletions aws-ifcb-data-sharer/terraform/iam.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ resource "aws_iam_user_policy" "prod_bucket" {
# Manage external S3 users with different IAM user/policies

resource "aws_iam_user" "s3_users" {
for_each = toset(var.user_names)
name = each.value
for_each = toset(var.user_names)
name = each.value
force_destroy = true
tags = {
Project = "${var.project_name}"
}
Expand Down
4 changes: 4 additions & 0 deletions aws-ifcb-data-sharer/terraform/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ output "all_users" {
output "all_policies" {
value = aws_iam_user_policy.s3_users
}

output "all_buckets" {
value = aws_s3_object.folders
}
2 changes: 1 addition & 1 deletion aws-ifcb-data-sharer/terraform/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ variable "bucket_name" {
variable "user_names" {
description = "Create IAM users with these names"
type = list(string)
default = ["eandrews"]
default = ["eandrews", "hablab"]
}

variable "aws_account_id" {
Expand Down

0 comments on commit 090b263

Please sign in to comment.