Giter VIP home page Giter VIP logo

Comments (10)

poupas avatar poupas commented on August 24, 2024 2

Hi,

We are having the same issue with Terraform 0.13.6

In our Terraform state, the aws_iam_access_key resource does not have the ses_smtp_password_v4 attribute.

The documentation mentions that this may happen if the resource is imported:

"Resource attributes such as encrypted_secret, key_fingerprint, pgp_key, secret, and ses_smtp_password_v4 are not available for imported resources as this information cannot be read from the IAM API."

We are pretty sure that this resource was not imported. It was created with the terraform-aws-iam-s3-user module, which in turn uses this module.

It might be a good idea to not assume that the ses_smtp_password_v4 is always present, and change the module accordingly.

FWIW, we are using this small patch as a workaround:

--- outputs.tf.orig	2021-02-05 16:28:25.186479917 +0000
+++ outputs.tf	2021-02-05 16:27:52.969094311 +0000
@@ -26,6 +26,6 @@

 output "ses_smtp_password_v4" {
   sensitive   = true
-  value       = join("", aws_iam_access_key.default.*.ses_smtp_password_v4)
+  value       = join("", compact(aws_iam_access_key.default.*.ses_smtp_password_v4))
   description = "The secret access key converted into an SES SMTP password by applying AWS's Sigv4 conversion algorithm"
 }

Thank you,
Joao

from terraform-aws-iam-system-user.

poupas avatar poupas commented on August 24, 2024 2

Hi @SweetOps . I am sorry to say that the issue is still not fixed.

I am currently using:

The version we are using already has the change mentioned in #24.

Consider the following output:

Error: Invalid function argument

  on .terraform/modules/backend_s3_user.s3_user/outputs.tf line 29, in output "ses_smtp_password_v4":
  29:   value       = join("", aws_iam_access_key.default.*.ses_smtp_password_v4)
    |----------------
    | aws_iam_access_key.default is tuple with 1 element

Invalid value for "lists" parameter: element 0 is null; cannot concatenate
null values.

Notice that the error is about attribute ses_smtp_password_v4 and not ses_smtp_password

The issue we are facing is the one I described above. The documentation states that ses_smtp_password_v4 might not always be present, which is in fact what is happening in our particular case.

Best regards,
Joao

from terraform-aws-iam-system-user.

joe-niland avatar joe-niland commented on August 24, 2024

Hi @yamu890
Are you using https://github.com/cloudposse/terraform-aws-iam-s3-user or this module?

from terraform-aws-iam-system-user.

yamu890 avatar yamu890 commented on August 24, 2024

Hello Joe,

I am using the module https://github.com/cloudposse/terraform-aws-iam-s3-user and that's main.tf file is pointing to this module.
https://github.com/cloudposse/terraform-aws-iam-s3-user/blob/master/main.tf

from terraform-aws-iam-system-user.

yamu890 avatar yamu890 commented on August 24, 2024

Hello @joe-niland

Can I ask if there is any workaround to fix this ?

from terraform-aws-iam-system-user.

benh57 avatar benh57 commented on August 24, 2024

I'm seeing the same issue.

from terraform-aws-iam-system-user.

benh57 avatar benh57 commented on August 24, 2024

I'm using the module like this:


module "codedeploy_user" {
  source    = "git::https://github.com/cloudposse/terraform-aws-iam-system-user.git?ref=0.17.0"
  namespace    = "sms"
  stage        = "${local.env}"
  name         = "xxx"
}

from terraform-aws-iam-system-user.

SweetOps avatar SweetOps commented on August 24, 2024

has been fixed by #24

from terraform-aws-iam-system-user.

Nuru avatar Nuru commented on August 24, 2024

@poupas Please upgrade to terraform-aws-iam-s3-user v0.15.1 and if this is still an issue, open a PR with your patch from here

from terraform-aws-iam-system-user.

poupas avatar poupas commented on August 24, 2024

Hi @Nuru . The issue still remains.

I will open a PR shortly.

from terraform-aws-iam-system-user.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.