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

App Configuration Data Plane resource GET After PUT Return 404 #763

Closed
teowa opened this issue May 29, 2023 · 2 comments
Closed

App Configuration Data Plane resource GET After PUT Return 404 #763

teowa opened this issue May 29, 2023 · 2 comments
Assignees
Labels
question service Issues related to the AppConfig service

Comments

@teowa
Copy link

teowa commented May 29, 2023

A GET after successful PUT should not return 404 (NOT FOUND). Occationally(Not 100% reproducible) the App Configuration Key resource would return 404 for GET after PUT.

Swagger file: https://github.com/Azure/azure-rest-api-specs/blob/280a956db30d829fa65a9c0fdede073261ad76bf/specification/appconfiguration/data-plane/Microsoft.AppConfiguration/stable/1.0/appconfiguration.json#L372-L378

detailed log from hashicorp/terraform-provider-azurerm#21939

The PUT request:

200 OK
X-Ms-Correlation-Request-Id: 79482ff0-aa1a-8be3-e0e1-8e9158d88250
X-Ms-Request-Id: ee4c4537-3097-4cc9-9c06-79b0fd945fc1

2023-05-13T07:36:22.8165342Z 2023-05-13T07:36:22.144Z [DEBUG] provider.terraform-provider-azurerm_v3.56.0_x5: AzureRM Request: 
2023-05-13T07:36:22.8168672Z PUT /kv/keyvault.access.policy.update.complete?api-version=1.0&label=aaaa-000 HTTP/1.1
2023-05-13T07:36:22.8171436Z Host: my-appcs-name.azconfig.io
2023-05-13T07:36:22.8175050Z User-Agent: Go/go1.19.3 (amd64-linux) go-autorest/v14.2.1 tombuildsstuff/kermit/v0.20230424.1090808 appconfiguration/1.0 HashiCorp Terraform/1.2.1 (+https://www.terraform.io) Terraform Plugin SDK/2.10.1 terraform-provider-azurerm/dev pid-222c6c49-1b0a-5959-a213-6608f9eb8820
2023-05-13T07:36:22.8178312Z Content-Length: 153
2023-05-13T07:36:22.8180210Z Content-Type: application/json; charset=utf-8
2023-05-13T07:36:22.8182486Z X-Ms-Correlation-Request-Id: 79482ff0-aa1a-8be3-e0e1-8e9158d88250
2023-05-13T07:36:22.8184679Z Accept-Encoding: gzip
2023-05-13T07:36:22.8185623Z 
2023-05-13T07:36:22.8187824Z {"content_type":"","key":"keyvault.access.policy.update.complete","label":"aaaa-000","tags":{},"value":"2023-05-13T07:36:13Z"}: timestamp=2023-05-13T07:36:22.144Z
2023-05-13T07:36:22.8192685Z 2023-05-13T07:36:22.184Z [DEBUG] provider.terraform-provider-azurerm_v3.56.0_x5: AzureRM Response for https://my-appcs-name.azconfig.io/kv/keyvault.access.policy.update.complete?api-version=1.0&label=aaaa-000: 
2023-05-13T07:36:22.8196232Z HTTP/2.0 200 OK
2023-05-13T07:36:22.8197947Z Connection: close
2023-05-13T07:36:22.8199876Z Access-Control-Allow-Credentials: true
2023-05-13T07:36:22.8201893Z Access-Control-Allow-Origin: *
2023-05-13T07:36:22.8207509Z Access-Control-Expose-Headers: DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-useragent, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, retry-after-ms, x-ms-request-id, x-ms-client-session-id, x-ms-effective-locale, WWW-Authenticate, traceparent, tracestate, Operation-Location, Retry-After
2023-05-13T07:36:22.8213136Z Content-Type: application/vnd.microsoft.appconfig.kv+json; charset=utf-8
2023-05-13T07:36:22.8215555Z Date: Sat, 13 May 2023 07:36:22 GMT
2023-05-13T07:36:22.8217594Z Etag: "hDUh946-LTi2E3ajFPyOC1e4Y7cuDq_kD-RzFUutYZ8"
2023-05-13T07:36:22.8219752Z Last-Modified: Sat, 13 May 2023 07:36:22 GMT
2023-05-13T07:36:22.8221693Z Server: openresty/1.21.4.1
2023-05-13T07:36:22.8223720Z Strict-Transport-Security: max-age=15724800; includeSubDomains
2023-05-13T07:36:22.8226032Z Sync-Token: my-sync-token
2023-05-13T07:36:22.8228405Z X-Ms-Correlation-Request-Id: 79482ff0-aa1a-8be3-e0e1-8e9158d88250
2023-05-13T07:36:22.8230800Z X-Ms-Request-Id: ee4c4537-3097-4cc9-9c06-79b0fd945fc1
2023-05-13T07:36:22.8232168Z 
2023-05-13T07:36:22.8235114Z {"etag":"hDUh946-LTi2E3ajFPyOC1e4Y7cuDq_kD-RzFUutYZ8","key":"keyvault.access.policy.update.complete","label":"aaaa-000","content_type":"","value":"2023-05-13T07:36:13Z","tags":{},"locked":false,"last_modified":"2023-05-13T07:36:22+00:00"}: timestamp=2023-05-13T07:36:22.184Z

The GET request after the above PUT:

404 Not Found
X-Ms-Correlation-Request-Id: 79482ff0-aa1a-8be3-e0e1-8e9158d88250
X-Ms-Request-Id: 43e09eb2-33c7-4cf7-9fa7-edb9fbc6efc2

2023-05-13T07:36:22.8244714Z 2023-05-13T07:36:22.238Z [DEBUG] provider.terraform-provider-azurerm_v3.56.0_x5: AzureRM Request: 
2023-05-13T07:36:22.8248037Z GET /kv/keyvault.access.policy.update.complete?api-version=1.0&label=aaaa-000 HTTP/1.1
2023-05-13T07:36:22.8250768Z Host: my-appcs-name.azconfig.io
2023-05-13T07:36:22.8254421Z User-Agent: Go/go1.19.3 (amd64-linux) go-autorest/v14.2.1 tombuildsstuff/kermit/v0.20230424.1090808 appconfiguration/1.0 HashiCorp Terraform/1.2.1 (+https://www.terraform.io) Terraform Plugin SDK/2.10.1 terraform-provider-azurerm/dev pid-222c6c49-1b0a-5959-a213-6608f9eb8820
2023-05-13T07:36:22.8258190Z X-Ms-Correlation-Request-Id: 79482ff0-aa1a-8be3-e0e1-8e9158d88250
2023-05-13T07:36:22.8260639Z Accept-Encoding: gzip: timestamp=2023-05-13T07:36:22.238Z
2023-05-13T07:36:22.8264499Z 2023-05-13T07:36:22.325Z [DEBUG] provider.terraform-provider-azurerm_v3.56.0_x5: AzureRM Response for https://my-appcs-name.azconfig.io/kv/keyvault.access.policy.update.complete?api-version=1.0&label=aaaa-000: 
2023-05-13T07:36:22.8267778Z HTTP/2.0 404 Not Found
2023-05-13T07:36:22.8269664Z Access-Control-Allow-Credentials: true
2023-05-13T07:36:22.8271828Z Access-Control-Allow-Origin: *
2023-05-13T07:36:22.8278539Z Access-Control-Expose-Headers: DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, x-ms-client-request-id, x-ms-useragent, x-ms-content-sha256, x-ms-date, host, Accept, Accept-Datetime, Date, If-Match, If-None-Match, Sync-Token, x-ms-return-client-request-id, ETag, Last-Modified, Link, Memento-Datetime, retry-after-ms, x-ms-request-id, x-ms-client-session-id, x-ms-effective-locale, WWW-Authenticate, traceparent, tracestate, Operation-Location, Retry-After
2023-05-13T07:36:22.8283593Z Date: Sat, 13 May 2023 07:36:22 GMT
2023-05-13T07:36:22.8285704Z Server: openresty/1.21.4.1
2023-05-13T07:36:22.8288192Z Strict-Transport-Security: max-age=15724800; includeSubDomains
2023-05-13T07:36:22.8290840Z Sync-Token: my-sync-token
2023-05-13T07:36:22.8293228Z X-Ms-Correlation-Request-Id: 79482ff0-aa1a-8be3-e0e1-8e9158d88250
2023-05-13T07:36:22.8295648Z X-Ms-Request-Id: 43e09eb2-33c7-4cf7-9fa7-edb9fbc6efc2
2023-05-13T07:36:22.8297907Z Content-Length: 0: timestamp=2023-05-13T07:36:22.325Z
teowa added a commit to teowa/terraform-provider-azurerm that referenced this issue May 31, 2023
@zhenlan
Copy link
Contributor

zhenlan commented May 31, 2023

This is by design. Please see more information in the consistency model document:

https://learn.microsoft.com/en-us/azure/azure-app-configuration/rest-api-consistency

@zhenlan zhenlan added service Issues related to the AppConfig service question labels May 31, 2023
@teowa
Copy link
Author

teowa commented Jun 1, 2023

Thanks for providing this!

@teowa teowa closed this as completed Jun 1, 2023
stephybun added a commit to hashicorp/terraform-provider-azurerm that referenced this issue Jun 1, 2023
…ure delete is finished, add stateWait to confirm key/feature is created (#21750)

* add app configuration checkNameAvailability

* remove retry logic in create

* go mod vendor

* increace fault tolerance

* switch list method

* add to cache when retrieve ID from endpoint

* cache app conf in create

* add state wait for key provision

* fix feature key

* fix error message and link to Azure/AppConfiguration#763

* rephrase error and log message for grammar

---------

Co-authored-by: stephybun <steph@hashicorp.com>
@zhenlan zhenlan self-assigned this Jun 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question service Issues related to the AppConfig service
Projects
None yet
Development

No branches or pull requests

2 participants