feat: moved completely over to this repository
This commit is contained in:
@@ -2,7 +2,7 @@ data "aws_s3_bucket" "storage_bucket" {
|
||||
bucket = var.boot_bucket
|
||||
}
|
||||
|
||||
data "aws_iam_policy_document" "gitea_bool_policy" {
|
||||
data "aws_iam_policy_document" "boot" {
|
||||
statement {
|
||||
effect = "Allow"
|
||||
actions = ["s3:*", "s3-object-lambda:*"]
|
||||
@@ -10,22 +10,19 @@ data "aws_iam_policy_document" "gitea_bool_policy" {
|
||||
}
|
||||
}
|
||||
|
||||
resource "aws_iam_policy" "gitea_boot_policy" {
|
||||
resource "aws_iam_policy" "boot" {
|
||||
name = "${var.boot_role}Policy"
|
||||
description = "The policy that manages the Gitea Boot."
|
||||
|
||||
policy = data.aws_iam_policy_document.gitea_bool_policy.json
|
||||
policy = data.aws_iam_policy_document.boot.json
|
||||
}
|
||||
|
||||
resource "aws_iam_user" "gitea_boot_user" {
|
||||
module "boot_user" {
|
||||
source = "terraform-aws-modules/iam/aws//modules/iam-user"
|
||||
version = "5.52.2"
|
||||
|
||||
create_iam_user_login_profile = false
|
||||
name = "${var.boot_role}User"
|
||||
password_reset_required = false
|
||||
policy_arns = [aws_iam_policy.boot.arn]
|
||||
}
|
||||
|
||||
resource "aws_iam_user_policy_attachment" "attachment" {
|
||||
user = aws_iam_user.gitea_boot_user.name
|
||||
policy_arn = aws_iam_policy.gitea_boot_policy.arn
|
||||
}
|
||||
|
||||
resource "aws_iam_access_key" "gitea_boot_key" {
|
||||
user = aws_iam_user.gitea_boot_user.name
|
||||
}
|
||||
Reference in New Issue
Block a user