https://pulumi.com logo
m

miniature-rose-15269

03/25/2020, 9:03 AM
Howdy! Having an issue where
gcp.compute.RouterNat
is always in need of update even when there are no changes I've made.
Copy code
Previewing update (dev):
     Type                      Name         Plan       Info
     pulumi:pulumi:Stack       appital-dev
 ~   └─ gcp:compute:RouterNat  router-nat   update     [diff: ~natIps]

Resources:
    ~ 1 to update
    28 unchanged
and this is how it's specified:
Copy code
export const router = new gcp.compute.Router('router', {
	network: network.name
})

const routerIpName = `${pulumi.getProject()}-${pulumi.getStack()}-ip`

export const routerIp = new gcp.compute.Address('router-ip', {
	name: routerIpName
})

export const routerNat = new gcp.compute.RouterNat('router-nat', {
	router: router.name,
	natIpAllocateOption: 'MANUAL_ONLY',
	natIps: [routerIpName],
	sourceSubnetworkIpRangesToNat: 'LIST_OF_SUBNETWORKS',
	subnetworks: [
		{
			name: subnetwork.name,
			sourceIpRangesToNats: ['ALL_IP_RANGES']
		}
	]
})
Any ideas on how to fix this?
g

gentle-diamond-70147

03/25/2020, 4:28 PM
Can you provide the
pulumi preview --diff
output?
m

miniature-rose-15269

03/26/2020, 12:12 PM
didn’t know about that command! it helped me fix it 👌
👍 1
essentially the IP string is the very long version:
<https://www.googleapis.com/compute/v1/projects/[project]/regions/[region]/addresses/[address-name]>