Advertisement
Guest User

Untitled

a guest
Sep 16th, 2019
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. resource "aws_lambda_function" "foo" {
  2. count = "2"
  3. function_name = "foo-${title(var.environment)}"
  4. handler = "main"
  5. description = "a foo test"
  6. role = "arn:aws:iam::12345:role/foo-role" #Change me!
  7. runtime = "go1.x"
  8. timeout = "300"
  9. reserved_concurrent_executions = "100"
  10.  
  11. tags {
  12. environment = "${title(var.environment)}" #fine
  13. # name = "${aws_lambda_function.foo.function_name}" #Doesnt work, inits, but self reference not allowed..
  14. # name = "${self.function_name}" #will not init, because cannot contain self reference of course
  15. name = "foo-${title(var.environment)}" #does work
  16. Environment = "${var.environment_tag}" #works fine with variables
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement