-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
ignore_changes should support wildcards #5666
Comments
Hi @gozer - yep this use case definitely makes sense! Tagged. |
Agree with @gozer. This also applies to resources like
This will ignore changes for All parameters and won't allow ignoring only say
Also, I suggest there should be an negation option available, something like below, to ignore changes to all
|
I am not sure what i am missing .. but I cant get ignore change to work on nested objects like https://www.terraform.io/docs/providers/aws/r/emr_cluster.html#emr_managed_master_security_group.
Anyone has an insight into what can I do to make it work, just using "emr_managed" does not work either ..
|
This got a "yep this use case definitely makes sense! Tagged." but hasn't seen any implementation for over 2 years? Will this ever be supported? |
@gozer you found any workaround for this issue? |
Any updates on this feature request? |
I'm using Cloud Custodian which makes heavy use of tags prefixed by |
This feature would be very helpful for managing subnets that are used by EKS clusters. |
It looks like v2.60.0 of the AWS provider includes this PR that adds provider-level |
I'm in a situation where I would like to use lifecycle to ignore changes to all ip_restriction blocks in the azurerm_app_service. For example:
In this example, I want to be able to configure site_config in Terraform, but I don't want Terraform to change ip_restriction blocks, and in this resource, ip_restriction block exists in the site_config{} block if you refer to the azurerm_app_service documentation. Update: I figured out how to ignore all ip_restriction changes in site_config. I had to use index reference
|
Here's the workaround I used to avoid resetting the tags on subnets that are used by EKS clusters. I used the new
|
My insane workaround at the moment is to use an external datasource with a script to queue information to match what has changed and inject that value into the place of the list map attribute. A big use case for this is vsphere virtual machines that get migrated around manually or by DRS. I don't want and also don't care if the resource pool (compute host) or the datastore for virtual disks locations change. To simply add a disk to a VM. the Entire VM in some cases with huge disks has to move back to it's original declared location or you have to go through and edit all of the values to match the current state manually. External datasource works just fine for now though. |
+1 |
I am also looking for a way to ignore all tags (which i have no control over ) except specific .. like suggestion not_ignore_changes |
7.5 years later, still no solution? |
Feels like this it could be something simple to someone with experience in the: Looks like no changes to the function in the last 3 years... |
It would be great to see this kind of functionality. This is related to using App Settings to selectively disable Functions during Slot based deployment, and the specific App Settings are not know at initial deployment time. (https://learn.microsoft.com/en-us/azure/azure-functions/disable-function?tabs=portal#functions-in-a-slot) Of course we could re-terraform the Function App prior to code deployment, but it impacts our agility. An ideal case for me would be to define and ignore block like resource "azurerm_windows_function_app" "example" {
name = "example-windows-function-app"
resource_group_name = azurerm_resource_group.example.name
location = azurerm_resource_group.example.location
storage_account_name = azurerm_storage_account.example.name
storage_account_access_key = azurerm_storage_account.example.primary_access_key
service_plan_id = azurerm_service_plan.example.id
site_config {}
app_settings = {
ValueKnownAtDeployTime = "Value1"
StickyValueKnownAtDeployTime = "Value2"
}
sticky_settings {
app_setting_names = ["StickyValueKnownAtDeployTime"]
}
lifecycle {
ignore_changes = [tags, app_settings["AzureWebJobs.*.Disabled"], sticky_settings.app_setting_names["AzureWebJobs.*.Disabled"]]
}
} Then during code deployment I am free to add in the additional AzureWebJobs.*.Disabled settings as required without causing state drift every time, or forcing the removal of settings if I have to terrraform the underlying Function Apps. |
In my particular example I have a case where I'd like to ignore a single proprety of a route, but I can't
determine the item id, since it's actually going to be route.123323232323.instance_id, and I can't predict
what that ID is going to be like.
Instead of simply doing a Prefix match, would be nice if wildcards (or regexpes, really) were also supported.
The text was updated successfully, but these errors were encountered: