Closed Glen-Moonpig closed 2 years ago
@Glen-Moonpig Could you paste the exact invocation you used to get this working?
@Glen-Moonpig Could you paste the exact invocation you used to get this working?
You just need to use the -target argument when you run terraform/terragrunt so that only the local_file resource is deployed (to the local terraform cache folder). Once the file is created you can run the same terraform command without the target argument to deploy all resources.
For example:
terraform apply -target=local_file.public_ssh_key
Ran into the same issue, am I using this module in an unintended way or is this a bug?
It is a bug, but I thinking about removing the 3 different ways to set the SSH key. The current way is far complex.
I would like to support a user provided reference to an existing EC2 key only, removing the part where te module is generating a key. Besides using an SSH key, the session manager is supported as well.. Anyone a suggestion?
I am planning to drop the support of an SSH EC2 key managed by the module. To access the instances you can either inject an ec2 key pair or use the Amazon sessions manager, see #192 for the PR. Please feel free to comment on this PR
@npalm SSH support has been dropped with #389. Issue seems to be obsolete now and can be closed. Can't it?
@kayman-mk thx for the reminder
I had just updated from commit 16d2e2b556641ff67771c3c47b6c81a07f03a677 to 26310fbf2287c4087ba16f2d6835b962bd46430b and tried a fresh deployment and found that it errors:
I had to deploy the local_file resource for the SSH key using the
-target
argument before I could deploy the terraform-aws-gitlab-runner module. This was not previously an issue. I can see the count expression has changed fromcount = var.ssh_key_pair == "" ? 1 : 0
tocount = var.ssh_key_pair == "" && var.ssh_public_key != "" ? 1 : 0
I am using terraform 0.12.19.