-
Notifications
You must be signed in to change notification settings - Fork 85
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
Support on-demand connection init in the provider #948
Conversation
When the new `on_demand_connection` provider flag is set to true, provider will not verify connection and pull NSX version on provider startup. Instead, those operations will be done for each provider instance when terraform objects are evaluated. This setting is useful when NSX appliance is being deployed via same apply process, and not yet responsive when the provider is initialized. This setting is not supported for VMC and not compatible with deprecated objects implemented via the old SDK. It is also temporarily incompatible with license feature (this will be fixed in follow up PR) Signed-off-by: Anna Khmelnitsky <[email protected]>
/test-all |
@annakhm should we run a test cycle (e.g sanity) with this turned on? |
/test-all |
clientAuthCertFile := d.Get("client_auth_cert_file").(string) | ||
clientAuthKeyFile := d.Get("client_auth_key_file").(string) | ||
clientAuthCert := d.Get("client_auth_cert").(string) | ||
clientAuthKey := d.Get("client_auth_key").(string) | ||
vmcToken := d.Get("vmc_token").(string) | ||
vmcAuthMode := d.Get("vmc_auth_mode").(string) | ||
|
||
if onDemandConn { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it make more sense if we make vmc params taking precedence over this on_demand_connection
, in that if vmc tokens / mode is set, on_demand_connection
is ignored and turned off?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think its preferrable that user is aware the setting is not applicable, and corrects the configuration
I ran the tests locally. Indeed we should add an option to pass env variables to CI. |
/test-all |
1 similar comment
/test-all |
When the new
on_demand_connection
provider flag is set to true, provider will not verify connection and pull NSX version on provider startup. Instead, those operations will be done for each provider instance when terraform objects are evaluated.This setting is useful when NSX appliance is being deployed via same apply process, and not yet responsive when the provider is initialized. This setting is not supported for VMC and not compatible with deprecated objects implemented via the old SDK. It is also temporarily incompatible with license feature (this will be fixed in follow up PR)