You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 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 --version
Terraform v1.0.3
Affected Resource(s)
google_bigquery_dataset
Terraform Configuration Files
resource"google_bigquery_dataset""operation_logging_dataset" {
dataset_id="test_datatset"friendly_name="test_datatset"description="Dataset to host logs"location="us"project="test-project-1"labels={}
}
Expected Behavior
If location is specified in lowercase like "us", the first time you apply terraform apply everything works fine but then next time if terraform apply is done, the dataset should not destroyed and recreated (if not changes are done to terraform code)
Actual Behavior
If location is specified in lowercase like "us", the first time you apply terraform apply everything works fine but then next time if terraform plan or apply is done, terraform suggests that it needs to destroy the dataset and create it again and the reason given is the location change from uppercase "US" to lowercase "us".
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
-/+ destroy and then create replacement
Terraform will perform the following actions:
# google_bigquery_dataset.operation_logging_dataset must be replaced
-/+ resource "google_bigquery_dataset" "operation_logging_dataset" {
~ creation_time = 1628839961940 -> (known after apply)
- default_partition_expiration_ms = 0 -> null
- default_table_expiration_ms = 0 -> null
~ etag = "AjoBjlvOgC2ZzMEozc4r9Q==" -> (known after apply)
~ id = "projects/toc-ncc-spoke-1/datasets/test_datatset" -> (known after apply)
- labels = {} -> null
~ last_modified_time = 1628839961940 -> (known after apply)
~ location = "US" -> "us" # forces replacement
~ self_link = "https://bigquery.googleapis.com/bigquery/v2/projects/toc-ncc-spoke-1/datasets/test_datatset" -> (known after apply)
Since location is actually not changing and BiqQuery saves the location as uppercase even if in terraform it is specified as lower case. The TF code should not consider a location change for a dataset if the change is just in the case of the loaction.
Steps to Reproduce
Create a BQ dataset resource and specify the location as lowercase "us".
Do a 'terraform apply'
Do a 'terraform apply' again. (Note: do not change anything in TF code)
TF will complain that it needs to recreate the dataset because of location change from "US" to "us"
The text was updated successfully, but these errors were encountered:
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.
Community Note
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 tohashibot
, a community member has claimed the issue already.Terraform Version
$ terraform --version
Terraform v1.0.3
Affected Resource(s)
google_bigquery_dataset
Terraform Configuration Files
Expected Behavior
If location is specified in lowercase like "us", the first time you apply terraform apply everything works fine but then next time if terraform apply is done, the dataset should not destroyed and recreated (if not changes are done to terraform code)
Actual Behavior
If location is specified in lowercase like "us", the first time you apply terraform apply everything works fine but then next time if terraform plan or apply is done, terraform suggests that it needs to destroy the dataset and create it again and the reason given is the location change from uppercase "US" to lowercase "us".
Since location is actually not changing and BiqQuery saves the location as uppercase even if in terraform it is specified as lower case. The TF code should not consider a location change for a dataset if the change is just in the case of the loaction.
Steps to Reproduce
The text was updated successfully, but these errors were encountered: