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

Unable to create encrypted Neptune cluster from unencrypted Neptune cluster snapshot #15240

Closed
kalyansundar opened this issue Sep 21, 2020 · 6 comments · Fixed by #33413
Closed
Labels
bug Addresses a defect in current functionality. service/neptune Issues and PRs that pertain to the neptune service.
Milestone

Comments

@kalyansundar
Copy link

kalyansundar commented Sep 21, 2020

I am trying to create a new encrypted Neptune cluster from an unencrypted cluster snapshot through terraform but the created cluster is not encrypted.

Expected Behavior
Neptune cluster created should be encryption enabled

Current Behavior
Created cluster is not encryption enabled

version

Terraform v0.12.29
+ provider.aws v3.7.0

Steps to Reproduce

  1. code snippet:
resource "aws_neptune_cluster" "default" {
  cluster_identifier        = "name"
  apply_immediately         = true
  backup_retention_period   = 5
  engine                    = "neptune"
  engine_version            = "1.0.1.0"
  final_snapshot_identifier = "name-final"
  neptune_subnet_group_name = "neptune-subnets"
  port                      = 8182
  preferred_backup_window   = "06:25-06:55"
  skip_final_snapshot       = false
  snapshot_identifier       = "snapshot_arn"

  # Encryption
  storage_encrypted       = true
  kms_key_arn             = "KMD_key_arn"

  vpc_security_group_ids = [ "security_group_id" ]

  
}
  1. terraform plan - shows storageEncrypted as true
  2. terraform apply - successfully created
  3. on verification in aws console the cluster shows Encryption as Not Enabled

Additional info is, looks it supporting only if the snapshot tooks from encrypted cluster only.

@ghost ghost added the service/neptune Issues and PRs that pertain to the neptune service. label Sep 21, 2020
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Sep 21, 2020
@gdavison gdavison added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Sep 23, 2020
@FarhanKhan-sains
Copy link

Any updates on this? I deleted a cluster thinking I would be able to recreate it with encryption enabled using a snapshot but am running into this problem.

@nlaxmi
Copy link

nlaxmi commented May 21, 2021

as far as I remember, It's not possible to take a snapshot from an unencrypted cluster and try to encrypt it.

image

https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/neptune.html

@FarhanKhan-sains
Copy link

@nlaxmi That's to copy a snapshot though. I'm trying to create a new cluster using a snapshot. This should be possible according to the AWS docs:

image

https://docs.aws.amazon.com/neptune/latest/userguide/encrypt.html

@triggan
Copy link
Contributor

triggan commented Sep 11, 2023

Bubbling this back up related to another issue due to changing KMS encryption keys from a source snapshot into a cluster with a newly assigned KMS key. It appears that the KMS key value is not being accepted as part of the RestoreDBClusterFromSnapshot API call input here:

if v, ok := d.GetOk("kms_key_arn"); ok {
v := v.(string)
inputC.KmsKeyId = aws.String(v)
}

ewbankkit added a commit that referenced this issue Sep 13, 2023
r/neptune_cluster: fix ignored kms key on snapshot restore #15240.
@github-actions github-actions bot added this to the v5.17.0 milestone Sep 13, 2023
@github-actions
Copy link

This functionality has been released in v5.17.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/neptune Issues and PRs that pertain to the neptune service.
Projects
None yet
5 participants