Skip to content

Commit

Permalink
34
Browse files Browse the repository at this point in the history
  • Loading branch information
OlhaDanylevska committed Feb 24, 2024
1 parent 2443a8e commit e6400fb
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 53 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/deploy-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
92 changes: 46 additions & 46 deletions server/terraform/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand All @@ -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
}
description = "password"
type = string
sensitive = true
}

0 comments on commit e6400fb

Please sign in to comment.