-
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: event_grid_domain
#2884
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.
LGTM @mbfrahry aside from a couple small nits 👍
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 @mbfrahry
I've taken a look through and left some minor comments in line but this is otherwise looking good to me; if we can fix up the minor comments this should be good to go 👍
Thanks!
string(eventgrid.InputSchemaCloudEventV01Schema), | ||
string(eventgrid.InputSchemaCustomEventSchema), | ||
string(eventgrid.InputSchemaEventGridSchema), | ||
}, true), |
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.
could we make this case-sensitive?
}, true), | |
}, false), |
} | ||
|
||
if err = future.WaitForCompletionRef(ctx, client.Client); err != nil { | ||
return err |
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.
could we wrap this error to make this easier to debug when it happens:
return err | |
return fmt.Errorf("Error waiting for EventGrid Domain %q (Resource Group %q) to become available: %s", name, resourceGroup, err) |
|
||
future, err := client.CreateOrUpdate(ctx, resourceGroup, name, domain) | ||
if err != nil { | ||
return err |
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.
could we wrap this error to make this easier to debug when it happens:
return err | |
return fmt.Errorf("Error creating/updating EventGrid Domain %q (Resource Group %q): %s", name, resourceGroup, err) |
|
||
read, err := client.Get(ctx, resourceGroup, name) | ||
if err != nil { | ||
return err |
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.
could we wrap this error to make this easier to debug when it happens:
return err | |
return fmt.Errorf("Error retrieving EventGrid Domain %q (Resource Group %q): %s", name, resourceGroup, err) |
resp, err := client.Get(ctx, resourceGroup, name) | ||
if err != nil { | ||
if utils.ResponseWasNotFound(resp.Response) { | ||
log.Printf("[WARN] EventGrid Domain '%s' was not found (resource group '%s')", name, resourceGroup) |
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.
minor we can use %q
rather than '%s'
log.Printf("[WARN] EventGrid Domain '%s' was not found (resource group '%s')", name, resourceGroup) | |
log.Printf("[WARN] EventGrid Domain %q was not found (Resource Group %q)", name, resourceGroup) |
|
||
`input_mapping_fields` supports the following: | ||
|
||
* `id` - (Optional) Specifies the id of the EventGrid Event to associate with the domain |
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.
* `id` - (Optional) Specifies the id of the EventGrid Event to associate with the domain | |
* `id` - (Optional) Specifies the id of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created. |
|
||
`input_mapping_default_values` supports the following: | ||
|
||
* `event_type` - (Optional) Specifies the default event type of the EventGrid Event to associate with the domain |
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.
* `event_type` - (Optional) Specifies the default event type of the EventGrid Event to associate with the domain | |
* `event_type` - (Optional) Specifies the default event type of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created. |
|
||
* `event_type` - (Optional) Specifies the default event type of the EventGrid Event to associate with the domain | ||
|
||
* `data_version` - (Optional) Specifies the default data version of the EventGrid Event to associate with the domain |
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.
* `data_version` - (Optional) Specifies the default data version of the EventGrid Event to associate with the domain | |
* `data_version` - (Optional) Specifies the default data version of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created. |
|
||
* `data_version` - (Optional) Specifies the default data version of the EventGrid Event to associate with the domain | ||
|
||
* `subject` - (Optional) Specifies the default subject of the EventGrid Event to associate with the domain |
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.
* `subject` - (Optional) Specifies the default subject of the EventGrid Event to associate with the domain | |
* `subject` - (Optional) Specifies the default subject of the EventGrid Event to associate with the domain. Changing this forces a new resource to be created. |
|
||
The following attributes are exported: | ||
|
||
* `id` - The EventGrid Domain ID. |
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.
I think this'd be clearer as:
* `id` - The EventGrid Domain ID. | |
* `id` - The ID of the EventGrid Domain. |
Addressed! |
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 ... |
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! |
This PR adds the EventGrid Domain resource to the azure provider.