mirror of
https://github.com/ansible-lockdown/RHEL9-CIS.git
synced 2025-12-24 22:23:06 +00:00
added local file option
Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com>
This commit is contained in:
parent
5c0bc4137a
commit
0c6feb1b67
1 changed files with 6 additions and 1 deletions
7
.github/workflows/main.tf
vendored
7
.github/workflows/main.tf
vendored
|
|
@ -3,6 +3,11 @@ provider "aws" {
|
|||
region = var.aws_region
|
||||
}
|
||||
|
||||
// Read local file not created via terraform
|
||||
data "local_file" "github_actions" {
|
||||
filename = "${path.module}/${var.private_key}"
|
||||
}
|
||||
|
||||
// Create a security group with access to port 22 and port 80 open to serve HTTP traffic
|
||||
|
||||
data "aws_vpc" "default" {
|
||||
|
|
@ -66,7 +71,7 @@ resource "aws_instance" "testing_vm" {
|
|||
# The default username for our AMI
|
||||
user = var.ami_username
|
||||
# Private key for connection
|
||||
private_key = "${file(var.private_key)}"
|
||||
private_key = data.local_file.github_actions
|
||||
# Type of connection
|
||||
type = "ssh"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue