2018-01-18 15:51:06 +00:00
---
title: About the aws_vpcs Resource
2018-02-14 01:42:39 +00:00
platform: aws
2018-01-18 15:51:06 +00:00
---
2018-02-15 02:23:29 +00:00
# aws\_vpcs
2018-01-18 15:51:06 +00:00
Use the `aws_vpcs` InSpec audit resource to test properties of some or all AWS Virtual Private Clouds (VPCs).
2018-02-14 01:42:39 +00:00
A VPC is a networking construct that provides an isolated environment. A VPC is contained in a geographic region, but spans availability zones in that region. A VPC may have multiple subnets, internet gateways, and other networking resources. Computing resources--such as EC2 instances--reside on subnets within the VPC.
2018-01-18 15:51:06 +00:00
2018-02-14 01:42:39 +00:00
Each VPC is uniquely identified by its VPC ID. In addition, each VPC has a non-unique CIDR IP Address range (such as 10.0.0.0/16) which it manages.
2018-01-18 15:51:06 +00:00
Every AWS account has at least one VPC, the "default" VPC, in every region.
<br>
## Syntax
An `aws_vpcs` resource block uses an optional filter to select a group of VPCs and then tests that group.
2018-02-14 01:42:39 +00:00
# The control will pass if the filter returns at least one result. Use `should_not` if you expect zero matches.
2018-01-18 15:51:06 +00:00
describe aws_vpcs do
it { should exist }
end
<br>
## Examples
The following examples show how to use this InSpec audit resource.
As this is the initial release of `aws_vpcs`, its limited functionality precludes examples.
<br>
## Matchers
2018-02-14 01:42:39 +00:00
For a full list of available matchers please visit our [matchers page](https://www.inspec.io/docs/reference/matchers/).
2018-01-18 15:51:06 +00:00
### exists
2018-02-14 01:42:39 +00:00
The control will pass if the filter returns at least one result. Use `should_not` if you expect zero matches.
2018-01-18 15:51:06 +00:00
# You will always have at least one VPC
describe aws_vpcs
it { should exist }
end