Skip to content

[Bug]: opensearch apply errors with invalid count argument #366

@uptownhr

Description

@uptownhr

Prior Search

  • I have already searched this project's issues to determine if a bug report has already been made.

What happened?

When attempting to apply kube_opensearch, there's an error around apply the aws_iam_user_policy

Steps to Reproduce

  1. apply kube_opensearch

Relevant log output

Error: Invalid count argument
│ 
│   on ../kube_aws_creds/main.tf line 52, in resource "aws_iam_user_policy" "user":
│   52:   count  = var.iam_policy_json != null ? 1 : 0
│ 
│ The "count" value depends on resource attributes that cannot be determined
│ until apply, so OpenTofu 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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions