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

anypoint_apim_policy_custom resource : Order of policies can't be defined #93

Open
vaibhav-yenorkar opened this issue Aug 30, 2024 · 5 comments

Comments

@vaibhav-yenorkar
Copy link

I am using anypoint_apim_policy_custom resource to create and apply standard as well as custom policies to Flex Gateway API. However , I have noticed order of policies is random when applied to API.

Event though, 'order' attribute is supposed to be Read Only as per documentation, I have tried to add 'order' attribute while creating policy resources, but I am getting following error -

Error: Value for unconfigurable attribute

│ with anypoint_apim_policy_custom.service-callout,
│ on main.tf line 165, in resource "anypoint_apim_policy_custom" "service-callout":
│ 165: order = 4

│ Can't configure a value for "order": its value will be decided automatically based on the result of applying this configuration.

I need help how the order of policies can be specified while creating them in TF template.

@sabsfdc
Copy link

sabsfdc commented Sep 3, 2024

@soufi - please take a look at this when you get some free time. Thanks

@gavinpitchersky
Copy link

Hi @soufi - Thanks so much for any help you can provide on this!

@soufi
Copy link
Contributor

soufi commented Sep 26, 2024

Hi,
As of today, the order cannot be specified because Mulesoft's API doesn't allow it.
But normally you policies are created one by one following the order of initialization.
Terraform uses parallelism by default and execute 10 operations at the same time.
If you want an absolute order, you can use the parallelism flag to make sure policies are created one after the other.

@gavinpitchersky
Copy link

Thanks for the information @soufi.

@soufi
Copy link
Contributor

soufi commented Sep 30, 2024

@sabsfdc this issue can be closed.

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

No branches or pull requests

4 participants