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

Neptune create from snapshot results in "InvalidParameterValue: The parameter ResourceName must be provided and must not be blank." #11752

Closed
trillom opened this issue Jan 24, 2020 · 13 comments · Fixed by #28051
Labels
service/neptune Issues and PRs that pertain to the neptune service.

Comments

@trillom
Copy link

trillom commented Jan 24, 2020

I'm seeing a similar issue to #5360, but when provisioning a Neptune cluster with tagging from an existing snapshot.

Error: error updating Neptune Cluster () tags: error tagging resource (): InvalidParameterValue: The parameter ResourceName must be provided and must not be blank.
	status code: 400, request id: ***

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

Terraform v0.12.20
+ provider.aws v2.46.0

Affected Resource(s)

  • aws_neptune_cluster

Terraform Configuration Files

resource "aws_neptune_cluster" "default" {
  cluster_identifier        = var.snapshot_identifier == null ? var.cluster_identifier : "${var.cluster_identifier}-restored"
  apply_immediately         = var.apply_immediately
  backup_retention_period   = var.retention_period
  engine                    = var.engine
  engine_version            = var.engine_version
  final_snapshot_identifier = "${var.cluster_identifier}-${local.now}-final"
  neptune_subnet_group_name = aws_neptune_subnet_group.default.id
  port                      = var.port
  preferred_backup_window   = var.backup_window
  skip_final_snapshot       = var.skip_final_snapshot
  snapshot_identifier       = var.snapshot_identifier

  # Encryption
  storage_encrypted       = true
  kms_key_arn             = data.aws_kms_key.default.arn

  vpc_security_group_ids = [ var.clusterwide_sg == "" ? aws_security_group.default[0].id : var.clusterwide_sg ]

  tags = merge(local.common_tags, {})
}

Debug Output

Expected Behavior

Neptune Cluster created from snapshot

Actual Behavior

Above error is thrown, base cluster is created, but apply fails and instances are not created.

Steps to Reproduce

  1. terraform apply

References

@ghost ghost added the service/neptune Issues and PRs that pertain to the neptune service. label Jan 24, 2020
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Jan 24, 2020
@jayvee1110
Copy link

Still no solution for this?

@kalyansundar
Copy link

kalyansundar commented Sep 21, 2020

still it is continuing, is there any timeline to give a solution for this ?

We are trying to create a new cluster with encryption by an existing Neptune cluster snapshot, but could not do for this reason

my info

Terraform v0.12.29
+ provider.aws v3.7.0

@nikolaykolev
Copy link

I've hit the same issue today, it seems it's still not fixed :(

@chungath
Copy link

chungath commented Mar 5, 2021

I could fix it locally by doing the !d.IsNewResource() check in aws/resource_aws_neptune_cluster.go#L678.

Existing Code
if d.HasChange("tags") {
Fix
if !d.IsNewResource() && d.HasChange("tags") {
Basically, only tag during actual resource update. Similar to the fix done to the RDS issue mentioned above.

I was able to build terraform-provider-aws with the fix and validate it by creating the neptune cluster from a snapshot.

However, I am not able to run the tests. Also, am not able to create a pull request. git push fails with the following error:

  • $ git push --set-upstream origin b/aws_neptune_cluster

remote: Permission to hashicorp/terraform-provider-aws.git denied to chungath.

Can someone take this change and process it?

@santoshdevops119
Copy link

The issue still persists and its a blocker for planning disaster recovery automation via terraform for neptune DB. Can someone please fix this.

@NasAmin
Copy link

NasAmin commented Apr 16, 2021

@chungath Sounds like you have a fix for this. Did you apply a fix to a fork or did you directly clone this repo and made changes to it?

I think you should be able to push to a fork and then create a PR from it on this repo.

@FarhanKhan-sains
Copy link

Is there any workaround for this issue?

@chungath
Copy link

chungath commented May 4, 2021

The workaround is to not create any tags on the neptune cluster.

@FarhanKhan-sains
Copy link

@chungath Thanks, that seems to have fixed the issue for now

@justinretzolk
Copy link
Member

Hey y'all 👋 Thank you for taking the time to file this issue, and for the ongoing discussion. Given that there's been a number of AWS provider releases since the last update on this issue, can anyone confirm whether you're still experiencing this behavior?

@justinretzolk justinretzolk added waiting-response Maintainers are waiting on response from community or contributor. and removed needs-triage Waiting for first response or review from a maintainer. labels Nov 18, 2021
@tachang
Copy link

tachang commented Mar 8, 2022

I just ran into it as well. Tried to create from snapshot and wouldn't let me due to tags. Removed them and it worked.

@github-actions github-actions bot removed the waiting-response Maintainers are waiting on response from community or contributor. label Mar 8, 2022
@danielcweber
Copy link
Contributor

danielcweber commented Jul 25, 2022

#25972 attempts to fix this. It's basically tries to include the change proposed by @chungath, though the referenced file has moved/changed. @chungath: Maybe you could have a quick look whether it captures your intent.

I'm neither familiar with Terraform nor Go but rather trying to get an internal showstopper resolved.

@justinretzolk

ewbankkit added a commit to DrFaust92/terraform-provider-aws that referenced this issue Feb 12, 2023
…ashicorp#11752 (comment)), tags may not be set when the resource is new, since there's no value for arn yet"

This reverts commit 482a86e.
@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 Mar 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/neptune Issues and PRs that pertain to the neptune service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.