File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -239,7 +239,7 @@ jobs:
239239 aws-region : ${{ secrets.AWS_REGION }}
240240 aws-access-key-id : ${{ secrets.AWS_ACCESS_KEY_ID }}
241241 aws-secret-access-key : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
242- instance-ids : " i-0528c585d9578d329 "
242+ instance-ids : " i-0ce4cb989d837170e "
243243 working-directory : /
244244 comment : Deploy
245245 command : |
Original file line number Diff line number Diff line change @@ -416,4 +416,20 @@ resource "aws_instance" "ec2_1" {
416416 user_data = <<- EOF
417417${ local . ec2_user_data_base }
418418EOF
419+ }
420+
421+ # Elastic IP 생성
422+ resource "aws_eip" "eip_1" {
423+ domain = " vpc"
424+
425+ tags = {
426+ Name = " ${ var . prefix } -eip-1"
427+ }
428+
429+ }
430+
431+ # Elastic IP와 EC2 인스턴스 연결
432+ resource "aws_eip_association" "eip_assoc" {
433+ instance_id = aws_instance. ec2_1 . id
434+ allocation_id = aws_eip. eip_1 . id
419435}
You can’t perform that action at this time.
0 commit comments