I’m trying to set the BigQuery default_table_expiration_ms to 7776000000 (90 days) and I’m getting this error. This worked in previous versions of the Google Provider.
Using the Google Provider Version 4.8.0
│ Error: Attribute must be a whole number, got 7.776e+09
Anyone seen this before?
fredzqm
September 14, 2022, 7:09pm
2
Yes, I run into exactly the same issue.
File an issue under google’s terraform provider:
opened 07:05PM - 14 Sep 22 UTC
bug
### Community Note
* Please vote on this issue by adding a 👍 [reaction](https… ://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue to help the community and maintainers prioritize this request.
* Please do not leave _+1_ or _me too_ comments, 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.
* If an issue is assigned to the `modular-magician` user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned to `hashibot`, a community member has claimed the issue already.
### Terraform Version
```
> ./terraform_0.12.31 -version
Terraform v0.12.31
+ provider.google v4.35.0
+ provider.google-beta v4.35.0
+ provider.null v3.1.1
```
I am working on upgrading terraform versions incrementally. It would be harder to go beyond 0.13 in one go.
### Affected Resource(s)
* google_bigquery_dataset
### Terraform Configuration Files
```tf
resource "google_bigquery_dataset" "logs" {
dataset_id = "logs"
friendly_name = "logs"
location = "us-central1"
default_table_expiration_ms = "2592000000" # 30 * 24 * 3600000
default_partition_expiration_ms = "2592000000" # 30 * 24 * 3600000
}
```
### Debug Output
```
Error: Attribute must be a whole number, got 2.592e+09
on bigquery-logs.tf line 5, in resource "google_bigquery_dataset" "logs":
5: default_table_expiration_ms = "2592000000" # 30 * 24 * 3600000
Error: Attribute must be a whole number, got 2.592e+09
on bigquery-logs.tf line 6, in resource "google_bigquery_dataset" "logs":
6: default_partition_expiration_ms = "2592000000" # 30 * 24 * 3600000
```
### Expected Behavior
The config should work. 30 day default expiration is a perfectly valid use case. It worked with earlier terraform binary.
### Actual Behavior
It fails due to `Attribute must be a whole number` because the input number is too big. (exceeding MAX_INT?)
### Steps to Reproduce
1. `terraform apply`
### References
I found a thread about the exact issue, but hasn't been responded to.
https://discuss.hashicorp.com/t/bigquery-table-expiration/36163