cisco-en-programmability / terraform-provider-dnacenter

https://registry.terraform.io/providers/cisco-en-programmability/dnacenter/latest/docs
MIT License
14 stars 12 forks source link

Provider does not handle authentication token expiration during terraform apply #221

Closed mschedrin closed 1 year ago

mschedrin commented 1 year ago

Prerequisites

Describe the bug If terraform apply takes significant time authentication token expires and provider crashes. Take a look in the logs. dnac.token_expired.sanitized.log

Expected behavior Provider should renew token when it expires.

Environment (please complete the following information):

bvargasre commented 1 year ago

Hi @mschedrin new terraform-provider-dnacenter v1.1.23-beta is out, please try with this new version, tell us if works for you and comment or close the problem as needed.

mschedrin commented 1 year ago

@bvargasre thanks for fixing it. Will I be able to see token expiration in terraform debug log or is reauthentication handled in SDK and "invisible" for the provider? I am not sure how long it takes authentication token to expire and therefore can not define successful test scenario. Do you have any information regarding expiration timer?

zapodeanu commented 1 year ago

@mschedrin The token expiration is 60 minutes, as documented in the API docs.

mschedrin commented 1 year ago

Thanks @zapodeanu, @bvargasre. I have ran a terraform apply job that went on for 75 minutes and can confirm that reauthentication works.