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

Using "snapshot_identifier" with no "allocated_storage" gives an error #109

Closed
jcmcken opened this issue Mar 27, 2019 · 5 comments
Closed

Comments

@jcmcken
Copy link

jcmcken commented Mar 27, 2019

The allocated_storage variable is not required when using snapshot_identifier, because the DB instance will use whatever storage size the snapshot used (the documentation also states this)

However, if you try to pass snapshot_identifier (but not allocated_storage), you get a type error:

allocated_storage: cannot parse '' as int: strconv.ParseInt: parsing "": invalid syntax

Version info:

Terraform v0.11.11
+ provider.aws v2.3.0
@sdouche
Copy link

sdouche commented Jul 4, 2019

Hello,
I'm interested too to be able to use a snapshot w/o give the storage size.

I think the simplest solution is to:

  • Add a default value to allocated_storage
  • Select the variable if no snapshot is specified (allocated_storage = var.snapshot_identifier != "" ? null : var.allocated_storage).

What do you think @antonbabenko? Do you have a better idea?

@aleon1220
Copy link

is happenning to me now and i am on terraform cloud. I believe the conflict is in
the duplicate use of the var.snapshot_identifier

Take a look at line 63 and 139

https://github.com/terraform-aws-modules/terraform-aws-rds/blob/master/modules/db_instance/main.tf#L139

@aleon1220
Copy link

I think the majority of the community is tracking the issue at hashicorp/terraform-provider-aws#17712

@bryantbiggs
Copy link
Member

hi all, I believe this was an issue in the upstream AWS provider (hashicorp/terraform-provider-aws#17755) - so closing for now. please feel free to respond or open a new issue if necessary

@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 Nov 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants