cloudformation-policy.json 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. {
  2. "AWSTemplateFormatVersion": "2010-09-09",
  3. "Resources": {
  4. "PorterRole": {
  5. "Type": "AWS::IAM::Role",
  6. "Properties": {
  7. "AssumeRolePolicyDocument": {
  8. "Version": "2012-10-17",
  9. "Statement": [
  10. {
  11. "Effect": "Allow",
  12. "Principal": {
  13. "AWS": [
  14. "arn:aws:iam::108458755588:role/CAPIManagement"
  15. ]
  16. },
  17. "Condition": {
  18. "StringEquals": {
  19. "sts:ExternalId": {
  20. "Ref": "ExternalIdParameter"
  21. }
  22. }
  23. },
  24. "Action": [
  25. "sts:AssumeRole"
  26. ]
  27. },
  28. {
  29. "Effect": "Allow",
  30. "Principal": {
  31. "Service": [
  32. "ec2.amazonaws.com"
  33. ]
  34. },
  35. "Action": [
  36. "sts:AssumeRole"
  37. ]
  38. },
  39. {
  40. "Effect": "Allow",
  41. "Principal": {
  42. "Service": [
  43. "eks.amazonaws.com"
  44. ]
  45. },
  46. "Action": [
  47. "sts:AssumeRole"
  48. ]
  49. }
  50. ]
  51. },
  52. "Path": "/",
  53. "ManagedPolicyArns": [
  54. "arn:aws:iam::aws:policy/AdministratorAccess",
  55. "arn:aws:iam::aws:policy/AmazonEKSClusterPolicy",
  56. "arn:aws:iam::aws:policy/AmazonEKSWorkerNodePolicy",
  57. "arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryReadOnly",
  58. "arn:aws:iam::aws:policy/service-role/AmazonEBSCSIDriverPolicy"
  59. ],
  60. "RoleName": "PorterRole"
  61. }
  62. }
  63. },
  64. "Parameters": {
  65. "ExternalIdParameter": {
  66. "Type" : "String",
  67. "Description": "External ID required for CAPIManagement role to access target ARN."
  68. }
  69. }
  70. }