-
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
New Resource: azurerm_api_management_api_diagnostic
#7873
Conversation
Signed-off-by: Sune Keller <[email protected]>
Signed-off-by: Sune Keller <[email protected]>
Signed-off-by: Sune Keller <[email protected]>
Signed-off-by: Sune Keller <[email protected]>
Signed-off-by: Sune Keller <[email protected]>
Signed-off-by: Sune Keller <[email protected]>
Really looking forward to this resource being implemented - we currently have to set this configuration with ARM templates directly and there's a bug with the azurerm_template_deployment resource type that's been causing us some headaches. Thanks for this work @sirlatrom ! |
Hi there! Look forward for this implementation too, thanks a lot for the hard work 💪 |
@jackofallops Can this be put on a milestone do you think? |
Hi @sirlatrom I wasn't involved in the other diagnostic resource (that I remember) - is there a reason that it, and this, doesn't support the other properties of the |
You guessed correctly that I copied and modified the I'll get around to making changes and addressing your order concerns on Monday CEST. |
Thanks @sirlatrom - We need to be mindful that fixing the issue doesn't create a breaking change for existing resources, such as by changing ID's, recreating resources unexpectedly etc. It may be appropriate to have the change still, but knowing the impact in the first instance is important! Thanks again :) |
…pdate Signed-off-by: Sune Keller <[email protected]>
@jackofallops I've now verified that the order of arguments to PS: Since this is a new resource with regards to the Terraform provider, there are no existing users of it. I have not changed any ID parsing functions, but merely provided the correct order of arguments to the |
This comment has been minimized.
This comment has been minimized.
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.
Hi @sirlatrom
Thanks for the updates, I've left a few minor comments below, but otherwise LGTM.
Thanks!
azurerm/internal/services/apimanagement/api_management_api_diagnostic_resource.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/apimanagement/api_management_api_diagnostic_resource.go
Outdated
Show resolved
Hide resolved
Signed-off-by: Sune Keller <[email protected]>
@jackofallops I've applied your suggestions, please let me know if any further modifications are needed. |
This comment has been minimized.
This comment has been minimized.
@tombuildsstuff I've added the client initialization in 5025a9d. |
Signed-off-by: Sune Keller <[email protected]>
Signed-off-by: Sune Keller <[email protected]>
Hi @sirlatrom
I couldn't see an immediately obvious problem with your ID parse code, but it's somehow dropping through to the a fail on Could you add a unit test for that parser and investigate? |
Signed-off-by: Sune Keller <[email protected]>
Also output what paths are left in ValidateNoEmptySegments error case. Signed-off-by: Sune Keller <[email protected]>
@jackofallops Thanks for finding that. I've added a unit test for that parser in 936bc51, and in |
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.
Hi @sirlatrom
Thanks for adding the additional unit test, and the additional info to the path error output. It uncovered the root of the odd issue, which I've commented on below. (I think they're the only instances, might be worth another quick scan since these resources are so similarly named)
Thanks!
azurerm/internal/services/apimanagement/api_management_api_diagnostic_resource.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/apimanagement/tests/api_management_api_diagnostic_resource_test.go
Outdated
Show resolved
Hide resolved
Signed-off-by: Sune Keller <[email protected]> Co-authored-by: Steve <[email protected]>
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.
Hi @sirlatrom
Hope you don't mind, but I pushed a couple fixes this morning to your branch. The basic and requiresImport are now passing, but on re-review I'm not sure the update
scenario is valid? Update tests are for in-place changes and there's a change to a Forcenew
property in that scenario. The config for that scenario also fails as the test2
resources have the same names as the test
, so trigger an import error. Can you review the test and adjust as appropriate?
Thanks.
Hi @jackofallops, |
Signed-off-by: Sune Keller <[email protected]>
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 @sirlatrom
This LGTM now, and tests are passing.
fixed hashibot tags on changes
This has been released in version 2.27.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 = "~> 2.27.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 👉 [email protected]. Thanks! |
Closes #4760.
Adds support for
azuremonitor
asidentifier
toazurerm_api_management_diagnostic
Missing: