Git Product home page Git Product logo

Comments (7)

 avatar commented on August 23, 2024

It's something with Option 3 setup:

resource "aws_kms_key" "this" {
  description = "KMS key for notify-slack test"
}

resource "aws_kms_alias" "this" {
  name          = "alias/kms-test-key"
  target_key_id = "${aws_kms_key.this.id}"
}

// kms_key_arn = "${aws_kms_key.this.arn}"

becasue Option 1 works:

variable "kms_key_arn" {
  default = "arn:aws:kms:eu-west-1:835367859851:key/054b4846-95fe-4537-94f2-1dfd255238cf"
}

// kms_key_arn = "${var.kms_key_arn}"

from terraform-aws-notify-slack.

 avatar commented on August 23, 2024

The problem is with this line:

count = "${var.kms_key_arn == "" ? 0 : 1}"

because when I set the count to fixed 0 or 1 (and use this module as sources) like

data "aws_iam_policy_document" "lambda" {
  #count = "${var.kms_key_arn == "" ? 0 : 1}"
  count = 1 # or 0
  source_json = "${data.aws_iam_policy_document.lambda_basic.json}"

  statement {
..

Everything works

Related issue: hashicorp/terraform#17421

from terraform-aws-notify-slack.

antonbabenko avatar antonbabenko commented on August 23, 2024

@xliiv sorry for the delay in my response.

Yes, HCL2 will have it fixed. Meanwhile, you have to specify key using any of available options (static var, data-source, or pass from tfvars, or from CLI). Everything will work except computed values (${aws_kms_key.this.arn}).

There is not much this module can do about it to keep in an easy-maintainable condition.

from terraform-aws-notify-slack.

 avatar commented on August 23, 2024

Does this mean that example doesn't work?
There is used ${aws_kms_key.this.arn}.

from terraform-aws-notify-slack.

antonbabenko avatar antonbabenko commented on August 23, 2024

You are right, it does not work as it is now in that example. My bad.

I will make a PR now which will fix this.

from terraform-aws-notify-slack.

antonbabenko avatar antonbabenko commented on August 23, 2024

v1.9.0 has been released. I've updated examples there.

Thanks a lot for opening this issue!

from terraform-aws-notify-slack.

github-actions avatar github-actions commented on August 23, 2024

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

from terraform-aws-notify-slack.

Related Issues (20)

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.