mirror of
https://github.com/inspec/inspec
synced 2024-11-23 13:13:22 +00:00
Spelling and punctuation check on Azure and AWS (#2657)
* Spelling and punctuation check Signed-off-by: kagarmoe <kgarmoe@chef.io>
This commit is contained in:
parent
f9452b022a
commit
bd7327b91c
16 changed files with 46 additions and 48 deletions
|
@ -45,7 +45,7 @@ The following examples show how to use this InSpec audit resource.
|
|||
it { should be_encrypted }
|
||||
end
|
||||
|
||||
### Test that the specified trail is a multi region trail
|
||||
### Test that the specified trail is a multi-region trail
|
||||
|
||||
describe aws_cloudtrail_trail('trail-name') do
|
||||
it { should be_multi_region_trail }
|
||||
|
@ -117,7 +117,7 @@ This InSpec audit resource has the following special matchers. For a full list o
|
|||
|
||||
### be\_multi\_region\_trail
|
||||
|
||||
The test will pass if the identified trail is a multi region trail.
|
||||
The test will pass if the identified trail is a multi-region trail.
|
||||
|
||||
describe aws_cloudtrail_trail('trail-name') do
|
||||
it { should be_multi_region_trail }
|
||||
|
|
|
@ -7,7 +7,7 @@ platform: aws
|
|||
|
||||
Use the `aws_cloudwatch_log_metric_filter` InSpec audit resource to search for and test properties of individual AWS Cloudwatch Log Metric Filters.
|
||||
|
||||
A Log Metric Filter (LMF) is an AWS resource that observes log traffic, looks for a specified pattern, and updates a metric about the number times the match occurs. The metric can also be connected to AWS Cloudwatch Alarms, so that actions can be taken when a match occurs.
|
||||
A Log Metric Filter (LMF) is an AWS resource that observes log traffic, looks for a specified pattern, and then updates a metric about the number times the match occurs. The metric can also be connected to AWS Cloudwatch Alarms, so that actions can be taken when a match occurs.
|
||||
|
||||
<br>
|
||||
|
||||
|
@ -15,7 +15,7 @@ A Log Metric Filter (LMF) is an AWS resource that observes log traffic, looks fo
|
|||
|
||||
An `aws_cloudwatch_log_metric_filter` resource block searches for an LMF, specified by several search options. If more than one log metric filter matches, an error occurs.
|
||||
|
||||
# Look for a LMF by its filter name and log group name. This combination
|
||||
# Look for an LMF by its filter name and log group name. This combination
|
||||
# will always either find at most one LMF - no duplicates.
|
||||
describe aws_cloudwatch_log_metric_filter(
|
||||
filter_name: 'my-filter',
|
||||
|
|
|
@ -103,7 +103,7 @@ If there is no bucket policy, this property returns an empty array.
|
|||
bucket_policy = aws_s3_bucket('my-bucket')
|
||||
|
||||
# Look for statements that allow the general public to do things
|
||||
# This may be a false positive; it's possible these statements
|
||||
# This may be a false positive; it is possible these statements
|
||||
# could be protected by conditions, such as IP restrictions.
|
||||
public_statements = bucket_policy.select do |s|
|
||||
s.effect == 'Allow' && s.principal == '*'
|
||||
|
|
|
@ -63,8 +63,6 @@ Use this parameter to define the type of resources to test.
|
|||
...
|
||||
end
|
||||
|
||||
|
||||
|
||||
These options can also be set using the environment variables:
|
||||
|
||||
* `AZURE_RESOURCE_GROUP_NAME`
|
||||
|
@ -76,7 +74,7 @@ When the options have been set as well as the environment variables, the environ
|
|||
|
||||
<br>
|
||||
|
||||
## Example
|
||||
## Parameter Example
|
||||
|
||||
describe azure_generic_resource(group_name: 'Inspec-Azure', name: 'Linux-Internal-VM', apiversion: '2.0') do
|
||||
its('location') { should eq 'westeurope' }
|
||||
|
@ -162,7 +160,7 @@ The following examples show how to use some of the InSpec audit properties:
|
|||
|
||||
## Matchers
|
||||
|
||||
For a full list of available matchers, please visit our [matchers page](https://www.inspec.io/docs/reference/matchers/).
|
||||
This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our [matchers page](https://www.inspec.io/docs/reference/matchers/).
|
||||
|
||||
<br>
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ Use this parameter to define the name of the Azure resource to test.
|
|||
...
|
||||
end
|
||||
|
||||
If both `group_name` and `name` is set then `name` will take priority.
|
||||
If both `group_name` and `name` is set then `name` takes priority
|
||||
|
||||
These options can also be set using the environment variables:
|
||||
|
||||
|
@ -164,7 +164,7 @@ Tests the number of Public IP Addresses in the resource group.
|
|||
|
||||
Tests the number of managed disk images that are in the resource group.
|
||||
|
||||
These are the items from which managed disks are created which are attached to machines. Generally the images are created from a base image or a custom image (e.g. Packer).
|
||||
Managed disks are created from disk images and then attached to the machines. Generally, the images are created from a base image or a custom image (e.g., Packer)
|
||||
|
||||
its('managed_disk_image_count') { should eq 5 }
|
||||
|
||||
|
@ -240,7 +240,7 @@ Use this matcher to test that public ips exist.
|
|||
|
||||
## Tags
|
||||
|
||||
It is possible to test the tags that have been assigned to the resource. There are a number of properties that can be called to check that it has tags, that it has the correct number and that the correct ones are assigned.
|
||||
It is possible to test the tags that have been assigned to the resource. There are some properties for checking that a resource has tags, that it has the correct number of tags, and that the correct tags are assigned.
|
||||
|
||||
### have\_tags
|
||||
|
||||
|
@ -262,7 +262,7 @@ It is possible to check if a specific tag has been set on the resource.
|
|||
|
||||
### xxx\_tag
|
||||
|
||||
To get the value of the tag, a number of preoprties have been created from the tags that are set.
|
||||
To get the value of the tag, some properties are created from the tags themselves.
|
||||
|
||||
For example, if the following tag is set on a resource:
|
||||
|
||||
|
|
|
@ -5,11 +5,11 @@ platform: azure
|
|||
|
||||
# azure\_virtual\_machine
|
||||
|
||||
Use the `azure_virtual_machine` InSpec audit resource to ensure that a Virtual Machine has been provisionned correctly.
|
||||
Use the `azure_virtual_machine` InSpec audit resource to ensure that a Virtual Machine has been provisioned correctly.
|
||||
|
||||
## Syntax
|
||||
|
||||
The name of the machine and the resourece group are required as properties to the resource.
|
||||
The name of the machine and the resource group are required as properties to the resource.
|
||||
|
||||
describe azure_virtual_machine(group_name: 'MyResourceGroup', name: 'MyVM') do
|
||||
its('property') { should eq 'value' }
|
||||
|
@ -17,9 +17,9 @@ The name of the machine and the resourece group are required as properties to th
|
|||
|
||||
where
|
||||
|
||||
* `MyVm` is the name of the virtual machine as seen in Azure. (It is **not** the hostname of the machine)
|
||||
* `MyResourceGroup` is the name of the resource group that the machine is in.
|
||||
* `property` is one of
|
||||
* `MyVm` is the name of the virtual machine as seen in Azure; it is **not** the hostname of the machine
|
||||
* `MyResourceGroup` is the name of the machine's resource group
|
||||
* `property` is one of the resource properties
|
||||
* `value` is the expected output from the matcher
|
||||
|
||||
## Examples
|
||||
|
@ -106,9 +106,9 @@ Name of the Virtual Machine in Azure. Be aware that this is not the computer nam
|
|||
|
||||
### publisher
|
||||
|
||||
The publisher of the image from which this machine was built.
|
||||
The publisher of this machine's build image.
|
||||
|
||||
This will be `nil` if the machine was created from a custom image.
|
||||
`nil` if the machine was created from a custom image.
|
||||
|
||||
its('publisher') { should cmp 'MicrosoftWindowsServer' }
|
||||
|
||||
|
@ -116,7 +116,7 @@ This will be `nil` if the machine was created from a custom image.
|
|||
|
||||
The offer from the publisher of the build image.
|
||||
|
||||
This will be `nil` if the machine was created from a custom image.
|
||||
`nil` if the machine was created from a custom image.
|
||||
|
||||
its('offer') { should cmp 'WindowsServer' }
|
||||
|
||||
|
@ -124,13 +124,13 @@ This will be `nil` if the machine was created from a custom image.
|
|||
|
||||
The item from the publisher that was used to create the image.
|
||||
|
||||
This will be `nil` if the machine was created from a custom image.
|
||||
`nil` if the machine was created from a custom image.
|
||||
|
||||
its('sku') { should cmp '2016-Datacenter' }
|
||||
|
||||
### os\_type
|
||||
|
||||
Test that returns the classification in Azure of the operating system type. Ostensibly this will be either `Linux` or `Windows`.
|
||||
Test that returns the classification in Azure of the operating system type. Usually either `Linux` or `Windows`.
|
||||
|
||||
its('os_type') { should cmp 'Windows' }
|
||||
|
||||
|
@ -148,7 +148,7 @@ Returns the type of caching that has been set on the operating system disk.
|
|||
|
||||
### create\_option
|
||||
|
||||
When the operating system disk is created, how it was created is set as an property. This property returns how the disk was created.
|
||||
When the operating system disk is created, how it was created is set as a property. This property returns how the disk was created.
|
||||
|
||||
its('create_option') { should cmp 'FromImage' }
|
||||
|
||||
|
|
|
@ -130,7 +130,7 @@ Returns an integer of size of this disk in GB.
|
|||
|
||||
### lun
|
||||
|
||||
The disk number as reported by Azure. This is a zero based index value.
|
||||
The disk number as reported by Azure. Has a zero-based index value.
|
||||
|
||||
its('lun') { should cmp 0 }
|
||||
|
||||
|
@ -142,7 +142,7 @@ String stating the caching that has been set on the disk.
|
|||
|
||||
### create\_option
|
||||
|
||||
How the disk was created. Typically for data disks this will be the string value 'Empty'.
|
||||
How the disk was created. Typically for data disks, this will be the string value 'Empty'.
|
||||
|
||||
its('create_option') { should cmp 'Empty' }
|
||||
|
||||
|
@ -154,7 +154,7 @@ Boolean stating if the disk is a managed disk or not. If it is not a managed dis
|
|||
|
||||
### vhd\_uri
|
||||
|
||||
If this _not_ a managed disk then the `vhd_uri` will be the full URI to the disk in the storage account.
|
||||
If this _not_ a managed disk, then the `vhd_uri` will be the full URI to the disk in the storage account.
|
||||
|
||||
its('vhd_uri') { should cmp '
|
||||
https://primary_storage.blob.core.windows.net/container_name/vm_name.vhd' }
|
||||
|
@ -169,7 +169,7 @@ This derived from the `vhd_uri`.
|
|||
|
||||
### storage\_account\_type
|
||||
|
||||
If this is a managed disk this is the storage account type, e.g. `Standard_LRS`
|
||||
If this is a managed disk this is the storage account type, e.g. `Standard_LRS`.
|
||||
|
||||
its('storage_account_type') { should cmp 'Standard_LRS' }
|
||||
|
||||
|
|
Loading…
Reference in a new issue