Skip to content

Commit 7311531

Browse files
authored
Clarify documented constraints for Build resource
1 parent 49d4874 commit 7311531

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

docs/resources/build.md

+9-2
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ between `heroku.yml` and Terraform, such as addons or config vars.
5050
A `source.url` may point to any `https://` URL that responds to a `GET` with a tarball source code. When running `terraform apply`,
5151
the source code will only be fetched once for a successful build. Change the URL to force a new resource.
5252

53-
Useful for building public, open-source source code, such as projects that publish releases on GitHub.
53+
💡 Useful for building public, open-source source code, such as projects that publish releases on GitHub.
54+
55+
⛔ Not useful for private URLs that require credentials to access.
5456

5557
### GitHub URLs
5658
GitHub provides [release](https://help.github.com/articles/creating-releases/) tarballs through URLs. Create a release
@@ -97,13 +99,18 @@ A `source.path` may point to either:
9799

98100
* a tarball of source code
99101
* a directory of source code
100-
* use `src/appname` relative paths to child directories within the Terraform project repo (recommended)
102+
* use `src/appname` relative paths to subdirectories within the Terraform project repo (recommended)
101103
* use `/opt/src/appname` absolute or `../appname` relative paths to external directories
102104
* **avoid ancestor paths that contain the Terraform configuration itself**
103105
* paths such as `../` will [cause errors during apply](https://github.com/heroku/terraform-provider-heroku/issues/269)
104106

105107
When running `terraform apply`, if the contents (SHA256) of the source path changed since the last `apply`, then a new build will start.
106108

109+
🚚 **The complete source must already be present at its `path` when Terraform runs**, so either:
110+
* copy/clone/checkout the source to the `path` before Terraform runs, like [this issue's solution](https://github.com/heroku/terraform-provider-heroku/issues/321#issuecomment-926778363)
111+
* commit the source code into a subdirectory of the Terraform project repository, so that that it's all cloned together.
112+
113+
107114
### Example Usage with Local Source Directory
108115

109116
```hcl-terraform

0 commit comments

Comments
 (0)