Some checks failed
check agents / check (push) Failing after 13s
The cp1-solution-architecture-agent and the sa-aws/azure/gcp-cloud MCP servers, a separate stream from the individual and sub-agent patterns. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
767 B
767 B
IAM role
A role a service assumes, with an inline policy of named actions on named resources.
variable "bucket_arn" {
type = string
}
data "aws_iam_policy_document" "assume" {
statement {
actions = ["sts:AssumeRole"]
principals {
type = "Service"
identifiers = ["ecs-tasks.amazonaws.com"]
}
}
}
data "aws_iam_policy_document" "read" {
statement {
actions = ["s3:GetObject"]
resources = ["${var.bucket_arn}/*"]
}
}
resource "aws_iam_role" "task" {
name = "app-task"
assume_role_policy = data.aws_iam_policy_document.assume.json
}
resource "aws_iam_role_policy" "read" {
name = "read-objects"
role = aws_iam_role.task.id
policy = data.aws_iam_policy_document.read.json
}