-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Auto Scale: filter out the $tags
tag
#1770
Conversation
Prior to this change (with the acctest fix): ``` $ acctests azurerm TestAccAzureRMAutoScaleSetting_basic === RUN TestAccAzureRMAutoScaleSetting_basic --- FAIL: TestAccAzureRMAutoScaleSetting_basic (400.30s) testing.go:513: Step 0 error: Check failed: Check 7/7 error: azurerm_autoscale_setting.test: Attribute 'tags.$type' found when not expected FAIL FAIL github.com/terraform-providers/terraform-provider-azurerm/azurerm 400.721s ``` Now: ``` $ acctests azurerm TestAccAzureRMAutoScaleSetting_basic === RUN TestAccAzureRMAutoScaleSetting_basic --- PASS: TestAccAzureRMAutoScaleSetting_basic (399.98s) PASS ok github.com/terraform-providers/terraform-provider-azurerm/azurerm 400.321s ```
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM and 1 non-blocking 🤔
@@ -432,7 +432,9 @@ func resourceArmAutoScaleSettingRead(d *schema.ResourceData, meta interface{}) e | |||
return fmt.Errorf("Error setting `notification` of Autoscale Setting %q (resource group %q): %+v", name, resourceGroup, err) | |||
} | |||
|
|||
flattenAndSetTags(d, resp.Tags) | |||
// Return a new tag map filtered by the specified tag names. | |||
tagMap := filterTags(resp.Tags, "$type") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this filtering be applied more globally? There seems to have been a few issues related to it across various resources.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not necessarily unfortunately - this values only restricted in certain API's (read: Monitor/App Insights) - such that it's potentially a valid key in other API's
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks! |
Prior to this change (with the acctest fix contained in this PR):
Now:
Fixes #1661