Terraform-provider-aws: aws_iam_access_key with keybase pgp_key has no attribute encrypted_secret

Created on 12 Jan 2018  路  4Comments  路  Source: hashicorp/terraform-provider-aws

Terraform Version

0.11.2

Affected Resource(s)

Please list the resources as a list, for example:

  • aws_iam_access_key

If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.

Terraform Configuration Files

resource "aws_iam_access_key" "access_key" {
  user    = "someuser"
  pgp_key = "keybase:<someuser>"
}

output "access_key_secret" {
  value = "${aws_iam_access_key.access_key.encrypted_secret}"
}

Expected Behavior

encrypted_secret should be available

Actual Behavior

encrypted_secret isn't available

Error: Error running plan: 1 error(s) occurred:

* output.access_key_secret: Resource 'aws_iam_access_key.access_key' does not have attribute 'encrypted_secret' for variable 'aws_iam_access_key.access_key.encrypted_secret'

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform apply or terraform plan

Important Factoids

This does work on 0.10.8
It started failing on 0.11.0 and still fails on 0.11.2

bug serviciam

Most helpful comment

We saw the same problem on 0.11.2 when creating an aws_iam_access_key for a Keybase user that did not have a PGP key. The encrypted secret would then be empty, and Terraform would fail. In our case the solution was to add a PGP key to the Keybase account, taint the resource and re-run.

All 4 comments

We saw the same problem on 0.11.2 when creating an aws_iam_access_key for a Keybase user that did not have a PGP key. The encrypted secret would then be empty, and Terraform would fail. In our case the solution was to add a PGP key to the Keybase account, taint the resource and re-run.

@bnordbo We experienced the same, how did you taint the resource?

@chitopunk you have to run terraform taint <your ressource>

Experiencing the same thing in v0.11.8, also just updated to v0.11.11 and issue remains

Was this page helpful?
0 / 5 - 0 ratings