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

azurerm_network_watcher_flow_log - support for version #5419

Merged
merged 6 commits into from Jan 21, 2020
Merged

azurerm_network_watcher_flow_log - support for version #5419

merged 6 commits into from Jan 21, 2020

Conversation

aqche
Copy link
Contributor

@aqche aqche commented Jan 16, 2020

Fixes #5403

Adds the version argument for the azurerm_network_watcher_flow_log resource.

Copy link
Collaborator

@katbyte katbyte left a 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)
Copy link
Collaborator

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,
Copy link
Collaborator

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?

website/docs/r/network_watcher_flow_log.html.markdown Outdated Show resolved Hide resolved
@aqche
Copy link
Contributor Author

aqche commented Jan 18, 2020

@katbyte thanks for the review, applied your suggestions!

@ghost ghost removed the waiting-response label Jan 18, 2020
Copy link
Collaborator

@katbyte katbyte left a 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$

@katbyte katbyte merged commit 6e65b43 into hashicorp:master Jan 21, 2020
katbyte added a commit that referenced this pull request Jan 21, 2020
@aqche aqche deleted the azurerm_network_watcher_flow_log_version branch January 21, 2020 03:49
@ghost
Copy link

ghost commented Jan 27, 2020

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 ...

@ghost
Copy link

ghost commented Mar 28, 2020

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!

@hashicorp hashicorp locked and limited conversation to collaborators Mar 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for version 2 flow logs in azurerm_network_watcher_flow_log
2 participants