terraform-provider-nomad: nomad_acl_token cannot unmarshal field ACLToken.ExpirationTTL with Nomad 1.5.x
Terraform Version
Terraform v1.3.9
on darwin_arm64
+ provider registry.terraform.io/hashicorp/nomad v1.4.19
Nomad Version
Nomad 1.5.0
Provider Configuration
provider "nomad" {}
Environment Variables
NOMAD_TOKEN=<redacted>
NOMAD_ADDR=http://127.0.0.1:4646"
Affected Resource(s)
- nomad_acl_token
Terraform Configuration Files
resource "nomad_acl_token" "vault" {
name = "Vault-management-token"
type = "management"
}
Debug Output
│
│ Error: error creating ACL token: json: cannot unmarshal string into Go struct field ACLToken.ExpirationTTL of type time.Duration
│
│ with nomad_acl_token.vault,
│ on nomad_acl.tf line 1, in resource "nomad_acl_token" "vault":
│ 1: resource "nomad_acl_token" "vault" {
│
│
Expected Behavior
naturally it should provision the resource
Actual Behavior
The error message is displayed and the apply fails.
Steps to Reproduce
terraform initterraform apply
Important Factoids
ACLs are bootstrapped and the bootstrap token is set in the environment vars.
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 13
- Comments: 16 (4 by maintainers)
Commits related to this issue
- release 1.15 cf https://github.com/hashicorp/terraform-provider-nomad/issues/312 — committed to cyrilgdn/terraform-provider-nomad by cyrilgdn a year ago
- release 1.15 cf https://github.com/hashicorp/terraform-provider-nomad/issues/312 — committed to cyrilgdn/terraform-provider-nomad by cyrilgdn a year ago
- release 1.5 cf https://github.com/hashicorp/terraform-provider-nomad/issues/312 — committed to cyrilgdn/terraform-provider-nomad by cyrilgdn a year ago
- release 1.5 cf https://github.com/hashicorp/terraform-provider-nomad/issues/312 — committed to cyrilgdn/terraform-provider-nomad by cyrilgdn a year ago
- release 1.5 cf https://github.com/hashicorp/terraform-provider-nomad/issues/312 — committed to cyrilgdn/terraform-provider-nomad by cyrilgdn a year ago
- release 1.5 cf https://github.com/hashicorp/terraform-provider-nomad/issues/312 — committed to cyrilgdn/terraform-provider-nomad by cyrilgdn a year ago
- release 1.5 cf https://github.com/hashicorp/terraform-provider-nomad/issues/312 — committed to cyrilgdn/terraform-provider-nomad by cyrilgdn a year ago
Hiya, any eta on this? The work around from @xkisu helps but is not ideal for use in our automated pipelines for configuring nomad.
Hey @jrasell I second above, can we please push out a release with a fix? This is hampering with CI flows for which it’s not easy to distribute a custom build of the provider.
In case anyone is looking for a patch in the meantime, make sure you’ve run
terraform initin your project so the providers are cached in the project directory, and then modify the provider and build it like so:You may need to delete the
hashessection fromterraform.tfstatefor theregistry.terraform.io/hashicorp/nomadprovider since the checksums won’t match the modified provider.Just to add to the report:
terraform planon state with existing resource does throw error as well:Same Terraform & nomad provider versions as above. Nomad cluster in version
1.4.5.Same for both
type = "client"andtype = "management".Thanks!
Hi all, the release is now available as v1.4.20: https://releases.hashicorp.com/terraform-provider-nomad/1.4.20/. Thanks for your patience.
Hi @kochen it’s been open since Jan because I worked on it while also working on the SSO feature within the main Nomad repository. 1.5.0 has also only been GA for one week which includes that fix. We have a single remaining question on the PR before we will be able to merge it. If this takes longer than expected, then we will totally use a separate PR for just updating the dependency.
I people are willing to build from main, I can update the dependency in main. Due to the release process, however, we would wait to perform an official release until all items we have lined up are merged.
@jrasell Hi, any estimation for the next release date (I saw that https://github.com/hashicorp/terraform-provider-nomad/pull/305 has been merged)?
Just to know if we switch to a fork meanwhile or if we can wait. (We’ve just updated to Nomad 1.5 and the provider became unusable because of this bug)
@jrasell the PR you mentioned is opened since
Jan 2023and still indraft. If the solution is a simple provider update, wouldn’t it make more since to “just” update the provide to solve this, and not have to wait for the other PR?