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

template/template_stack: can't both be enforced yet conflicting #295

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

cyphermox
Copy link

@cyphermox cyphermox commented Jul 16, 2021

Likely closes #294

The template and template_stack objects are enforced when running
plan/apply against imported objects; otherwise the engine would
want to completely replace the objects, which would likely cause
consistency issues with the rest of the configuration.

Since they are both enforced; they can't also be conflicting; that
leads to an impossible scenario where you must but can't define
both a template and template_stack.

Signed-off-by: Mathieu Trudel-Lapierre mtrudel@stack8.com

Description

Make these schema fields not conflicting

Motivation and Context

See above

How Has This Been Tested?

I am running this against a subset of my production config with good results (ie. terraform plan shows no changes to be applied when running the proposed code, with template_stack and template both set on panorama-defined zones).

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes if appropriate.
  • All new and existing tests passed.

PaloAltoNetworks#294)

The template and template_stack objects are enforced when running
plan/apply against imported objects; otherwise the engine would
want to completely replace the objects, which would likely cause
consistency issues with the rest of the configuration.

Since they are both enforced; they can't also be conflicting; that
leads to an impossible scenario where you must but can't define
both a template and template_stack.

Signed-off-by: Mathieu Trudel-Lapierre <mtrudel@stack8.com>
@welcome-to-palo-alto-networks

🎉 Thanks for opening this pull request! We really appreciate contributors like you! 🙌

@cyphermox
Copy link
Author

This isn't tested yet, I need to figure out how to build the provider first. I submitted the PR right away to have a discussion if the approach is right; I believe making changes non-destructive is more important than preserving this particular conflict in the schema.

Signed-off-by: Mathieu Trudel-Lapierre <mtrudel@stack8.com>
@cyphermox
Copy link
Author

Yeah, that code change alone doesn't seem to work; I've built the provider and using it locally, but it still complains about conflicts.

…_stack

Signed-off-by: Mathieu Trudel-Lapierre <mtrudel@stack8.com>
Signed-off-by: Mathieu Trudel-Lapierre <mtrudel@stack8.com>
…ama zone

Signed-off-by: Mathieu Trudel-Lapierre <mtrudel@stack8.com>
@cyphermox
Copy link
Author

@shinmog I think this is ready for review.

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

Successfully merging this pull request may close these issues.

Template / template_stack conflict yet are enforced
1 participant