Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Create VM with external IP

Hey All, 

We have the "constraints/compute.vmExternalIpAccess" set to DENY ALL which is intended but have a requirement to create a couple of VMs to have external IPs. 

Is it possible to allow or whitelist a few VMs with certain TAGS to have external IPs whereas everything else is denied the external IP?

 

1 1 232
1 REPLY 1

Hello @g_munish  ,Welcome on Google Cloud Community.

Yes, you are able to do it.
Documentation: https://cloud.google.com/resource-manager/docs/organization-policy/org-policy-constraints?_gl=1*1iw4....

Compute Engine	Define allowed external IPs for VM instances	This list constraint defines the set of Compute Engine VM instances that are allowed to use external IP addresses.
By default, all VM instances are allowed to use external IP addresses.
The allowed/denied list of VM instances must be identified by the VM instance name, in the form: projects/PROJECT_ID/zones/ZONE/instances/INSTANCE

constraints/compute.vmExternalIpAccess


Syntax: 

DamianS_0-1726547745973.png

--
cheers,
DamianS
LinkedIn medium.com Cloudskillsboost Sessionize Youtube