Skip to content

[BUG] Filtering with wild card values not possible #830

@slackfan

Description

@slackfan

Service

EC2

AWS API Action

describe-vpcs

Expected behavior

When filtering for tag values using wildcards is supported as it is with the real API.

Actual behavior

When filtering for tag values using wild cards is unsupported. It seems the wildcards are taken as is.

Reproduction

aws --endpoint-url=http://floci:4566 \
    ec2 create-vpc \
    --cidr-block 10.0.0.0/16 \
    --tag-specifications ResourceType=vpc,Tags=[{Key=Name,Value=BEGINANDEND}]
{
    "Vpc": {
        "OwnerId": "000000000000",
        "InstanceTenancy": "default",
        "CidrBlockAssociationSet": [
            {
                "AssociationId": "vpc-cidr-assoc-a0d1592c",
                "CidrBlock": "10.0.0.0/16",
                "CidrBlockState": {
                    "State": "associated"
                }
            }
        ],
        "IsDefault": false,
        "Tags": [
            {
                "Key": "Name",
                "Value": "BEGINANDEND"
            }
        ],
        "VpcId": "vpc-8c2e8fdd",
        "State": "available",
        "CidrBlock": "10.0.0.0/16",
        "DhcpOptionsId": "dopt-default"
    }
}

aws --endpoint-url=http://floci:4566 \
    ec2 describe-vpcs \
    --filters 'Name=tag:Name,Values=BEGINANDEND'
{
    "Vpcs": [
        {
            "OwnerId": "000000000000",
            "InstanceTenancy": "default",
            "CidrBlockAssociationSet": [
                {
                    "AssociationId": "vpc-cidr-assoc-a0d1592c",
                    "CidrBlock": "10.0.0.0/16",
                    "CidrBlockState": {
                        "State": "associated"
                    }
                }
            ],
            "IsDefault": false,
            "Tags": [
                {
                    "Key": "Name",
                    "Value": "BEGINANDEND"
                }
            ],
            "VpcId": "vpc-8c2e8fdd",
            "State": "available",
            "CidrBlock": "10.0.0.0/16",
            "DhcpOptionsId": "dopt-default"
        }
    ]
}

aws --endpoint-url=http://floci:4566 \
    ec2 describe-vpcs \
    --filters 'Name=tag:Name,Values=BEGIN*END'
{
    "Vpcs": []
}

Environment

  • Floci 1.5.15
  • boto3 1.43.6, awscli 2.32.7
  • Floci is running in Docker

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingec2

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions