-
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_dev_center_network_connection
#26718
New Resource: azurerm_dev_center_network_connection
#26718
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.
Hi @neil-yechenwei, Thanks for this PR - I've taken a look through and left some comments inline. If we can fix those up, this should be good to go 👍
internal/services/devcenter/dev_center_network_connection_resource_test.go
Show resolved
Hide resolved
@ms-zhenhua , Thanks for the comments. I updated PR. Please take another look. Thanks. |
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.
@neil-yechenwei, thank you for your updates. 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.
Thanks @neil-yechenwei. Overall this is looking good, once you've fixed up the few minor comments then this will be good to go!
if v := props.SubnetId; v != nil { | ||
state.SubnetId = pointer.From(v) | ||
} | ||
|
||
if v := props.DomainName; v != nil { | ||
state.DomainName = pointer.From(v) | ||
} | ||
|
||
if v := props.DomainUsername; v != nil { | ||
state.DomainUsername = pointer.From(v) | ||
} | ||
|
||
if v := props.OrganizationUnit; v != nil { | ||
state.OrganizationUnit = pointer.From(v) | ||
} |
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.
pointer.From
can handle the nil check for us so these can be simplified
if v := props.SubnetId; v != nil { | |
state.SubnetId = pointer.From(v) | |
} | |
if v := props.DomainName; v != nil { | |
state.DomainName = pointer.From(v) | |
} | |
if v := props.DomainUsername; v != nil { | |
state.DomainUsername = pointer.From(v) | |
} | |
if v := props.OrganizationUnit; v != nil { | |
state.OrganizationUnit = pointer.From(v) | |
} | |
state.SubnetId = pointer.From(props.SubnetId) | |
state.DomainName = pointer.From(props.DomainName) | |
state.DomainUsername = pointer.From(props.DomainUsername) | |
state.OrganizationUnit = pointer.From(props.OrganizationUnit) |
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.
Updated
lifecycle { | ||
ignore_changes = [subnet] | ||
} |
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.
This change has been reverted so we should remove this
lifecycle { | |
ignore_changes = [subnet] | |
} |
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.
Updated
lifecycle { | ||
ignore_changes = [subnet] | ||
} |
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.
lifecycle { | |
ignore_changes = [subnet] | |
} |
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.
Updated
@stephybun , thanks for the comments. I updated PR. Below is the latest test result I just now triggered. |
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 @neil-yechenwei LGTM 💯
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. |
Community Note
Description
This PR is to support new resource Dev Center Network Connection.
API Spec: https://github.com/Azure/azure-rest-api-specs/blob/09741dc7c9e43a8f9401d782186cac723dc4af71/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/vdi.json#L707
Overview: https://learn.microsoft.com/en-us/azure/dev-box/how-to-configure-network-connections?tabs=AzureADJoin
PR Checklist
For example: “
resource_name_here
- description of change e.g. adding propertynew_property_name_here
”Changes to existing Resource / Data Source
Testing
Change Log
Below please provide what should go into the changelog (if anything) conforming to the Changelog Format documented here.
azurerm_dev_center_network_connection
This is a (please select all that apply):
Note
If this PR changes meaningfully during the course of review please update the title and description as required.