my-terraform-s3-backend/providers.tf

23 lines
503 B
Terraform
Raw Normal View History

2024-03-02 11:59:10 +00:00
terraform {
backend "s3" {
2024-03-02 13:39:26 +00:00
# PROVIDE THIS KEY ... FILE ISOLATION
key = "global/s3/terraform.tfstate"
# PROVIDE THIS KEY ... FILE ISOLATION
2024-03-02 11:59:10 +00:00
}
required_version = ">= 1.0.0"
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 4.0.0"
}
}
}
provider "aws" {
region = var.aws_region
# using aws-vault to assume a role
assume_role {
duration = "1h"
role_arn = var.role_arn
}
}