SoldierCoder

SoldierCoder

Engineering Elixir Applications: End of Chapter 2, github_issues_labels

@elliefairholm and @Gilacost

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.

First Post!

elliefairholm

elliefairholm

Author Engineering Elixir Applications

Hi @SoldierCoder could you share your whole main.tf and .auto.tfvars files? It looks like your having an issue when trying to access a specific “github_issue_label.issues_labels” resource. Rather than having many “issue_labels” in your state it seems that you only have one.

Popular Pragmatic topics Top

jimschubert
In Chapter 3, the source for index introduces Config on page 31, followed by more code including tests; Config isn’t introduced until pag...
New
belgoros
Following the steps described in Chapter 6 of the book, I’m stuck with running the migration as described on page 84: bundle exec sequel...
New
ianwillie
Hello Brian, I have some problems with running the code in your book. I like the style of the book very much and I have learnt a lot as...
New
herminiotorres
Hi @Margaret , On page VII the book tells us the example and snippets will be all using Elixir version 1.11 But on page 3 almost the en...
New
swlaschin
The book has the same “Problem space/Solution space” diagram on page 18 as is on page 17. The correct Problem/Solution space diagrams ar...
New
fynn
This is as much a suggestion as a question, as a note for others. Locally the SGP30 wasn’t available, so I ordered a SGP40. On page 53, ...
New
Charles
In general, the book isn’t yet updated for Phoenix version 1.6. On page 18 of the book, the authors indicate that an auto generated of ro...
New
adamwoolhether
Is there any place where we can discuss the solutions to some of the exercises? I can figure most of them out, but am having trouble with...
New
EdBorn
Title: Agile Web Development with Rails 7: (page 70) I am running windows 11 pro with rails 7.0.3 and ruby 3.1.2p20 (2022-04-12 revision...
New
gorkaio
root_layout: {PentoWeb.LayoutView, :root}, This results in the following following error: no “root” html template defined for PentoWeb...
New

Other popular topics Top

AstonJ
You might be thinking we should just ask who’s not using VSCode :joy: however there are some new additions in the space that might give V...
New
PragmaticBookshelf
Rust is an exciting new programming language combining the power of C with memory safety, fearless concurrency, and productivity boosters...
New
Rainer
Not sure if following fits exactly this thread, or if we should have a hobby thread… For many years I’m designing and building model air...
New
PragmaticBookshelf
Learn different ways of writing concurrent code in Elixir and increase your application's performance, without sacrificing scalability or...
New
PragmaticBookshelf
Build highly interactive applications without ever leaving Elixir, the way the experts do. Let LiveView take care of performance, scalabi...
New
AstonJ
If you want a quick and easy way to block any website on your Mac using Little Snitch simply… File > New Rule: And select Deny, O...
New
First poster: bot
Large Language Models like ChatGPT say The Darnedest Things. The Errors They MakeWhy We Need to Document Them, and What We Have Decided ...
New
PragmaticBookshelf
A Ruby-Centric Chat with Noel Rappin @noelrappin Once you start noodling around with Ruby you quickly figure out, as Noel Rappi...
New
New
CommunityNews
A Brief Review of the Minisforum V3 AMD Tablet. Update: I have created an awesome-minisforum-v3 GitHub repository to list information fo...
New

Latest in PragProg

View all threads ❯