-
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
[resource_arm_function_app] Adding function keys to output #4066
[resource_arm_function_app] Adding function keys to output #4066
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.
Thank you for the PR @lawrencegripper,
In addition to the comments i've left inline, could we update the docs with the new property?
@katbyte Thanks for taking a look. Things got busy my end so hoping to get back around to fixing up the feedback in the next few weeks - sorry for the delay! |
@katbyte and @tombuildsstuff I'm a little worried about continuing to add this into the main My proposal is to move this code out of the resource into a data "azurerm_functions_key" "test" {
name = "function_app_name_here"
resource_group_name = "resource_group_here"
function_name = "name_of_function_you_want_key_for_here"
} This way the DetailsFor the code to be able to retrieve the keys for the functions the This happens an indeterminate amount of time after the resource is published based on my experience so far. I looks like the CLI tooling uses a Alongside this we have to differentiate between a deployment which contains functions and a deployments which is creating an empty functions resource. I won't want to wait for functions to appear that never will as the user has created the resource without any functions in it. |
I've started work on the Unfortunately it looks like the SwaggerDefinition/SDK for the endpoints needed is incorrect, trying to work around it now. SDK issue: Azure/azure-rest-api-specs#7143 |
Tested this out with the PR build of the SDK and it does what is needed. Going to sit tight and wait for the change to get merged then this can go in, unless any other feedback? I'm happy with the Will finish off docs tomorrow so it's ready to go once SDK change is in. |
Updated the docs and tweaks some naming to hopefully make things more usable. Hopefully now just needs SDK update and it's ready to go. |
Quick update. Now waiting on this REST Spec change to be merged and then updated GoSDK to be merged Azure/azure-rest-api-specs#7174 |
@katbyte and @tombuildsstuff The upstream SDK update is now merged so I'm hoping to be able to start work on finishing this off. Is there a protocol on how to update the Azure Go SDK or do I do an update in my PR branch through Go mod and push here? |
That's great news @lawrencegripper, basically once its been released to a named version you can update |
@katbyte So I tried to give this one a go, it looks like the SDK has removed all the https://github.com/Azure/azure-sdk-for-go/releases/tag/v34.0.0 Whats the way forward here do I create a PR updating the SDK and removing the |
Turns out Tom already did all that hard work for me and I was a bit behind on master do did it all again before I realized: #4609 |
Dependent on #4775 (since there's vendor changes) |
Hi @lawrencegripper , #4775 has been merged. Do you have any time to work on this? I'd love to make some changes related to this work. I don't want to make similar changes to what your doing and potentially cause rebase/merge issues 😄 . |
@Brunhil I merged the upstream changes but the bug in the spec remains meaning the GoSDK is still incorrect and cannot be used to list the functions keys. Details: Azure/azure-rest-api-specs#7174 (comment) Given the team have been unable to help over a number of months my proposal is to close this PR. |
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! |
This aims to resolve #699 by adding a computed output onto the functions resource which contains the keys for each function and the
trigger_url
for calling the function.Would be great to get thoughts on this early to so I don't waist time if this isn't an approach that can be merged.
Other considered approaches
I considered was adding a generic
resource_arm_list_keys
resource so it could be used on any resource and have a more dynamic output but I figured this is more complex and likely a tougher sell to get merged.Another option I looked at was having this added functionality as a
data_source_arm_function_keys
but this seemed at odds with how other resources likestorage_account
do things so didn't want to make it confusing.Todo