Skip to content

Commit

Permalink
upd: update non-compatible policy 458
Browse files Browse the repository at this point in the history
  • Loading branch information
anna-shcherbak committed Aug 3, 2024
1 parent 530b994 commit 7b7e2c5
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ policies:
- name: ecc-aws-485-codedeploy_ec2_minimum_healthy_hosts_configured
comment: '010031132010'
description: |
CodeDeploy deployment config of application does not meet the requirements
CodeDeploy deployment groups for EC2 are not configured with a minimum healthy hosts
resource: aws.codedeploy-group
filters:
- type: value
Expand All @@ -22,7 +22,7 @@ policies:
- type: deployment-config-filter
key: minimumHealthyHosts.value
op: lt
value: 50
value: 66
- and:
- type: deployment-config-filter
key: minimumHealthyHosts.type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"deploymentConfigName": "485_deployment-config_green",
"minimumHealthyHosts": {
"type": "FLEET_PERCENT",
"value": 50
"value": 66
},
"createTime": {
"__class__": "datetime",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ class PolicyTest(object):
def test_resources_with_client(self, base_test, resources, local_session):
base_test.assertEqual(len(resources), 1)
config = local_session.client("codedeploy").get_deployment_config(deploymentConfigName=resources[0]['deploymentConfigName'])
base_test.assertLessEqual(config['deploymentConfigInfo']['minimumHealthyHosts']['value'],50)
base_test.assertLess(config['deploymentConfigInfo']['minimumHealthyHosts']['value'],66)
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ resource "aws_codedeploy_deployment_config" "this" {

minimum_healthy_hosts {
type = "FLEET_PERCENT"
value = "50"
value = "70"
}

depends_on = [aws_codedeploy_app.this]
Expand Down

0 comments on commit 7b7e2c5

Please sign in to comment.