Skip to content

Add DoNotSendPassword field to VpsModel and InstallOptionsModel#1197

Open
mathieulaude wants to merge 1 commit intoovh:masterfrom
mathieulaude:patch-1
Open

Add DoNotSendPassword field to VpsModel and InstallOptionsModel#1197
mathieulaude wants to merge 1 commit intoovh:masterfrom
mathieulaude:patch-1

Conversation

@mathieulaude
Copy link

@mathieulaude mathieulaude commented Dec 30, 2025

Description

When (re)installing a VPS from Terraform, there is not equivalent of the " I do not wish to receive my VPS authentication codes by email. " option.
This PR adds an attribute do_not_send_password to disable password authentication. This allows a complete automatized workflow where the first authentication on the VPS with the SSH key is successful.

Type of change

  • Improvement (improve existing resource(s) or datasource(s))

How Has This Been Tested?

No

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings or issues
  • I have added acceptance tests that prove my fix is effective or that my feature works
  • New and existing acceptance tests pass locally with my changes
  • I ran successfully go mod vendor if I added or modify go.mod file

@mathieulaude mathieulaude requested a review from a team as a code owner December 30, 2025 17:16
@mathieulaude mathieulaude force-pushed the patch-1 branch 6 times, most recently from 47b0031 to a20efd2 Compare January 11, 2026 13:34
@mathieulaude
Copy link
Author

Hi there,
I have issues running tests because of cloud_project_rancher that should not be impacted by my modification.
Can you give me some hints about how to fix this please?

> make test-compile 
go test -c $(go list ./... |grep -v 'vendor') 
cannot write test binary cloud_project_rancher.test for multiple packages:
github.com/ovh/terraform-provider-ovh/v2/ovh/datasources/cloud_project_rancher
github.com/ovh/terraform-provider-ovh/v2/ovh/resources/cloud_project_rancher
make: *** [GNUmakefile:39 : test-compile] Erreur 1

Copy link
Collaborator

@amstuta amstuta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your PR @mathieulaude !

Regarding the issue running the tests, we usually run them like this: make testacc TESTARGS="-run 'TestAccResourceVps_doNotSendPassword'", this should solve your issue ;)

Signed-off-by: mathieulaude <82038410+mathieulaude@users.noreply.github.com>
@mathieulaude
Copy link
Author

mathieulaude commented Jan 27, 2026

Thank you @amstuta for your review!
I still have an error regarding rancher, even with your test command options:

$ make testacc TESTARGS="-run 'TestAccResourceVps_doNotSendPassword'"
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test $(go list ./... |grep -v 'vendor') -v -run 'TestAccResourceVps_doNotSendPassword' -timeout 600m -p 10
?   	github.com/ovh/terraform-provider-ovh/v2	[no test files]
# github.com/ovh/terraform-provider-ovh/v2/ovh
# [github.com/ovh/terraform-provider-ovh/v2/ovh]
ovh/resource_cloud_project_network_private.go:214:41: non-constant format string in call to fmt.Sprintf
ovh/types_cloud_project_database.go:26:21: non-constant format string in call to fmt.Errorf
FAIL	github.com/ovh/terraform-provider-ovh/v2/ovh [build failed]
?   	github.com/ovh/terraform-provider-ovh/v2/ovh/datasources/cloud_project_rancher	[no test files]
?   	github.com/ovh/terraform-provider-ovh/v2/ovh/helpers	[no test files]
testing: warning: no tests to run
PASS
ok  	github.com/ovh/terraform-provider-ovh/v2/ovh/helpers/hashcode	(cached) [no tests to run]
?   	github.com/ovh/terraform-provider-ovh/v2/ovh/ovhwrap	[no test files]
?   	github.com/ovh/terraform-provider-ovh/v2/ovh/resources/cloud_project_rancher	[no test files]
?   	github.com/ovh/terraform-provider-ovh/v2/ovh/types	[no test files]
FAIL
make: *** [GNUmakefile:17 : testacc] Erreur 1

@amstuta
Copy link
Collaborator

amstuta commented Feb 3, 2026

@mathieulaude, the issue is fixed if you rebase your branch on master ;)

@sTiKyt
Copy link

sTiKyt commented Feb 11, 2026

When will this be merged? we really need this

@amstuta
Copy link
Collaborator

amstuta commented Feb 16, 2026

Sorry for the lag. @mathieulaude could you add the doc change in the docs/ directory as well ?

After that, ok for me to merge !

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