awslabs / awslabs/diagram-as-code
Odd way of specifying the output when generating DAC file from template
- Dominant language
- Go
- Stars
- 1.6k
- Forks
- 101
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 2
Description
## Issue detail
I am testing awsdac to generate DAC files from cfn templates.
I need to be able to specify where the DAC file is generated.
Currently the DAC file is overwritten by the PNG file if one is not aware of the "strange" (at least for me) argument usage.
## Reproduce process
Simply execute: `awsdac stack/production/template.yaml -c -d -o diagrams/production.yaml`
### command / error messages
awsdac generate the diagram where specified but then overwrites it:
```
[Completed] dac (diagram-as-code) data written to diagrams/production.yaml
[Completed] AWS infrastructure diagram generated: diagrams/production.yaml
```
## Intended result
In order to obtain the intended result, one has to issue the following command:
```console
awsdac stack/production/template.yaml -c -d -o diagrams/production.png
```
> **Note**: This generates the PNG file, even if it is unwanted.
The current command options feel quite awkward.
In order to obtain the intended result, compared to other command line tools, it would feel more natural to write something like:
```console
awsdac -c stack/production/template.yaml -d diagrams/production.yaml
```
Contributor guide
Research direction
Start by tracing how awsdac parses the reproduced command's -c, -d, and -o options and how it chooses output formats. Compare that behavior with the proposed command syntax. Done means a DAC output path does not get overwritten by a PNG and the intended output is produced without requiring an unwanted PNG.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, go
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100