Hi John,
In your aws-compose-x.yaml you have a x-elbv2 section that doesn't appear to parse properly.
> ecs-compose-x plan -f docker-compose.yaml -f aws-compose-x.yaml -n frontend-app
2024-06-07 11:15:48 [ INFO] Update service frontend image to blah.dkr.ecr.ap-southeast-2.amazonaws.com/frontend@sha256:stuff
2024-06-07 11:15:48 [ INFO] services.frontend - No Launch Type defined. Using default: FARGATE
2024-06-07 11:15:50 [ INFO] frontend - No scan to be evaluated.
2024-06-07 11:15:50 [ INFO] frontend.frontend - ECR Scan Pass (No vulnerabilities found)
2024-06-07 11:15:50 [ INFO] Service families to process ['frontend']
2024-06-07 11:15:50 [ INFO] No cluster information provided. Creating a new one
Loaded x-elbv2 elbv2 elbv2 /var/tmp/venvs/aws/lib/python3.12/site-packages/ecs_composex/elbv2
2024-06-07 11:15:50 [ ERROR] elbv2.public-alb - Definition is not conform to schema.
Traceback (most recent call last):
File "/var/tmp/venvs/aws/bin/ecs-compose-x", line 8, in <module>
sys.exit(main())
^^^^^^
File "/var/tmp/venvs/aws/lib/python3.12/site-packages/ecs_composex/cli.py", line 206, in main
root_stack = generate_full_template(settings)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/var/tmp/venvs/aws/lib/python3.12/site-packages/ecs_composex/ecs_composex.py", line 248, in generate_full_template
settings.mod_manager.init_mods_resources(settings)
File "/var/tmp/venvs/aws/lib/python3.12/site-packages/ecs_composex/mods_manager.py", line 307, in init_mods_resources
module.set_resources(settings)
File "/var/tmp/venvs/aws/lib/python3.12/site-packages/ecs_composex/mods_manager.py", line 266, in set_resources
new_definition = self.resource_class(
^^^^^^^^^^^^^^^^^^^^
File "/var/tmp/venvs/aws/lib/python3.12/site-packages/ecs_composex/elbv2/elbv2_stack/elbv2.py", line 75, in __init__
super().__init__(name, definition, module, settings)
File "/var/tmp/venvs/aws/lib/python3.12/site-packages/ecs_composex/compose/x_resources/network_x_resources.py", line 37, in __init__
super().__init__(name, definition, module, settings)
File "/var/tmp/venvs/aws/lib/python3.12/site-packages/ecs_composex/compose/x_resources/services_resources.py", line 39, in __init__
super().__init__(name, definition, module, settings)
File "/var/tmp/venvs/aws/lib/python3.12/site-packages/ecs_composex/compose/x_resources/__init__.py", line 79, in __init__
self.validate_schema(name, definition, module.mod_key)
File "/var/tmp/venvs/aws/lib/python3.12/site-packages/ecs_composex/compose/x_resources/__init__.py", line 191, in validate_schema
_eval.validate(definition)
File "/var/tmp/venvs/aws/lib/python3.12/site-packages/jsonschema/validators.py", line 451, in validate
raise error
jsonschema.exceptions.ValidationError: [{'name': 'frontend:frontend', 'port': 80, 'protocol': 'HTTP', 'healthcheck': '80:HTTP:/:200'}] is not of type 'object'
Failed validating 'type' in schema['properties']['Services']:
{'additionalProperties': False,
'patternProperties': {'^[a-zA-Z0-9\\:_\\-]+$': {'$ref': '#/definitions/TargetDef'},
'x-': {}},
'type': 'object'}
On instance['Services']:
[{'healthcheck': '80:HTTP:/:200',
'name': 'frontend:frontend',
'port': 80,
'protocol': 'HTTP'}]
Hi John, In your aws-compose-x.yaml you have a x-elbv2 section that doesn't appear to parse properly.
Perhaps the example needs updating? Thanks!