gcloud compute instances describe
command to get the details of the instance.gcloud compute instances delete-access-config
command to remove the public IP from the instance:
gcloud compute instances describe
command to get the details of the instance.gcloud compute instances add-metadata
command to enable OS Login for the instance:
gcloud compute firewall-rules list
command to get the list of firewall rules.gcloud compute firewall-rules update
command to restrict SSH access to specific IP ranges:
google-cloud-sdk
library to interact with GCP Compute API.instances().list()
method.instances().get()
method.instances().setMetadata()
method to update the instance metadata with the desired configurations.google-cloud-sdk
library to interact with GCP Compute API.firewalls().list()
method.firewalls().update()
method to modify the firewall rules and enforce secure configurations.google-cloud-sdk
library to interact with GCP Security Command Center API.organizations().sources().findings().list()
method.organizations().sources().findings().update()
method to acknowledge or mitigate the security findings.