Question: I am encountering an error while trying to set up my GitLab repository for an AWS Amplify App using Terraform. I have followed the necessary steps, but I keep receiving the following error message during the terraform apply step:
Error: creating Amplify App (amplify-test): BadRequestException: There was an issue setting up your repository. Please try again later. ({"message":"403 Forbidden"})
To provide some context, I am currently using the aws_amplify_app resource from the Terraform Registry. I have generated a personal access token (PAT) in GitLab and provided it during the setup process, but the error persists.
resource "aws_amplify_app" "example" {
name = "example"
repository = var.gitlabrepo
# GitHub personal access token
access_token = "..."
}
I suspect that the issue is related to a permission problem or an authorization issue between the Amplify service and GitLab. I would appreciate any guidance or suggestions on how to troubleshoot and resolve this error.
Here are the details of my setup:
Amplify App Details:
App Name: amplify-test Repository Provider: GitLab Personal Access Token (PAT) used: [Insert the PAT you generated] Steps I followed:
Configured the necessary Terraform code for provisioning the Amplify App, using the aws_amplify_app resource from the Terraform Registry. Executed terraform init to initialize the Terraform environment. Executed terraform apply to create the Amplify App. Encountered the aforementioned error during the terraform apply step. If anyone has encountered a similar issue or has any insights into resolving this problem, I would greatly appreciate your assistance. Thank you in advance for your help.
I tried setting up my repository on GitLab for an AWS Amplify App using Terraform. I expected the repository setup to be successful without any errors. However, when I executed the terraform apply command, I received the following error message:
Error: creating Amplify App (amplify-test): BadRequestException: There was an issue setting up your repository. Please try again later. ({"message":"403 Forbidden"})
I generated a personal access token (PAT) in GitLab and provided it during the setup process, expecting it to grant the necessary permissions and resolve any authorization issues. Unfortunately, the error message persisted, indicating a "403 Forbidden" status.
I have also verified that the PAT has the required permissions and followed the recommended steps for setting up the Amplify App using the aws_amplify_app resource from the Terraform Registry.
Despite these efforts, I have been unable to resolve the issue and successfully set up the repository for the Amplify App.
I would appreciate any insights, suggestions, or guidance to troubleshoot and resolve this error. Thank you.