CiscoDevNet / terraform-provider-nxos

Terraform Cisco NX-OS Provider
https://registry.terraform.io/providers/netascode/nxos
Mozilla Public License 2.0
7 stars 10 forks source link

#Cosmetic# provider fails to check credentials before trying to apply config #230

Open StevenHolm opened 4 months ago

StevenHolm commented 4 months ago

When deploying configuration with incorrect credentials, the provider instantly tries to deploy configuration without checking validity of the given credentials. This result in the following:

nxos_feature_bgp.bgp: Creating...
nxos_feature_bgp.bgp: Still creating... [10s elapsed]
nxos_feature_bgp.bgp: Still creating... [20s elapsed]
nxos_feature_bgp.bgp: Still creating... [30s elapsed]

and after the timeout a hard crash from terraform

 Error: Client Error

   with nxos_feature_bgp.bgp,
   on system.tf line 18, in resource "nxos_feature_bgp" "bgp":
   18: resource "nxos_feature_bgp" "bgp" {
Failed to post object, got error: JSON error: {"imdata":[{"error": {"attributes": {"code": "403","text": "Need a valid webtoken cookie (named APIC-Cookie) or a signed request with signature in the cookie APIC-Request-Signature for all REST API requests"}}}]}

Compared to ACI provider which returns a "nice" error just stating "unable to authenticate" with no time delay