Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aws_iam_user_ssh_key status and state issue #3363

Closed
eugenetaranov opened this issue Feb 13, 2018 · 2 comments
Closed

aws_iam_user_ssh_key status and state issue #3363

eugenetaranov opened this issue Feb 13, 2018 · 2 comments
Labels
bug Addresses a defect in current functionality. service/iam Issues and PRs that pertain to the iam service. stale Old or inactive issues managed by automation, if no further action taken these will get closed.

Comments

@eugenetaranov
Copy link

eugenetaranov commented Feb 13, 2018

Hello,

aws_iam_user_ssh_key seem to have several closely related issues:

  • initial creation does not set status correctly, it sets Active for all keys, ignoring Inactive.
  • local state part related to aws_iam_user_ssh_key is wiped off.

Terraform Version

Terraform v0.11.3
+ provider.aws v1.8.0

Affected Resource(s)

  • aws_iam_user_ssh_key

Terraform Configuration Files

resource "aws_iam_user" "test" {
  name = "test"
  path = "/"
}

resource "aws_iam_user_ssh_key" "test" {
  username   = "${aws_iam_user.test.name}"
  encoding   = "PEM"
  public_key =<<EOF
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDFcMDIpVtqvnm/rQagtR7oRL4WwvQEKLfu+jzyCw9wF4JZNjiLCVVJiCKEqbxc7Qrl/U0LSqOcoOYsn4YTwYqlS2Kob0Z7V1PShWYSPvvUTu6FWzSmXIbwHMQ6RvBdGL740mIgCwgpqoIeOOxrEDQlWEjCLla15p5NSGphHYg32PV0oodauq6RsTK3owtMWd7oyd30yK16MqNufG91JNHG4M/tpUfdd2gQ5SWoLYcAgPXLUWC01+rntIPNc0ZKm+I53R0VhVZVTE/1+nFmJiVZdp7nIEFdr5AjUUPFp3GWUSt7nDAC8OaF9b/3uCmA4emXLecAjz7YtnlXrEaCsauH
EOF
  status     = "Inactive"
}

Debug Output

1st apply: https://gist.github.com/eugenetaranov/3e10bfc38d966d1d361e4218a15708ea
2nd apply: https://gist.github.com/eugenetaranov/dd8fffb772356a694a02b2d1a7f95b45
3rd apply: https://gist.github.com/eugenetaranov/e3d55911491591faae8a9c9451b71232

Panic Output

None

Expected Behavior

create iam user, attach ssh public key with correct status

Actual Behavior

1st run:

Steps to Reproduce

Run terraform apply 3 times.

@bflad bflad added bug Addresses a defect in current functionality. service/iam Issues and PRs that pertain to the iam service. labels Feb 13, 2018
@github-actions
Copy link

Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label.

If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you!

@github-actions github-actions bot added the stale Old or inactive issues managed by automation, if no further action taken these will get closed. label Mar 27, 2020
@ghost
Copy link

ghost commented May 28, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators May 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/iam Issues and PRs that pertain to the iam service. stale Old or inactive issues managed by automation, if no further action taken these will get closed.
Projects
None yet
Development

No branches or pull requests

2 participants