mirror of https://github.com/pulumi/pulumi.git
274920fead
13218: CLI update summary now shows after non-mandatory policy events seen. r=abhinav a=dixler <!--- Thanks so much for your contribution! If this is your first time contributing, please ensure that you have read the [CONTRIBUTING](https://github.com/pulumi/pulumi/blob/master/CONTRIBUTING.md) documentation. --> # Description This change causes only mandatory policy violations to skip the summary display causing the resources changed and duration details to not be printed. Policy Violations are categorized as `mandatory`, `disabled`, and `advisory`. We were treating all 3 as policy violations to skip displaying the update summary. Now we only use `mandatory`. Fixes #13109 ## Checklist - [x] I have run `make tidy` to update any new dependencies - [x] I have run `make lint` to verify my code passes the lint check - [x] I have formatted my code using `gofumpt` <!--- Please provide details if the checkbox below is to be left unchecked. --> - [x] I have added tests that prove my fix is effective or that my feature works <!--- User-facing changes require a CHANGELOG entry. --> - [x] I have run `make changelog` and committed the `changelog/pending/<file>` documenting my change <!-- If the change(s) in this PR is a modification of an existing call to the Pulumi Cloud, then the service should honor older versions of the CLI where this change would not exist. You must then bump the API version in /pkg/backend/httpstate/client/api.go, as well as add it to the service. --> - [ ] Yes, there are changes in this PR that warrants bumping the Pulumi Cloud API version <!-- `@Pulumi` employees: If yes, you must submit corresponding changes in the service repo. --> 13220: `pulumi new` now supports numeric stack names. r=abhinav a=dixler <!--- Thanks so much for your contribution! If this is your first time contributing, please ensure that you have read the [CONTRIBUTING](https://github.com/pulumi/pulumi/blob/master/CONTRIBUTING.md) documentation. --> # Description `pulumi new` now correctly serializes a stack name of 123456 as a string in the `Pulumi.yaml` file. Previously `123456` is interpreted as a number in YAML by default. <!--- Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. --> Fixes #12136 ## Checklist - [x] I have run `make tidy` to update any new dependencies - [x] I have run `make lint` to verify my code passes the lint check - [x] I have formatted my code using `gofumpt` <!--- Please provide details if the checkbox below is to be left unchecked. --> - [x] I have added tests that prove my fix is effective or that my feature works <!--- User-facing changes require a CHANGELOG entry. --> - [x] I have run `make changelog` and committed the `changelog/pending/<file>` documenting my change <!-- If the change(s) in this PR is a modification of an existing call to the Pulumi Cloud, then the service should honor older versions of the CLI where this change would not exist. You must then bump the API version in /pkg/backend/httpstate/client/api.go, as well as add it to the service. --> - [ ] Yes, there are changes in this PR that warrants bumping the Pulumi Cloud API version <!-- `@Pulumi` employees: If yes, you must submit corresponding changes in the service repo. --> 13224: Remove extra tab that convert TS outputs in JSON file r=abhinav a=mikhailshilkov <!--- Thanks so much for your contribution! If this is your first time contributing, please ensure that you have read the [CONTRIBUTING](https://github.com/pulumi/pulumi/blob/master/CONTRIBUTING.md) documentation. --> # Description <!--- Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. --> Fixes #10776 Examples of generated files: tsconfig.js: ```json { "compilerOptions": { "strict": true, "outDir": "bin", "target": "es2016", "module": "commonjs", "moduleResolution": "node", "sourceMap": true, "experimentalDecorators": true, "pretty": true, "noFallthroughCasesInSwitch": true, "noImplicitReturns": true, "forceConsistentCasingInFileNames": true }, "files": [ "index.ts", ] } ``` package.json ```json { "name": "simple-yaml", "devDependencies": { "`@types/node":` "^14" }, "dependencies": { "typescript": "^4.0.0", "`@pulumi/pulumi":` "^3.0.0", "`@pulumi/aws-native":` "*" } } ``` ## Checklist - [x] I have run `make tidy` to update any new dependencies - [x] I have run `make lint` to verify my code passes the lint check - [ ] I have formatted my code using `gofumpt` <!--- Please provide details if the checkbox below is to be left unchecked. --> - [ ] I have added tests that prove my fix is effective or that my feature works <!--- User-facing changes require a CHANGELOG entry. --> - [ ] I have run `make changelog` and committed the `changelog/pending/<file>` documenting my change <!-- If the change(s) in this PR is a modification of an existing call to the Pulumi Cloud, then the service should honor older versions of the CLI where this change would not exist. You must then bump the API version in /pkg/backend/httpstate/client/api.go, as well as add it to the service. --> - [ ] Yes, there are changes in this PR that warrants bumping the Pulumi Cloud API version <!-- `@Pulumi` employees: If yes, you must submit corresponding changes in the service repo. --> 13225: cli: Fix Markdown reference formatting issues r=abhinav a=abhinav Fixes a couple of Markdown formatting issues in the output of `gen-markdown`. This is used as input to this section of the Pulumi website: <https://www.pulumi.com/docs/cli/commands/> Differences in gen-markdown output following this change: diff -u before/pulumi_logout.md after/pulumi_logout.md --- before/pulumi_logout.md 2023-06-20 15:20:06 +++ after/pulumi_logout.md 2023-06-20 15:20:17 `@@` -19,6 +19,7 `@@` If no URL is provided, you will be logged out of the current backend. If you would like to log out of all backends simultaneously, you can pass `--all`, + $ pulumi logout --all ``` diff -u before/pulumi_state_delete.md after/pulumi_state_delete.md --- before/pulumi_state_delete.md 2023-06-20 15:20:06 +++ after/pulumi_state_delete.md 2023-06-20 15:20:17 `@@` -20,12 +20,15 `@@` Make sure that URNs are single-quoted to avoid having characters unexpectedly interpreted by the shell. -Example: -pulumi state delete 'urn:pulumi:stage::demo::eks:index:Cluster$pulumi:providers:kubernetes::eks-provider' - ``` pulumi state delete <resource URN> [flags] +``` + +### Examples + +``` +pulumi state delete 'urn:pulumi:stage::demo::eks:index:Cluster$pulumi:providers:kubernetes::eks-provider' ``` ### Options diff -u before/pulumi_state_rename.md after/pulumi_state_rename.md --- before/pulumi_state_rename.md 2023-06-20 15:20:06 +++ after/pulumi_state_rename.md 2023-06-20 15:20:17 `@@` -17,12 +17,15 `@@` Make sure that URNs are single-quoted to avoid having characters unexpectedly interpreted by the shell. -Example: -pulumi state rename 'urn:pulumi:stage::demo::eks:index:Cluster$pulumi:providers:kubernetes::eks-provider' new-name-here - ``` pulumi state rename <resource URN> <new name> [flags] +``` + +### Examples + +``` +pulumi state rename 'urn:pulumi:stage::demo::eks:index:Cluster$pulumi:providers:kubernetes::eks-provider' new-name-here ``` ### Options Resolves #11991 13227: Fix `stack rm` removing config files for the wrong project r=abhinav a=Frassle <!--- Thanks so much for your contribution! If this is your first time contributing, please ensure that you have read the [CONTRIBUTING](https://github.com/pulumi/pulumi/blob/master/CONTRIBUTING.md) documentation. --> # Description <!--- Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. --> Fixes https://github.com/pulumi/pulumi/issues/12246 ## Checklist - [x] I have run `make tidy` to update any new dependencies - [x] I have run `make lint` to verify my code passes the lint check - [ ] I have formatted my code using `gofumpt` <!--- Please provide details if the checkbox below is to be left unchecked. --> - [x] I have added tests that prove my fix is effective or that my feature works <!--- User-facing changes require a CHANGELOG entry. --> - [x] I have run `make changelog` and committed the `changelog/pending/<file>` documenting my change <!-- If the change(s) in this PR is a modification of an existing call to the Pulumi Cloud, then the service should honor older versions of the CLI where this change would not exist. You must then bump the API version in /pkg/backend/httpstate/client/api.go, as well as add it to the service. --> - [ ] Yes, there are changes in this PR that warrants bumping the Pulumi Cloud API version <!-- `@Pulumi` employees: If yes, you must submit corresponding changes in the service repo. --> 13228: Don't use printf without a fixed format string r=abhinav a=Frassle <!--- Thanks so much for your contribution! If this is your first time contributing, please ensure that you have read the [CONTRIBUTING](https://github.com/pulumi/pulumi/blob/master/CONTRIBUTING.md) documentation. --> # Description <!--- Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. --> Fixes https://github.com/pulumi/pulumi/issues/11990 There were a few places we were passing an already formatted string in as the format argument for printf. This replaces those calls with non-formatting print calls. ## Checklist - [x] I have run `make tidy` to update any new dependencies - [x] I have run `make lint` to verify my code passes the lint check - [ ] I have formatted my code using `gofumpt` <!--- Please provide details if the checkbox below is to be left unchecked. --> - [x] I have added tests that prove my fix is effective or that my feature works <!--- User-facing changes require a CHANGELOG entry. --> - [x] I have run `make changelog` and committed the `changelog/pending/<file>` documenting my change <!-- If the change(s) in this PR is a modification of an existing call to the Pulumi Cloud, then the service should honor older versions of the CLI where this change would not exist. You must then bump the API version in /pkg/backend/httpstate/client/api.go, as well as add it to the service. --> - [ ] Yes, there are changes in this PR that warrants bumping the Pulumi Cloud API version <!-- `@Pulumi` employees: If yes, you must submit corresponding changes in the service repo. --> 13229: [Snyk] Fix for 1 vulnerabilities r=abhinav a=pulumi-bot <p>This PR was automatically created by Snyk using the credentials of a real user.</p><br /><h3>Snyk has created this PR to fix one or more vulnerable packages in the `yarn` dependencies of this project.</h3> #### Changes included in this PR - Changes to the following files to upgrade the vulnerable dependencies to a fixed version: - sdk/nodejs/package.json #### Note for [zero-installs](https://yarnpkg.com/features/zero-installs) users If you are using the Yarn feature [zero-installs](https://yarnpkg.com/features/zero-installs) that was introduced in Yarn V2, note that this PR does not update the `.yarn/cache/` directory meaning this code cannot be pulled and immediately developed on as one would expect for a zero-install project - you will need to run `yarn` to update the contents of the `./yarn/cache` directory. If you are not using zero-install you can ignore this as your flow should likely be unchanged. <details> <summary>⚠️ <b>Warning</b></summary> ``` Failed to update the yarn.lock, please update manually before merging. ``` </details> #### Vulnerabilities that will be fixed ##### With an upgrade: Severity | Priority Score (*) | Issue | Breaking Change | Exploit Maturity :-------------------------:|-------------------------|:-------------------------|:-------------------------|:------------------------- ![medium severity](https://res.cloudinary.com/snyk/image/upload/w_20,h_20/v1561977819/icon/m.png "medium severity") | **658/1000** <br/> **Why?** Proof of Concept exploit, Recently disclosed, Has a fix available, CVSS 5.3 | Regular Expression Denial of Service (ReDoS) <br/>[SNYK-JS-SEMVER-3247795](https://snyk.io/vuln/SNYK-JS-SEMVER-3247795) | Yes | Proof of Concept (*) Note that the real score may have changed since the PR was raised. Check the changes in this PR to ensure they won't cause issues with your project. ------------ **Note:** *You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.* For more information: <img src="https://api.segment.io/v1/pixel/track?data=eyJ3cml0ZUtleSI6InJyWmxZcEdHY2RyTHZsb0lYd0dUcVg4WkFRTnNCOUEwIiwiYW5vbnltb3VzSWQiOiI5ZjM5MzJlOS1jYTdhLTQyMmYtODRkMi04OGQ0YmEyYjJhNzUiLCJldmVudCI6IlBSIHZpZXdlZCIsInByb3BlcnRpZXMiOnsicHJJZCI6IjlmMzkzMmU5LWNhN2EtNDIyZi04NGQyLTg4ZDRiYTJiMmE3NSJ9fQ==" width="0" height="0"/> 🧐 [View latest project report](https://app.snyk.io/org/pulumi/project/e3f34c6a-bc17-4001-b1c7-ab15ce3940e5?utm_source=github&utm_medium=referral&page=fix-pr) 🛠 [Adjust project settings](https://app.snyk.io/org/pulumi/project/e3f34c6a-bc17-4001-b1c7-ab15ce3940e5?utm_source=github&utm_medium=referral&page=fix-pr/settings) 📚 [Read more about Snyk's upgrade and patch logic](https://support.snyk.io/hc/en-us/articles/360003891078-Snyk-patches-to-fix-vulnerabilities) [//]: # (snyk:metadata:{"prId":"9f3932e9-ca7a-422f-84d2-88d4ba2b2a75","prPublicId":"9f3932e9-ca7a-422f-84d2-88d4ba2b2a75","dependencies":[{"name":"normalize-package-data","from":"2.5.0","to":"3.0.0"},{"name":"semver","from":"6.3.0","to":"7.5.2"}],"packageManager":"yarn","projectPublicId":"e3f34c6a-bc17-4001-b1c7-ab15ce3940e5","projectUrl":"https://app.snyk.io/org/pulumi/project/e3f34c6a-bc17-4001-b1c7-ab15ce3940e5?utm_source=github&utm_medium=referral&page=fix-pr","type":"auto","patch":[],"vulns":["SNYK-JS-SEMVER-3247795"],"upgrade":["SNYK-JS-SEMVER-3247795"],"isBreakingChange":true,"env":"prod","prType":"fix","templateVariants":["pr-warning-shown","priorityScore"],"priorityScoreList":[658],"remediationStrategy":"vuln"}) --- **Learn how to fix vulnerabilities with free interactive lessons:** 🦉 [Regular Expression Denial of Service (ReDoS)](https://learn.snyk.io/lessons/redos/javascript/?loc=fix-pr) Co-authored-by: Kyle Dixler <kyle@pulumi.com> Co-authored-by: Mikhail Shilkov <github@mikhail.io> Co-authored-by: Abhinav Gupta <abhinav@pulumi.com> Co-authored-by: Fraser Waters <fraser@pulumi.com> Co-authored-by: snyk-bot <snyk-bot@snyk.io> |
||
---|---|---|
.. | ||
cgstrings | ||
convert | ||
docs | ||
dotnet | ||
gen_program_test | ||
go | ||
hcl2 | ||
nodejs | ||
pcl | ||
python | ||
report | ||
schema | ||
testing | ||
README.md | ||
docs.go | ||
docs_test.go | ||
utilities.go | ||
utilities_test.go | ||
utilities_types.go |
README.md
Pulumi CrossCode
The github.com/pulumi/pulumi/pkg/v3/codegen
package defines the core components of Pulumi's CrossCode technology. CrossCode provides a set of foundational capabilities for working across a variety of programming languages supported by the Pulumi platform.
The core components of CrossCode in this package are:
- Schema: The definition of Pulumi Schema, a language-neutral specification of cloud resource models. Pulumi Schema is the interface definition language for all Pulumi Packages, and is used as input to SDK code generation for each supported Pulumi language.
- SDK Code Generation for Node.js, Python, Go and .NET: These libraries define how to create Pulumi SDKs from a Pulumi Schema definition of a package. The resulting SDKs expose the resource, components and functions from that package into the the Pulumi programming model defined for the given language.
- Docs Generation: In addition to generating per-language SDKs, CrossCode supports generating language-neutral documentation for a package from it's Pulumi Schema. This documentation is currently hosted in the Pulumi Registry, but can in principle be hosted in other contexts as well.
- Pulumi Configuration Language: An internal representation of Pulumi programs which supports all core concepts of the Pulumi programming model in a minimal form. Although not exposed directly to users today, this intermediate representation is used to support a variety of program conversion tasks, from and to various supported Pulumi languages.
- Program Generation for Node.js, Python, Go and .NET: Support for lowering Pulumi Configuration Language into each of the supported Pulumi languages, such that examples and programs can be generated for the language.
These foundations enable a vast array of features supported in the Pulumi Platform, including:
- Pulumi support for Node.js, Python, Go, .NET, Java and YAML: Each Pulumi language is supported by defining a representation of the Pulumi resource model in that language, and then implementing SDK Code Generation and Program Generation for the language.
- Pulumi Packages: Pulumi packages define a set of resources using Pulumi Schema, and use the CrossCode SDK Code Generators for every Pulumi language automatically.
pulumi import
: Cloud infrastructure resources deployed outside of Pulumi can be imported into Pulumi, including generated Pulumi code in your language of choice which defines the infrastructure. This builds on the program generation support from CrossCode.- tf2pulumi, arm2pulumi, crd2pulumi, kube2pulumi and cf2pulumi: These tools convert the source IaC format into an intermediate Pulumi Configuration Language model, and then use the CrossCode program generation support to convert that ultimately into the language a Pulumi user wants to use for their infrastructure.
pulumi convert
: Thepulumi convert
command allows Pulumi YAML programs to be converted into programs in any other Pulumi language. Because Pulumi YAML is a proper subset of what can be expressed in Pulumi Configuration Language, this conversion from Pulumi YAML to Pulumi Configuration Language and then into each Pulumi language can be done faithfully.- Pulumi Registry: The Pulumi Registry provides discovery and documentation hosting for all Pulumi Packages. It is powered by the Pulumi Schema and CrossCode documentation generation features.
Learn more about Pulumi CrossCode at https://www.pulumi.com/crosscode/.