diff --git a/.github/workflows/deploy-image.yml b/.github/workflows/deploy-image.yml index f4b19893b2..3f37718e61 100644 --- a/.github/workflows/deploy-image.yml +++ b/.github/workflows/deploy-image.yml @@ -10,16 +10,16 @@ jobs: runs-on: ubuntu-latest steps: - - name: Set AWS credentials - uses: aws-actions/configure-aws-credentials@v1 - with: - aws-access-key-id: ${{ secrets.AWS_EC2_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_EC2_SECRET_ACCESS_KEY }} - aws-region: eu-west-2 + # - name: Set AWS credentials + # uses: aws-actions/configure-aws-credentials@v1 + # with: + # aws-access-key-id: ${{ secrets.AWS_EC2_ACCESS_KEY_ID }} + # aws-secret-access-key: ${{ secrets.AWS_EC2_SECRET_ACCESS_KEY }} + # aws-region: eu-west-2 - name: Check SSH Connection run: | - ssh -o StrictHostKeyChecking=no -o BatchMode=yes -o ConnectTimeout=10 ${{ secrets.USERNAME }}@${{ secrets.AWS_HOST }} exit + ssh -i ${{secrets.SSH_PRIVATE_KEY}} -o StrictHostKeyChecking=no -o BatchMode=yes -o ConnectTimeout=10 ${{ secrets.USERNAME }}@${{ secrets.AWS_HOST }} exit - name: Checkout code uses: actions/checkout@v2 diff --git a/server/terraform/variables.tf b/server/terraform/variables.tf index f9b739261e..fcc922924e 100644 --- a/server/terraform/variables.tf +++ b/server/terraform/variables.tf @@ -2,18 +2,18 @@ variable "aws_region" { default = "eu-west-2" } variable "vpc_cidr_block" { - description = "cidr Block for VPC" - type = string - default = "10.0.0.0/16" + description = "cidr Block for VPC" + type = string + default = "10.0.0.0/16" } variable "subnet_count" { - description = "Number of subnets" - type = map(number) - default = { - public = 1, - private = 2 - } + description = "Number of subnets" + type = map(number) + default = { + public = 1, + private = 2 + } } variable "availability-zones" { @@ -25,62 +25,62 @@ variable "availability-zones" { } variable "settings" { - description = "Configuration settings" - type = map(any) - default = { - "database" = { - allocated_storage = 10 - engine = "postgres" - engine_version = "11.17" - instance_class = "db.t3.micro" - db_name = "video_db" - skip_final_snapshot = true - }, - "web-app" = { - count = 1 - instance_type = "t2.micro" - } + description = "Configuration settings" + type = map(any) + default = { + "database" = { + allocated_storage = 10 + engine = "postgres" + engine_version = "11.17" + instance_class = "db.t3.micro" + db_name = "video_db" + skip_final_snapshot = true + }, + "web-app" = { + count = 1 + instance_type = "t2.micro" } - + } + } variable "public_subnet_sidr_block" { - description = "Available CiDR block for public subnet" - type = list(string) - default = [ - "10.0.1.0/24", - "10.0.2.0/24", - "10.0.3.0/24", - "10.0.4.0/24" - ] - + description = "Available CiDR block for public subnet" + type = list(string) + default = [ + "10.0.1.0/24", + "10.0.2.0/24", + "10.0.3.0/24", + "10.0.4.0/24" + ] + } variable "private_subnet_cidr_block" { description = "Availabla cidr block for privat subnet" - type = list(string) - default = [ + type = list(string) + default = [ "10.0.101.0/24", "10.0.102.0/24", "10.0.103.0/24", "10.0.104.0/24" - ] + ] } variable "my_ip" { description = "ip" - type = string - sensitive = true + type = string + sensitive = true } variable "db_username" { - description = "master username" - type = string - sensitive = true + description = "master username" + type = string + sensitive = true } variable "db_password" { - description = "password" - type = string - sensitive = true -} \ No newline at end of file + description = "password" + type = string + sensitive = true +}