Closed hfm closed 6 years ago
This is because there's no graph dependency between the two resources. If you change your mysql_grant
to look like below it should work.
resource "mysql_grant" "hfm" {
user = "${mysql_user.hfm.user}"
host = "%"
database = "sample"
privileges = ["ALL"]
}
This will cause mysql_grant.hfm
to become dependent on mysql_user.hfm
.
When attempting to apply mysql_user and mysql_grant resources at once, it creates user but fails to give privileges to users.
Terraform Version
Terraform v0.11.8
Affected Resource(s)
Terraform Configuration Files
docker-compose.yml
Debug Output
https://gist.github.com/hfm/97e431f9bfe9eb14bd6e3674fe257ea6
Expected Behavior
Terraform should generate and display a plan successfully.
Actual Behavior
Receiving the following error message:
Steps to Reproduce
docker-compose up -d
terraform apply