Skip to content
This repository has been archived by the owner on Jun 4, 2024. It is now read-only.

ARM/M1 builds for plugins #539

Closed
AgDude opened this issue May 4, 2022 · 18 comments
Closed

ARM/M1 builds for plugins #539

AgDude opened this issue May 4, 2022 · 18 comments
Assignees
Labels
bug Something isn't working c-dc Internal Customer Reference c-dr Internal Customer Reference c-ed Internal Customer Reference c-gl Internal Customer Reference c-si Internal Customer Reference c-sr Internal Customer Reference c-sy Internal Customer Reference c-ty Internal Customer Reference c-xn Internal Customer Reference release-engineering Related to release engineering terraform provider

Comments

@AgDude
Copy link

AgDude commented May 4, 2022

Please add ARM builds for Apple M1 to the published releases so we don't have to build the terraform plugin manually.

gz#5327

gz#5468

@AgDude AgDude changed the title ARM builds for terraform ARM builds for terraform plugin May 4, 2022
@programmerq programmerq added terraform provider bug Something isn't working release-engineering Related to release engineering c-dr Internal Customer Reference labels May 27, 2022
@programmerq
Copy link
Contributor

Related to #235

@programmerq programmerq added the c-si Internal Customer Reference label Jun 9, 2022
@r0mant r0mant changed the title ARM builds for terraform plugin ARM/M1 builds for plugins Aug 3, 2022
@pschisa pschisa added the c-sy Internal Customer Reference label Aug 18, 2022
@pschisa pschisa added the c-ty Internal Customer Reference label Aug 18, 2022
@moisesmejia1200 moisesmejia1200 added the c-ed Internal Customer Reference label Aug 29, 2022
@alexlafreniere
Copy link

+1, we have a mix of arm64 and amd64 machines amongst our dev team and having published builds for both CPU architectures would make our lives much much easier.

@thg-adamdean
Copy link

thg-adamdean commented Oct 12, 2022

+1 more of the workforce in our area are getting M1 Pros at the moment

@zarko-a
Copy link

zarko-a commented Dec 16, 2022

+1

1 similar comment
@cbnorman
Copy link

+1

@pschisa pschisa added the c-sr Internal Customer Reference label Feb 2, 2023
@pschisa pschisa added the c-dc Internal Customer Reference label Feb 27, 2023
@Erick-Reyes Erick-Reyes added c-oo and removed c-oo labels Mar 7, 2023
@oshati oshati added the c-xn Internal Customer Reference label Mar 17, 2023
@pschisa pschisa added the c-gl Internal Customer Reference label Mar 23, 2023
@benarent
Copy link
Contributor

+1 but I did find make install for the terraform provider fixed my issue. Still an extra step, I would love to see this.

@pschisa
Copy link

pschisa commented Apr 24, 2023

related: gravitational/teleport#4226

@camscale
Copy link
Contributor

camscale commented May 4, 2023

This is done for the terraform plugin, and there are no plans to do it for the event handler plugin. No other plugins are built for Mac. I'll leave this open until a new release of the plugins is released.

@sklirg
Copy link

sklirg commented May 12, 2023

Just cross-posting from a recent Slack-thread to here.

There is now a release supporting ARM/Mac M1 builds out, but the terraform provider still doesn't work on an M1 Mac:

❯ terraform init

Initializing the backend...

Initializing provider plugins...
- Finding terraform.releases.teleport.dev/gravitational/teleport versions matching ">= 13.0.0"...
╷
│ Error: Incompatible provider version
│
│ Provider terraform.releases.teleport.dev/gravitational/teleport v13.0.0 does not have a package available for your current platform, darwin_arm64.
│
│ Provider releases are separate from Terraform CLI releases, so not all providers are available for all platforms. Other versions of this provider may have
│ different platforms supported.

❯ bat main.tf --plain
terraform {
  required_providers {
     teleport = {
       version = ">= 13.0.0"
       source = "terraform.releases.teleport.dev/gravitational/teleport"
     }
  }
}

@inter0n
Copy link

inter0n commented Jun 6, 2023

╷
│ Error: Failed to query available provider packages
│
│ Could not retrieve the list of available versions for provider 
terraform.releases.teleport.dev/gravitational/teleport: 
no available releases match the given constraints >= 13.0.4
╷
│ Error: Failed to query available provider packages
│
│ Could not retrieve the list of available versions for provider 
terraform.releases.teleport.dev/gravitational/teleport: 
no available releases match the given constraints >= 13.1.0

@webvictim
Copy link
Contributor

@camscale AFAIK the Terraform provider is now published for M1 Macs and the instructions in docs will work out of the box. We should be able to close this issue, I think?

@dm3ch
Copy link

dm3ch commented Jul 24, 2023

I just tested the official doc - https://goteleport.com/docs/management/dynamic-resources/terraform-provider/#step-23-create-a-terraform-configuration .

Unfortunately, I got an error:

❯ terraform init

Initializing the backend...

Initializing provider plugins...
- Finding terraform.releases.teleport.dev/gravitational/teleport versions matching ">= 13.2.2"...
╷
│ Error: Failed to query available provider packages
│
│ Could not retrieve the list of available versions for provider terraform.releases.teleport.dev/gravitational/teleport: no available releases match the given constraints >= 13.2.2

@webvictim
Copy link
Contributor

Very weird, it worked for me:

% terraform init

Initializing the backend...

Initializing provider plugins...
- Finding terraform.releases.teleport.dev/gravitational/teleport versions matching "13.2.2"...
- Installing terraform.releases.teleport.dev/gravitational/teleport v13.2.2...
- Installed terraform.releases.teleport.dev/gravitational/teleport v13.2.2 (self-signed, key ID C87ED53A6282C411)

Partner and community providers are signed by their developers.
If you'd like to know more about provider signing, you can read about it here:
https://www.terraform.io/docs/cli/plugins/signing.html

Terraform has made some changes to the provider dependency selections recorded
in the .terraform.lock.hcl file. Review those changes and commit them to your
version control system if they represent changes you intended to make.

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.

Here's my provider.tf file:

terraform {
  required_providers {
    teleport = {
      version = "13.2.2"
      source  = "terraform.releases.teleport.dev/gravitational/teleport"
    }
  }
}

provider "teleport" {
  # Update addr to point to Teleport Auth/Proxy
  addr               = "gus.teleportdemo.com:443"

 # one file
  identity_file_path = "/Users/gus/se/terraform-provider-new/tbot-output/identity"
}

@webvictim
Copy link
Contributor

When I used the exact provider config from the docs it also worked:

Initializing the backend...

Initializing provider plugins...
- Finding terraform.releases.teleport.dev/gravitational/teleport versions matching ">= 13.2.2"...
- Installing terraform.releases.teleport.dev/gravitational/teleport v13.2.3...
- Installed terraform.releases.teleport.dev/gravitational/teleport v13.2.3 (self-signed, key ID C87ED53A6282C411)
...
terraform {
  required_providers {
    teleport = {
      source  = "terraform.releases.teleport.dev/gravitational/teleport"
      version = ">= 13.2.2"
    }
  }
}

What sort of machine are you on?

gus@apollo:~ % uname -a
Darwin apollo.home.lan 22.5.0 Darwin Kernel Version 22.5.0: Thu Jun  8 22:22:23 PDT 2023; root:xnu-8796.121.3~7/RELEASE_ARM64_T6020 arm64

@dm3ch
Copy link

dm3ch commented Jul 24, 2023

❯ uname -a
Darwin MacBook-Pro.local 22.5.0 Darwin Kernel Version 22.5.0: Thu Jun  8 22:22:20 PDT 2023; root:xnu-8796.121.3~7/RELEASE_ARM64_T6000 arm64
❯ terraform version
Terraform v1.5.2
on darwin_arm64

Your version of Terraform is out of date! The latest version
is 1.5.3. You can update by downloading from https://www.terraform.io/downloads.html

@webvictim What version of terraform are you using

@webvictim
Copy link
Contributor

% terraform version
Terraform v1.5.3
on darwin_arm64

@dm3ch
Copy link

dm3ch commented Jul 24, 2023

Upgrade to v1.5.3 and drop of the ~/.terraform.d helped

@camscale
Copy link
Contributor

Thanks for confirming @dm3ch . I'll close this now as completed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working c-dc Internal Customer Reference c-dr Internal Customer Reference c-ed Internal Customer Reference c-gl Internal Customer Reference c-si Internal Customer Reference c-sr Internal Customer Reference c-sy Internal Customer Reference c-ty Internal Customer Reference c-xn Internal Customer Reference release-engineering Related to release engineering terraform provider
Projects
None yet
Development

No branches or pull requests