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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Network Interface ID attribute to Database Migration Service resource #21339

Open
1 task done
bn-jswick opened this issue Apr 7, 2023 · 0 comments
Open
1 task done

Comments

@bn-jswick
Copy link

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

Description

When creating an Azure Database Migration Service instance, a network interface is created by Azure in the selected subnet. However, there is currently no straight forward way to identify the IP of the NIC within Terraform.

The properties json of the resource does provide the virtualNicId of this automatically created NIC. If this was available in the exported attributes, the ID could be passed to a network interface data source to get the assigned IP of the NIC.

Sample resource json:

{
    "properties": {
        "provisioningState": "Stopped",
        "virtualNicId": "/subscriptions/fxxx-xxx-xxx-xx/resourceGroups/example-rg/providers/Microsoft.Network/networkInterfaces/NIC-xxxxxx",
        "virtualSubnetId": "/subscriptions/xxx-xxx-xxx-xx/resourceGroups/example-rg/providers/Microsoft.Network/virtualNetworks/example-vnet/subnets/example-snet"
    },
    "etag": "xxxxxxxxxxx",
    "id": "/subscriptions/xxx-xxx-xxx-xx/resourceGroups/example-rg/providers/Microsoft.DataMigration/services/example-dms",
    "kind": "Cloud",
    "location": "eastus2",
    "name": "example-dms",
    "sku": {
        "name": "Premium_4vCores",
        "size": "4 vCores",
        "tier": "Premium"
    },
    "type": "Microsoft.DataMigration/services"
}

The purpose of this is so that can use the assigned IP of the DMS resource in a network security rule to permit traffic from the resource to required endpoints.

New or Affected Resource(s)/Data Source(s)

azurerm_database_migration_service

Potential Terraform Configuration

No response

References

https://learn.microsoft.com/en-us/cli/azure/dms?view=azure-cli-latest#az-dms-show

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

No branches or pull requests

2 participants