Skip to content

Conversation

@thaunghtike-share
Copy link
Contributor

No description provided.

@abhiyerra
Copy link
Member

This code is incorrect. I want to support multiple ssh_keys that I can add manually AND support ec2 instance connect. Please redo this.

main.tf Outdated
"Effect": "Allow",
"Action": "ec2:DescribeInstances",
"Resource": [
"arn:aws:ec2:us-east-1:${data.aws_caller_identity.current.account_id}:instance/${aws_instance.x.id}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should just pass the resources directly as they can be in different environments.

variables.tf Outdated

variable "ingress_cidrs" {}

variable "ec2_connect_installed" {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change this to: ec2_connect_enabled

variables.tf Outdated
default = []
variable "ssh_key" {
description = "SSH public key to add to the image"
default = ""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be multiple SSH keys. Why is this modified?

README.md Outdated
module "bastion" {
source = "github.com/opszero/terraform-aws-bastion"

ssh_key = "ssh-rsa ..."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should still support multiple ssh-keys. Why did you remove this feature?

# Keys
touch /home/ubuntu/.ssh/authorized_keys
echo "${ssh_key}" >> /home/ubuntu/.ssh/authorized_keys
%{endfor~}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to still support multiple ssh keys

@abhiyerra abhiyerra merged commit db30f4d into opszero:main May 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants