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

Empty doadmin password for new postgres cluster #750

Open
csandanov opened this issue Oct 31, 2024 · 1 comment
Open

Empty doadmin password for new postgres cluster #750

csandanov opened this issue Oct 31, 2024 · 1 comment

Comments

@csandanov
Copy link

Hi,

I've recently noticed that I can no longer get doadmin user password when creating a new database server.

client := godo.NewClient(oauth2.NewClient(ctx, tokenSource))

client.Databases.Create(ctx, &godo.DatabaseCreateRequest{
		Name:       "testname",
		EngineSlug: "pg",
		Version:    "16",
		SizeSlug:   "db-s-1vcpu-1gb",
		Region:     "nyc1",
		NumNodes:   1,
	})

When the database server status is online I check database.Connection.Password and it's always empty. At the same time I can get the password from UI and using doctl.

My go version: go version go1.23.0 darwin/arm64
Tried with the latest sdk github.com/digitalocean/godo v1.128.0 but also didn't work with the old one. It used to work before.

@danaelhe
Copy link
Member

danaelhe commented Mar 4, 2025

Did this ever get resolved for you? Apologies for the late response. hmm. I'm not able to reproduce the problem on my end. I do the following:

	db, _, _ := client.Databases.Create(ctx, &godo.DatabaseCreateRequest{
		Name:       "testname",
		EngineSlug: "pg",
		Version:    "16",
		SizeSlug:   "db-s-1vcpu-1gb",
		Region:     "nyc1",
		NumNodes:   1,
	})

	fmt.Println(db.Connection.Password)

Outputs:

d@x test % go run main.go 
AXXX_7aJxxsjKxxxWQYxxxx

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

No branches or pull requests

2 participants