k1LoW / awspec

RSpec tests for your AWS resources.
MIT License
1.17k stars 192 forks source link

nat gateway tag validation fails #453

Closed matt-rean closed 5 years ago

matt-rean commented 5 years ago

When testing for tags on a nat gateway, the check always fails. Given:

require 'spec_helper'

describe nat_gateway('nat-04780bdc5d049') do
  it { should have_tag('Owner').value('matthew.herrick') }
  it { should exist }
end

awspec reports:

nat_gateway 'nat-04780bdc5d049'
  should have tag "Owner" value "matthew.herrick" (FAILED - 4)
  should exist

However, the aws console appears correct, and aws cli reports the tag correctly:

matt@ubuntu:/$ aws ec2 describe-tags --filters "Name=resource-id,Values=nat-04780bdc5d049" Name=tag:Owner,Values=matthew.herrick
{
    "Tags": [
        {
            "Key": "Owner",
            "ResourceId": "nat-04780bdc5d049",
            "ResourceType": "natgateway",
            "Value": "matthew.herrick"
        }
    ]
}

I have tried this with numerous tags.