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

ciphertrust_cm_key - Provider produced inconsistent result after apply [Root resource was present, but now absent] #9

Open
anuj1366 opened this issue Apr 5, 2024 · 3 comments

Comments

@anuj1366
Copy link

anuj1366 commented Apr 5, 2024

Hi Team,
Currently I am trying to create "ciphertrust_cm_key" using terraform and getting "Provider produced inconsistent result after apply" for sometime which is causing our automation to break.

Terraform Configuration Files

resource "ciphertrust_cm_key" "cm_aes_key" {
  name      = var.keyalias
  algorithm = "AES"
  usage_mask = 60
  unexportable = true
  undeletable = var.undeletable
}

resource "ciphertrust_aws_xks_key" "xks_linked_key_with_cm_as_source_1" {
  local_hosted_params {
    blocked = var.blocked
    custom_key_store_id = data.ciphertrust_aws_custom_keystore.by_resource_id.id
    linked = true
    source_key_id = ciphertrust_cm_key.cm_aes_key.id
    source_key_tier = "local"
  }
  description = "TEST KEY"
  alias = [var.keyalias]
      tags = {
        hosted = "TEST"
      }
  schedule_for_deletion_days = 30  
}

Error Output:

Error: Provider produced inconsistent result after apply
When applying changes to ciphertrust_cm_key.cm_aes_key, provider "provider[\"registry.terraform.io/thalesgroup/ciphertrust\"]" produced an unexpected new value: Root resource was present, but now absent.
This is a bug in the provider, which should be reported in the provider's own issue tracker.

@anuj1366
Copy link
Author

anuj1366 commented Apr 5, 2024

SarahThompson Could you please look into this issue

@SarahThompson
Copy link

Hi Anuj,
Can you provide a debug log by adding log_level = "debug" to the provider block? Default log file name is ctp.log.
Also, what are the versions of the provider and CipherTrust Manager you are using?
Thank-you Sarah

@anuj1366
Copy link
Author

anuj1366 commented Apr 16, 2024

Hi SarahThompson
We are using below version for provider and CipherTrust Manager.

terraform {
  required_providers {
    ciphertrust = {
      source = "ThalesGroup/ciphertrust"
      version = "0.10.0-beta"
    }
  }
}
CipherTrust Manager version 2.14.0+10829
crypto version: 1.7.0

We'll generate and share the debug log shortly by replicating the issue again

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

2 participants