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

Add Log Analytics support for ACI #2763

Merged
merged 9 commits into from
Mar 7, 2019
Merged

Add Log Analytics support for ACI #2763

merged 9 commits into from
Mar 7, 2019

Conversation

metacpp
Copy link
Contributor

@metacpp metacpp commented Jan 25, 2019

This PR is mainly to addressing the feature request in #2755, which includes:

  1. log_analytics field support in ACI.
  2. Fix the async issue in ACI CreateOrUpdate method.

@metacpp
Copy link
Contributor Author

metacpp commented Jan 29, 2019

All tests passed:
image

azurerm/resource_arm_container_group.go Outdated Show resolved Hide resolved
azurerm/resource_arm_container_group.go Outdated Show resolved Hide resolved
azurerm/resource_arm_container_group.go Outdated Show resolved Hide resolved
azurerm/resource_arm_container_group_test.go Show resolved Hide resolved
azurerm/resource_arm_container_group_test.go Outdated Show resolved Hide resolved
Copy link

@JunyiYi JunyiYi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @metacpp for the contribution. The code looks good except some small issues. Once they are resolved, it would be good to go.

azurerm/resource_arm_container_group.go Outdated Show resolved Hide resolved
Junyi Yi and others added 4 commits January 30, 2019 18:23
@metacpp
Copy link
Contributor Author

metacpp commented Jan 31, 2019

@katbyte @JunyiYi Just updated PR, please review the changes.

Copy link

@JunyiYi JunyiYi 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 update and the code now looks good to me.

@metacpp
Copy link
Contributor Author

metacpp commented Feb 1, 2019

All ACI tests passed:
image

@tombuildsstuff tombuildsstuff modified the milestones: 2.0.0, 1.23.0 Feb 7, 2019
@metacpp metacpp requested a review from mbfrahry February 28, 2019 10:42
@tombuildsstuff tombuildsstuff self-assigned this Mar 5, 2019
@metacpp metacpp removed the request for review from WodansSon March 5, 2019 16:48
Copy link
Contributor

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi @metacpp

Thanks for pushing those changes - apologies for the delayed re-review here!

I've taken a look through and left some comments in-line but I feel like we need to better match the SDK here (by placing the log_analytics block within a diagnostics block) since it appears that multiple diagnostics options may be supported in the future, by virtue of this diagnostics wrapper existing.

Since there's a couple of out-of-scope changes which need to be made to the documentation for this resource to make this consistent - I'm going to push a commit to fix the highlighted issues and update the documentation; I hope you don't mind.

Thanks!

azurerm/resource_arm_container_group.go Outdated Show resolved Hide resolved
@@ -406,7 +461,14 @@ func resourceArmContainerGroupRead(d *schema.ResourceData, meta interface{}) err

d.Set("restart_policy", string(props.RestartPolicy))
d.Set("os_type", string(props.OsType))

if diag := props.Diagnostics; diag != nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since we're combining this into a diagnostics block, we should move this within the flattenContainerLogAnalytics function (since that handles returning an empty list if this is nil) such that this is set regardless

azurerm/resource_arm_container_group.go Outdated Show resolved Hide resolved
azurerm/resource_arm_container_group.go Outdated Show resolved Hide resolved
azurerm/resource_arm_container_group_test.go Outdated Show resolved Hide resolved
website/docs/r/container_group.html.markdown Outdated Show resolved Hide resolved
website/docs/r/container_group.html.markdown Outdated Show resolved Hide resolved
azurerm/resource_arm_container_group.go Outdated Show resolved Hide resolved
azurerm/resource_arm_container_group.go Outdated Show resolved Hide resolved
website/docs/r/container_group.html.markdown Outdated Show resolved Hide resolved
@tombuildsstuff tombuildsstuff dismissed katbyte’s stale review March 6, 2019 16:12

dismissing since changes have been pushed

@tombuildsstuff
Copy link
Contributor

Tests pass:

screenshot 2019-03-07 at 08 41 16

@tombuildsstuff tombuildsstuff merged commit 03a8403 into master Mar 7, 2019
@tombuildsstuff tombuildsstuff deleted the ci_log branch March 7, 2019 07:42
tombuildsstuff added a commit that referenced this pull request Mar 7, 2019
@ghost
Copy link

ghost commented Mar 8, 2019

This has been released in version 1.23.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.23.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Apr 6, 2019

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!

@ghost ghost locked and limited conversation to collaborators Apr 6, 2019
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.

None yet

4 participants