terraform-aws-iam-user icon indicating copy to clipboard operation
terraform-aws-iam-user copied to clipboard

Enable uploading a public ssh key into the user account

Open FlorinAndrei opened this issue 1 year ago • 7 comments

what

This PR enables uploading of a public ssh key into the IAM user account. By default the ssh key uploading is disabled.

It also fixes a minor bug where, even when login_profile_enabled = false, the module would still ask for a value for the pgp_key variable.

why

I need ssh keys attached to my IAM user accounts.

references

FlorinAndrei avatar Sep 10 '24 22:09 FlorinAndrei

Done, and pushed to the branch.

FlorinAndrei avatar Sep 10 '24 22:09 FlorinAndrei

/terratest

Gowiem avatar Sep 10 '24 22:09 Gowiem

AFAICT, now it's the automated tests themselves that are failing for some reason (old test environment maybe?).

Please let me know if there's anything I need to do.

FlorinAndrei avatar Sep 16 '24 18:09 FlorinAndrei

💥 This pull request now has conflicts. Could you fix it @FlorinAndrei? 🙏

mergify[bot] avatar Sep 19 '24 03:09 mergify[bot]

/terratest

Gowiem avatar Sep 24 '24 14:09 Gowiem

@FlorinAndrei we're getting this failure in our tests:

TestExamplesComplete 2024-09-24T14:41:19Z retry.go:72: terraform [output -no-color user_name]
TestExamplesComplete 2024-09-24T14:41:19Z command.go:53: Running command terraform with args [output -no-color user_name]
TestExamplesComplete 2024-09-24T14:41:20Z command.go:121: "cp-testing-user"
    examples_complete_test.go:33: 
        	Error Trace:	examples_complete_test.go:33
        	Error:      	Not equal: 
        	            	expected: "cp-testing-user"
        	            	actual  : "\"cp-testing-user\""
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1 +1 @@
        	            	-cp-testing-user
        	            	+"cp-testing-user"
        	Test:       	TestExamplesComplete

Can you look into that? It seems we're double quoting or doing something odd with the username?

Gowiem avatar Sep 24 '24 16:09 Gowiem

@Gowiem That doesn't seem related. My changes only refer to the ssh key resource.

FlorinAndrei avatar Sep 24 '24 17:09 FlorinAndrei

💥 This pull request now has conflicts. Could you fix it @FlorinAndrei? 🙏

mergify[bot] avatar May 29 '25 20:05 mergify[bot]

This PR was closed due to inactivity and merge conflicts. 😭 Please resolve the conflicts and reopen if necessary.

mergify[bot] avatar May 29 '25 20:05 mergify[bot]