Update provider to allow use of dummy credentials#468
Conversation
|
@Jimbad Why is this change required ? |
My team are trying to migrate from the old Infobloxopen/Infoblox provider to this one. We deploy networks to a series of environments, some of which are connected to our on-prem servers (i.e. Infoblox) and some of which are disconnected and with reduced security guardrails and therefore not appropriate for connecting to on-prem. In the disconnected environments we use hard coding and cloud native IPAM tools to set network CIDR ranges, and in connected environments we use Infoblox for IPAM and DNS. Our Terraform code contains provider config to support all options. The older Infoblox Terraform provider we are migrating from supported the use of dummy credentials in the provider block. When dummy credentials were used, Terraform could still run so long as no resources were managed by the infoblox provider in that environment. We used conditional logic to control this. Now that we are migrating to this newer provider we need the same functionality. Our lower environments cannot authenticate to Infoblox, so right now Terraform is failing to plan in those environments. With this change, the error from not having the extensible attribute set in Infoblox would be moved from the plan stage to the apply stage, and only in the case where Terraform is actually trying to manage resources in Infoblox. |
This PR allows the use of dummy credentials in the Infoblox NIOS provider by changing its behaviour when extensible attributes can't be verified during provider initialisation.
This means that Terraform configurations which contain the NIOS provider but do not necessarily manage any NIOS resources or data sources (for example configurations deployed to multiple environments which do not all have network connectivity to an Infoblox instance) can function without authenticating to Infoblox.