-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resource creation guide, edited #139
Conversation
Signed-off-by: mmclane <m.mclane@criteo.com>
Signed-off-by: Trevor Bramble <tbramble@chef.io>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found a typo and I have a recommendation for updating the reference code. Otherwise looking good!
docs/resource_creation_guide.md
Outdated
The singular resource (`azurerm_subnet`) is used to test a specific resource of that type and should include all of the properties available. A plural resource (`azurerm_subnets`) is used to test the collection of resources of that type. This allows for tests to be written based on the group of resources. | ||
|
||
## Update libraries/support/azure/management.rb | ||
The files in `libraries/support/azure` define how things are downloaded by the API. A definition needs to be added for the types of resources your going to be testing for (i.e. virtual machine, virtual networks, subnets, etc). This definition will need to include the location of the resource in the API. This is essentially the type of object. The [Azure Resource Explorer](https://resources.azure.com) can be used to determine the location by browsing for an object and referencing the object type. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/resources your going/resources you're going/
docs/resource_creation_guide.md
Outdated
``` | ||
def initialize(resource_group: nil, name: nil) | ||
resp = client.subnet(resource_group, name) | ||
return if resp.nil? || resp.key?('error') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should use favor using this method: https://github.com/inspec/inspec-azure/blob/master/libraries/azurerm_resource.rb#L41
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That should also be added to the style guide.
Signed-off-by: Trevor Bramble <tbramble@chef.io>
Description
Replaces #129. Same great nutritional value, bold new flavor.