Skip to content
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

Improvement for https://www.pulumi.com/learn/building-with-pulumi/stack-references/ #10226

Closed
eguerlain opened this issue Nov 5, 2023 · 1 comment · Fixed by #11883
Closed
Assignees
Milestone

Comments

@eguerlain
Copy link

When creating reference to the stack of my_first_app, the stackRef variable is built with a kebab-cased project name (my-first-app):

const stackRef = new pulumi.StackReference(`${org}/my-first-app/${stack}`)

However, this project was created with a snake_cased name in Creating a Pulumi Project. (mkdir my_first_app)

This leads to the following error when running pulumi up for the my-second-app-staging stack:

     Type                             Name                            Plan       Info
 +   pulumi:pulumi:Stack              my-second-app-staging           create     1 error
     └─ pulumi:pulumi:StackReference  etigrln95/my-first-app/staging             1 error

Diagnostics:
  pulumi:pulumi:Stack (my-second-app-staging):
    error: preview failed

  pulumi:pulumi:StackReference (etigrln95/my-first-app/staging):
    error: Preview failed: unknown stack "etigrln95/my-first-app/staging"

Using snake_cased project name works correctly:

const stackRef = new pulumi.StackReference(`${org}/my_first_app/${stack}`)

I suggest using kebab-cased name when creating the my-first-app directory in the first tutorial to keep a consistant naming.

@github-actions github-actions bot added the needs-triage Needs attention from the triage team label Nov 5, 2023
@github-project-automation github-project-automation bot moved this to 🤔 Triage in Docs 📚 Nov 5, 2023
@toriancrane toriancrane moved this from 🤔 Triage to 🧳 Backlog in Docs 📚 Nov 6, 2023
@toriancrane
Copy link
Contributor

Thank you @eguerlain for submitting this issue! We will be taking a look into this. We do have an updated guide available for Stack Outputs and References if you'd like to check that out in the meantime.

@toriancrane toriancrane added docs/tutorials and removed needs-triage Needs attention from the triage team labels Nov 6, 2023
@toriancrane toriancrane moved this from 🧳 Backlog to 🎬 Ready in Docs 📚 Nov 6, 2023
@cnunciato cnunciato self-assigned this Jul 1, 2024
@cnunciato cnunciato added this to the 0.107 milestone Jul 1, 2024
@cnunciato cnunciato moved this from 🎬 Ready to 🔧 In Progress in Docs 📚 Jul 4, 2024
@interurban interurban modified the milestones: 0.107, 0.108 Jul 24, 2024
@github-project-automation github-project-automation bot moved this from 🔧 In Progress to 🏁 Done in Docs 📚 Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🏁 Done
Development

Successfully merging a pull request may close this issue.

4 participants