akamai / terraform-provider-akamai

Terraform Akamai provider
https://www.terraform.io/docs/providers/akamai/
Mozilla Public License 2.0
109 stars 96 forks source link

DXE-4204 akamai_cloudaccess_key has no drift detection #579

Open rolmo opened 1 month ago

rolmo commented 1 month ago

Hi there,

If I create an AWS access key with the Terraform resource akamai_cloudaccess_key and later delete its key version (via API or UI), Terraform does not recognise this and does not restore the key with a new apply.

Terraform and Akamai Terraform Provider Versions

Affected Resource(s)

Terraform Configuration Files

resource "akamai_cloudaccess_key" "test" {
  access_key_name       = "test"
  authentication_method = "AWS4_HMAC_SHA256"
  group_id              = 12345
  contract_id           = "G-XXXXX"
  network_configuration = {
    security_network = "STANDARD_TLS"
  }
  credentials_a = {
    cloud_access_key_id     = var.access_key_id
    cloud_secret_access_key = var.secret_access_key
    primary_key             = false
  }
}

Expected Behavior

Each "terraform apply" run should ensure, that there is a key version ("credentials_a").

Actual Behavior

When the key is deleted (via UI or API), terraform does not restore the key.

Steps to Reproduce

  1. Create the key withterraform apply
  2. Delete the key in the UI
  3. Run terraform apply again
mimazaka commented 1 month ago

Hi @rolmo,

We will investigate this issue and come back to you with this topic.

Regards, Michał