pulumi/pkg/cmd/pulumi
Paul C. Roberts ee101a4ff4
Adds a flag to graph command to insert fragment (#14858)
<!--- 
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. -->

This enables you to insert arbitrary dot inside the `digraph` element.
This can be used to style the dot file. For example:

with the file `fragment.dot` having the contents:

```
rankdir=LR
ranksep=0.01
dpi=300
node [shape=rect style=filled fillcolor="#8a3391" fontcolor="white" fontname="Arial"]
edge [fontname="Arial" fontcolor="#83a3391" penwidth=2]
```

You could then call

`pulumu stack graph --dot-fragment "$(<fragment.dot)" stack.dot`

Which could be in a command pipeline like

`pulumu stack graph --dot-fragment "$(<fragment.dot)" stack.dot && dot
-Tpng -O stack.dot && open stack.dot.png`

To generate and display a styled view of the graph without needing to
hand edit the dot file in the process.

## 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. -->
- [ ] 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. -->

---------

Co-authored-by: Paul Roberts <proberts@pulumi.com>
2024-01-08 22:03:08 +00:00
..
convert_testdata Refactor convert command to add entrypoint for pulumi convert debugging 2022-10-01 15:40:17 -07:00
pcl_convert_testdata Support PCL as a convert input (and output) 2022-11-11 10:45:40 +00:00
testdata policy publish: default to default-org if possible (#14090) 2023-10-05 16:51:06 +00:00
about.go Enable perfsprint linter (#14813) 2023-12-12 12:19:42 +00:00
about_env.go [cli] Colorize table headers (#14557) 2023-11-14 22:52:57 +00:00
about_test.go Move about information to language plugins (#10392) 2022-08-15 14:55:04 +01:00
ai.go Kp/adds root pulumi ai command (#13808) 2023-09-05 23:18:03 +00:00
ai_web.go Enable perfsprint linter (#14813) 2023-12-12 12:19:42 +00:00
cancel.go Add tokens.StackName (#14487) 2023-11-15 07:44:54 +00:00
config.go Ensure that pulumi config cp also copies the environments from the source stack (#14847) 2023-12-19 20:37:10 +00:00
config_env.go Fix a bug in pulumi config env ls json output (#14961) 2023-12-20 00:19:36 +00:00
config_env_add.go [esc] Add commands for managing stack environments (#14628) 2023-11-22 05:04:14 +00:00
config_env_add_test.go [esc] Add commands for managing stack environments (#14628) 2023-11-22 05:04:14 +00:00
config_env_init.go [esc] Add a command to create an ESC env from stack config (#14634) 2023-11-22 20:57:02 +00:00
config_env_init_test.go [esc] Add a command to create an ESC env from stack config (#14634) 2023-11-22 20:57:02 +00:00
config_env_ls.go Fix a bug in pulumi config env ls json output (#14961) 2023-12-20 00:19:36 +00:00
config_env_ls_test.go Fix a bug in pulumi config env ls json output (#14961) 2023-12-20 00:19:36 +00:00
config_env_rm.go [esc] Add commands for managing stack environments (#14628) 2023-11-22 05:04:14 +00:00
config_env_rm_test.go [esc] Add commands for managing stack environments (#14628) 2023-11-22 05:04:14 +00:00
config_env_test.go [esc] Add a command to create an ESC env from stack config (#14634) 2023-11-22 20:57:02 +00:00
config_test.go Ensure that pulumi config cp also copies the environments from the source stack (#14847) 2023-12-19 20:37:10 +00:00
console.go service to cloud 2023-04-08 09:49:37 -07:00
convert-trace.go Reimport appdash from our mirror (#14701) 2023-11-30 14:21:35 +00:00
convert.go Enable perfsprint linter (#14813) 2023-12-12 12:19:42 +00:00
convert_test.go Send args from convert to converter plugin (#13973) 2023-09-18 11:01:13 +00:00
crypto.go Fix config set-all saving secret provider configuration 2023-04-12 15:21:29 +01:00
destroy.go Set a default limit for --parallel (#15016) 2024-01-03 16:12:57 +00:00
doc.go Document Go packages (#6009) 2021-01-11 11:07:59 -07:00
env.go [cli] Include config from ESC in `pulumi config` (#14560) 2023-11-21 10:44:45 +00:00
errors.go Clean up uses of .Error() (#14965) 2023-12-20 15:54:06 +00:00
gen_completion.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
gen_markdown.go Consecutive markdown heading levels CLI docs (#13822) 2023-09-28 17:36:24 +00:00
import.go Set a default limit for --parallel (#15016) 2024-01-03 16:12:57 +00:00
import_test.go Add LogicalName to import system (#14745) 2023-12-16 10:14:51 +00:00
install.go Pass root and main info to language host methods (#14654) 2023-12-10 17:30:51 +00:00
login.go Enable perfsprint linter (#14813) 2023-12-12 12:19:42 +00:00
logout.go Remove Logout logic from Backend interface (#13951) 2023-09-18 17:21:32 +00:00
logs.go [cli] Add support for environments (#14140) 2023-10-10 01:35:39 +00:00
logs_test.go Use `assert.NoError` rather than `assert.Nil` (#14233) 2023-10-13 09:46:07 +00:00
main.go Use slice.Prealloc instead of make([]T, 0, ...) 2023-06-29 11:27:50 +01:00
new.go Fix AI prompt repetition on Windows (#15010) 2024-01-03 23:03:11 +00:00
new_acceptance_test.go [test] fix `TestCreatingProjectWithEmptyConfig` flakiness (#14777) 2023-12-08 23:00:49 +00:00
new_ai.go Fix AI prompt repetition on Windows (#15010) 2024-01-03 23:03:11 +00:00
new_ai_test.go Fix AI prompt repetition on Windows (#15010) 2024-01-03 23:03:11 +00:00
new_test.go Adds Pulumi AI integrations with Pulumi New (#14685) 2023-12-20 22:08:09 +00:00
org.go Removes PULUMI_DEV flag for org search features (#13888) 2023-09-06 19:32:44 +00:00
org_search.go Clean up uses of .Error() (#14965) 2023-12-20 15:54:06 +00:00
org_search_ai.go Clean up uses of .Error() (#14965) 2023-12-20 15:54:06 +00:00
org_search_ai_test.go Replace some more uses of assert.Contains(err.Error()) with assert.ErrorContains (#14863) 2023-12-15 17:45:32 +00:00
org_search_test.go Enable perfsprint linter (#14813) 2023-12-12 12:19:42 +00:00
package.go Add an envar to disable automatic provider installation (#14083) 2023-10-03 15:35:23 +00:00
package_extract_mapping.go Clean up uses of .Error() (#14965) 2023-12-20 15:54:06 +00:00
package_extract_schema.go Add gen-sdk sub-command 2022-09-14 17:07:05 +02:00
package_gen_sdk.go Enable perfsprint linter (#14813) 2023-12-12 12:19:42 +00:00
package_pack_sdk.go Add hidden sdk-pack command 2023-08-08 17:53:04 +01:00
package_publish.go additional comment as per review 2023-06-01 10:00:31 -07:00
plugin.go Warn about ambient plugins loaded from $PATH 2023-08-08 13:11:34 +01:00
plugin_install.go Check if Plugin is bundled before installing 2023-08-07 15:33:12 +01:00
plugin_install_test.go Enable perfsprint linter (#14813) 2023-12-12 12:19:42 +00:00
plugin_ls.go [cli] Colorize table headers (#14557) 2023-11-14 22:52:57 +00:00
plugin_rm.go Enable perfsprint linter (#14813) 2023-12-12 12:19:42 +00:00
policy.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
policy_disable.go policy publish: default to default-org if possible (#14090) 2023-10-05 16:51:06 +00:00
policy_enable.go policy publish: default to default-org if possible (#14090) 2023-10-05 16:51:06 +00:00
policy_group_ls.go [cli] Colorize table headers (#14557) 2023-11-14 22:52:57 +00:00
policy_ls.go [cli] Colorize table headers (#14557) 2023-11-14 22:52:57 +00:00
policy_new.go Enable perfsprint linter (#14813) 2023-12-12 12:19:42 +00:00
policy_new_acceptance_test.go Use context.Background in tests (#14029) 2023-09-25 12:25:26 +00:00
policy_new_test.go Use context.Background in tests (#14029) 2023-09-25 12:25:26 +00:00
policy_publish.go Enable perfsprint linter (#14813) 2023-12-12 12:19:42 +00:00
policy_publish_test.go policy publish: default to default-org if possible (#14090) 2023-10-05 16:51:06 +00:00
policy_rm.go policy publish: default to default-org if possible (#14090) 2023-10-05 16:51:06 +00:00
policy_validate.go policy publish: default to default-org if possible (#14090) 2023-10-05 16:51:06 +00:00
preview.go Set a default limit for --parallel (#15016) 2024-01-03 16:12:57 +00:00
preview_test.go fix `--import-file` failing when resources share the same name. (#15008) 2023-12-28 15:33:59 +00:00
pulumi.go correct version check when we have a dev version installed (#14954) 2023-12-22 16:40:12 +00:00
pulumi_test.go correct version check when we have a dev version installed (#14954) 2023-12-22 16:40:12 +00:00
query.go Replace result.Result in Query with error (#13939) 2023-09-20 15:43:46 +00:00
refresh.go Set a default limit for --parallel (#15016) 2024-01-03 16:12:57 +00:00
replay_events.go Make `engine.NewEvent` type safe (#14590) 2023-11-16 16:54:03 +00:00
schema.go [codegen/schema] Add a schema checker (#7865) 2021-08-30 19:29:24 -07:00
schema_check.go all: Drop ioutil 2023-01-06 16:35:14 -08:00
stack.go Check qualified type for root stackness (#14714) 2023-12-04 10:36:51 +00:00
stack_change_secrets_provider.go Add tests for stackChangeSecretsProviderCmd (#13791) 2023-08-31 08:56:38 +00:00
stack_change_secrets_provider_test.go [test] fix `TestCreatingProjectWithEmptyConfig` flakiness (#14777) 2023-12-08 23:00:49 +00:00
stack_export.go cmd: Reduce noise from offerNew, setCurrent bool 2023-01-20 15:34:39 -08:00
stack_graph.go Adds a flag to graph command to insert fragment (#14858) 2024-01-08 22:03:08 +00:00
stack_graph_test.go Adds a flag to graph command to insert fragment (#14858) 2024-01-08 22:03:08 +00:00
stack_history.go Fix config set-all saving secret provider configuration 2023-04-12 15:21:29 +01:00
stack_import.go Add `pulumi state edit` utility. 2023-07-17 09:47:05 -07:00
stack_init.go Ensure that pulumi config cp also copies the environments from the source stack (#14847) 2023-12-19 20:37:10 +00:00
stack_init_test.go service to cloud 2023-04-08 09:49:37 -07:00
stack_ls.go [cli] Colorize table headers (#14557) 2023-11-14 22:52:57 +00:00
stack_ls_test.go [test] fix `TestCreatingProjectWithEmptyConfig` flakiness (#14777) 2023-12-08 23:00:49 +00:00
stack_output.go Use slice.Prealloc instead of make([]T, 0, ...) 2023-06-29 11:27:50 +01:00
stack_output_fuzz_test.go cli/stack-ouput/test: Fix Powershell test failures 2023-01-30 07:58:47 -08:00
stack_output_test.go fix(cli/stack output): Don't escape HTML characters 2023-06-23 09:11:20 -07:00
stack_rename.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
stack_rm.go Support bailing from RunFunc (#13804) 2023-08-29 07:43:40 +00:00
stack_select.go Set the current project as ambient context on backends. 2023-03-03 20:32:42 +00:00
stack_tag.go [cli] Colorize table headers (#14557) 2023-11-14 22:52:57 +00:00
stack_test.go fix(cli/stack output): Don't escape HTML characters 2023-06-23 09:11:20 -07:00
stack_unselect.go include error in formatted message and explicitly check for an empty stack 2022-03-14 11:32:33 +01:00
state.go state delete: fix panic when there are no snapshots (#15045) 2024-01-04 15:52:13 +00:00
state_delete.go state delete: fix panic when there are no snapshots (#15045) 2024-01-04 15:52:13 +00:00
state_edit.go Enable perfsprint linter (#14813) 2023-12-12 12:19:42 +00:00
state_edit_encoder.go Add `pulumi state edit` utility. 2023-07-17 09:47:05 -07:00
state_edit_test.go [`pulumi state edit`] handle multi-part EDITOR variables (i.e. `emacs -nw`) (#13922) 2023-09-12 15:34:03 +00:00
state_rename.go state delete: fix panic when there are no snapshots (#15045) 2024-01-04 15:52:13 +00:00
state_rename_test.go Allow anything in resource names (#14107) 2023-11-20 08:59:00 +00:00
state_unprotect.go state delete: fix panic when there are no snapshots (#15045) 2024-01-04 15:52:13 +00:00
state_upgrade.go Add tokens.StackName (#14487) 2023-11-15 07:44:54 +00:00
state_upgrade_test.go Add tokens.StackName (#14487) 2023-11-15 07:44:54 +00:00
terminal.go crypto/ssh/terminal is deprecated 2023-01-12 09:07:34 -08:00
terminal_test.go Fix negative page size panic (#10475) 2022-08-23 16:45:47 -04:00
up.go Set a default limit for --parallel (#15016) 2024-01-03 16:12:57 +00:00
up_test.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
util.go [esc] Add commands for managing stack environments (#14628) 2023-11-22 05:04:14 +00:00
util_remote.go fix typo in --remote-git-branch usage string (#15067) 2024-01-05 14:49:52 +00:00
util_remote_test.go [cli] Experimental support for remote operations 2022-10-27 16:15:59 -07:00
util_test.go chore: Share unescaped JSON logic with makeJSONString 2023-06-23 09:52:06 -07:00
version.go [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
view-trace.go Reimport appdash from our mirror (#14701) 2023-11-30 14:21:35 +00:00
watch.go Set a default limit for --parallel (#15016) 2024-01-03 16:12:57 +00:00
whoami.go Enable perfsprint linter (#14813) 2023-12-12 12:19:42 +00:00
whoami_test.go Fix panic in whoami (#14108) 2023-10-06 16:56:36 +00:00