Anyone that have links or information regarding mo...
# typescript
a
Anyone that have links or information regarding moving Digitalocean infrastructure from Terraform to Pulumi? It's not very big and most things was taken care of by tf2pulumi and then some manual edits to add in
{import:"resource id"}
. Problem is that some resources give warnings like the following, while the inputs are configured exactly the same as previous TF code and is correct in relation to the existing TF state. 🤔 And if I run
terraform plan
there are no changes to be made, so there should not be any wild configuration changes floating around.
Copy code
digitalocean:index:Droplet (mgr):
    warning: inputs to import do not match the existing resource; importing this resource will fail
g
When you select Details from the "Do you want to perform this update" prompt it should show you what inputs are different.
If it shows no differences then that sounds like a bug.
pulumi preview --diff
will also show you the full details
a
Thanks for the suggestions. The warnings seem to come from that a new IP is allocated to those resources for some reason. Will look into that a bit more when at home again. Another problem I found was when trying to import DNSRecords under a domain I get errors that says that "domain can't be an empty string" even when I refer to a domain that already exist in Digitalocean and declared as a variable in the TS code.
Copy code
const tld = new digitalocean.Domain('<http://tld.com|tld.com>', {...}, {import: 'identifier'});
const sub = new digitalocean.DnsRecord('<http://sub.tld.com|sub.tld.com>', {
    domain = tld.name,
    ...
}, {import: 'identifier'});
The empty string thing is the same even when I hardcode the domain in the subdomain.
g
I think this is a nuance of https://github.com/pulumi/pulumi/pull/3327, which should be fixed in the next couple weeks. In the meantime, if you hardcode the domain in the
digitalocean.DnsRecord
resource I believe it will import fine and then you can revert to using the
tld.name
reference.