Sha256: 5bb619ec65ddf2d078aa4204a1e78da56fbea103085e379747fd962538be741f

Contents?: true

Size: 597 Bytes

Versions: 4

Compression:

Stored size: 597 Bytes

Contents

module Awspec::Type
  class EksNodegroup < ResourceBase
    attr_accessor :cluster

    def initialize(group_name)
      super
      @group_name = group_name
    end

    def resource_via_client
      @resource_via_client ||= find_eks_nodegroup(cluster, @group_name)
    end

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

    def cluster
      @cluster || 'default'
    end

    STATES = %w(ACTIVE INACTIVE)

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
awspec-1.24.3 lib/awspec/type/eks_nodegroup.rb
awspec-1.24.2 lib/awspec/type/eks_nodegroup.rb
awspec-1.24.1 lib/awspec/type/eks_nodegroup.rb
awspec-1.24.0 lib/awspec/type/eks_nodegroup.rb