Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Requesting the ability to add tfe_policy_set_parameter resources to non-VCS-sourced tfe_policy_set resources #1512

Open
rc-adammikolajczyk opened this issue Oct 30, 2024 · 0 comments

Comments

@rc-adammikolajczyk
Copy link

rc-adammikolajczyk commented Oct 30, 2024

Presently, the resource tfe_policy_set_parameter is only viable to apply to policy sets which have been created through VCS sources.

Policy sets which are created using the tfe_policy_set resource, utilizing manually ascribed policy IDs via the policy_ids parameter can-not utilize policy_set_parameters. This is not evident until the run fails during the apply stage with a badly worded, resource not found, error.

The lack of meaningful feedback makes this very time consuming and difficult to troubleshoot.

In fact, the documentation page for tfe_policy_set_parameter and tfe_policy_set do not mention this at all.
This is, however, documented here:
https://developer.hashicorp.com/terraform/cloud-docs/policy-enforcement/manage-policy-sets#sentinel-only-sentinel-parameters

This may, in-fact, be a limitation of the underlying Terraform API, so if it is, then I'm happy to file a feature request with Hashicorp, but wanted to at least pose the question here.

Error: Error creating policy-set parameter something-something resource not found
with tfe_policy_set_parameter.something-something
on sentinel_policies.tf line 57, in resource "tfe_policy_set_parameter" "something-something":
resource "tfe_policy_set_parameter" "something-something" {

Use-cases

Attempting to manage tfe_policy_set_parameter as one might intuitively expect, following standard Terraform references should work.

Attempted Solutions

NA

Proposal

Unless there is some insurmountable technical blocker for this, a non VCS managed policy set should allow the assignment of policy set parameters. If there is a technical blocker to implementing this, the documentation of those resources should be updated to more clearly note this is a constraint of the tfe_policy_set_parameter resource.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant