Terraform Bridge and a "Missing ID" When managing...
# general
g
Terraform Bridge and a "Missing ID" When managing a
vantage_team
via the Pulumi-wrapped Terraform provider, the resource is created successfully and a
token
(e.g.,
team_…
) is returned as an output. However, the Pulumi resource ID is never set and remains
"missing ID"
in state. Because the ID is empty, Pulumi treats the resource as absent on subsequent previews/updates and plans a replace instead of an in-place update. Example code:
Copy code
import * as pulumi from "@pulumi/pulumi";
import * as vantage from "@local/vantage";
...
const team = new vantage.Team("TestTeam", {
  name: "TestTeam",
  description: "TestTeam",
  workspaceTokens: [],
});
State:
Copy code
{
  "urn": "urn:pulumi:default::...::vantage:team:NDTeam$vantage:index/team:Team::TestTeam",
  "custom": true,
  "id": "missing ID",
  "type": "vantage:index/team:Team",
  "inputs": {
    "description": "TestTeam",
    "name": "TestTeam",
    "workspaceTokens": []
  },
  "outputs": {
    "description": "TestTeam",
    "name": "TestTeam",
    "token": "team_a3a926c31733487a",
    "userEmails": [],
    "userTokens": [],
    "workspaceTokens": []
  },
  "provider": "urn:pulumi:default::...::pulumi:providers:vantage::default_0_1_62::2d400833-a014-45c3-b5cf-177eb33a4956"
}
@white-camera-67848 Is this a bug in the provider - ie, is there some missing connection in the provider that needs to tell it to map the "outputs.token" field (which is the unique ID of the team) to the "id" field in the state file?
e
For the former I'd raise an issue on the repo, for the latter I'd raise an issue at the dynamic bridge repo https://github.com/pulumi/pulumi-terraform-provider
g
I'm working with Vantage on this - it looks like their Terraform promvider doesn't set any "id" fields...
👀 1
Can you tell me? I am using the
pulumi package add terraform-provider vantage-sh/vantage
command (though per https://github.com/pulumi/pulumi/issues/20386, I had to do some manual work to make it work for now)
@echoing-dinner-19531 oh i see https://github.com/pulumi/pulumi/pull/20387 got merged... im curious how long until it gets released?
e
im curious how long until it gets released?
Should be today
g
oh! nice!
e
There's been CI issues all day 😞 so has been pushed to tomorrow
g
Coming back to this ... the fix is at https://github.com/vantage-sh/terraform-provider-vantage/pull/134 for this provider. I've provided evidence to the team that it works now in the Pulumi bridge... so hopefully they get it shipped quickly. Overall though impressed with how quickly they were willing to put up a fix.