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

[Resource Type] - [BUG] - CloudControl cannot update AWS::ApiGateway::Stage with empty Tags array #2236

Open
flostadler opened this issue Jan 14, 2025 · 0 comments
Labels

Comments

@flostadler
Copy link

Name of the resource

AWS::ApiGateway::Stage

Resource Name

No response

Issue Description

When trying to update the tags of an AWS::ApiGateway::Stage that currently has an empty tag array, Cloud Control fails with: An error occurred (ValidationException) when calling the UpdateResource operation: [REPLACE Operation] noSuchPath in source, path provided : //Tags

Expected Behavior

Updating an API Gateway Stage with Tags that were explicitly set to an empty array should work.

Observed Behavior

It fails with the above mentioned error message. It seems like the JSON patch semantics aren't properly respected. Going from an empty Tags array to one with entries should be possible with a replace operation.

Test Cases

  1. Create Stage:
aws cloudcontrol create-resource \
  --type-name AWS::ApiGateway::Stage \
  --desired-state '{
    "RestApiId": "$REST_API_ID",
    "StageName": "testing",
    "DeploymentId": "$DEPLOYMENT_ID",
    "Tags": []
  }'
  1. Update Stage and observe error:
aws cloudcontrol update-resource \
  --type-name AWS::ApiGateway::Stage \
  --identifier '$REST_API_ID|testing' \
  --patch-document '[{"op":"replace","path":"/Tags","value":[{"Key":"foo","Value":"bar"}]}]'

Other Details

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant