Sorry, noob here. I’m using gitlab.com free tier to learn and improve my skills with GitLab and DevOps stuff.
I’m using terraform with AWS.
Everything worked fine before I set the state file to work from gitlab.
I followed a guide and in one section I had to run these rows to my instance:
export PROJECT_ID=“”
export TF_USERNAME=“”
export TF_PASSWORD=“”
export TF_ADDRESS=“https://gitlab.com/api/v4/projects/${PROJECT_ID}/terraform/state/tf_state”
terraform init
-backend-config=address=${TF_ADDRESS}
-backend-config=lock_address=${TF_ADDRESS}/lock
-backend-config=unlock_address=${TF_ADDRESS}/lock
-backend-config=username=${TF_USERNAME}
-backend-config=password=${TF_PASSWORD}
-backend-config=lock_method=POST
-backend-config=unlock_method=DELETE
-backend-config=retry_wait_min=5
After that the ,git push" doesn’t work anymore as it is downloading the aws provider’s .exe which is 438MB. I’ve already deleted the file, tried to push, but same issue.
What I tried:
git gc
git fetch --all
created .gitignore file to exclude .exe
PS C:\VSCode\AWS_practice> git push
Enumerating objects: 28, done.
Counting objects: 100% (27/27), done.
Delta compression using up to 12 threads
Compressing objects: 100% (14/14), done.
Writing objects: 100% (24/24), 96.97 MiB | 13.49 MiB/s, done.
Total 24 (delta 7), reused 18 (delta 3), pack-reused 0 (from 0)
remote: GitLab: You are attempting to check in one or more blobs which exceed the 100.0MiB limit:
remote:
remote: - 6c48dcaf051d222a882ff863b84c5fa8ae8f2460 (438 MiB)
remote: To resolve this error, you must either reduce the size of the above blobs, or utilize LFS.
remote: You may use “git ls-tree -r HEAD | grep $BLOB_ID” to see the file path.
remote: Please refer to Free push limit | GitLab and
remote: Account and limit settings | GitLab
remote: for further information.
To https://gitlab.com/xyz/AWS_practice.git
! [remote rejected] main → main (pre-receive hook declined)
error: failed to push some refs to ‘https://gitlab.com/xyz/AWS_practice.git’
As you can see the file is not there anymore as I deleted, but the push no longer works.
PS C:\VSCode\AWS_practice> git ls-tree -r HEAD
100644 blob adb36c821965862397d65fa68e26cd2433c97140 .gitignore
100644 blob 46a9e51376d6fc75815c4881895161b8c4c67f78 .gitlab-ci.yml
100644 blob c55f45d722f81c218e395c92e4087b030e1f8111 .terraform.lock.hcl
100644 blob d3ab2b9ef5d5c57d1ec6fb04db54c658b39ecafb README.md
100644 blob d40b45a9cda32e8a442ca994b59c9f62f9c56039 ec2.tf
100644 blob a80926ca56b4f428bd8b892941bb532524ddc311 main.tf
100644 blob 8e5d32cb1165946de21dfd746efbdc522fda5b53 s3.tf
100644 blob 34a07ca8a5494ad3956ba8e1db6d2347818f44db terraform.tfvars
100644 blob 30e1473436f65bd0c898268e20c42b85a8140807 variables.tf
Do you have any idea what should I do or what can be the problem?