Note this same code works when it is connecting to github
Steps to Reproduce
I'm not sure if this is an issue with AWS Amplify or Terraform. To reproduce
Go to the AWS Amplify console, and manually create a a New app (Host an app)
Connect it to a Bitbucket Repo, but make sure there is no branch called main in the repo
Select a branch from your repository (in this case UAT)
When it creates the new amplify app. Open up the App settings and select General.
You will see my using the AWS Amplify console it does populate the Production branch with UAT
BUT, the Source repository should NOT read https://bitbucket.org/xxxxxx/frontend/src/main, there is NO branch called main. If you click on the hyperlink you get a 404 from Bitbucket, and that's correct. Yet it still managed to populate Production branch with UAT
Now
delete the Amplify App that you just created manually
recreate from Terraform.
When it finishes the apply, open up the AWS Amplify console. You will it display
Production branch is blank, when I know it can be create manually from the console.
But note the source repository, there is no main branch. So I suspect Terraform can't find the source repo so it cannot connect the Production branch.
Workaround
So I created a main branch in Bitbucket to see if Terraform can link the Production branch, but it still came out blank.
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
Volunteering to Work on This Issue
If you are interested in working on this issue, please leave a comment.
If this would be your first contribution, please review the contribution guide.
Terraform Core Version
1.3.0
AWS Provider Version
3.0
Affected Resource(s)
aws_amplify_branch
Expected Behavior
Production branch should be populated with the branch name
As you can see from the above it is blank
Actual Behavior
As above, the branch name is not populated.
Relevant Error/Panic Output Snippet
No response
Terraform Configuration Files
Note this same code works when it is connecting to github
Steps to Reproduce
I'm not sure if this is an issue with AWS Amplify or Terraform. To reproduce
https://bitbucket.org/xxxxxx/frontend/src/main
, there is NO branch called main. If you click on the hyperlink you get a 404 from Bitbucket, and that's correct. Yet it still managed to populate Production branch with UATNow
Workaround
Let me know if you need anymore details
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
None