aptible / terraform-provider-aptible

The official Terraform provider for Aptible Deploy
https://registry.terraform.io/providers/aptible/aptible/latest
10 stars 13 forks source link

Add all database credentials as fields on the database resource #28

Closed robertfairhead closed 4 years ago

robertfairhead commented 4 years ago

Previously, we only set the default credentials as the connection_url property. This did not work well for Redis databases where the secured credentials were in a second record.

Now the default is in default_connection_url renamed from connection_url and all of the credentials are available in an array called connection_urls. The first item in that array should be the default.

There is a bug in our generated client that does not include the credentials in the original database object. To work around that, we make a separate API call to get the credentials here. Once we have fixed the generated client, we can remove that separate call.


The acceptance tests were updated and confirmed as passing against my sandbox stack.

robertfairhead commented 4 years ago

Yeah, I was debating moving it into go-deploy which is why I hadn't tagged you for review yet. I was going to ask you for your thoughts, but then... I forgot.

I'll go ahead and merge this and tag a release to test the Terraform 0.13 install is fixed with a "full" semver tag.

I'm planning to revisit the swagger code-gen issue to try to resolve there and then rework this later this week.