adorable-action-51248
03/05/2021, 3:59 PMconst serviceDirectoryNamespace = new gcp.servicedirectory.Namespace('ns', {
namespaceId: "nsid",
location: 'europe-west3',
project,
});
const dnsManagedZone = new gcp.dns.ManagedZone('zone',{
dnsName: 'fancy.local.',
project,
visibility: "private",
serviceDirectoryConfig: {
namespace: {
namespaceUrl: serviceDirectoryNamespace.selfLink,
},
}
});
i get this error message:
gcp:dns/managedZone:ManagedZone resource 'zone' has a problem: "service_directory_config.0.namespace.0.namespace_url": required field is not set
if i change serviceDirectoryConfig
and wrap the contents in arrays, I get error messages like this: [...] has a problem: service_directory_config.0.namespace.0: expected object, got slice
the code i have looks pretty much like the code here: https://github.com/pulumi/pulumi-gcp/blob/master/sdk/nodejs/dns/managedZone.ts#L134
does anybody have an idea why this is not working ?witty-candle-66007
03/05/2021, 4:40 PMid
property instead of the selfLink
property like in your code.
Assuming selfLink
is correct, then I’m thinking you may want to use apply()
to resolve the selfLink
property when used in the dnsManagedZone declaration.
For example:
const dnsManagedZone = serviceDirectoryNamespace.selfLink.apply(link =>
new gcp.dns.ManagedZone('zone',{
dnsName: 'fancy.local.',
project,
visibility: "private",
serviceDirectoryConfig: {
namespace: {
namespaceUrl: link,
},
}
}))
You can read more about what the apply does here: https://www.pulumi.com/docs/intro/concepts/inputs-outputsadorable-action-51248
03/05/2021, 4:42 PM