aws-amplify / aws-amplify/amplify-cli
Update Documentation to include requirements for putting aws-exports.js in source control
- Dominant language
- TypeScript
- Stars
- 2.9k
- Forks
- 825
- Avg merge
- 11d 23h
- Merged PRs (30d)
- 2
Description
### Before opening, please confirm:
- [X] I have installed the latest version of the Amplify CLI (see above), and confirmed that the issue still persists.
- [X] I have [searched for duplicate or closed issues](https://github.com/aws-amplify/amplify-cli/issues?q=is%3Aissue+).
- [X] I have read the guide for [submitting bug reports](https://github.com/aws-amplify/amplify-cli/blob/dev/CONTRIBUTING.md#bug-reports).
- [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
- [X] I have removed any sensitive information from my code snippets and submission.
### How did you install the Amplify CLI?
_No response_
### If applicable, what version of Node.js are you using?
_No response_
### Amplify CLI Version
all up to now (9.1.0)
### What operating system are you using?
all
### Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
no
### Amplify Categories
Not applicable
### Amplify Commands
Not applicable
### Describe the bug
**tldr;** note in docs for [aws-exports.js](https://docs.amplify.aws/cli/reference/files/#aws-exportsjs) says `Add to version control: NO` but it should explain that it's okay to add inversion control if the developer ensures it gets updated when pushing/pulling the project.
**More context**
In order versions of Amplify, there were some concerns about sensitive information in aws-exports.js going into git:
https://github.com/aws-amplify/amplify-cli/issues/754#issuecomment-456965703
https://github.com/aws-amplify/amplify-js/issues/2495#issuecomment-453282477
These are no longer a concern, so the current reason that it is not in source control is that it's essentially a build artifact that's generated by the CLI based on backend config. A developer could include it in source control _**provided they ensure it gets updated when pushing/pulling the project**_.
The [documentation page](https://docs.amplify.aws/cli/reference/files/#amplify-metajson) should be updated to explain this.
### Expected behavior
Docs explain what is necessary to include aws-exports.js in source control.
### Reproduction steps
Docs page: https://docs.amplify.aws/cli/reference/files/#amplify-metajson
### GraphQL schema(s)
```graphql
# Put schemas below this line
```
### Project Identifier
_No response_
### Log output
```
# Put your logs below this line
```
### Additional information
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.