-
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 service: DeviceRegistry
+ new resources: azurerm_device_registry_asset
and azurerm_device_registry_asset_endpoint_profile
#28399
base: main
Are you sure you want to change the base?
Conversation
DeviceRegistry
DeviceRegistry
…d only fields per terraform requirement
…azurerm into rylo/adr-terraform
…to local cluster only
DeviceRegistry
DeviceRegistry
DeviceRegistry
DeviceRegistry
+ new resources: azurerm_device_registry_asset
and azurerm_device_registry_asset_endpoint_profile
r := AssetTestResource{} | ||
|
||
if os.Getenv(ASSET_CUSTOM_LOCATION_NAME) == "" || os.Getenv(ASSET_RESOURCE_GROUP_NAME) == "" { | ||
t.Skipf("Skipping test due to missing environment variables %s and/or %s", ASSET_CUSTOM_LOCATION_NAME, ASSET_RESOURCE_GROUP_NAME) |
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.
For both asset and asset endpoint profile resource tests, we require env vars ARM_DEVICE_REGISTRY_CUSTOM_LOCATION
and ARM_DEVICE_REGISTRY_RESOURCE_GROUP
to be set or else the tests will fail (to prevent this we skip the tests).
however, the resource group, custom location, and the AIO cluster must be pre-existing this test run. Investigation and efforts to get the acceptance tests to create and provision an AIO cluster are flakey, take a long time to run (45+ minutes), and we found that the test steps delete the cluster resources before the asset/asset endpoint profile resource tests run (causing the latter ones to fail). awaiting response from Hashicorp and Terraform PMs what the best course of action is here.
This PR introduces support for the Device Registry service, comprising of:
Resources
Community Note
Description
Swagger: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/deviceregistry/resource-manager/Microsoft.DeviceRegistry/stable/2024-11-01
Azure Doc: https://learn.microsoft.com/en-us/azure/iot-operations/discover-manage-assets/howto-manage-assets-remotely?tabs=cli
PR Checklist
For example: “
resource_name_here
- description of change e.g. adding propertynew_property_name_here
”Changes to existing Resource / Data Source
Testing
The acceptance tests for
azurerm_device_registry_asset
andazurerm_device_registry_asset_endpoint_profile
require an arc-enabled kubernetes cluster with Azure IoT Operations' service extension installed on the cluster in order to pass. Creating this cluster in the terraform acceptance tests has been unsuccessful, takes over 45 minutes to complete, and the installation of AIO script has proven to be flakey. Once the cluster is setup, you need to add these environment variables to pass:Local tests against a pre-existing AIO cluster:
Change Log
Below please provide what should go into the changelog (if anything) conforming to the Changelog Format documented here.
DeviceRegistry
- support for thedevice_registry
service [GH-00000]azurerm_device_registry_asset
[GH-00000]azurerm_device_registry_asset_endpoint_profile
[GH-00000]This is a (please select all that apply):
Related Issue(s)
Fixes #0000
Note
If this PR changes meaningfully during the course of review please update the title and description as required.