terraform-aws-modules / terraform-aws-datadog-forwarders

Terraform module to create resources on AWS to forward logs/metrics to Datadog 🇺🇦
https://registry.terraform.io/modules/terraform-aws-modules/datadog-forwarders/aws
Apache License 2.0
55 stars 41 forks source link

Terraform registry version is still 6.0.1 #42

Closed kimikimi714 closed 1 month ago

kimikimi714 commented 1 month ago

Description

Hello! I would like to update this module to version 6.1.0, but the latest version available on the Terraform registry is still 6.0.1. When I update my tf file and run terraform init, I get the following error:

There is no available version of module "registry.terraform.io/terraform-aws-modules/datadog-forwarders/aws//modules/log_forwarder" (datadog_log_forwarder.tf:5) which matches the given version constraint. The newest available version is 6.0.1.

Could you update the version of Terraform registry?

⚠️ Note

Before you submit an issue, please perform the following first:

  1. Remove the local .terraform directory (! ONLY if state is stored remotely, which hopefully you are following that best practice!): rm -rf .terraform/
  2. Re-initialize the project root to pull down modules: terraform init
  3. Re-attempt your terraform plan or apply and check if the issue still persists

Versions

Reproduction Code [Required]

module "datadog_forwarders_log_forwarder" {
  source  = "terraform-aws-modules/datadog-forwarders/aws//modules/log_forwarder"
  version = "6.1.0"

  runtime                   = "python3.11"
  forwarder_version         = "3.122.0"
  dd_api_key_secret_arn     = data.aws_secretsmanager_secret.dd_api_key.arn
  log_forwarder_bucket_tags = {
    Sample = "tag"
  }
}

Steps to reproduce the behavior:

Expected behavior

Finish without an error, like the example below (this example is for terraform-aws-modules/datadog-forwarders/aws 6.0.1):

❯ terraform init
Initializing the backend...
Initializing modules...
Downloading registry.terraform.io/terraform-aws-modules/datadog-forwarders/aws 6.0.1 for datadog_forwarders_log_forwarder...
- datadog_forwarders_log_forwarder in .terraform/modules/datadog_forwarders_log_forwarder/modules/log_forwarder
Downloading registry.terraform.io/terraform-aws-modules/s3-bucket/aws 3.6.1 for datadog_forwarders_log_forwarder.this_s3_bucket...
- datadog_forwarders_log_forwarder.this_s3_bucket in .terraform/modules/datadog_forwarders_log_forwarder.this_s3_bucket
Initializing provider plugins...
- Reusing previous version of hashicorp/null from the dependency lock file
- Reusing previous version of hashicorp/aws from the dependency lock file
- Reusing previous version of hashicorp/tls from the dependency lock file
- Using previously-installed hashicorp/null v3.2.2
- Using previously-installed hashicorp/aws v5.64.0
- Using previously-installed hashicorp/tls v4.0.5

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.

Actual behavior

❯ terraform init
Initializing the backend...
Initializing modules...
╷
│ Error: Unresolvable module version constraint
│ 
│   on datadog_log_forwarder.tf line 5:
│    5: module "datadog_forwarders_log_forwarder" {
│ 
│ There is no available version of module "registry.terraform.io/terraform-aws-modules/datadog-forwarders/aws//modules/log_forwarder" (datadog_log_forwarder.tf:5) which matches the given
│ version constraint. The newest available version is 6.0.1.

Additional context

I'm using terraform-aws-datadog-forwarders module from registry.terraform.io . If there is a walk around, let me know.

antonbabenko commented 1 month ago

Fixed with magic stick :)

kimikimi714 commented 1 month ago
スクリーンショット 2024-08-29 10 22 27

Thank you!