Skip to content

Commit

Permalink
do not use ignore_changes
Browse files Browse the repository at this point in the history
  • Loading branch information
wuxu92 committed Nov 11, 2024
1 parent 3da1187 commit 55a8c2d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
2 changes: 2 additions & 0 deletions internal/services/nginx/nginx_configuration_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ func (m ConfigurationResource) Read() sdk.ResourceFunc {
}

if files := prop.Files; files != nil {
output.ConfigFile = []ConfigFile{}
for _, file := range *files {
output.ConfigFile = append(output.ConfigFile, ConfigFile{
Content: pointer.ToString(file.Content),
Expand All @@ -263,6 +264,7 @@ func (m ConfigurationResource) Read() sdk.ResourceFunc {

// GET does not return protected files
if files := prop.ProtectedFiles; files != nil {
output.ProtectedFile = []ProtectedFile{}
for _, file := range *files {
output.ProtectedFile = append(output.ProtectedFile, ProtectedFile{
Content: pointer.ToString(file.Content),
Expand Down
8 changes: 0 additions & 8 deletions internal/services/nginx/nginx_configuration_resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,6 @@ resource "azurerm_nginx_configuration" "test" {
content = local.protected_content
virtual_path = "/opt/.htpasswd"
}
lifecycle {
ignore_changes = [protected_file]
}
}
`, a.template(data))
}
Expand Down Expand Up @@ -198,10 +194,6 @@ resource "azurerm_nginx_configuration" "test" {
content = local.protected_content
virtual_path = "/opt/.htpasswd"
}
lifecycle {
ignore_changes = [protected_file]
}
}
`, a.template(data))
}
Expand Down

0 comments on commit 55a8c2d

Please sign in to comment.