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

Ordering of seaching policies by id should favour built in policies. #18337

Closed
1 task done
Nepomuceno opened this issue Sep 10, 2022 · 3 comments
Closed
1 task done

Comments

@Nepomuceno
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

1.2.9

AzureRM Provider Version

3.22.0

Affected Resource(s)/Data Source(s)

azurerm_policy_definition, azurerm_policy_set_definition

Terraform Configuration Files

terraform {
}

provider "azurerm" {
  features {}
}

# NIST 5.3 policy.
data "azurerm_policy_set_definition" "policy_set" {
  name = "179d1daa-458f-4e47-8086-2a68d0d6c38f"
}

data "azurerm_policy_definition" "for_each_pol" {
    count = length(data.azurerm_policy_set_definition.policy_set.policy_definition_reference)
    name = data.azurerm_policy_set_definition.policy_set.policy_definition_reference[0].reference_id
}

Debug Output/Panic Output

Takes over 2 minutes to do the data reads becasue of the throtolling limits.

Expected Behaviour

The search on hte built in should be done before the search in the custome since custom policies are normally on a much smaller number them the built in one that way there is a biggest change of you find the policies on the built in them on the custom.

Actual Behaviour

The plan takes more than 2 minutes

Steps to Reproduce

terraform plan

Important Factoids

No response

References

No response

@wuxu92
Copy link
Contributor

wuxu92 commented Sep 13, 2022

thanks for your feedback, since you have already created a PR, let's wait for hashi's response.

@mbfrahry mbfrahry added this to the v3.30.0 milestone Oct 28, 2022
@katbyte katbyte modified the milestones: v3.30.0, v3.31.0 Nov 4, 2022
@katbyte katbyte modified the milestones: v3.31.0, v3.32.0 Nov 11, 2022
@manicminer manicminer modified the milestones: v3.32.0, v3.33.0 Nov 17, 2022
@tombuildsstuff tombuildsstuff modified the milestones: v3.33.0, v3.30.0 Nov 24, 2022
@tombuildsstuff
Copy link
Contributor

Fixed via #18338

@tombuildsstuff tombuildsstuff closed this as not planned Won't fix, can't repro, duplicate, stale Nov 24, 2022
@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants