jolly-megabyte-6233
12/19/2024, 10:35 AMjolly-megabyte-6233
12/19/2024, 10:35 AMaws-native:iotsitewise:Asset ({asset-urn-redacted}):\n' +
{turbo node job redacted}: ' error: operation UPDATE failed with "InvalidRequest": Invalid request provided: Hierarchy cannot use actual ID to reference asset model hierarchy\n' +
And here's the code:
const asset = new Asset(`tmp-${name}`, {
assetName: instanceArgs.name,
assetExternalId: instanceArgs.externalId,
assetModelId: model.assetModelId,
assetProperties,
assetHierarchies: Object.entries<Asset[]>(
instanceArgs.children ?? {},
).flatMap(([modelName, childAssets]) => {
return (childAssets ?? []).map((asset) => ({
childAssetId: asset.assetId,
logicalId: hierarchyLogicalId(modelName),
}))
}),
})
Is this maybe a bug in the resource implementation: Does the resource maybe use the actual id of the hiararchy from it's state when updating?
Note 1: Resource creation works perfectly fine. So for the first run of the code everything works as intended.
Note 2: The code might look dynamic but the inputs don't change between runs.jolly-megabyte-6233
12/19/2024, 10:36 AMjolly-megabyte-6233
12/19/2024, 10:37 AM"@pulumi/aws-native": "^1.17.0"
quick-house-41860
12/20/2024, 9:21 AM