Skip to content
Snippets Groups Projects
Commit d967eab8 authored by Krish Moodbidri's avatar Krish Moodbidri
Browse files

Integrate S3 backend with environment variable-based authentication

Updated the Terraform configuration to leverage S3 for state management using environment variables for AWS credentials. This change improves security by utilizing the built-in support for AWS credentials management, ensuring that sensitive keys are not hardcoded in the Terraform files.
parent 33d96560
No related branches found
No related tags found
1 merge request!47Integration Testing: Sequential Merge and Validation of Four Feature Branches (PR #43,#44, #45,#46)
...@@ -7,6 +7,13 @@ required_version = ">= 0.14.0" ...@@ -7,6 +7,13 @@ required_version = ">= 0.14.0"
version = "~> 1.42.0" version = "~> 1.42.0"
} }
} }
backend "s3" {
bucket = "my-terraform-state-bucket"
key = "state/terraform.tfstate"
region = "us-east-1"
encrypt = true
dynamodb_table = "my-terraform-lock-table"
}
} }
...@@ -84,7 +91,7 @@ resource "openstack_compute_volume_attach_v2" "attach_prod_volume" { ...@@ -84,7 +91,7 @@ resource "openstack_compute_volume_attach_v2" "attach_prod_volume" {
resource "openstack_compute_volume_attach_v2" "attach_prod_queue_volume" { resource "openstack_compute_volume_attach_v2" "attach_prod_queue_volume" {
instance_id = openstack_compute_instance_v2.ohpc.id instance_id = openstack_compute_instance_v2.ohpc.id
volume_id = var.xdmod_queue_data_volume volume_id = var.prod_volume_id
} }
output "xdmod_instance_id" { output "xdmod_instance_id" {
value = openstack_compute_instance_v2.ohpc.id value = openstack_compute_instance_v2.ohpc.id
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment