Skip to content
This repository has been archived by the owner on Jan 12, 2021. It is now read-only.

Adds a mysql_user_password resource for securely managing MySQL passwords #50

Merged
merged 9 commits into from
Oct 24, 2018

Conversation

joestump
Copy link
Contributor

What does this PR change?

For some reason #47 didn't stick. This re-PRs that work.

Example HCL

resource "mysql_user" "test" {
  user = "jdoe"
}
 resource "mysql_user_password" "test" {
  user    = "${mysql_user.test.user}"
  pgp_key = "keybase:joestump"
}

Test Output

MYSQL_ENDPOINT='127.0.0.1:3305' MYSQL_USERNAME='root' MYSQL_PASSWORD='tests' make testacc
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test $(go list ./... |grep -v 'vendor') -v  -timeout 120m
?   	github.com/terraform-providers/terraform-provider-mysql	[no test files]
=== RUN   TestProvider
--- PASS: TestProvider (0.00s)
=== RUN   TestProvider_impl
--- PASS: TestProvider_impl (0.00s)
=== RUN   TestAccDatabase
--- PASS: TestAccDatabase (0.08s)
=== RUN   TestAccDatabase_collationChange
--- PASS: TestAccDatabase_collationChange (0.11s)
=== RUN   TestAccGrant
--- PASS: TestAccGrant (0.16s)
=== RUN   TestAccUserPassword_basic
--- PASS: TestAccUserPassword_basic (0.62s)
=== RUN   TestAccUser_basic
--- PASS: TestAccUser_basic (0.15s)
=== RUN   TestAccUser_auth
--- PASS: TestAccUser_auth (0.05s)
=== RUN   TestAccUser_deprecated
--- PASS: TestAccUser_deprecated (0.09s)
PASS
ok  	github.com/terraform-providers/terraform-provider-mysql/mysql	1.469s

@ghost ghost added the size/XXL label Oct 23, 2018
CHANGELOG.md Outdated
@@ -12,6 +12,7 @@ IMPROVEMENTS:
* `r/mysql_user`: Added the `tls_option` attribute, which allows to restrict the MySQL users to a specific MySQL-TLS-Encryption. ([#26](https://github.com/terraform-providers/terraform-provider-mysql/issues/40))
* `r/mysql_grant`: Added the `tls_option` attribute, which allows to restrict the MySQL grant to a specific MySQL-TLS-Encryption. ([#26](https://github.com/terraform-providers/terraform-provider-mysql/issues/40))
* `r/mysql_grant`: Added a `table` argument that allows `GRANT` statements to be scoped to a single table.
* `r/mysql_user_password`: Manages a PGP encrypted randomly assinged password for given MySQL user.
Copy link
Contributor

Choose a reason for hiding this comment

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

typo: assinged

Copy link
Contributor

Choose a reason for hiding this comment

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

do you also want to add the PR html url here?

@davidji99
Copy link
Contributor

seems the majority of these changes are vendored files. other than that, looks good.

@joestump
Copy link
Contributor Author

@davidji99 the encryption helper pulled in a few new dependencies. make dep now updates vendor/ using go mod.

@joestump joestump merged commit 4a81725 into master Oct 24, 2018
@joestump joestump deleted the jstump-encrypted-password branch October 24, 2018 01:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants