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

feat: add subscription_tags_ignored variable #410

Closed

Conversation

JPEasier
Copy link

@JPEasier JPEasier commented Aug 30, 2024

Overview/summary

This PR adds the subscription_tags_ignored variable to the subscription module. This variable allows users to specify a list of tags to ignore when updating the subscription.

In one customer scenario, the customer has internal cost center information that is applied and updated as tags to the subscription outside of the vending module. Running the Terraform deployment results in overwriting the tags, so we need the ability to ignore certain tags.

Testing evidence

Please provide testing evidence to show that your Pull Request works/fixes as described and documented above.

As part of this pull request I have

  • Checked for duplicate Pull Requests
  • Associated it with relevant issues, for tracking and closure.
  • Run and make fmt & make docs to format your code and update documentation.
  • Created unit and deployment tests and provided evidence.
  • Updated relevant and associated documentation.

This commit adds the `subscription_tags_ignored` variable to the subscription module. This variable allows users to specify a list of tags to ignore when updating the subscription.
@JPEasier JPEasier marked this pull request as ready for review August 30, 2024 08:17
@matt-FFFFFF
Copy link
Member

@JPEasier

Have you tested that this works?

I believe that lifecycle.ignore_chanegs cannot reference a variable. I tested this locally to be sure:

❯  t plan
╷
│ Error: Invalid expression
│ 
│   on main.tf line 9, in resource "terraform_data" "test":
│    9:     ignore_changes = var.ignore_changes
│ 
│ A static list expression is required.
╵

@JPEasier
Copy link
Author

JPEasier commented Sep 2, 2024

Hi @matt-FFFFFF,
Nope, I haven't tested it jet, our current solution is to load the module locally and manipulate the subscription submodule.

Anyway, I found this open issue hashicorp/terraform#24188
So currently there is no chance for a dynamic lifecycle element.

So we can close this PR, but I am open for ideas! 😄

@JPEasier JPEasier closed this Sep 2, 2024
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.

2 participants