rich-tiger-43483
02/17/2022, 2:57 PMID
.
I have a resource called Group
and other called Check
. You should be able to use the groupId
property of the Check
in order to link them.
The problem is when I tried to do it, I get this error message:
error: checkly:index/check:Check resource 'pulumi-api-check' has a problem: Attribute must be a whole number, got 257503. Examine values at 'Check.GroupId'
I guess this is related with types and for some reason the ID
of the group is being returned as string
when it should be a number
.
In my TF provider the ID
has the correct type, so I am not sure why this is happening. I could try to manually parse the ID
to integer when setting it in the group but don’t think will be a good DX.
Here is the JS source of the example I am trying to make it work 👇
const checkly = require( "@pulumi/checkly");
const group = new checkly.CheckGroup("group", {
activated: true,
concurrency: 1,
locations: ['us-east-1'],
});
new checkly.Check("api-check", {
activated: true,
frequency: 10,
type: "API",
groupId: group.id
});
Any help/suggestion will be appreciated 🙏echoing-dinner-19531
02/17/2022, 4:21 PMrich-tiger-43483
02/17/2022, 4:45 PMID
?
group.id.apply(id => parseInt(id)
echoing-dinner-19531
02/17/2022, 4:51 PMGroup
object and auto-resolving to it's id instead of taking a plain id value. I'll see if I can dig out an example.rich-tiger-43483
02/17/2022, 5:03 PMechoing-dinner-19531
02/17/2022, 5:31 PM"oneOf": [
{
"type": "string"
},
{
"type": "string",
"$ref": "#/types/aws:s3/bucket:Bucket"
}
],
rich-tiger-43483
02/18/2022, 2:55 AM