https://pulumi.com logo
#general
Title
# general
a

adamant-dress-73325

09/09/2019, 7:12 PM
When upgrading from
^0.18.25
to
^1.1.0
of
pulumi-aws
, I am getting the following error during preview:
Copy code
Diagnostics:
  aws:ecs:Cluster (cluster):
    error: Preview failed: refreshing urn:pulumi:qa::pt-site-next::awsx:x:ecs:Cluster$aws:ecs/cluster:Cluster::cluster: error reading ECS Cluster (arn:aws:ecs:us-east-1:149539663033:cluster/arn:aws:ecs:us-east-1:149539663033:cluster/blah-cluster-qa-6372e69): InvalidParameterException: Invalid identifier: Unexpected number of separators
        status code: 400, request id: 68c46836-6b60-4072-b1bb-758e20a4ed43
Trying to get us onto the latest deps but this is a blocker.
g

gentle-diamond-70147

09/09/2019, 7:14 PM
I'm not familiar with that error message, but did you also update
awsx
? That
urn
indicates you're using
awsx
as well.
a

adamant-dress-73325

09/09/2019, 7:14 PM
awsx is on latest 0.18.10
I can provide full yarn.lock over dm if needed
b

broad-dog-22463

09/09/2019, 7:17 PM
This is the part that's incorrect
arn:aws:ecs:us-east-1:149539663033:cluster/arn:aws:ecs:us-east-1:149539663033:cluster/blah-cluster-qa-6372e69
it's added the full ARN to the end of the ARN where it should have added just the cluster name
Please can you open a bug in pulumi-awsx @adamant-dress-73325?
We need to look at this for you
a

adamant-dress-73325

09/09/2019, 7:18 PM
@broad-dog-22463 Sure, I'll open an issue
b

broad-dog-22463

09/09/2019, 7:19 PM
Thanks!
a

adamant-dress-73325

09/09/2019, 7:23 PM
l

lemon-spoon-91807

09/09/2019, 7:25 PM
Hi @adamant-dress-73325 it is possible to show a few lines of the code where you create this cluster?
a

adamant-dress-73325

09/09/2019, 7:26 PM
Copy code
const cluster = new awsx.ecs.Cluster('cluster', {
    cluster: stackRef.getOutputSync('clusterId') as pulumi.Output<string>,
    vpc,
  });
l

lemon-spoon-91807

09/09/2019, 7:27 PM
interesting. and where's the code that exposed that
clusterId
variable?
a

adamant-dress-73325

09/09/2019, 7:28 PM
Copy code
cluster = new awsx.ecs.Cluster(`pt-cluster-${env}`, {
    vpc: vpc,
    tags: {
      Name: `pt-cluster-${env}`,
    },
  });

export const clusterId = cluster && cluster.id;
l

lemon-spoon-91807

09/09/2019, 7:31 PM
that all looks proper. in the pulumi console, for the stack where you export clusterId, what does it show as the value in your Outputs
i.e.
trying to narrow down where things are going off the rails.
a

adamant-dress-73325

09/09/2019, 7:32 PM
one sec
@lemon-spoon-91807 Will dm you instead
l

lemon-spoon-91807

09/09/2019, 7:34 PM
sure
@broad-dog-22463 i can't see anyhting on our end that is immediately wrong. and i've found this:
where someone reported the same issue. i.e.:
(arn:aws:ecs:eu-west-1:104375939617:cluster/arn:aws:ecs:eu-west-1:104375939617:cluster/candu-backend): InvalidParameterException: Invalid identifier: Unexpected number of separators
which is the exact same issue here (where a portion of the arn is prepended to the real arn)
going to spelunk into the terraform code.
pulling @microscopic-florist-22719 In. Pat, i have investigated this and there appears to be nothing wrong on the SDK side here. Either something is going off the rails on the engine side (seems unlikely) or this is a terraform issue (though i couldn't find a smoking gun.
While investigating with @adamant-dress-73325 we isolated things down to just a simple call to:
aws.ecs.Cluster.get("whateveryouwant", "< their actual cluster id >")
this call fails with AWS reporting back that the cluster ID is malformed. looking at our logs we have:
ReadResource RPC prepared: id=<correct id>, name=whateveryouwant<{%reset%}>)
however, aws reports back effectively:
arn:aws:ecs:us-east-1:149539663033:cluster/arn:aws:ecs:us-east-1:149539663033:cluster/blah-cluster-qa-6372e69): InvalidParameterException: Invalid identifier: Unexpected number of separators
basically, something in the engine/provider/terraform has taken the ID up through the
/
and has prepended it to the beginning of the ID.
all other reads are succeeding, so i can't imagine this is on us.
but i also don't see anything in terraform that would cause this
but it was closed out, and no-one else has reported this problem
i'm at an impasse on how to proceed @microscopic-florist-22719. Do you have any ideas?
Richard also says: ok, I can repro again if necessary, this still happened after a full rm -rf of node_modules so should be reproducible
he's ok for now moving back to 0.18 libs. but this is a pretty worrying issue in the 1.1 libs.