Skip to content

Commit

Permalink
public_key
Browse files Browse the repository at this point in the history
  • Loading branch information
edbizarro committed Dec 6, 2019
1 parent 2e62561 commit 37d9a8d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ Special thanks to [villasv/aws-airflow-stack](https://github.com/villasv/aws-air
| load\_example\_dags | Load the example DAGs distributed with Airflow. Useful if deploying a stack for demonstrating a few topologies, operators and scheduling strategies. | string | `"false"` | no |
| private\_key | Enter the content of the SSH Private Key to run provisioner. | string | `"null"` | no |
| private\_key\_path | Enter the path to the SSH Private Key to run provisioner. | string | `"~/.ssh/id_rsa"` | no |
| public\_key | Enter the content of the SSH Public Key to run provisioner. | string | `"null"` | no |
| public\_key\_path | Enter the path to the SSH Public Key to add to AWS. | string | `"~/.ssh/id_rsa.pub"` | no |
| rbac | Enable support for Role-Based Access Control (RBAC). | string | `"false"` | no |
| root\_volume\_delete\_on\_termination | Whether the volume should be destroyed on instance termination. | string | `"true"` | no |
Expand Down
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

resource "aws_key_pair" "auth" {
key_name = var.key_name != "" ? var.key_name : module.airflow_labels.id
public_key = file(var.public_key_path)
public_key = coalesce(var.public_key, file(var.public_key_path))
}

# -------------------------------------------
Expand Down
5 changes: 5 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ variable "private_key" {
default = null
}

variable "public_key" {
description = "Enter the content of the SSH Public Key to run provisioner."
default = null
}

variable "private_key_path" {
description = "Enter the path to the SSH Private Key to run provisioner."
default = "~/.ssh/id_rsa"
Expand Down

0 comments on commit 37d9a8d

Please sign in to comment.