assume_role_policy-non_saml.tf 873 B

12345678910111213141516171819202122232425262728293031323334
  1. data "aws_iam_policy_document" "non_saml_assume_role_policy" {
  2. statement {
  3. sid = "AllowAssumeRoleFromReadOnly"
  4. effect = "Allow"
  5. principals {
  6. type = "AWS"
  7. identifiers = [
  8. "arn:${local.aws_partition}:iam::${local.aws_account}:role/user/mdr_engineer_readonly"
  9. ]
  10. }
  11. actions = [
  12. "sts:AssumeRole",
  13. ]
  14. }
  15. }
  16. data "aws_iam_policy_document" "non_saml_assume_role_policy_developer" {
  17. statement {
  18. sid = "AllowAssumeRoleFromReadOnly"
  19. effect = "Allow"
  20. principals {
  21. type = "AWS"
  22. identifiers = [
  23. "arn:${local.aws_partition}:iam::${local.aws_account}:role/user/mdr_developer_readonly",
  24. "arn:${local.aws_partition}:iam::${local.aws_account}:role/user/mdr_engineer_readonly", # engineers can be developers for testing
  25. ]
  26. }
  27. actions = [
  28. "sts:AssumeRole",
  29. ]
  30. }
  31. }