From 705f9d55f3b20c7bc7894bc9d6ed6260db6e6ef1 Mon Sep 17 00:00:00 2001 From: Pierre-Edouard Barrault Date: Wed, 6 Nov 2024 17:15:43 +0300 Subject: [PATCH] aws install --- terraform/main.tf | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/terraform/main.tf b/terraform/main.tf index 7ac144d..e1a81a4 100644 --- a/terraform/main.tf +++ b/terraform/main.tf @@ -111,6 +111,11 @@ resource "null_resource" "setup_services" { provisioner "remote-exec" { inline = [ + # Install AWS CLI + "curl 'https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip' -o 'awscliv2.zip'", + "unzip awscliv2.zip", + "sudo ./aws/install --bin-dir /usr/local/bin --install-dir /usr/local/aws-cli --update", + # Setup AWS credentials using heredoc "echo 'Setting up AWS credentials...'", "mkdir -p ~/.aws", @@ -119,9 +124,9 @@ resource "null_resource" "setup_services" { "aws_access_key_id = ${var.scaleway_access_key}", "aws_secret_access_key = ${var.scaleway_secret_key}", "EOF", - "cat ~/.aws/config", "echo '${var.scaleway_awscli_config}'", "echo '${var.scaleway_awscli_config}' >> ~/.aws/config", + "cat ~/.aws/config", # Import data "echo 'Importing data from bucket ...'",