terraform-provider-google
terraform-provider-google copied to clipboard
Error Root resource was present, but now absent.
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 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 tohashibot
, a community member has claimed the issue already.
Terraform Version
Terraform v1.1.6
on linux_amd64
+ provider registry.terraform.io/hashicorp/google v4.33.0
+ provider registry.terraform.io/hashicorp/tls v4.0.2
Affected Resource(s)
- google_privateca_certificate
Terraform Configuration Files
resource "google_privateca_certificate" "buildkit" {
pool = google_privateca_ca_pool.devops.name
certificate_authority = google_privateca_certificate_authority.default.certificate_authority_id
location = "europe-west1"
lifetime = "3600s"
name = "buildkit"
pem_csr = tls_cert_request.buildkit.cert_request_pem
}
Debug Output
-----------------------------------------------------: timestamp=2022-09-15T13:24:49.852+0200
2022-09-15T13:24:49.969+0200 [INFO] provider.terraform-provider-google_v4.33.0_x5: 2022/09/15 13:24:49 [DEBUG] Google API Response Details:
---[ RESPONSE ]--------------------------------------
HTTP/2.0 404 Not Found
Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"
Cache-Control: private
Content-Type: application/json; charset=UTF-8
Date: Thu, 15 Sep 2022 11:24:49 GMT
Server: ESF
Vary: Origin
Vary: X-Origin
Vary: Referer
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Xss-Protection: 0
{
"error": {
"code": 404,
"message": "Row not found",
"status": "NOT_FOUND"
}
}
Panic Output
Expected Behavior
Should create the cert
Actual Behavior
When applying changes to google_privateca_certificate.buildkit, provider "provider["registry.terraform.io/hashicorp/google"]" produced an unexpected new value: Root resource was present, but now absent.
Steps to Reproduce
-
terraform apply
Important Factoids
References
- #0000
@AndreasBergmeier6176 can you share all api requests & responses?
@AndreasBergmeier6176 can you share all api requests & responses?
Where should I send it to?
@AndreasBergmeier6176 can you post it here? Redacted log is fine
@AndreasBergmeier6176 is the log available?
@edwardmedia I've got the same error message on a different resource however, do you want me to add my log here or should I create a completely new issue. Error message I get right trying to add a user through google_sql_user
:
╷
│ Error: Provider produced inconsistent result after apply
│
│ When applying changes to google_sql_user.graph_dev_graph, provider "provider[\"registry.terraform.io/hashicorp/google\"]" produced an unexpected new value: Root resource was present, but now absent.
│
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.
╵
Strangely, it created the resources correctly (at least I see them in Google Cloud Console). I'm able to reproduce even if I delete them manually and apply again.
@maoueh please create a separate issue as yours happens on a different resource. Also please share the config and the debug log. Thanks
@AndreasBergmeier6176 is your redacted log available?
Don't think redacting the log is realistic. I will be out of office for two weeks. If you have a mail I might be able upload it somewhere afterwards.
@AndreasBergmeier6176 are you able to run the samples in this page? If yes, then you could try to figure out what are the difference. If not, let me know and I will try to repro. Based on the info you provided, I can't repro. Maybe you can provide a minimum config that can be used to repro the issue?
@AndreasBergmeier6176 I am closing this assuming it is no longer an issue. Feel free to reopen if you have answers to what I suggested.
same issue here
│ Error: Provider produced inconsistent result after apply
│
│ When applying changes to google_sql_user.users["dbuser"], provider
│ "provider[\"registry.terraform.io/hashicorp/google\"]" produced an
│ unexpected new value: Root resource was present, but now absent.
│
│ This is a bug in the provider, which should be reported in the provider's
│ own issue tracker.
╵
I have to removed the %
from the user creation module, the depends_on
did not help either
resource "google_sql_user" "users" {
depends_on = [
google_sql_database.database
]
name = some-random-name
instance = google_sql_database_instance.instance.name
password = some-random-pass
}
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.