Skip to content

Commit

Permalink
Add region to aws.vpc.subnet (#3858)
Browse files Browse the repository at this point in the history
Also cleanup some descriptions and add region into the defaults for
aws.vpc.subnet

Signed-off-by: Tim Smith <[email protected]>
  • Loading branch information
tas50 authored Apr 26, 2024
1 parent 15dcb2c commit e4f1e24
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 3 deletions.
8 changes: 5 additions & 3 deletions providers/aws/resources/aws.lr
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ private aws.vpc.routetable @defaults("id routes.length") {
}

// Amazon Virtual Private Cloud (VPC) subnet
private aws.vpc.subnet @defaults("id cidrs availabilityZone defaultForAvailabilityZone") {
private aws.vpc.subnet @defaults("id cidrs region availabilityZone defaultForAvailabilityZone") {
// ARN of the subnet
arn string
// Unique ID of the subnet
Expand All @@ -93,6 +93,8 @@ private aws.vpc.subnet @defaults("id cidrs availabilityZone defaultForAvailabili
assignIpv6AddressOnCreation bool
// The state of the subnet: pending or available
state string
// Region in which the VPC subnet exists
region string
}

// Amazon Virtual Private Cloud (VPC) endpoint
Expand All @@ -103,7 +105,7 @@ private aws.vpc.endpoint @defaults("id type region") {
type string
// VPC in which the endpoint exists
vpc string
// Region in which the VPC exists
// Region in which the VPC endpoint exists
region string
// The name of the endpoint service
serviceName string
Expand All @@ -125,7 +127,7 @@ private aws.vpc.flowlog @defaults("id region status") {
id string
// VPC in which the flow log exists
vpc string
// Region in which the flow log exists
// Region in which the VPC flow log exists
region string
// Status of the flow log
status string
Expand Down
12 changes: 12 additions & 0 deletions providers/aws/resources/aws.lr.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions providers/aws/resources/aws.lr.manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2658,6 +2658,7 @@ resources:
defaultForAvailabilityZone: {}
id: {}
mapPublicIpOnLaunch: {}
region: {}
state: {}
is_private: true
min_mondoo_version: 9.0.0
Expand Down
1 change: 1 addition & 0 deletions providers/aws/resources/aws_vpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ func (a *mqlAwsVpc) subnets() ([]interface{}, error) {
"defaultForAvailabilityZone": llx.BoolDataPtr(subnet.DefaultForAz),
"id": llx.StringDataPtr(subnet.SubnetId),
"mapPublicIpOnLaunch": llx.BoolDataPtr(subnet.MapPublicIpOnLaunch),
"region": llx.StringData(a.Region.Data),
"state": llx.StringData(string(subnet.State)),
})
if err != nil {
Expand Down

0 comments on commit e4f1e24

Please sign in to comment.