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

components_datadog-private-location-ecs Error: Missing resource instance key #842

Open
pchafouleas opened this issue Aug 26, 2023 · 1 comment
Labels
bug 🐛 An issue with the system

Comments

@pchafouleas
Copy link

pchafouleas commented Aug 26, 2023

Describe the Bug

Error: Missing resource instance key
on .terraform/modules/components_datadog-private-location-ecs/modules/datadog-private-location-ecs/main.tf line 9, in locals:
  datadog_location_config = jsondecode(datadog_synthetics_private_location.private_location.config)
Because datadog_synthetics_private_location.private_location has "count" set, its attributes must be accessed on specific instances.

For example, to correlate with indices of a referring resource, use:
    datadog_synthetics_private_location.private_location[count.index]

Expected Behavior

The datadog-private-location-ecs module to deploy a private space in datadog and an aws ecs fargate container.

Steps to Reproduce

I have this in my main.tf and am deploying using Terraform Cloud,

terraform {
  required_providers {
    datadog = {
      source = "DataDog/datadog"
    }
  }
}
provider "datadog" {
  api_key = var.datadog_api_key
  app_key = var.datadog_app_key
}
module "components_datadog-private-location-ecs" {
  source  = "cloudposse/components/aws//modules/datadog-private-location-ecs"
  version = "1.293.2"
  region = "us-west-2"
}

Screenshots

No response

Environment

Terraform version 1.4.6 (Terraform Cloud)
cloudposse/components/aws//modules/datadog-private-location-ecs - version 1.295.0

Additional Context

I 100% recognize this may be user error and not a bug at all. I apologize in advance if it is not.

Thank you!

@pchafouleas pchafouleas added the bug 🐛 An issue with the system label Aug 26, 2023
@Benbentwo
Copy link
Member

Are you still having this issue? can you retry with the latest component version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 An issue with the system
Projects
None yet
Development

No branches or pull requests

2 participants