diff --git a/doc/_resource_types/cloudformation_stack.md b/doc/_resource_types/cloudformation_stack.md index 4530b6e1..4b6711c5 100644 --- a/doc/_resource_types/cloudformation_stack.md +++ b/doc/_resource_types/cloudformation_stack.md @@ -6,3 +6,11 @@ describe cloudformation_stack('my-cloudformation-stack') do its(:stack_status) { should eq 'UPDATE_COMPLETE' } end ``` + +### have_tag + +```ruby +describe cloudformation_stack('my-cloudformation-stack') do + it { should have_tag('env').value('dev') } +end +``` diff --git a/doc/resource_types.md b/doc/resource_types.md index 86c02875..3af89303 100644 --- a/doc/resource_types.md +++ b/doc/resource_types.md @@ -457,6 +457,15 @@ describe cloudformation_stack('my-cloudformation-stack') do end ``` + +### have_tag + +```ruby +describe cloudformation_stack('my-cloudformation-stack') do + it { should have_tag('env').value('dev') } +end +``` + ### its(:stack_id), its(:stack_name), its(:change_set_id), its(:description), its(:parameters), its(:creation_time), its(:deletion_time), its(:last_updated_time), its(:rollback_configuration), its(:stack_status), its(:stack_status_reason), its(:disable_rollback), its(:notification_arns), its(:timeout_in_minutes), its(:capabilities), its(:role_arn), its(:enable_termination_protection), its(:parent_id), its(:root_id), its(:drift_information) ## cloudfront_distribution diff --git a/lib/awspec/type/cloudformation_stack.rb b/lib/awspec/type/cloudformation_stack.rb index 76c4c2e1..f41320db 100644 --- a/lib/awspec/type/cloudformation_stack.rb +++ b/lib/awspec/type/cloudformation_stack.rb @@ -2,6 +2,9 @@ module Awspec::Type class CloudformationStack < ResourceBase + aws_resource Aws::CloudFormation::Stack + tags_allowed + def resource_via_client @resource_via_client ||= find_cloudformation_stack(@display_name) end