-
-
Save rgodishela/e509d67e5657160a2f4c668a29fc27bc to your computer and use it in GitHub Desktop.
vpc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Skeleton: | |
1. Get the VPC Name | |
2. check the cidr block:Get-EC2Vpc -Filter @{Name="cidr"; Values="172.31.0.0/16"} | |
3. check dns hosnames are enabled or not: Get-EC2VpcAttribute -VpcId $VPC_Id -Attribute enableDnsHostnames | |
4. check dns support enabled or not : Get-EC2VpcAttribute -VpcId $VPC_Id -Attribute enableDnsSupport | |
5. find the vpc end point: we need vpc endpoint id too-- not found yet | |
6. check whether service_name matches with com.amazonaws.us-east-1.s3 | |
7. Check whether the given vpc_id matching with vpc id: Get-EC2Vpc | select VpcId | format-wide | |
8. Check how many private subnets are there :(Get-EC2Subnet -Filter @{Name="MapPublicIpOnLaunch"; Values="False"}).count | |
9. list private subnet route tables: not found yet | |
10. check whether the given log group name matches with vpc cwl group name: Get-CWLLogGroup -LogGroupNamePrefix | |
11. Check wther the iam-role-arn value matches with arn of iam role for vpc flow logs: not found yet | |
The below things are need for the above script | |
1. VPC Name ( we can pass this as an argument ) | |
2. vpc_id | |
3. how many private subnets should be there | |
4. rivate subnet route tables should be there | |
5. cwl group name | |
6. iam-role-arn value | |
7. vpc endpoint id |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment