-
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: SignalR service azurerm_signalr_service
#2410
Conversation
azurerm_signalr
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 @JunyiYi,
Thanks for the new resource, i've taken a quick look and left some comments inline.
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.
hey @JunyiYi
Thanks for this PR :)
I've taken a look through and left some comments in-line - but most of these comments are fairly minor; if we can fix those up & split the SKU block out we should be able to run the tests 👍
Thanks!
Co-Authored-By: JunyiYi <junyi@microsoft.com>
Co-Authored-By: JunyiYi <junyi@microsoft.com>
Co-Authored-By: JunyiYi <junyi@microsoft.com>
Co-Authored-By: JunyiYi <junyi@microsoft.com>
Co-Authored-By: JunyiYi <junyi@microsoft.com>
Co-Authored-By: JunyiYi <junyi@microsoft.com>
Co-Authored-By: JunyiYi <junyi@microsoft.com>
azurerm_signalr
azurerm_signalr_service
Thanks @tombuildsstuff and @katbyte for reviewing the code. I have updated it accordingly, please take a look. |
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.
@JunyiYi Thanks for the PR LGTM!
v := input[0].(map[string]interface{}) | ||
name := v["name"].(string) | ||
if name == "Free" { | ||
name = "Free_F1" |
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 there a reason we don't just have the user use Free_F1
for the name property?
Also is it Free_F1
for all capacities?
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.
It is what @tombuildsstuff suggested before:
sku {
name = "Free"
capacity = 1
}
And for your second question, the answer is "Yes". SignalR service does not follow the convention of sku
, they only accept Free_F1
and Standard_S1
no matter what capacity
is.
@tombuildsstuff @katbyte , after talking with the service team, they do need to use fixed sku names (i.e.
So I will change the |
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.
Sounds good @JunyiYi
@tombuildsstuff @katbyte Code change has been pushed. One more thing, what service labeled should be added to this PR? If no existing label is applicable, could you please add a new |
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.
LGTM.
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.
Looks good aside from two comments i've left inline
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.
Looks good aside from two comments i've left inline
Co-Authored-By: JunyiYi <junyi@microsoft.com>
Co-Authored-By: JunyiYi <junyi@microsoft.com>
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 changes @JunyiYi, LGTM 👍
|
||
func flattenSignalRServiceSku(input *signalr.ResourceSku) []interface{} { | ||
result := make(map[string]interface{}) | ||
if input != nil { |
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.
if input's nil we're going to set an empty sku block in the state (so there'll be an object there but it'll be empty) - can we update this to:
if input == nil {
return []interface{}{}
}
...
this way it'll show that the Sku block isn't being returned from the API from the fact that Terraform will show the block being removed, rather than the fields being blank
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! |
In this pull request, I introduced Azure SignalR (used to create real-time web application) to Terraform. AFAIK, there are no issues or feature requests yet.
I put it under "Messaging" section because it is somehow similar to notification hub.