aws / aws-cli

Universal Command Line Interface for Amazon Web Services
Other
15.55k stars 4.13k forks source link

`--deletion-protection-enabled` is missing in dynamodb create-table #8155

Closed landsman closed 1 year ago

landsman commented 1 year ago

Describe the bug

I'm not able to create a new dynamodb table with this flag via one command.

Expected Behavior

One CLI command only, as it's in example here: https://docs.aws.amazon.com/cli/latest/reference/dynamodb/create-table.html

Current Behavior

Unknown options: --deletion-protection-enabled

Reproduction Steps

AWS_PROFILE="hello"
AWS_REGION="eu-west-1"
AWS_DYNAMO_TABLE="terraform-backend-lock"

aws dynamodb create-table \
    --profile ${AWS_PROFILE} \
    --region ${AWS_REGION} \
    --table-name ${AWS_DYNAMO_TABLE} \
    --billing-mode PAY_PER_REQUEST \
    --attribute-definitions AttributeName=LockID,AttributeType=S \
    --key-schema AttributeName=LockID,KeyType=HASH \
    --stream-specification StreamEnabled=false \
    --tags Key=Name,Value=${AWS_DYNAMO_TABLE} \
    --deletion-protection-enabled

Possible Solution

No response

Additional Information/Context

No response

CLI version used

2.2.5

Environment details (OS name and version, etc.)

macOS 13.5.1

tim-finnigan commented 1 year ago

Hi @landsman, support for --deletion-protection-enabled was added here in version 2.11.2. The version your using (2.2.5) is quite a bit older. Please try updating your version of the AWS CLI to 2.11.2 to access that parameter.

github-actions[bot] commented 1 year ago

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see. If you need more assistance, please 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.

landsman commented 1 year ago

@tim-finnigan oh, my bad sorry I overlooked that bigger version. 🤦‍♂️