Sha256: ed533bdc1aa7c4139953beb7812e9b8135cbf3614a7fb10c177ddc464d901d39

Contents?: true

Size: 606 Bytes

Versions: 72

Compression:

Stored size: 606 Bytes

Contents

module Awspec::Type
  class NlbTargetGroup < ResourceBase
    def resource_via_client
      @resource_via_client ||= find_nlb_target_group(@display_name)
    end

    def id
      @id ||= resource_via_client.target_group_name if resource_via_client
    end

    def has_ec2?(id)
      ec2 = find_ec2(id)
      return nil unless ec2
      descriptions = elbv2_client.describe_target_health(
        target_group_arn: resource_via_client.target_group_arn
      ).target_health_descriptions
      descriptions.find do |description|
        description.target.id == ec2.instance_id
      end
    end
  end
end

Version data entries

72 entries across 72 versions & 3 rubygems

Version Path
cthiesfork-awspec-1.2.2 lib/awspec/type/nlb_target_group.rb
cthiesfork-awspec-1.2.1 lib/awspec/type/nlb_target_group.rb
awspec-1.18.5 lib/awspec/type/nlb_target_group.rb
cthiesfork-awspec-1.2.0 lib/awspec/type/nlb_target_group.rb
cthiesfork-awspec-1.1.0 lib/awspec/type/nlb_target_group.rb
cthiesfork-awspec-1.0.0 lib/awspec/type/nlb_target_group.rb
awspec-1.18.4 lib/awspec/type/nlb_target_group.rb
awspec-1.18.3 lib/awspec/type/nlb_target_group.rb
awspec-1.18.2 lib/awspec/type/nlb_target_group.rb
awspec-1.18.1 lib/awspec/type/nlb_target_group.rb
awspec-1.18.0 lib/awspec/type/nlb_target_group.rb
awspec-1.17.4 lib/awspec/type/nlb_target_group.rb
awspec-1.17.3 lib/awspec/type/nlb_target_group.rb
awspec-1.17.2 lib/awspec/type/nlb_target_group.rb
awspec-1.17.1 lib/awspec/type/nlb_target_group.rb
awspec-1.17.0 lib/awspec/type/nlb_target_group.rb
awspec-1.16.1 lib/awspec/type/nlb_target_group.rb
awspec-1.16.0 lib/awspec/type/nlb_target_group.rb
awspec-1.15.3 lib/awspec/type/nlb_target_group.rb
awspec-1.15.2 lib/awspec/type/nlb_target_group.rb