-
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_resource_management_private_link_association
#23546
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.
Thanks @teowa - I've left a couple of comments inline but once those are addressed we can take another look. Thanks!
"name": { | ||
ForceNew: true, | ||
Optional: true, | ||
Computed: true, | ||
Type: pluginsdk.TypeString, | ||
ValidateFunc: validation.IsUUID, | ||
}, |
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.
Given that this is only used as part of the resource id, would it make sense to remove this entirely and rely on the generated uuid here? In any case, as outlined in the contributors guide here we are no longer adding Optional and Computed to new fields.
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 remove name
entirely, will get test error:
=== CONT TestAccResourceManagementPrivateLinkAssociation_requiresImport
testcase.go:113: Step 2/2, expected an error but got none
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.
Can I make name
as required to solve this? but in this way user needs to manually set a uuid.
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 @teowa. On second thought, we should set this to just Optional
and add a note in the docs that the user should use ignore_changes
on name if they want to use the generated uuid
variable "primary_location" { | ||
default = %q | ||
} | ||
variable "random_string" { | ||
default = %q | ||
} | ||
variable "random_integer" { | ||
default = %d | ||
} |
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.
Given that these seem to be only used once, can we remove these and use the data.Locations.Primary
, data.RandomString
and data.RandomInteger
directly where needed?
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.
fixed, thanks.
|
||
managementGroupId, err := commonids.ParseManagementGroupID(config.ManagementGroupId) | ||
if err != nil { | ||
return fmt.Errorf("parse management group id: %+v", 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.
return fmt.Errorf("parse management group id: %+v", err) | |
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.
fixed, thanks.
internal/services/resource/resource_management_private_link_association_resource.go
Show resolved
Hide resolved
c994b85
to
e7018d9
Compare
|
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 @teowa 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. |
Private link association (Microsoft.Authorization/privateLinkAssociations)
This resource works together with
azurerm_resource_management_private_link
#23098