-
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
azurerm_network_watcher_flow_log
- support for version
#5419
azurerm_network_watcher_flow_log
- support for version
#5419
Conversation
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.
Thanks for the PR @aqche,
Overall looks good aside fro a couple minor comments i've left inline 🙂
@@ -253,6 +264,7 @@ func resourceArmNetworkWatcherFlowLogRead(d *schema.ResourceData, meta interface | |||
|
|||
if props := fli.FlowLogProperties; props != nil { | |||
d.Set("enabled", props.Enabled) | |||
d.Set("version", props.Format.Version) |
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.
We'll need to nil check Format
here
"version": { | ||
Type: schema.TypeInt, | ||
Optional: true, | ||
Default: 1, |
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.
Is it possible to remove the default and set this to computed instead?
Co-Authored-By: kt <kt@katbyte.me>
…l Format during read
@katbyte thanks for the review, applied your suggestions! |
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.
Thanks @aqche! this LGTM now 🚀
Ran test locally:
[18:11:18] kt@katbook:~/hashi/tf/azure/azurerm▸postgres/casing$ testazure TestAccAzureRMNetworkWatcher
==> Fixing source code with gofmt...
# This logic should match the search logic in scripts/gofmtcheck.sh
find . -name '*.go' | grep -v vendor | xargs gofmt -s -w
=== RUN TestAccAzureRMNetworkWatcher
=== RUN TestAccAzureRMNetworkWatcher/FlowLog
=== RUN TestAccAzureRMNetworkWatcher/FlowLog/version
--- PASS: TestAccAzureRMNetworkWatcher (263.48s)
--- PASS: TestAccAzureRMNetworkWatcher/FlowLog (263.48s)
--- PASS: TestAccAzureRMNetworkWatcher/FlowLog/version (263.48s)
PASS
ok github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/network/tests 264.624s
[18:21:55] kt@katbook:~/hashi/tf/azure/azurerm▸azurerm_network_watcher_flow_log_version$
This has been released in version 1.42.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example: provider "azurerm" {
version = "~> 1.42.0"
}
# ... other configuration ... |
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 👉 hashibot-feedback@hashicorp.com. Thanks! |
Fixes #5403
Adds the
version
argument for theazurerm_network_watcher_flow_log
resource.