You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.
When attempting to convert a docker-compose.yml file to a Cloud Formation template with a service with volumes defined in conjunction with x-aws-cloudformation > Resources > task definition for TaskRoleArn if fails to generate a CloudFormation template.
Use the docker-compose.yml file posted in the description inputting the vpc id for x-aws-vpc
run docker compose -f docker-compose.yml --verbose config > test.cloudformation to attempt to generate a CloudFormation template from the docker compose file.
Describe the results you received:
Cloud formation failed to generate
Error:
wrong Node Kind for expected: MappingNode was ScalarNode: value: {arn:aws:iam:123456789012:role/foo-bar}
Describe the results you expected:
Cloud Formation template to be properly generated when the volumes are defined in the service.
Additional information you deem important (e.g. issue happens only occasionally):
It seems like this is related to having something after the TaskRoleArn definition in the CloudFormation template ServiceTaskDefinition (i.e. the only thing alphabetically which would be present is the volumes block).
As a workaround for now, we've defined an inline role with the correct policies and then used a reference to that within the x-aws-cloudformation > Resources > ServiceTaskDefinitoin > Properties > TaskRoleArn
Output of docker context show:
You can also run docker context inspect context-name to give us more details but don't forget to remove sensitive content.
Description
When attempting to convert a docker-compose.yml file to a Cloud Formation template with a service with volumes defined in conjunction with
x-aws-cloudformation
>Resources
> task definition forTaskRoleArn
if fails to generate a CloudFormation template.Example docker-compose.yml file:
When removing the volumes block it properly generates the CloudFormation template.
Example command:
Error received (when volumes block is present):
Steps to reproduce the issue:
docker compose -f docker-compose.yml --verbose config > test.cloudformation
to attempt to generate a CloudFormation template from the docker compose file.Describe the results you received:
Cloud formation failed to generate
Error:
Describe the results you expected:
Cloud Formation template to be properly generated when the volumes are defined in the service.
Additional information you deem important (e.g. issue happens only occasionally):
It seems like this is related to having something after the TaskRoleArn definition in the CloudFormation template ServiceTaskDefinition (i.e. the only thing alphabetically which would be present is the volumes block).
As a workaround for now, we've defined an inline role with the correct policies and then used a reference to that within the x-aws-cloudformation > Resources > ServiceTaskDefinitoin > Properties > TaskRoleArn
i.e.:
And then reference it like so:
Output of
docker-compose --version
:Output of
docker version
:Output of
docker context show
:You can also run
docker context inspect context-name
to give us more details but don't forget to remove sensitive content.Output of
docker info
:Additional environment details (AWS ECS, Azure ACI, local, etc.):
AWS ECS
The text was updated successfully, but these errors were encountered: