Skip to content

Terraform module to create Remote State Storage resources for workload deployment on Azure Cloud.

License

Notifications You must be signed in to change notification settings

squareops/terraform-azurerm-tfstate-asc

Repository files navigation

Azure tfstate Terraform module

squareops_avatar

SquareOps Technologies Your DevOps Partner for Accelerating cloud journey.


Terraform module to create Remote State Storage resources for workload deployment on Azure Cloud.

Usage Example

module "backend" {
  source                    = "squareops/tfstate-asc/azurerm"
  resource_group_name       = "skaf"
  storage_account_name      = "skafaccount"
  storage_container_name    = "tfstate" # unique storage container name
  resource_group_location   = "eastus"
  environment               = "prod"
}

Refer examples for more details.

Permissions

The required permissions to create resources from this module can be found here

Important Note

Terraform state locking is a mechanism used to prevent multiple users from simultaneously making changes to the same Terraform state, which could result in conflicts and data loss. A state lock is acquired and maintained by Terraform while it is making changes to the state, and other instances of Terraform are unable to make changes until the lock is released.

By using Azure Blob Storage as the backend for storing the tfstate file, Terraform automatically benefits from the built-in locking mechanism provided by Azure. This ensures the safety and consistency of your infrastructure state when working in a team or executing multiple Terraform operations simultaneously.

Requirements

Name Version
terraform >= 1.0
azure >= 3.0.0

Providers

Name Version
azure >= 3.0.0

Resources

Name Type
azurerm_resource_group resource
azurerm_storage_account resource
azurerm_storage_container resource

Inputs

Name Description Type Default Required
storage_container_name Name of the Storage container to be created. string "" no
environment Specify the type of environment(dev, demo, prod) in which the Storage account, Storage container and resource group will be created. string "demo" no
region Specify the region in which the Storage account, Storage container and resource group will be created. string "East US" no
name Specify the name of the project where Storage account, Storage container and resource group will be created. string "skaf" no
additional_tags Specify the tags for the resources such as Storage account, Storage container and resource group will be created. string "" no

Outputs

Name Description
terraform_state_resource_group_name Name of the Resource Group that will be used to maintain resources list.
storage_account_name Name of the Storage account where storage container will be created for storing tfstate.
state_storage_container_name Name of the Storage container where tfstate will be stored.

Contribution & Issue Reporting

To report an issue with a project:

  1. Check the repository's issue tracker on GitHub
  2. Search to see if the issue has already been reported
  3. If you can't find an answer to your question in the documentation or issue tracker, you can ask a question by creating a new issue. Make sure to provide enough context and details.

License

Apache License, Version 2.0, January 2004 (http://www.apache.org/licenses/).

Support Us

To support a GitHub project by liking it, you can follow these steps:

  1. Visit the repository: Navigate to the GitHub repository

  2. Click the "Star" button: On the repository page, you'll see a "Star" button in the upper right corner. Clicking on it will star the repository, indicating your support for the project.

  3. Optionally, you can also leave a comment on the repository or open an issue to give feedback or suggest changes.

Starring a repository on GitHub is a simple way to show your support and appreciation for the project. It also helps to increase the visibility of the project and make it more discoverable to others.

Who we are

We believe that the key to success in the digital age is the ability to deliver value quickly and reliably. That’s why we offer a comprehensive range of DevOps & Cloud services designed to help your organization optimize its systems & Processes for speed and agility.

  1. We are an AWS Advanced consulting partner which reflects our deep expertise in AWS Cloud and helping 100+ clients over the last 4 years.
  2. Expertise in Kubernetes and overall container solution helps companies expedite their journey by 10X.
  3. Infrastructure Automation is a key component to the success of our Clients and our Expertise helps deliver the same in the shortest time.
  4. DevSecOps as a service to implement security within the overall DevOps process and helping companies deploy securely and at speed.
  5. Platform engineering which supports scalable,Cost efficient infrastructure that supports rapid development, testing, and deployment.
  6. 24*7 SRE service to help you Monitor the state of your infrastructure and eradicate any issue within the SLA.

We provide support on all of our projects, no matter how small or large they may be.

You can find more information about our company on this squareops.com, follow us on Linkedin, or fill out a job application. If you have any questions or would like assistance with your cloud strategy and implementation, please don't hesitate to contact us.

Requirements

Name Version
azurerm =3.0.0

Providers

Name Version
azurerm =3.0.0

Modules

No modules.

Resources

Name Type
azurerm_resource_group.resource_group resource
azurerm_storage_account.storage_account resource
azurerm_storage_container.storage_container resource

Inputs

Name Description Type Default Required
resource_group_name Name of the resource group to be created. string "" no
resource_group_location Name of the resource group location to be created. string "" no
storage_account_name Name of the Storage account to be created. string "" no
storage_container_name Name of the storage container to be created. string "" no
environment Specify the type of environment(dev, demo, prod) in which the storage account will be created. string "" no

Outputs

Name Description
terraform_state_resource_group_name Specify the resource group name in which an Storage account will be created by the module.
terraform_state_storage_account Specify the storage account name in which an Storage container will be created by the module.
terraform_state_storage_container_name Specify the storage container name in where tfstate will be stored by the module.

About

Terraform module to create Remote State Storage resources for workload deployment on Azure Cloud.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages