Giter VIP home page Giter VIP logo

Comments (6)

aknysh avatar aknysh commented on July 22, 2024

@amontalban
thank you for testing and submitting the issue.
those are issues with the new Terraform version (they were not present in the old versions).
we already fixed some of our modules, and will take a look at this one.
thanks again

from terraform-aws-iam-system-user.

aknysh avatar aknysh commented on July 22, 2024

@amontalban
This was addressed in https://github.com/cloudposse/terraform-aws-iam-system-user/releases/tag/0.2.2
Merged to master.
Thank you for testing.
We'll close the issue for now.

from terraform-aws-iam-system-user.

amontalban avatar amontalban commented on July 22, 2024

w00t! Thank you so much for fixing this @aknysh!

from terraform-aws-iam-system-user.

amontalban avatar amontalban commented on July 22, 2024

Hi @aknysh,

I have tested this change but for some reason I'm not getting output (Besides the users are created properly). This is the text I get when running terraform apply:

Apply complete! Resources: 11 added, 0 changed, 0 destroyed.

And when trying to do terraform output I get this:

The state file either has no outputs defined, or all the defined
outputs are empty. Please define an output in your configuration
with the `output` keyword and run `terraform refresh` for it to
become available. If you are using interpolation, please verify
the interpolated value is not empty. You can use the 
`terraform console` command to assist.

This is my configuration:

module "gitlabci-user" {
  source = "cloudposse/iam-system-user/aws"
  version = "0.2.2"

  namespace = "${var.domain}"
  stage = "production"
  name = "gitlabci"
  policy  = "${data.aws_iam_policy_document.gitlabci_user_policy.json}"
}

Am I doing something wrong?

Thanks!

from terraform-aws-iam-system-user.

aknysh avatar aknysh commented on July 22, 2024

@amontalban
thank you again for testing.
I'm not sure what's the problem with your setup.
when I run it, I get the outputs:

module.label.null_resource.default: Creating...
  triggers.%:          "" => "5"
  triggers.attributes: "" => ""
  triggers.id:         "" => "app"
  triggers.name:       "" => "app"
  triggers.namespace:  "" => ""
  triggers.stage:      "" => ""
module.label.null_resource.default: Creation complete after 0s (ID: 7982287155863031421)
aws_iam_user.default: Creating...
  arn:           "" => "<computed>"
  force_destroy: "" => "false"
  name:          "" => "app"
  path:          "" => "/"
  unique_id:     "" => "<computed>"
aws_iam_user.default: Creation complete after 1s (ID: app)
aws_iam_access_key.default: Creating...
  encrypted_secret:  "" => "<computed>"
  key_fingerprint:   "" => "<computed>"
  secret:            "" => "<computed>"
  ses_smtp_password: "" => "<computed>"
  status:            "" => "<computed>"
  user:              "" => "app"
aws_iam_access_key.default: Creation complete after 0s (ID: AKIAIV4CHHX7R5J43CMQ)

Apply complete! Resources: 3 added, 0 changed, 0 destroyed.

Outputs:

access_key_id = AKIAIV4CHHX7R5J42DMQ
secret_access_key = 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
user_arn = arn:aws:iam::XXXXXXXXXXXXXXX:user/app
user_name = app
user_unique_id = AIDAJBDM7QVKSM5A7HCFY

Do you use other resources? I see 11 resources added in your example
Apply complete! Resources: 11 added

Can you share the full setup that you are using?

from terraform-aws-iam-system-user.

osterman avatar osterman commented on July 22, 2024

@amontalban based on your example, you do not provide any outputs. That's why terraform output is empty. Unfortunately module outputs are not automatically output. You need to redefine the in the root scope.

E.g. Try this configuration.

module "gitlabci-user" {
  source = "cloudposse/iam-system-user/aws"
  version = "0.2.2"

  namespace = "${var.domain}"
  stage = "production"
  name = "gitlabci"
  policy  = "${data.aws_iam_policy_document.gitlabci_user_policy.json}"
}
output "user_name" {
  value = "${module.gitlabci-user.user_name}"
}

output "user_arn" {
  value = "${module.gitlabci-user.user_arn}"
}

output "user_unique_id" {
  value = "${module.gitlabci-user.user_unique_id}"
}

output "access_key_id" {
  value = "${module.gitlabci-user.access_key_id}"
}

output "secret_access_key" {
  value = "${module.gitlabci-user.secret_access_key}"
}

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.