And I want to update this part of code by adding parameter-constraints as describe here.
But adding allowed_parameters, my TF plan got the following error
╷
│ Error: Unsupported argument
│
│ on .terraform/modules/github-actions-approle/main.tf line 13, in data "vault_policy_document" "rule-document":
│ 13: allowed_parameters = {
│
│ An argument named "allowed_parameters" is not expected here.
I did try that as well, but got a different error message:
╷
│ Error: Unsupported argument
│
│ on .terraform/modules/github-actions-approle/main.tf line 20, in data "vault_policy_document" "rule-document":
│ 20: allowed_parameter = {
│
│ An argument named "allowed_parameter" is not expected here. Did you mean to
│ define a block of type "allowed_parameter"?
I did try that as well, but I might miss something. Using list, I got an error
------------------------------------------------------------------------
╷
│ Error: Unsupported argument
│
│ on .terraform/modules/github-actions-approle/main.tf line 13, in data "vault_policy_document" "rule-document":
│ 13: allowed_parameter = ["bar", "baz"]
│
│ An argument named "allowed_parameter" is not expected here. Did you mean to
│ define a block of type "allowed_parameter"?
╵
------------------------------------------------------------------------
I did that before, and I just tried it as you suggested, but still got the error:
│ Error: Unsupported argument
│
│ on .terraform/modules/github-actions-approle/main.tf line 13, in data "vault_policy_document" "rule-document":
│ 13: allowed_parameter = [{key = "secret", value = "cloud-engineering"}]
│
│ An argument named "allowed_parameter" is not expected here. Did you mean to
│ define a block of type "allowed_parameter"?