Comments (7)
I have the same problem. You can fix it like this:
cd /usr/local/
sudo mkdir bin
sudo chmod 777 bin
from terraform-switcher.
I have the same problem. You can fix it like this:
cd /usr/local/ sudo mkdir bin sudo chmod 777 bin
Nothing personal, but this is bad advice from a security angle.
If you find yourself setting directories to 0777
, then something is wrong. Check user and group associations before setting things (especially entire directories) to 0777
. Do you simply need to add your user to a particular group? On macOS, do you just need to add yourself to the wheel
or admin
group?
from terraform-switcher.
Looks like there are now M1 (arm) releases since 1.0.2 https://releases.hashicorp.com/terraform/1.0.2/terraform_1.0.2_darwin_arm64.zip
I've previously added ~/bin
to my PATH
so I don't have any issue with this, as per #151
I tried running tfswitch
in another repo, which installed 1.0.4
. When I run terraform -v
I can see it has installed the amd64
binary, not the arm64
. It doesn't matter; that amd64
(x86_64) binary works just fine, but perhaps some point in the future it should pick the correct build for this architecture.
from terraform-switcher.
@skyzyx Are you on the M1 chipset? I have the problem on M1.
from terraform-switcher.
I'm on Big Sur, and I don't have this issue.
from terraform-switcher.
Ah. I'm on x86. I think the M1 is context I didn't see in the original post.
Terraform doesn't have official releases for M1 yet. That's probably the problem.
from terraform-switcher.
Seems to be a permissions issue (which idk why that would be different between Big Sur arches), easy workaround seems to be to give tfswitch
a user-owned directory (I add ~/bin as top item in PATH in my profile):
(✓) 19:06:30 [~/code/pckilgore/learn-terraform-circleci::master]
$ tfswitch
Reading required version from terraform file
Reading required version from constraint: > 1.0.0
Matched version: 1.0.1
2021/06/28 19:06:45
Unable to create new symlink.
Maybe symlink already exist. Try removing existing symlink manually.
Try running "unlink /usr/local/bin/terraform" to remove existing symlink.
If error persist, you may not have the permission to create a symlink at/usr/local/bin/terraform.
Error: symlink /Users/patrick/.terraform.versions/terraform_1.0.1 /usr/local/bin/terraform: permission denied
(✖ - 1) 19:06:45 [~/code/pckilgore/xxx::master]
$ tfswitch -b ~/bin/terraform
Reading required version from terraform file
Reading required version from constraint: > 1.0.0
Matched version: 1.0.1
Switched terraform to version "1.0.1"
(✓) 19:06:53 [~/code/pckilgore/xxx::master]
$ which terraform
/Users/patrick/bin/terraform
(✓) 19:07:00 [~/code/pckilgore/xxx::master]
$ terraform -v
Terraform v1.0.1
on darwin_amd64
+ provider registry.terraform.io/hashicorp/aws v3.44.0
+ provider registry.terraform.io/hashicorp/local v2.1.0
+ provider registry.terraform.io/hashicorp/random v3.1.0
+ provider registry.terraform.io/hashicorp/template v2.2.0
Happy to help debug some more if you have ideas but the workaround is pretty easy.
from terraform-switcher.
Related Issues (20)
- Error in v1.10 parsing version HOT 3
- Any content in terragrunt.hcl other than "terraform_version_constraint" causes tfswitch to error HOT 7
- We are facing the issue with the latest version(v1.1.0) of tfswitcher HOT 2
- v1.1.0 does not parse tf version constraint correctly HOT 5
- install.sh does not support non v-prefixed tags HOT 3
- Terraform `1.8.2` ships additional file within tarball
- Reading automatically from ~/.tfswitch.toml is broken HOT 17
- `log-level` TOML config doesn't work HOT 1
- How do I turn off logging? HOT 8
- tfswitch ignored -b argument HOT 5
- v1.1.1 ignoring `required_version` HOT 1
- Install script issue HOT 3
- Move away from golang openpgp HOT 2
- Version: v1.1.1 no longer reads terraform required_version anymore HOT 29
- tfswitch -v should not apply anything - it should only print the tfswitch version HOT 4
- terraform file extraction does not work under windows
- Standardise logic for failing/warning when an error occurs during terraform version detection HOT 4
- [Feature request] Disable color logs when not a terminal HOT 3
- Add additional debug logs when determining version from various sources
- Re-add support for environment variable that is a default version
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terraform-switcher.