mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-22 00:00:22 -07:00
[cloud] Create ECS integration test suite (#33757)
Tests for: * ecs_cluster * ecs_service * ecs_service_facts * ecs_taskdefinition * ecs_taskdefinition_facts * Add idempotency testing Test ecs_cluster, ecs_service and ecs_taskdefinition for trivial idempotency. Add FIXMEs to the tests because the latter two fail. Remove unused dependencies
This commit is contained in:
parent
b5318e2c34
commit
866d7fdce9
9 changed files with 558 additions and 2 deletions
|
@ -131,10 +131,14 @@
|
|||
"Effect": "Allow",
|
||||
"Action": [
|
||||
"elasticloadbalancing:ConfigureHealthCheck",
|
||||
"elasticloadbalancing:CreateListener",
|
||||
"elasticloadbalancing:CreateLoadBalancer",
|
||||
"elasticloadbalancing:CreateLoadBalancerListeners",
|
||||
"elasticloadbalancing:CreateTargetGroup",
|
||||
"elasticloadbalancing:DeleteListener",
|
||||
"elasticloadbalancing:DeleteLoadBalancer",
|
||||
"elasticloadbalancing:DeleteLoadBalancerListeners",
|
||||
"elasticloadbalancing:DeleteTargetGroup",
|
||||
"elasticloadbalancing:DeregisterInstancesFromLoadBalancer",
|
||||
"elasticloadbalancing:DescribeInstanceHealth",
|
||||
"elasticloadbalancing:DescribeLoadBalancerAttributes",
|
||||
|
@ -212,14 +216,39 @@
|
|||
"Resource": "arn:aws:lambda:{{aws_region}}:{{aws_account}}:function:*"
|
||||
},
|
||||
{
|
||||
"Sid": "AllowLambdaRoleManagement",
|
||||
"Sid": "AllowRoleManagement",
|
||||
"Effect": "Allow",
|
||||
"Action": [
|
||||
"iam:PassRole"
|
||||
],
|
||||
"Resource": [
|
||||
"arn:aws:iam::{{aws_account}}:role/ansible_lambda_role"
|
||||
"arn:aws:iam::{{aws_account}}:role/ansible_lambda_role",
|
||||
"arn:aws:iam::{{aws_account}}:role/ecsInstanceRole",
|
||||
"arn:aws:iam::{{aws_account}}:role/ecsServiceRole"
|
||||
]
|
||||
},
|
||||
{
|
||||
"Sid": "AllowECSManagement",
|
||||
"Effect": "Allow",
|
||||
"Action": [
|
||||
"application-autoscaling:Describe*",
|
||||
"application-autoscaling:PutScalingPolicy",
|
||||
"application-autoscaling:RegisterScalableTarget",
|
||||
"cloudwatch:DescribeAlarms",
|
||||
"cloudwatch:PutMetricAlarm",
|
||||
"ecs:CreateCluster",
|
||||
"ecs:CreateService",
|
||||
"ecs:DeleteCluster",
|
||||
"ecs:DeleteService",
|
||||
"ecs:Describe*",
|
||||
"ecs:DeregisterTaskDefinition",
|
||||
"ecs:List*",
|
||||
"ecs:RegisterTaskDefinition",
|
||||
"ecs:UpdateService"
|
||||
],
|
||||
"Resource": [
|
||||
"*"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
57
hacking/aws_config/testing_policies/ecs-policy.json
Normal file
57
hacking/aws_config/testing_policies/ecs-policy.json
Normal file
|
@ -0,0 +1,57 @@
|
|||
{
|
||||
"Version": "2012-10-17",
|
||||
"Statement": [
|
||||
{
|
||||
"Sid": "UnspecifiedCodeRepositories",
|
||||
"Effect": "Allow",
|
||||
"Action": [
|
||||
"ecr:DescribeRepositories",
|
||||
"ecr:CreateRepository"
|
||||
],
|
||||
"Resource": "*"
|
||||
},
|
||||
{
|
||||
"Sid": "SpecifiedCodeRepositories",
|
||||
"Effect": "Allow",
|
||||
"Action": [
|
||||
"ecr:GetRepositoryPolicy",
|
||||
"ecr:SetRepositoryPolicy",
|
||||
"ecr:DeleteRepository",
|
||||
"ecr:DeleteRepositoryPolicy",
|
||||
"ecr:DeleteRepositoryPolicy"
|
||||
],
|
||||
"Resource": [
|
||||
"arn:aws:ecr:{{aws_region}}:{{aws_account}}:repository/ansible-*"
|
||||
]
|
||||
},
|
||||
{
|
||||
"Effect": "Allow",
|
||||
"Action": [
|
||||
"application-autoscaling:Describe*",
|
||||
"application-autoscaling:PutScalingPolicy",
|
||||
"application-autoscaling:RegisterScalableTarget",
|
||||
"cloudwatch:DescribeAlarms",
|
||||
"cloudwatch:PutMetricAlarm",
|
||||
"ecs:List*",
|
||||
"ecs:Describe*",
|
||||
"ecs:CreateCluster",
|
||||
"ecs:DeleteCluster",
|
||||
"ecs:CreateService",
|
||||
"ecs:UpdateService",
|
||||
"elasticloadbalancing:Describe*",
|
||||
"iam:AttachRolePolicy",
|
||||
"iam:CreateRole",
|
||||
"iam:GetPolicy",
|
||||
"iam:GetPolicyVersion",
|
||||
"iam:GetRole",
|
||||
"iam:ListAttachedRolePolicies",
|
||||
"iam:ListRoles",
|
||||
"iam:ListGroups",
|
||||
"iam:ListUsers"
|
||||
],
|
||||
"Resource": [
|
||||
"*"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
22
hacking/aws_config/testing_policies/security-policy.json
Normal file
22
hacking/aws_config/testing_policies/security-policy.json
Normal file
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"Version": "2012-10-17",
|
||||
"Statement": [
|
||||
{
|
||||
"Action": [
|
||||
"iam:GetPolicy",
|
||||
"iam:GetPolicyVersion",
|
||||
"iam:GetRole",
|
||||
"iam:ListAttachedRolePolicies",
|
||||
"iam:ListGroups",
|
||||
"iam:ListInstanceProfilesForRole",
|
||||
"iam:ListPolicies",
|
||||
"iam:ListRoles",
|
||||
"iam:ListRolePolicies",
|
||||
"iam:ListUsers"
|
||||
],
|
||||
"Resource": "*",
|
||||
"Effect": "Allow",
|
||||
"Sid": "AllowReadOnlyIAMUse"
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue