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

Error - Cannot read the remote archive resource #53

Open
kroc353 opened this issue Jun 14, 2022 · 4 comments
Open

Error - Cannot read the remote archive resource #53

kroc353 opened this issue Jun 14, 2022 · 4 comments

Comments

@kroc353
Copy link

kroc353 commented Jun 14, 2022

logdna terraform resource logdna_archive creates successfully , and destroys successfully, but if modified outside of terraform, produces error during plan, apply, or destroy.

Terraform Version

Terraform v1.1.9
on darwin_amd64
+ provider registry.terraform.io/logdna/logdna v1.10.0

Expected/Desired Behavior

If the logdna instance's archive configuration is modified outside of terraform, such as a bucket setting was changed OR the archive setting was disabled completely, subsequent terraform plan or apply should identify this change and return the configuration to IaC desired state.

Actual behavior witnessed

Logdna archiving is successfully implemented with the configuration. If not modifications are made outside of terraform, the configuration can be removed with a terraform destroy. But , when testing a real world scenario of configuration change outside of terraform, an error is received during the terraform plan, apply or destroy's state refresh.

Error message

╷
│ Error: Cannot read the remote archive resource
│ 
│   with module.logdna_cos_archive.logdna_archive.config,
│   on modules/logdna/main.tf line 26, in resource "logdna_archive" "config":
│   26: resource "logdna_archive" "config" {
│ 
│ GET https://api.us-east.logging.cloud.ibm.com/v1/config/archiving, status 404 NOT OK! {"error":"No active archiving configuration
│ exists","code":"NotFound","status":"error"}
╵

Terraform module code

terraform {
  required_providers {
    logdna = {
      source  = "logdna/logdna"
      version = ">=1.10.0"
    }
  }
}

provider "logdna" {
  servicekey = var.logdna_servicekey
  url               = var.logdna_url
}

resource "logdna_archive" "config" {
  integration = "ibm"
  ibm_config {
    bucket                      = var.bucket
    endpoint                  = var.endpoint
    apikey                      = var.apikey
    resourceinstanceid = var.resourceinstanceid
  }
}
@elisiano
Copy link

I can confirm I see a similar behavior with other resource types (category, alert and view have been observed with this behavior).

In my case the resources were deleted outside of terraform but as mentioned by @kroc353, the provider should reconcile to the desired state instead of erroring out.

@gjanco
Copy link
Contributor

gjanco commented Aug 24, 2022

We will look into fixing this. We do not have a precise timeline on when it will be complete.

@kroc353
Copy link
Author

kroc353 commented Jan 24, 2023

Has there been any progress on this issue?

@kroc353
Copy link
Author

kroc353 commented Jan 24, 2023

Confirming that the issue still exists at the latest available provider. Thank you.

terraform version
Terraform v1.3.7
on darwin_arm64
+ provider registry.terraform.io/logdna/logdna v1.14.2

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

No branches or pull requests

3 participants