Sha256: 3195531c43b21a399931fc8bdd25ee71aae9c45dd53db2afad630f5ab19cf8af

Contents?: true

Size: 751 Bytes

Versions: 72

Compression:

Stored size: 751 Bytes

Contents

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

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

    STATES = %w(
      active provisioning failed
    )

    STATES.each do |state|
      define_method state + '?' do
        resource_via_client.state.code == state
      end
    end

    def has_security_group?(_sg_id)
      false
    end

    def has_subnet?(subnet_id)
      azs = resource_via_client.availability_zones
      ret = azs.find do |az|
        az.subnet_id == subnet_id
      end
      return true if ret
      subnet2 = find_subnet(subnet_id)
      subnet2.subnet_id = subnet_id
    end
  end
end

Version data entries

72 entries across 72 versions & 3 rubygems

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