chore(infrastructure): remove useless test that requires too much permissions
All checks were successful
main / test (push) Successful in 37s
All checks were successful
main / test (push) Successful in 37s
This commit is contained in:
parent
912021f8e5
commit
1fcbd151ed
2 changed files with 0 additions and 64 deletions
|
@ -10,41 +10,5 @@ module "aws_iam_ci_user" {
|
|||
}
|
||||
source = "git::ssh://git@git.adyxax.org/adyxax/tofu-module-aws-iam-ci-user?depth=1&ref=1.0.1"
|
||||
|
||||
core_policy_statements = jsonencode([
|
||||
{
|
||||
Action = "iam:*"
|
||||
Effect = "Allow"
|
||||
Resource = "arn:aws:iam::*:role/tftest"
|
||||
},
|
||||
])
|
||||
name = local.name
|
||||
tests_policy_statements = jsonencode([{
|
||||
Action = "iam:*"
|
||||
Effect = "Allow"
|
||||
Resource = "arn:aws:iam::*:role/tftest",
|
||||
}])
|
||||
}
|
||||
|
||||
resource "aws_iam_policy" "tftest" {
|
||||
provider = aws.all["root"]
|
||||
|
||||
name = "${local.name}-tftest"
|
||||
policy = jsonencode({
|
||||
Statement = [{
|
||||
Action = "iam:*"
|
||||
Effect = "Allow"
|
||||
Resource = [
|
||||
"arn:aws:iam::*:user/tftest",
|
||||
"arn:aws:iam::*:policy/${local.name}-tftest",
|
||||
]
|
||||
}]
|
||||
Version = "2012-10-17"
|
||||
})
|
||||
}
|
||||
|
||||
resource "aws_iam_user_policy_attachment" "tftest" {
|
||||
provider = aws.all["root"]
|
||||
|
||||
policy_arn = aws_iam_policy.tftest.arn
|
||||
user = local.name
|
||||
}
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
provider "aws" {
|
||||
alias = "core"
|
||||
profile = "core"
|
||||
region = "eu-west-3"
|
||||
}
|
||||
|
||||
provider "aws" {
|
||||
alias = "root"
|
||||
profile = "root"
|
||||
region = "eu-west-3"
|
||||
}
|
||||
|
||||
provider "aws" {
|
||||
alias = "tests"
|
||||
profile = "tests"
|
||||
region = "eu-west-3"
|
||||
}
|
||||
|
||||
run "main" {
|
||||
assert {
|
||||
condition = output.access_key_id != null
|
||||
error_message = "invalid iam user access key id"
|
||||
}
|
||||
}
|
||||
|
||||
variables {
|
||||
name = "tftest"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue