-
Notifications
You must be signed in to change notification settings - Fork 47
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
feat: add contact_email to equinix_metal_connection datasource and resource #412
feat: add contact_email to equinix_metal_connection datasource and resource #412
Conversation
…source Signed-off-by: Marques Johansson <[email protected]>
@@ -221,6 +228,11 @@ func resourceMetalConnectionCreate(d *schema.ResourceData, meta interface{}) err | |||
Type: connType, | |||
} | |||
|
|||
// missing email is tolerated for user keys (can't be reasonably detected) | |||
if contactEmail, ok := d.GetOk("contact_email"); ok { |
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.
nit: this doesn't match the ok
pattern elsewhere
Signed-off-by: Marques Johansson <[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.
I had one small nit but I see that the relevant tests pass, so this is good to go as far as I'm concerned.
@@ -118,6 +121,7 @@ The following arguments are supported: | |||
* `facility` - (**Deprecated**) Facility where the connection will be created. Use metro instead; read the [facility to metro migration guide](https://registry.terraform.io/providers/equinix/equinix/latest/docs/guides/migration_guide_facilities_to_metros_devices) | |||
* `redundancy` - (Required) Connection redundancy - redundant or primary. | |||
* `type` - (Required) Connection type - dedicated or shared. | |||
* `contact_email` - (Required) The preferred email used for communication and notifications about the Equinix Fabric interconnection. Required when using a Project API key. Optional and defaults to the primary user email address when using a User API key. |
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.
Nit: I'm not totally sold on labeling this (Required)
, since it isn't always required; it looks like we went the opposite way with project_id
, which is marked (Optional)
.
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.
Fair enough. I'll merge and change that in a subsequent PR so as not to offend the pass status on tests.
…414) follow up to [#412 ](#412 (comment)) Signed-off-by: Marques Johansson <[email protected]>
fixes #340
note: