Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two errors when trying to plan 'Invalid count argument' and 'Incorrect attribute value type' #121

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

goruha
Copy link
Member

@goruha goruha commented Mar 6, 2025

what

  • Fix
│ Error: Invalid count argument
│
│   on .terraform\modules\foo.vpc_flow_logs.s3_log_storage_bucket.aws_s3_bucket\main.tf line 64, in resource "aws_s3_bucket_logging" "default":
│   64:   count  = local.enabled && var.logging != null ? 1 : 0
│
│ The "count" value depends on resource attributes that cannot be determined until
│ apply, so Terraform cannot predict how many instances will be created. To work
│ around this, use the -target argument to first apply only the resources that the
│ count depends on.
╵

references

@goruha goruha requested review from a team as code owners March 6, 2025 19:09
@goruha goruha requested review from kevcube and joe-niland March 6, 2025 19:09
@mergify mergify bot added the triage Needs triage label Mar 6, 2025
@goruha
Copy link
Member Author

goruha commented Mar 6, 2025

/terratest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage Needs triage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants