hashicorp / terraform-provider-mysql

Terraform MySQL provider – This Terraform provider is archived per our provider archiving process: https://terraform.io/docs/internals/archiving.html
https://www.terraform.io/docs/providers/mysql/
Mozilla Public License 2.0
61 stars 187 forks source link

Document how to use MYSQL_ENDPOINT and MYSQL_USERNAME environment variables #133

Closed mitchellrj closed 4 years ago

mitchellrj commented 4 years ago

MySQL provider v1.9.0, Terraform 0.12.29

The documentation states that the environment variables MYSQL_ENDPOINT and MYSQL_USERNAME can be used to set those values for the provider. However, I can't find a way to actually get them to work.

Omitting the username and endpoint fields from the provider block yields:

The argument "username" is required, but no definition was found. The argument "endpoint" is required, but no definition was found.

Setting the field values to null yields:

Error: "endpoint": required field is not set Error: "username": required field is not set

Setting the field values to empty strings yields:

Error: Endpoint must not be an empty string

mitchellrj commented 4 years ago

Needed to export my environment variables 🙈