aws-amplify / aws-amplify/amplify-cli
Detect changes on team-provider-info.json and update the associated resources
- Dominant language
- TypeScript
- Stars
- 2.9k
- Forks
- 825
- Avg merge
- 11d 23h
- Merged PRs (30d)
- 2
Description
**Is your feature request related to a problem? Please describe.**
Sometime, in our AWS Amplify project we change the content of _team-provider-info.json_ manually.
We do that because we changed some stuff that needs to be updated.
For example on a _function_ resource I set an environment variable from the value of a parameter in _team-provider-info.json_:
```
"my-env": {
"categories": {
"function": {
"myNiceFunction": {
"myEnvVariableValue": "some-value"
},
```
Another use case can be that I changed my Social provider app ID and secret:
```
"my-env": {
"categories": {
"auth": {
"myAuth": {
"hostedUIProviderCreds": "[{\"ProviderName\":\"Facebook\",\"client_id\":\"12345\",\"client_secret\":\"xxxxxxxxxxxxxx\"},{\"ProviderName\":\"Google\",\"client_id\":\"12345\",\"client_secret\":\"xxxxxxxxxxxxxx\"},{\"ProviderName\":\"LoginWithAmazon\",\"client_id\":\"12345\",\"client_secret\":\"xxxxxxxxxxxxxx\"}]"
}
},
```
When I do that change, Amplify CLI do not detect the change:
```
amplify status
Current Environment: my-env
| Category | Resource name | Operation | Provider plugin |
| -------- | ---------------------------------------- | --------- | ----------------- |
| Auth | myAuth | No Change | awscloudformation |
| Function | myNiceFunction | No Change | awscloudformation |
```
**Describe the solution you'd like**
I like that the CLI read the team-provider-info.json and detect the change. And when I push I want these parameters to be redeployed with the new values.
**Describe alternatives you've considered**
My current super painfull workaround is:
_Everytime I make a change in team-provider-info.json I update the cloudformation script with a minor change to force Amplify CLI to update my resource_
**Additional context**
There are two other painpoints that can benefit from this change:
#5402 #5401
Contributor guide
Assessment
This issue has not been assessed yet.