Skip to content
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

Network / API Version 2022-09-01 - Application Security Group Association for Private Endpoint #533

Closed
1 task done
mbfrahry opened this issue Jul 5, 2023 · 3 comments

Comments

@mbfrahry
Copy link
Member

mbfrahry commented Jul 5, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Service Used

Network

API Versions Used

2022-09-01

Description

I'm looking to migrate azurerm_private_endpoint_application_security_group_association. In this resource, we are doing a Get call from the application security group client and appending that to the private endpoint model.

Though the application security group models are the same from privateendpoints and applicationsecuritygroups, go doesn't like it as they are two separate packages.

I believe we need a way to copy the model from applicationsecuritygroups into the one from privateendpoints

References

No response

@tombuildsstuff
Copy link
Contributor

@mbfrahry this only actually needs the ID to map across, so whilst these are two distinct object types in two different packages, it should be sufficient to specify:

if ASGList != nil {
				*ASGList = append(*ASGList, privateendpoints.ApplicationSecurityGroup{
					Id: other.Id,
				})
				input.ApplicationSecurityGroups = ASGList
			} else {
				input.ApplicationSecurityGroups = &[]privateendpoints.ApplicationSecurityGroup{
					{
						Id: other.Id,
					},
				}
			}

Can you take a look and see if that works for you here?

@tombuildsstuff
Copy link
Contributor

@mbfrahry given hashicorp/terraform-provider-azurerm#22396 I'm going to close this issue for the moment?

@mbfrahry
Copy link
Member Author

mbfrahry commented Jul 7, 2023

For sure! Thank you thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants