diff --git a/lib/fog/aws/models/beanstalk/environment.rb b/lib/fog/aws/models/beanstalk/environment.rb index eef6b427d..82400a2a2 100644 --- a/lib/fog/aws/models/beanstalk/environment.rb +++ b/lib/fog/aws/models/beanstalk/environment.rb @@ -47,8 +47,12 @@ module Fog # Returns the load balancer object associated with the environment. def load_balancer(elb_connection = Fog::AWS[:elb]) - requires :resources - elb_connection.load_balancers.get(resources['LoadBalancer']['LoadBalancerName']) + + if resources.nil? + elb_connection.load_balancers.get(live_resources['LoadBalancers'].first['Name']) + else + elb_connection.load_balancers.get(resources['LoadBalancer']['LoadBalancerName']) + end end # Return events related to this version diff --git a/lib/fog/aws/parsers/beanstalk/describe_environment_resources.rb b/lib/fog/aws/parsers/beanstalk/describe_environment_resources.rb index ee74ad1f9..92a5ddf33 100644 --- a/lib/fog/aws/parsers/beanstalk/describe_environment_resources.rb +++ b/lib/fog/aws/parsers/beanstalk/describe_environment_resources.rb @@ -16,6 +16,17 @@ module Fog tag 'Id', :string tag 'LaunchConfigurations', :object, :list tag 'LoadBalancers', :object, :list + tag 'Resources', :object, :list + tag 'Description', :string + tag 'LogicalResourceId', :string + tag 'PhysicalResourceId', :string + tag 'Type', :string + tag 'Properties', :object, :list + tag 'RuntimeSources', :object, :list + tag 'Parameter', :string + tag 'Versions', :object, :list + tag 'ApplicationName', :string + tag 'VersionLabel', :string tag 'Triggers', :object, :list end