Custom Provider Local Development Environment Setup

I’m building my first custom provider on a Mac and am struggling to have a successful terraform init to pull in the provider.

.terraformrc:
provider_installation {
dev_overrides {
“ics/rdsmysql” = “/Users/foobar/code/terraform-external-data-rds/registry/ics/rdsmysql”
}
}

/Users/foobar/code/terraform-external-data-rds/main.tf
terraform {
required_providers {
rdsmysql = {
version = “0.1.0”
source = “ics/rdsmysql”
}
}
}

provider path:
/Users/foobar/code/terraform-external-data-rds/registry/ics/rdsmysql/0.1.0/darwin_amd64/terraform-provider-rdsmysql_0.1.0_x4

Does anyone see a reason why this provider cannot be found, and the terraform init command fails to pull in the provider?

Thank you!

The dev_overrides path should point to a directory which contains the binary for your current platform, not to a provider mirror-like tree. That is, Terraform expects to find a file named something like terraform-provider-rdsmysql in the path you specify.

Note that terraform init is not necessary when using dev overrides, and it may error. Even if it does, terraform plan and other commands may succeed.

1 Like

Fantastic, thank you for that information! I can move forward with my development now.

Regards

Don