Skip to content

Add documentation about RootDirectory #15617

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Add documentation about RootDirectory #15617

wants to merge 5 commits into from

Conversation

Frassle
Copy link
Member

@Frassle Frassle commented Jul 30, 2025

Update the project concept page to have a section about getting paths relative to the root directory (the one containing the Pulumi.yaml)

@pulumi-bot
Copy link
Collaborator

@pulumi-bot
Copy link
Collaborator

@pulumi-bot
Copy link
Collaborator

@Frassle Frassle marked this pull request as ready for review August 1, 2025 10:43
@pulumi-bot
Copy link
Collaborator

@Frassle Frassle requested review from a team August 1, 2025 10:58
@@ -0,0 +1 @@
FROM nginx
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing newline.

@@ -0,0 +1,8 @@
module awsx-root-directory-go

go 1.21.12
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this use a more up to date version of Go and the SDK?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I picked the oldest version of the SDK that supported RootDir

@@ -0,0 +1 @@
FROM nginx
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing newline.

@@ -8,7 +8,7 @@ menu:
iac:
name: Projects
parent: iac-concepts
weight: 20
weight: 1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious why this change? Is it intended in this PR?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No... not sure how that changed

Copy link
Contributor

@CamSoper CamSoper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Broke up sentence for readability


You can get the directory containing the `Pulumi.yaml` file, which may differ from your working directory if it specified a `main` option (see [main attribute](/docs/reference/pulumi-yaml/#attributes)), with the `ProjectDirectory` function.

The path returned will be an absolute path, but if using this in resource properties you'll want to make sure it's made relative to the working directory to prevent diffs from running the project on multiple machines with different roots.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The path returned will be an absolute path, but if using this in resource properties you'll want to make sure it's made relative to the working directory to prevent diffs from running the project on multiple machines with different roots.
The path returned is an absolute path. When using this in resource properties, ensure it's relative to the working directory. This prevents diffs from running the project on multiple machines with different roots.

@Frassle
Copy link
Member Author

Frassle commented Aug 4, 2025

Just waiting for some releases for dotnet/nodejs so I can get their examples written up before merging this.

@pulumi-bot
Copy link
Collaborator

@pulumi-bot
Copy link
Collaborator

@pulumi-bot
Copy link
Collaborator

@Frassle
Copy link
Member Author

Frassle commented Aug 13, 2025

Test is failing because its still on pulumi 3.187 and needs 3.188. I think github images should update at some point to fix that.

@justinvp
Copy link
Member

Test is failing because its still on pulumi 3.187 and needs 3.188. I think github images should update at some point to fix that.

Or we could update the workflow's use of pulumi/actions to specify pulumi-version: latest

@Frassle
Copy link
Member Author

Frassle commented Aug 14, 2025

Or we could update the workflow's use of pulumi/actions to specify pulumi-version: latest

@pulumi/docs you ok with that? Feels reasonable for us to always be using the latest, even if that means sometimes having to download it rather than using what's on the GitHub runners ready installed.

@CamSoper
Copy link
Contributor

Sounds fine to me but I'd want @thoward to chime in, too.

@meagancojocar
Copy link
Collaborator

We are good with pinning to latest!

@pulumi-bot
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants