https://pulumi.com logo
#general
Title
# general
c

chilly-photographer-60932

02/09/2019, 3:45 AM
This is from the example code and it is running into an error
error: unexpected null property rrdatas[0]
m

microscopic-florist-22719

02/09/2019, 3:46 AM
Is that also the case if property values that refer to an actual address are passed to
gcp.compute.getAddress
?
(i.e. rather than
{ name: 'foobar', region: 'us-central1', project: 'abcd' }
etc.)
c

chilly-photographer-60932

02/09/2019, 4:20 PM
@microscopic-florist-22719 Yes that is the case. I would appreciate if you could try and recreate and post an example for creating a static IP.
Any update on this?
@gentle-diamond-70147 Would you be able to help with this?
g

gentle-diamond-70147

02/11/2019, 7:00 PM
Are you meaning to use
gcp.compute.getAddress
to get an existing static IP? Or are you wanting to create a new static IP?
c

chilly-photographer-60932

02/11/2019, 7:01 PM
I want a new Static IP
g

gentle-diamond-70147

02/11/2019, 7:04 PM
getAddress
is a function to get a static IP that already exists
you need to create a new Address - e.g.
const ip = new gcp.compute.Address(...
Copy code
import * as pulumi from '@pulumi/pulumi';
import * as gcp from '@pulumi/gcp';

const ip = new gcp.compute.Address('prod', {
    name: 'foobar',
});

const prod = new gcp.dns.ManagedZone('prod', {
    dnsName: 'prod.mydomain.com.'
});

const frontend = new gcp.dns.RecordSet('frontend', {
    name: pulumi.interpolate `frontend.${prod.dnsName}`,
    managedZone: prod.name,
    rrdatas: [ip.address],
    ttl: 300,
    type: 'A'
});