iknowjason / BlueCloud

Cyber Range including Velociraptor + HELK system with a Windows VM for security testing and R&D. Azure and AWS terraform support.
https://blue.iknowjason.io
MIT License
125 stars 28 forks source link

Issue in aws keypair #9

Open hirenchavda25 opened 2 years ago

hirenchavda25 commented 2 years ago

│ Error: Unsupported attribute │ │ on main.tf line 72, in module "velocihelk": │ 72: key_name = module.key_pair.key_pair_key_name │ ├──────────────── │ │ module.key_pair is a object, known only after apply │ │ This object does not have an attribute named "key_pair_key_name". ╵ ╷ │ Error: Unsupported attribute │ │ on main.tf line 82, in module "ws2019": │ 82: key_name = module.key_pair.key_pair_key_name │ ├──────────────── │ │ module.key_pair is a object, known only after apply │ │ This object does not have an attribute named "key_pair_key_name".

iknowjason commented 2 years ago

@hirenchavda25

Will investigate this issue and get back to you as soon as I can.

Thanks, J

iknowjason commented 2 years ago

Hi @hirenchavda25 I am unable to duplicate your problem and a fix for this was pushed back in June. It currently builds just fine with a more recent version of terraform. Can you try this?

Upgrade your terraform CLI to this version or the latest?

terraform version
Terraform v1.1.5
on linux_amd64

I need to update all of the documentation here to reflect new changes.

Gerh-Hack commented 2 years ago

Hi bro Great job! It was working before, but now I get the same error reported here. Attached is the output of the command you request....

image

terraform version Terraform v1.2.9 on linux_amd64

iknowjason commented 2 years ago

@Gerh-Hack Just pushed a commit to resolve this. Please do a git pull and give it a go.

Gerh-Hack commented 2 years ago

Thank you very much bro! It is now functional... Although I tried to configure SSH keys but it always creates SSH keys called deployer-one and I could not connect to BlueCloud-velocihelk. Anyway, thank you very much!

iknowjason commented 2 years ago

@Gerh-Hack

No problem, man. Yeah it auto creates a pair of SSH keys, you can call them whatever you want and even change the name of the ssh private key file. So wait, you still aren't able to SSH into the velocihelk system? You should be able to by referencing the ssh private key file with username. Should be something like this:
$ ssh -i ssh_key.pem helk@<IP ADDRESS>