Terraform http backend with Gitlab & How to import and manage existing Gitlab repos by Terraform

preview_player
Показать описание
GitLab provides a Terraform HTTP backend to securely store your state files with minimal configuration.
In GitLab, you can:

Version your Terraform state files.
Encrypt the state file both in transit and at rest.
Lock and unlock states.
Remotely execute terraform plan and terraform apply commands.

In this video we learn how to set up the initial http backend for storing state file and then transfer local state file to Gitlab and in continue will describe how to import and manage existing Repositories on gitlab by Terraform.
Рекомендации по теме
Комментарии
Автор

number one gitlab tutorial channel. I appreciate all your videos

George-mklp
Автор

I sincerely appreciate your help, you've saved me a lot amount of time. Your explanations is very good and easy to follow. Please make more videos 🙂 خیلی ممنون

neelojp
Автор

may be an update with OpenTofu would be great.

snipercan
Автор

Great video and thank you for showing this. Can I use a different endpoint other than gitlab? currently I am seeing error

│ Error: Failed to save state

│ Error saving state: HTTP error: 404


│ Error: Failed to persist state to backend

Checking logs I am seeing this

State storage *remote.State declined to persist a state snapshot
provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"

shershot
Автор

hi sir, there is an error i get called "member already exists" in ci pipeline. i checked where this error is producing. it only gets when i the user got the permission of the repo manually not by terraform state. i want to make the pipeline when ever if the user exists pipleine should not failed and the addition of user should be of terraform state if it is, then covert to terraform state. can you help me here

paraskumargupta
Автор

I have question about the terraform state, can I see the previous versions of the terraform state? or only the last one ? if yes how can I see other versions ? thanks, I found this:

is there a better way or is this the only way ?

neelojp
Автор

where to get the code from your tutorials?

RaviSharma-rd