[英]GCP equivalent of aws describe-network-interfaces. A way to see all networking resources in GCP
To debug IPs and search objects by name, the aws command of aws ec2 describe-network-interfaces
was very useful.要调试 IP 和按名称搜索对象,
aws ec2 describe-network-interfaces
的 aws 命令非常有用。
Is there anything similar to this in GCP? GCP中有类似的东西吗?
Also you could run a script eg你也可以运行一个脚本,例如
#!/bin/bash
vpc="vpc-xxxxxxxxxxxxx"
aws ec2 describe-internet-gateways --filters 'Name=attachment.vpc-id,Values='$vpc | grep InternetGatewayId
aws ec2 describe-subnets --filters 'Name=vpc-id,Values='$vpc | grep SubnetId
aws ec2 describe-route-tables --filters 'Name=vpc-id,Values='$vpc | grep RouteTableId
aws ec2 describe-network-acls --filters 'Name=vpc-id,Values='$vpc | grep NetworkAclId
aws ec2 describe-vpc-peering-connections --filters 'Name=requester-vpc-info.vpc-id,Values='$vpc | grep VpcPeeringConnectionId
aws ec2 describe-vpc-endpoints --filters 'Name=vpc-id,Values='$vpc | grep VpcEndpointId
aws ec2 describe-nat-gateways --filter 'Name=vpc-id,Values='$vpc | grep NatGatewayId
aws ec2 describe-security-groups --filters 'Name=vpc-id,Values='$vpc | grep GroupId
aws ec2 describe-instances --filters 'Name=vpc-id,Values='$vpc | grep InstanceId
aws ec2 describe-vpn-connections --filters 'Name=vpc-id,Values='$vpc | grep VpnConnectionId
aws ec2 describe-vpn-gateways --filters 'Name=attachment.vpc-id,Values='$vpc | grep VpnGatewayId
aws ec2 describe-network-interfaces --filters 'Name=vpc-id,Values='$vpc | grep NetworkInterfaceId
Is there anything similar to this in GCP? GCP中有类似的东西吗?
Google Cloud has a similar CLI tool gcloud
that has hundreds of commands. Google Cloud 有一个类似的 CLI 工具
gcloud
,它有数百个命令。
AWS uses the command format verb-service
. AWS 使用命令格式
verb-service
。
Google Cloud has commands based on Google Cloud service
feature
sub-feature
verb
.谷歌云有基于谷歌云
service
feature
sub-feature
verb
的命令。
Examples:例子:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.