gray-airplane-38353
01/30/2024, 2:01 AMerror: could not deserialize deployment: snapshot integrity failure; refusing to use it: resource urn:pulumi:stage1::infra::aws:lb:ApplicationLoadBalancer$aws:route53/record:Record::r53-resource-name dependency urn:pulumi:stage1::infra::aws:lb:ApplicationLoadBalancer$aws:lb/loadBalancer:LoadBalancer::lb-name refers to missing resource
I cannot simply rm
my stack as it's in use (and has been from some time).
Importing the resource that is claimed to be missing is also failing.
(also posted this msg in #typescript)icy-controller-6092
01/30/2024, 2:03 AMpulumi stack export --stack foo > state.json
gray-airplane-38353
01/30/2024, 2:12 AM{
"urn": "urn:pulumi:stage1::infra::aws:lb:ApplicationLoadBalancer::lb-name",
"custom": false,
"type": "aws:lb:ApplicationLoadBalancer",
"parent": "urn:pulumi:stage1::infra::pulumi:pulumi:Stack::infra-stage1",
"sourcePosition": "project:///node_modules/@pulumi/lb/application.ts#54,9"
},
All the other records with a reference to the ApplicationLoadBalancer
mentioned have the URN listed as a parent:
"parent": "urn:pulumi:stage1::infra::aws:lb:ApplicationLoadBalancer::lb-name",
gray-airplane-38353
01/30/2024, 2:13 AMicy-controller-6092
01/30/2024, 2:14 AMgray-airplane-38353
01/30/2024, 2:15 AMicy-controller-6092
01/30/2024, 2:16 AMgray-airplane-38353
01/30/2024, 2:29 AMurn:pulumi:stage1::infra::aws:lb:ApplicationLoadBalancer$aws:route53/record:Record::r53-record
), that depends upon a ALB resource (urn:pulumi:stage1::infra::aws:lb:ApplicationLoadBalancer$aws:lb/loadBalancer:LoadBalancer::alb-name
).
The R53 record (string) occurs twice in the JSON. Once as a "parent", the other as custom resource ("custom": true
) in the JSON file.
The ALB record string occurs 55 times in the JSON file, but every time as a dependency of another record (either a R53 record or a CloudWatch alarm - which is expected).gray-airplane-38353
01/30/2024, 2:31 AMicy-controller-6092
01/30/2024, 2:39 AMicy-controller-6092
01/30/2024, 2:40 AMimport
resource optiongray-airplane-38353
01/30/2024, 2:41 AMicy-controller-6092
01/30/2024, 2:41 AMicy-controller-6092
01/30/2024, 2:42 AMgray-airplane-38353
01/30/2024, 2:44 AMicy-controller-6092
01/30/2024, 2:45 AMgray-airplane-38353
01/30/2024, 2:50 AMicy-controller-6092
01/30/2024, 2:53 AMr53-resource-name
and another named lb-name
• lb-name
is in your stack because you posted the snippet from state.json earlier, which is why you are also seeing it in web view
• i assume the r53-resource-name
is also in your stack's state - because the error message indicates it is there, but it referss to a missing resource lb-name
• my best guess would be the URNs are not matching
• did you perform any pulumi up
actions using the --target
flag?gray-airplane-38353
01/30/2024, 2:55 AM• did you perform anyActually, I did. BUT, it was on a DIFFERENT ALB (in the same stack).actions using thepulumi up
flag?--target
# pulumi up --target 'alb-urn' --target-dependents
icy-controller-6092
01/30/2024, 2:57 AMresource53
has a dependency on:
urn:pulumi:stage1::infra::aws:lb:ApplicationLoadBalancer$aws:lb/loadBalancer:LoadBalancer::lb-name
but in your snippet the URN for lb-name
is:
urn:pulumi:stage1::infra::aws:lb:ApplicationLoadBalancer::lb-name
these URNs do not match, even though you mention you edited the URNs for privacyicy-controller-6092
01/30/2024, 2:58 AMresource53
indicates a parent-child relationship (the $
symbol)icy-controller-6092
01/30/2024, 3:02 AMaws:lb/loadBalancer:LoadBalancer
the second is a aws:lb:ApplicationLoadBalancer
but they both have the same name lb-name
- which is typically not allowed I would have thought?gray-airplane-38353
01/30/2024, 3:04 AMgray-airplane-38353
01/30/2024, 3:10 AMurn:pulumi:stage1::infra::aws:lb:ApplicationLoadBalancer$aws:lb/loadBalancer:LoadBalancer::lb-name
The resource that exists (and shows online) is:
urn:pulumi:stage1::infra::aws:lb:ApplicationLoadBalancer::lb-name
So, as you pointed out, the difference is the $aws
.icy-controller-6092
01/30/2024, 3:16 AM--target
it updated lb-name
- but not the reference in r53-resource-name
- which broke the reference
you can go through your history on the Updates tab in Pulumi Cloud to see what each update has applied.icy-controller-6092
01/30/2024, 3:17 AMgray-airplane-38353
01/30/2024, 4:03 AM$aws
resource never existed...gray-airplane-38353
01/30/2024, 7:06 AMgray-airplane-38353
01/30/2024, 7:16 AMpulumi stack import --file JSON-file
gray-airplane-38353
01/30/2024, 7:43 AMimport
, I am seeing the same error.
Here's the import JSON:
{
"resources": [
{
"type": "aws:lb/loadBalancer:LoadBalancer",
"name": "lb-name",
"id": "arn:aws:elasticloadbalancing:us-west-2:123456789123:loadbalancer/app/lb-name/79f63fb45bf44d3b"
}
]
}
Used the docs from this page.