Remote Backend State with Terraform and Azure Storage

  Рет қаралды 12,893

Travis Roberts

Travis Roberts

Күн бұрын

Пікірлер: 19
@xGomo
@xGomo 2 жыл бұрын
Thank you, Travis. I'm recently learning Terraform and I could never get my head around remote states until now.
@zimek
@zimek Жыл бұрын
thanks for sharing your knowledge Travis!
@marcussantos7195
@marcussantos7195 Жыл бұрын
In the beginning, you said that state file is created after terraform init, but it is created after terraform apply. Great video, though! Love this playlist!
@ncvman
@ncvman 8 ай бұрын
Very nice video and example Travis. If using terraform cloud could I store state in the cloud and the tfstate.backup in azure storage for better redundancy and DR scenario?
@mloskot
@mloskot Жыл бұрын
Instead of bootstrapping the storage with Azure CLI commands, any particular reason why don't you use Terraform to create those resources?
@mkraochirumamilla
@mkraochirumamilla 2 жыл бұрын
Hello Travis, Thanks for your videos and knowledge sharing. What happens if two terraform developers executed terraform apply/destroy concurrently working on the same terraform code base and have two different remote state files in different blob containers?
@Ciraltos
@Ciraltos 2 жыл бұрын
Each instance of terraform would act independently and overwrite the other. That's what a central state file is intended to prevent.
@mosksky
@mosksky 2 жыл бұрын
Happy new year Travis and ty for your knowledge transfer! I think state file is the "Achilles' heel" of TF, as in AWS you would need to setup dynamodb to lock the state file in S3. In Azure blob that is happening by default as you shoed in the demo. However, the worse part of the state file is if there were changes in the portal (not by TF) statefile is out of sync and that would cause different type of issues to get them in sync again. Where in ArmTemplate (BICEP) i could run complete mode and make sure everything is matched what is in the code. What-If is similar to TF Plan. Same would go for CloudFormation. Travis, what are you thoughts about it?
@Ciraltos
@Ciraltos 2 жыл бұрын
Happy new year to you as well! That is the big limitation, or feature, of Terraform. If all is done with TF, things go well. But problems start when changes are made outside of TF. FWIW, one of the selling points to TF is it prevents configuration drift. So, removing changes made outside of TF is what it is expected to do. I prefer ARM templates or Bicep over Terraform. Not that there is anything wrong with TF, I am fortunate to work in an Azure only environment and TF seems like another layer of complexity. I would think differently with a multi-cloud environment. Customers like Terraform, that is the motivation to the videos. Also, most of the information available is on Terraform with AWS. I though it would help to create content focused on Azure.
@jon-paulboyd9984
@jon-paulboyd9984 2 жыл бұрын
I need that t-shirt! Where? Thanks for the vid!
@Ciraltos
@Ciraltos 2 жыл бұрын
Shirts by Shane, all proceeds go to Girls Who Code. I see a couple new designs, I may need to place an order. shirtsbyshane.com/
@PsyberMind
@PsyberMind 2 жыл бұрын
Could you just run that initial script as a BASH script if you were using Github Actions for CI/CD? I'm still learning, and building a pipeline to AKS for practice, so this is a little new to me
@PsyberMind
@PsyberMind 2 жыл бұрын
Actually, disregard that.. I see now that this is a "first run" script, just to set up the storage account
@anshuanand7657
@anshuanand7657 2 жыл бұрын
Hi Travis, i hv one query how can we call the same state file from storage account while deploying another resource for example: i hv created one resource group in my infra that is stored in tfstate file. now i wants to create one public ip in same resource group and i don't want to write code again to deploy resource group( we can't with same name as well) . Is there any option so we can call the same tfstate file from storage account.
@ArkaSkyburner
@ArkaSkyburner Жыл бұрын
Okay i am able to do this but i want to have a backend with multiple subscriptions along with it cause i tried doing that and got an error saying that i have an undefined provider despite doing the correct syntax for multiple subscriptions according to forums
@indranilmondal5509
@indranilmondal5509 8 ай бұрын
how to run this through release pipeline? it asks for input yes/no which is not possible to provide through pipeline
@valp8198
@valp8198 Жыл бұрын
Does anyone know what the environment variable name should be on Linux? it is not ARM_ACCESS_KEY
@VGaming-msv
@VGaming-msv Жыл бұрын
what if that storage account goes down?
@lichardbaliuag4122
@lichardbaliuag4122 2 жыл бұрын
Thank Travis. I've tried to add backend "azurerm" under required providers but I'm getting "Error: Variables not allowed" for all those 4 items - resource_group_name, storage_account_name, container_name, and key. Any idea? Appreciate it, thank you. 🙂
Dynamic Blocks in Terraform with Azure
11:26
Travis Roberts
Рет қаралды 8 М.
Terraform with Multiple State Files
26:14
Michael Crilly
Рет қаралды 21 М.
小天使和小丑太会演了!#小丑#天使#家庭#搞笑
00:25
家庭搞笑日记
Рет қаралды 60 МЛН
Sigma baby, you've conquered soap! 😲😮‍💨 LeoNata family #shorts
00:37
REAL 3D brush can draw grass Life Hack #shorts #lifehacks
00:42
MrMaximus
Рет қаралды 11 МЛН
What's in the clown's bag? #clown #angel #bunnypolice
00:19
超人夫妇
Рет қаралды 20 МЛН
Using Azure Storage for Terraform State - Best Practices
25:09
Ned in the Cloud
Рет қаралды 3,4 М.
Terraform Workflow with Azure: Write, Plan and Apply
15:49
Travis Roberts
Рет қаралды 18 М.
Azure DevOps Pipelines with Terraform and Stages
22:26
Travis Roberts
Рет қаралды 63 М.
Proper Terraform Authentication for Azure Deployments
29:25
HashiCorp
Рет қаралды 12 М.
How to manage Terraform State?
51:02
Anton Putra
Рет қаралды 10 М.
Beginners Tutorial to Terraform with Azure
9:42
Wahl Network
Рет қаралды 74 М.
Input Variables with Terraform and Azure
21:52
Travis Roberts
Рет қаралды 15 М.
Learn How to Create Terraform Custom Modules for Azure | #EP14
19:54
Someone Elses Cloud
Рет қаралды 10 М.
小天使和小丑太会演了!#小丑#天使#家庭#搞笑
00:25
家庭搞笑日记
Рет қаралды 60 МЛН