这是indexloc提供的服务,不要输入任何密码
Skip to content

Docs claim id attribute can be user-provided #8

@qcxrvb

Description

@qcxrvb

Hi, i am working on a script which is supposed to generate both server and client configurations including private and public keys for all my users. I have a list of users and just in case i am going to remove a user in the future, i am trying to setup a custom id for each key:

resource "wireguard_asymmetric_key" "vpn_client" {
  count = length(local.permitted_clients)
  id    = sha256(local.permitted_clients[count.index].name)
}

This however produced the following error:

│ Error: Invalid or unknown key
│ 
│   with wireguard_asymmetric_key.vpn_client,
│   on private-key.tf line 6, in resource "wireguard_asymmetric_key" "vpn_client":
│    6:   id    = sha256(local.permitted_clients[count.index].name)

Can you please make the ID configurable?
The docs already say that this should be possible, but i think it is missing the required implementation ...

Anyway, thank you very much for your effort to implement this provider :D

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/documentationImprovements or additions to documentationwaiting/dependencyBlocked waiting for an update to a dependency

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions