https://pulumi.com logo
Title
g

gray-sandwich-51355

05/02/2023, 1:03 PM
I'm trying to have Pulumi update my Google Domains DNS record after provisioning a static IP address. I got the request working, but I'm seeing that it runs both on the preview and when actually running
pulumi up
. Is there a reason for this and how would I make sure that the record is not updated during the preview?
const googleDomainUrl = pulumi.interpolate `<https://domains.google.com/nic/update?hostname=${mydomain}&myip=${ip.address}>`;
const options =
        {
            method: 'POST',
            headers: {
                'User-Agent': 'Pulumi',
                'Authorization': `Basic ${Buffer.from(`${googleDomainUser}:${googleDomainPass}`).toString('base64')}`
            }
        }



let response = googleDomainUrl.apply(url => fetch(url, options))