Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aws_ecs: docker volume autoprovision parameter document do not match cdk behavior #26697

Closed
HangJiaKolmostar opened this issue Aug 10, 2023 · 4 comments
Labels
@aws-cdk/aws-ecs Related to Amazon Elastic Container documentation This is a problem with documentation.

Comments

@HangJiaKolmostar
Copy link

Describe the issue

in https://docs.aws.amazon.com/AmazonECS/latest/developerguide/docker-volumes.html
the doc of autoprovision param says:"If this value is true, the Docker volume is created if it does not already exist. This field is only used if the scope is shared. If the scope is task then this parameter must either be omitted or set to false."

but when i use scope="task" , autoprovison=False in code, when deploy, the error message says

❌ XXX-my-app-name-XXX failed: Error: The stack named XXX failed to deploy: UPDATE_ROLLBACK_COMPLETE: Resource handler returned message: "Invalid request provided: Create TaskDefinition: When 'scope' parameter is 'task', 'autoprovision' must either not be specified or set to 'True'. (Service: AmazonECS; Status Code: 400; Error Code: ClientException; Request ID: XXXXXXX; Proxy: null)" (RequestToken:XXXXXX, HandlerErrorCode: InvalidRequest)
at FullCloudFormationDeployment.monitorDeployment (/usr/local/lib/node_modules/aws-cdk/lib/index.js:426:10236)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.deployStack2 [as deployStack] (/usr/local/lib/node_modules/aws-cdk/lib/index.js:429:153208)
at async /usr/local/lib/node_modules/aws-cdk/lib/index.js:429:136985

the doc says it should be set to false, the error message says it should set to true

Links

https://docs.aws.amazon.com/AmazonECS/latest/developerguide/docker-volumes.html

@HangJiaKolmostar HangJiaKolmostar added documentation This is a problem with documentation. needs-triage This issue or PR still needs to be triaged. labels Aug 10, 2023
@github-actions github-actions bot added the @aws-cdk/aws-ecs Related to Amazon Elastic Container label Aug 10, 2023
@peterwoodworth
Copy link
Contributor

peterwoodworth commented Aug 10, 2023

Are you using CDK? If you're not, you should provide feedback on this docpage you linked. If you are using CDK, could you please share the code you're using and the link to our documentation where we could be more clear?

@peterwoodworth peterwoodworth added response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. and removed needs-triage This issue or PR still needs to be triaged. labels Aug 10, 2023
@HangJiaKolmostar
Copy link
Author

yes, of course Im using cdk.
the code is
`

volume_name = volume_config['name']
destroy = volume_config.get('destroy', False)
task.add_volume(
    name=volume_name,
    docker_volume_configuration=ecs.DockerVolumeConfiguration(
        scope=ecs.Scope.TASK if destroy else ecs.Scope.SHARED,
        autoprovision=not destroy,
        driver='local'
    )
)

`
the doc in https://docs.aws.amazon.com/AmazonECS/latest/developerguide/docker-volumes.html#specify-volume-config
describe that i should use autoprovison=False, but cdk error told me that i should use autovison=True

image

@github-actions github-actions bot removed the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Aug 11, 2023
@peterwoodworth
Copy link
Contributor

None of the errors you're running into are rooted in CDK. Our documentation doesn't state anything incorrect, and the error message isn't coming from us - but rather CloudFormation. So, I'm not sure there's anything we can do to help clear this up in the docs/error message. Like I mentioned before, if you have docs feedback, report that on the docs page itself. And if you want to reach out to CloudFormation, create an issue here

@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-ecs Related to Amazon Elastic Container documentation This is a problem with documentation.
Projects
None yet
Development

No branches or pull requests

2 participants