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

bug: parity issue in secretsmanager when peforming tags operation #10477

Closed
1 task done
macnev2013 opened this issue Mar 18, 2024 · 1 comment
Closed
1 task done

bug: parity issue in secretsmanager when peforming tags operation #10477

macnev2013 opened this issue Mar 18, 2024 · 1 comment
Assignees
Labels
aws:secretsmanager AWS Secrets Manager status: backlog Triaged but not yet being worked on type: bug Bug report

Comments

@macnev2013
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When we perform the following opeation in sequence, we have a minor parity gap with AWS.

  • Create a secret using secretsmanager
  • Add tags in the secret
  • Remove tags from the secret
  • Describe the Secret (We can see AWS provides empty Tags key in the response, whereas localstack removes the key)

Expected Behavior

Tagging operations should be in parity with AWS.

How are you starting LocalStack?

With a docker-compose file

Steps To Reproduce

How are you starting localstack (e.g., bin/localstack command, arguments, or docker-compose.yml)

version: "3.8"

services:
  localstack:
    container_name: "${LOCALSTACK_DOCKER_NAME:-localstack-main}"
    image: localstack/localstack
    ports:
      - "127.0.0.1:4566:4566"            # LocalStack Gateway
      - "127.0.0.1:4510-4559:4510-4559"  # external services port range
    environment:
      # LocalStack configuration: https://docs.localstack.cloud/references/configuration/
      - DEBUG=${DEBUG:-0}
    volumes:
      - "${LOCALSTACK_VOLUME_DIR:-./volume}:/var/lib/localstack"
      - "/var/run/docker.sock:/var/run/docker.sock"
docker-compose up

Client commands (e.g., AWS SDK code snippet, or sequence of "awslocal" commands)

import boto3
import uuid

session = boto3.Session(profile_name="<AWS_PROFILE>")
aws_client = session.client(
    "secretsmanager",
    region_name="us-east-1",
    # endpoint_url="http://localhost:4566",
)

response = aws_client.create_secret(
    Name="my-secret" + str(uuid.uuid4()),
    Description="This is my secret",
    SecretString='{"username":"admin","password":"admin"}',
)
print("Tags not in Response")
print(response)
secret_arn = response["ARN"]

tags = [{"Key": "env", "Value": "dev"}]

aws_client.tag_resource(SecretId=secret_arn, Tags=tags)

aws_client.untag_resource(SecretId=secret_arn, TagKeys=["env"])

response = aws_client.describe_secret(SecretId=secret_arn)
print("Empty list of Tags are Response")
print(response)


aws_client.delete_secret(SecretId=secret_arn, ForceDeleteWithoutRecovery=True)

Environment

- OS: Ubuntu 23.10
- LocalStack: 3.2.1.dev

Anything else?

No response

@macnev2013 macnev2013 added type: bug Bug report status: triage needed Requires evaluation by maintainers aws:secretsmanager AWS Secrets Manager labels Mar 18, 2024
@bentsku bentsku added status: backlog Triaged but not yet being worked on and removed status: triage needed Requires evaluation by maintainers labels Mar 18, 2024
@macnev2013 macnev2013 self-assigned this Apr 1, 2024
@macnev2013
Copy link
Contributor Author

This issue has been resolved in the most recent LocalStack.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aws:secretsmanager AWS Secrets Manager status: backlog Triaged but not yet being worked on type: bug Bug report
Projects
None yet
Development

No branches or pull requests

2 participants