-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support autonaming of SQS fifo queues #967
Comments
* Add richer name transformation support Part of pulumi/pulumi-aws#967. * Additional test case
This appears to have regressed. Full repro at https://gist.github.com/c3f571b0af3b891b3b8283cbf58ecb9c. import * as aws from "@pulumi/aws";
// FAILS - name becomes `main-abc123` - Error validating the FIFO queue name: [FIFO queue name should end with ".fifo": main-4d1963b]
const main = new aws.sqs.Queue("main", {
fifoQueue: true,
});
// FAILS - name becomes `main.fifo-abc123` - resource 'main.fifo' has a problem: only alphanumeric characters and hyphens allowed in "name"
const mainFifo = new aws.sqs.Queue("main.fifo", {
fifoQueue: true,
});
// SUCCEEDS - name stays `main.fifo`
const mainFifoName = new aws.sqs.Queue("main", {
name: "main.fifo",
fifoQueue: true,
});
|
@stack72 The property in the PR that fixes this is |
Fixes: #967 ``` ▶ pulumi up ..... Type Name Status + pulumi:pulumi:Stack testing-aws-fifo-dev created + └─ aws:sqs:Queue main2 created Outputs: name: "main2-801295a.fifo" Resources: + 2 created Duration: 8s ```
Fixes: #967 ``` ▶ pulumi up ..... Type Name Status + pulumi:pulumi:Stack testing-aws-fifo-dev created + └─ aws:sqs:Queue main2 created Outputs: name: "main2-801295a.fifo" Resources: + 2 created Duration: 8s ```
@leezen great question - this actually uses our property bag that gets translated from the TF provider - I think this regressed around the time we changed to use v2 of the plugin sdk as the properties changed around Regardless, it was a lift and shift of a PR that Luke created that actually worked originally PR is open - it's been approved and tests have been added to ensure we don't regress again! I will publish a patch as soon as this goes green |
Fixes: #967 ``` ▶ pulumi up ..... Type Name Status + pulumi:pulumi:Stack testing-aws-fifo-dev created + └─ aws:sqs:Queue main2 created Outputs: name: "main2-801295a.fifo" Resources: + 2 created Duration: 8s ```
Fixes: #967 ``` ▶ pulumi up ..... Type Name Status + pulumi:pulumi:Stack testing-aws-fifo-dev created + └─ aws:sqs:Queue main2 created Outputs: name: "main2-801295a.fifo" Resources: + 2 created Duration: 8s ```
Fixes: #967 ``` ▶ pulumi up ..... Type Name Status + pulumi:pulumi:Stack testing-aws-fifo-dev created + └─ aws:sqs:Queue main2 created Outputs: name: "main2-801295a.fifo" Resources: + 2 created Duration: 8s ```
SQS FIFO queue names must have a ".fifo" suffix. This does not play well will auto-naming because the random hex will be tacked on at the end yielding an invalid name. I suggest that the ".fifo" suffix should be added by pulumi when autonaming a fifo queue.
Here is some example C# code:
The text was updated successfully, but these errors were encountered: