question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`count` is marked as undefined variable

See original GitHub issue
resource "aws_vpc" "vpc" {
  cidr_block = "10.10.0.0/16"
}

resource "aws_subnet" "subnet" {
  count = 3

  vpc_id = aws_vpc.vpc.id
  cidr_block = "10.10.${count.index + 1}.0/24"
  availability_zone_id = "apse2-az${count.index + 1}"
}

In the following HCL count (both instances) is marked as There is no variable named "count".

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:45
  • Comments:12 (1 by maintainers)

github_iconTop GitHub Comments

7reactions
borikosscommented, Dec 20, 2019

@DJAlPee great, thx 😃 It seems as the PR has been merged yesterday

6reactions
Vermyndaxcommented, Oct 15, 2019

Having this issue on language server 0.9 too.

Read more comments on GitHub >

github_iconTop Results From Across the Web

php $count - Undefined variable
php if ($count == 5) { $count = 0; echo '<div class="clearit"></div>'; } ?> It works but I am getting this error that...
Read more >
Notice: Undefined variable: count in [SOLVED] - php
This code is running fine in my server. Try declaring the '$count=0' before and increment it in the loop. May that work. Good...
Read more >
PHP error: 'Undefined variable: count' preventing admin. ...
I've just deployed an EE site which was working fine locally under MAMP to a Windows-based server and am getting this on admin.php...
Read more >
ErrorException Undefined variable: limit
not working limit and id ,, i want to insert is manually public function import(Request $request) { $id= $request->id; $limit = $request->limit; ...
Read more >
Why do I get the error "Unrecognized function or variable"?
Undefined function or variable 'y'. % Possible corrections: % Change line 3 to "plot(x,t)".
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found