Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

README instructions don't work #59

Closed
GuillaumeDesforges opened this issue Oct 5, 2023 · 2 comments · Fixed by #60
Closed

README instructions don't work #59

GuillaumeDesforges opened this issue Oct 5, 2023 · 2 comments · Fixed by #60

Comments

@GuillaumeDesforges
Copy link

GuillaumeDesforges commented Oct 5, 2023

Describe the bug
Follow README instructions, it fails at init.

To Reproduce

$ nix flake init -t github:tweag/tf-ncl#hello-tf
$ nix run .#terraform -- hello-tf.ncl init
error: flake '...' does not provide attribute 'apps.x86_64-linux.terraform', 'packages.x86_64-linux.terraform', 'legacyPackages.x86_64-linux.terraform' or 'terraform'

Expected behavior
Should init.

@GuillaumeDesforges GuillaumeDesforges changed the title README instrcutions don't work README instructions don't work Oct 5, 2023
@GuillaumeDesforges
Copy link
Author

GuillaumeDesforges commented Oct 5, 2023

Then after

diff --git a/flake.nix b/flake.nix
index 7211af4..1084327 100644
--- a/flake.nix
+++ b/flake.nix
@@ -13,6 +13,7 @@
 
   outputs = inputs: inputs.utils.lib.eachDefaultSystem (system:
     {
+      packages.terraform = inputs.tf-ncl.packages.${system}.terraform;
       devShell = inputs.tf-ncl.lib.${system}.mkDevShell {
         providers = p: {
           inherit (p) null gcp;

I get

$ nix run .#terraform -- hello-tf.ncl init
Terraform has no command named "hello-tf.ncl".

To see all of Terraform's top-level commands, run:
  terraform -help

@vkleen
Copy link
Contributor

vkleen commented Oct 5, 2023

Ah, I neglected to update the README in #43. The equivalent should be nix develop -c run-terraform init etc. If you enter the dev shell using nix develop it also prints a message to that effect.

I'll update the README 👍

vkleen added a commit that referenced this issue Oct 6, 2023
vkleen added a commit that referenced this issue Dec 6, 2023
@vkleen vkleen closed this as completed in #60 Dec 6, 2023
vkleen added a commit that referenced this issue Dec 6, 2023
* Update README getting started instructions

Closes #59

* Add unfreePredicate allowing terraform

* Fix rustfmt complaint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants