inspec / inspec-aws

InSpec AWS Resource Pack https://www.inspec.io/
Other
136 stars 106 forks source link

Update documentation for ELB resource #169

Open rmoles opened 4 years ago

rmoles commented 4 years ago

🎛 Description

It seems that the ELB resource provides functionality for users to test ELB's and NLB's. It would be worthwhile to update the documentation to reflect this. Also, it appears that a link to the ELB documentation has been left out of the README.md

SowDeu commented 4 years ago

Hi @rmoles ,

Quick note aws_alb method is not working as expected .. issues linked #139. Please help me understand if this is an ongoing issue or new issue. Thanks in advance .

rmoles commented 4 years ago

Hi @rmoles ,

Quick note aws_alb method is not working as expected .. issues linked #139. Please help me understand if this is an ongoing issue or new issue. Thanks in advance.

Firstly, apologies, it is the ELB class that covers the NLBs rather than ALB, I've updated this issue to reflect this. However, the aws_alb class should be available and working. The NoMethodError sounds like there may be an issue with your implementation of the inspec-aws resource pack, or you are using an older version. I would take a look through the README to verify your setup. If the NoMethodError persists I'd suggest checking the FAQ section https://github.com/inspec/inspec-aws#faq

SowDeu commented 4 years ago

@rmoles : No problem and thanks for the update .. I will check with ELB method if I can test NLB and update the same.. Fingers Crossed. If I got it right the current version we are using for Inspec is 4.18.24... Not sure if structure is wrong as we are using same structure for other resources and it is working fine.. saying that I might be wrong, I will check once again.

SowDeu commented 4 years ago

@rmoles : We have updated inspec chef to new version - 4.18.51 and run a simple test for : TEST: For Testing NLB with ELB describe aws_elb('nlb-name') do it {should exist} end RESULT: × AWS ELB nlb-name is expected to exist expected AWS ELB nlb-name to exist

TEST: For Testing ELB with ELB describe aws_elb('elb_name') do it {should exist} end RESULT: ✔ elb: AWS ELB elb_name ✔ AWS ELB elb_name is expected to exist. So not sure why it is not picking NLB. Please let me if there is something wrong with how we did or actually is there an issue with ELB not picking NLB....

rmoles commented 4 years ago

@SowDeu thanks for the feedback. While I investigate further on my end, would you be able to test this using the aws_alb resource, just to verify that this doesn't cover your use case?

SowDeu commented 4 years ago

@rmoles : Thanks for the update but I am unable to test aws_alb resource itself getting below error,

     2: from alb.rb:3:in `load_with_context'
     1: from /usr/local/bundle/gems/inspec-4.18.59/lib/inspec/dsl.rb:68:in `method_missing'

/usr/local/bundle/gems/inspec-4.18.59/lib/inspec/dsl.rb:71:in rescue in method_missing': undefined methodaws_alb' for # (NoMethodError). Please help me understand where the issue is ?? we are getting same error for loads of other methods like auto_scaling group , regions, ecr etc....

SowDeu commented 4 years ago

@rmoles Thank you very much for the support . I can confirm that its ALB Resource that is being used for NLB. It's a formatting error in my profile. Now got it working.