Skip to content

Commit

Permalink
update ec2.tf and infra workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
DrInTech22 authored Dec 13, 2024
1 parent a09bfa7 commit 1ca5d6b
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 15 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/ansible-monitoring.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ jobs:
| jq -r '.workflow_runs | sort_by(.run_number) | last(.[])?.id // ""')
echo "run_id=$RUN_ID" >> $GITHUB_OUTPUT
echo "$RUN_ID"
echo "${{ toJson(github.event) }}"
echo "Triggering Workflow Run ID: ${{ github.event.workflow_dispatch.workflow_id }}"
echo "Triggering Workflow Run Number: ${{ github.event.workflow_dispatch.run_number }}"
- name: Write Private Key to File
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/terraform-apply.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: Public_IP
path: ./public_ip_env.txt
path: ./terraform/public_ip_env.txt

- name: Invoke workflow without inputs
if: steps.terraform-operation.outcome == 'success' && github.event.inputs.operation != 'destroy'
Expand Down
11 changes: 0 additions & 11 deletions terraform/ec2.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,4 @@ resource "aws_instance" "ec2" {
provisioner "local-exec" {
command = "echo 'Instance provisioned: ${self.public_ip}'"
}
}

resource "aws_instance" "ec2-2" {
ami = var.ami_id
instance_type = var.instance_type
key_name = var.key_pair_name
subnet_id = aws_subnet.public_subnet.id
vpc_security_group_ids = [aws_security_group.sg.id]
tags = {
Name = var.ec2_name
}
}

0 comments on commit 1ca5d6b

Please sign in to comment.