Skip to content

Commit

Permalink
Change ALM public key to variable
Browse files Browse the repository at this point in the history
Change the ALM public key to use a variable
Add the variables to the variables file for specific environments
  • Loading branch information
Scott Millard committed Jul 12, 2018
1 parent c6874f3 commit a019062
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ data "aws_secretsmanager_secret_version" "openvpn_admin_password" {

resource "aws_key_pair" "cloud_key" {
key_name = "cloud_key"
public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDRAvH6k7iEeRDz9SQtkH1o8KiUaed/e2hmzTUjA8bhmeWVLPsgCMKIUKR0jdPlvdZ0AmMLXswobsXj08dPgWxUZxoAWIqKCjd969KckydUpBtcb+X2Q+tpOcugBOQSY1H8hgNrdcRKEaUllTfvseJ9pBOYU7j9VuZ608HQhfZw7+aS8wi9o/BJwejtpWdlo6gkxXoIRqDX/ioYg+W6Tc7yoUzAEANwZAy3/3GKWDrh+9jnzR6mEEN48Nuee49wWfP5G0T/v4+Gvux5zioHb3rcmmR9YTkFOiv1poInhXlPdc7Q38yj+z6E+hACNN3rK80YjU0ByaSPltPjqm9ZYmPX"
public_key = "${var.key_pair_public_key}"
}

module "vpc" {
Expand Down
5 changes: 5 additions & 0 deletions main_variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,8 @@ variable "streaming_consumer_host" {
variable "alm_account_id" {
description = "Account id of the ALM environment (should match deployment_identifier env)"
}

variable "key_pair_public_key" {
description = "The public key used to create a key pair"
}

2 changes: 2 additions & 0 deletions variables/alm.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,5 @@ directory_name = "jenkins_home"
efs_encrypted = true

alm_account_id = "199837183662"

key_pair_public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDRAvH6k7iEeRDz9SQtkH1o8KiUaed/e2hmzTUjA8bhmeWVLPsgCMKIUKR0jdPlvdZ0AmMLXswobsXj08dPgWxUZxoAWIqKCjd969KckydUpBtcb+X2Q+tpOcugBOQSY1H8hgNrdcRKEaUllTfvseJ9pBOYU7j9VuZ608HQhfZw7+aS8wi9o/BJwejtpWdlo6gkxXoIRqDX/ioYg+W6Tc7yoUzAEANwZAy3/3GKWDrh+9jnzR6mEEN48Nuee49wWfP5G0T/v4+Gvux5zioHb3rcmmR9YTkFOiv1poInhXlPdc7Q38yj+z6E+hACNN3rK80YjU0ByaSPltPjqm9ZYmPX"

0 comments on commit a019062

Please sign in to comment.