ansible / terraform-provider-ansible

community terraform provider for ansible
https://registry.terraform.io/providers/ansible/ansible/latest
GNU General Public License v3.0
201 stars 45 forks source link

Ansible provider version incompatible with linux_amd64 | Empty Summary: This is always a bug in the provider #126

Open Skye-Lu opened 6 months ago

Skye-Lu commented 6 months ago

I have been using Ansible provider for 8 months, version is 1.1.0. It works well until yesterday I run the pipeline and got the error when terraform init Error: Incompatible provider version│ Provider registry.terraform.io/ansible/ansible v1.1.0 does not have a│ package available for your current platform, linux_amd64. (Nothing has changed on my code) 1.2.0 has same errors as 1.1.0.

Found that 1.3.0 been published 14 days ago, the last time I run the pipeline is 15 days ago working well.

After bump ansible provider version to 1.3.0, terraform init is good, but terraform planerror logs are: Error: Empty Summary: This is always a bug in the provider and should be reported to the provider developers. ( Same errors with TF_LOG=DEBUG).

resource "ansible_vault" "secrets" {
  vault_file          = "${path.module}/../x/${var.environment}.yml"
  vault_password_file = "${path.module}/../${var.environment}-vault-password.txt"
}
Initializing provider plugins...
- Finding hashicorp/aws versions matching "4.49.0"...
2024-05-21T22:59:20.110Z [DEBUG] Service discovery for registry.terraform.io at https://registry.terraform.io/.well-known/terraform.json
2024-05-21T22:59:20.121Z [DEBUG] GET https://registry.terraform.io/v1/providers/hashicorp/aws/versions
- Finding ansible/ansible versions matching "~> 1.3.0"...
2024-05-21T22:59:20.133Z [DEBUG] GET https://registry.terraform.io/v1/providers/ansible/ansible/versions
2024-05-21T22:59:20.142Z [DEBUG] GET https://registry.terraform.io/v1/providers/hashicorp/aws/4.49.0/download/linux/amd64
2024-05-21T22:59:20.153Z [DEBUG] GET https://releases.hashicorp.com/terraform-provider-aws/4.49.0/terraform-provider-aws_4.49.0_SHA256SUMS
2024-05-21T22:59:20.162Z [DEBUG] GET https://releases.hashicorp.com/terraform-provider-aws/4.49.0/terraform-provider-aws_4.49.0_SHA256SUMS.72D7468F.sig
- Installing hashicorp/aws v4.49.0...
2024-05-21T22:59:20.404Z [DEBUG] Provider signed by 34365D9472D7468F HashiCorp Security (hashicorp.com/security) <security@hashicorp.com>
- Installed hashicorp/aws v4.49.0 (signed by HashiCorp)
2024-05-21T22:59:21.914Z [DEBUG] GET https://registry.terraform.io/v1/providers/ansible/ansible/1.3.0/download/linux/amd64
2024-05-21T22:59:21.924Z [DEBUG] GET https://github.com/ansible/terraform-provider-ansible/releases/download/v1.3.0/terraform-provider-ansible_1.3.0_SHA256SUMS
2024-05-21T22:59:21.955Z [DEBUG] GET https://github.com/ansible/terraform-provider-ansible/releases/download/v1.3.0/terraform-provider-ansible_1.3.0_SHA256SUMS.sig
- Installing ansible/ansible v1.3.0...
2024-05-21T22:59:22.091Z [DEBUG] Provider signed by 41F01D0480007165 Mike Graves (Terraform provider signing key) <mgraves@redhat.com>
- Installed ansible/ansible v1.3.0 (self-signed, key ID )

Partner and community providers are signed by their developers.
If you'd like to know more about provider signing, you can read about it here:
https://www.terraform.io/docs/cli/plugins/signing.html

Terraform has created a lock file .terraform.lock.hcl to record the provider
selections it made above. Include this file in your version control repository
so that Terraform can guarantee to make the same selections by default when
you run "terraform init" in the future.

Terraform has been successfully initialized!
Planning failed. Terraform encountered an error while generating this plan.

│ Error: Empty Summary: This is always a bug in the provider and should be reported to the provider developers.
│ 
│   with ansible_vault.secrets,
│   on data-extracted.tf line 31, in resource "ansible_vault" "secrets":
│   31: resource "ansible_vault" "secrets" {
│ 
│ ansible-playbook
╵
2024-05-21T22:59:16.024Z [ERROR] provider.terraform-provider-ansible_v1.3.0: Response contains error diagnostic: diagnostic_detail=ansible-playbook tf_resource_type=ansible_vault @caller=github.com/hashicorp/terraform-plugin-go@v0.21.0/tfprotov5/internal/diag/diagnostics.go:62 tf_rpc=ReadResource diagnostic_severity=ERROR tf_proto_version=5.4 diagnostic_summary="Empty Summary: This is always a bug in the provider and should be reported to the provider developers." tf_req_id=860b2860-20cd-0305-1fb6-efe13d58d36e @module=sdk.proto tf_provider_addr=provider timestamp=2024-05-21T22:59:16.023Z
2024-05-21T22:59:16.024Z [ERROR] vertex "ansible_vault.secrets" error: Empty Summary: This is always a bug in the provider and should be reported to the provider developers.
2024-05-21T22:59:16.024Z [ERROR] vertex "ansible_vault.secrets (expand)" error: Empty Summary: This is always a bug in the provider and should be reported to the provider developers.

ansible_vault is the only resource used in my case.

Then I ran terraform init & plan locally on my local (Mac M1 arm64) with 1.3.0, it works well. Here's my local terraform version: Terraform v1.5.6 on darwin_arm64

Changing pipeline pool from ubuntu to Macos works for now.

Can somebody help with that? Thank you.

tehbooom commented 6 months ago

+1 as I am running into the exact same issue now. Has been working for months and stopped working. I am runnning it in an Ubuntu container

Skye-Lu commented 6 months ago

This error weirdly dispeared on ubuntu (did nothing just rerun the pipeline)

│ 
│   with ansible_vault.secrets,
│   on data-extracted.tf line 31, in resource "ansible_vault" "secrets":
│   31: resource "ansible_vault" "secrets" {
│ 
│ ansible-playbook

So just bumping ansible version to 1.3.0 on ubuntu is good now.

RoodeyMental commented 6 months ago

I have the same problem. I was using version 1.1.0 for a few months but recently i got the error that the provider is not available for my platform linux_amd64. Updating to version 1.3.0 did not fix it for me on ubuntu 22.04.

hedinasr commented 5 months ago

same for me