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

Rotation on created keys are not working #11

Open
anuj1366 opened this issue Apr 25, 2024 · 0 comments
Open

Rotation on created keys are not working #11

anuj1366 opened this issue Apr 25, 2024 · 0 comments

Comments

@anuj1366
Copy link

anuj1366 commented Apr 25, 2024

Rotation on created keys is not functioning as expected. We've followed the configuration outlined in the Terraform documentation. Although the rotation job is successfully created, it's not properly attached to the keys that are generated.

Steps to Reproduce

  1. Deploy the key creation process using Terraform.
    
  2. Confirm that the rotation job is created.
    
  3. Observe that the rotation job is not properly linked or associated with the created keys.
    

Expected Behavior

The rotation job should automatically be attached to the keys upon creation, as per the configuration specified in the Terraform documentation.

Additional Information

  • Terraform version: 1.5
    
  • CipherTrust Manager version 2.14.0+10829
    
  • crypto version: 1.7.0
    
  • Cloud provider : AWS
    
  • terraform {
    required_providers {
    ciphertrust = {
    source = "ThalesGroup/ciphertrust"
    version = "0.10.0-beta"
    }
    }
    }

# Create an linked XKS key with cm as key source in above linked external key store
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 = "EKM key"
  alias = [var.keyalias]
      tags = {
        hosted = "EKM"
      }
  enable_rotation {
    key_source = "ciphertrust"
    job_config_id = ciphertrust_scheduler.aws_scheduled_key_rotation.id
  }
  schedule_for_deletion_days = 30  
}

resource "time_static" "createtime" {}
resource "ciphertrust_scheduler" "aws_scheduled_key_rotation" {
  cckm_key_rotation_params {
    cloud_name = "aws"
  }
  name       = format("rotation-%s", var.keyalias)
  operation  = "cckm_key_rotation"
  run_at     = format("%s %s %s %s *",time_static.createtime.minute,time_static.createtime.hour,time_static.createtime.day,time_static.createtime.month)
}
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

1 participant