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

Support on-demand connection init in the provider #948

Merged
merged 1 commit into from
Aug 23, 2023

Conversation

annakhm
Copy link
Collaborator

@annakhm annakhm commented Aug 21, 2023

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)

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]>
@annakhm
Copy link
Collaborator Author

annakhm commented Aug 22, 2023

/test-all

@ksamoray
Copy link
Collaborator

@annakhm should we run a test cycle (e.g sanity) with this turned on?

@ksamoray
Copy link
Collaborator

/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 {
Copy link
Contributor

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?

Copy link
Collaborator Author

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

@annakhm
Copy link
Collaborator Author

annakhm commented Aug 22, 2023

@annakhm should we run a test cycle (e.g sanity) with this turned on?

I ran the tests locally. Indeed we should add an option to pass env variables to CI.

@annakhm
Copy link
Collaborator Author

annakhm commented Aug 22, 2023

/test-all

1 similar comment
@annakhm
Copy link
Collaborator Author

annakhm commented Aug 23, 2023

/test-all

@annakhm annakhm merged commit 5c4ecbb into master Aug 23, 2023
@annakhm annakhm mentioned this pull request Nov 3, 2023
@annakhm annakhm deleted the on-demand-connection branch August 10, 2024 00:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants