
SoldierCoder
Engineering Elixir Applications: End of Chapter 2, github_issues_labels
All of Chapter 2 works fine until this last bit.
variable “issues” {
type = list(object({
title = string
body = string
labels = list(string)
milestone = string
}))
}
resource “github_issue” “tasks” {
count = length(var.issues)
repository = github_repository.kanban.name
title = var.issues[count.index].title
body = var.issues[count.index].body
milestone_number = github_repository_milestone.epics[var.issues[count.index].milestone].number
labels = [for l in var.issues[count.index].labels :
github_issue_label.issues_labels[l].name]
Error: Invalid index
│
│ on main.tf line 77, in resource “github_issue” “tasks”:
│ 77: github_issue_label.issues_labels[l].name]
│ ├────────────────
│ │ github_issue_label.issues_labels is object with 15 attributes
│
│ The given key does not identify an element in this collection value.
Popular Prag Prog topics










Other popular topics










Latest in PragProg
Latest (all)
Categories:
Popular Portals
- /elixir
- /opensuse
- /rust
- /kotlin
- /ruby
- /erlang
- /python
- /clojure
- /react
- /quarkus
- /go
- /react-native
- /vapor
- /v
- /wasm
- /django
- /security
- /nodejs
- /centos
- /rails
- /haskell
- /fable
- /gleam
- /swift
- /deno
- /js
- /tailwind
- /assemblyscript
- /laravel
- /symfony
- /phoenix
- /crystal
- /typescript
- /debian
- /adonisjs
- /julia
- /arch-linux
- /svelte
- /spring
- /preact
- /c-plus-plus
- /flutter
- /actix
- /java
- /angular
- /ocaml
- /kubuntu
- /zig
- /scala
- /zotonic
- /vim
- /rocky
- /lisp
- /keyboards
- /html
- /emacs
- /nim
- /vuejs
- /nerves
- /elm