Skip to content

New service: DeviceRegistry + new resources: azurerm_device_registry_asset and azurerm_device_registry_asset_endpoint_profile#28399

Open
mryanlo wants to merge 74 commits intohashicorp:mainfrom
mryanlo:rylo/adr-terraform
Open

New service: DeviceRegistry + new resources: azurerm_device_registry_asset and azurerm_device_registry_asset_endpoint_profile#28399
mryanlo wants to merge 74 commits intohashicorp:mainfrom
mryanlo:rylo/adr-terraform

Conversation

@mryanlo
Copy link

@mryanlo mryanlo commented Dec 30, 2024

This PR introduces support for the Device Registry service, comprising of:

Resources

- azurerm_device_registry_asset
- azurerm_device_registry_asset_endpoint_profile

Community Note

  • Please vote on this PR by adding a 👍 reaction to the original PR to help the community and maintainers prioritize for review
  • Please do not leave comments along the lines of "+1", "me too" or "any updates", they generate extra noise for PR followers and do not help prioritize for review

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

  • I have followed the guidelines in our Contributing Documentation.
  • I have checked to ensure there aren't other open Pull Requests for the same update/change.
  • I have checked if my changes close any open issues. If so please include appropriate closing keywords below.
  • I have updated/added Documentation as required written in a helpful and kind way to assist users that may be unfamiliar with the resource / data source.
  • I have used a meaningful PR title to help maintainers and other users understand this change and help prevent duplicate work.
    For example: “resource_name_here - description of change e.g. adding property new_property_name_here

Changes to existing Resource / Data Source

  • I have added an explanation of what my changes do and why I'd like you to include them (This may be covered by linking to an issue above, but may benefit from additional explanation).
  • I have written new tests for my resource or datasource changes & updated any relevent documentation.
  • I have successfully run tests with my changes locally. If not, please provide details on testing challenges that prevented you running the tests.
  • (For changes that include a state migration only). I have manually tested the migration path between relevant versions of the provider.

Testing

  • My submission includes Test coverage as described in the Contribution Guide and the tests pass. (if this is not possible for any reason, please include details of why you did or could not add test coverage)

The acceptance tests for azurerm_device_registry_asset and azurerm_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 successful but it takes over 45 minutes to complete. In order for the tests to run correctly, the following environment variables need to be set:

# ID of the Azure subscription that the acceptance tests will run on
export ARM_SUBSCRIPTION_ID=<subscription ID> 

# The Client ID of the Service Principal that will run the acceptance tests.
export ARM_CLIENT_ID=<client ID>

# The password of the Service Principal that will run the acceptance tests.
export ARM_CLIENT_SECRET=<client secret> 

# The Object ID of the Custom Locations RP's Entra App, as mentioned in previous step.
export ARM_ENTRA_APP_OBJECT_ID=<object ID> 

If one of those variables isn't set, the tests will be skipped.

Here are the successful test results. I had to run each test one at a time because my subscription did not have enough quota to create multiple VMs. Please ensure that the Azure subscription can create multiple VMs at once. Here are the final results:

ASSET ENDPOINT PROFILE TESTS

make acctests SERVICE='deviceregistry' TESTARGS='-run=TestAccAssetEndpointProfile_basic'
TF_ACC=1 go test -v ./internal/services/deviceregistry -run=TestAccAssetEndpointProfile_basic -timeout 180m -ldflags="-X=github.com/hashicorp/terraform-provider-azurerm/version.ProviderVersion=acc"
=== RUN   TestAccAssetEndpointProfile_basic
=== PAUSE TestAccAssetEndpointProfile_basic
=== CONT  TestAccAssetEndpointProfile_basic
Running setup steps to SSH into VM and create AIO cluster
Getting public IP address 'acctestpip-250327203216201991'
Connecting to the VM with IP Address: 52.175.235.1
Creating SSH session for stripping carriage return
Stripping carriage return from the setup script
Creating SSH session for enabling execution for setup script
Enabling execution for setup script
Creating SSH session for running setup script
Running setup script
Setup steps to SSH into VM and create AIO cluster completed
--- PASS: TestAccAssetEndpointProfile_basic (2542.60s)
PASS
ok      github.com/hashicorp/terraform-provider-azurerm/internal/services/deviceregistry        2561.008s

make acctests SERVICE='deviceregistry' TESTARGS='-run=TestAccAssetEndpointProfile_complete_certificate'
TF_ACC=1 go test -v ./internal/services/deviceregistry -run=TestAccAssetEndpointProfile_complete_certificate -timeout 180m -ldflags="-X=github.com/hashicorp/terraform-provider-azurerm/version.ProviderVersion=acc"
=== RUN   TestAccAssetEndpointProfile_complete_certificate
=== PAUSE TestAccAssetEndpointProfile_complete_certificate
=== CONT  TestAccAssetEndpointProfile_complete_certificate
Running setup steps to SSH into VM and create AIO cluster
Getting public IP address 'acctestpip-250327211658376605'
Connecting to the VM with IP Address: 40.125.75.160
Creating SSH session for stripping carriage return
Stripping carriage return from the setup script
Creating SSH session for enabling execution for setup script
Enabling execution for setup script
Creating SSH session for running setup script
Running setup script
Setup steps to SSH into VM and create AIO cluster completed
--- PASS: TestAccAssetEndpointProfile_complete_certificate (2558.27s)
PASS
ok      github.com/hashicorp/terraform-provider-azurerm/internal/services/deviceregistry        2563.423s

make acctests SERVICE='deviceregistry' TESTARGS='-run=TestAccAssetEndpointProfile_complete_usernamePassword'
TF_ACC=1 go test -v ./internal/services/deviceregistry -run=TestAccAssetEndpointProfile_complete_usernamePassword -timeout 180m -ldflags="-X=github.com/hashicorp/terraform-provider-azurerm/version.ProviderVersion=acc"
=== RUN   TestAccAssetEndpointProfile_complete_usernamePassword
=== PAUSE TestAccAssetEndpointProfile_complete_usernamePassword
=== CONT  TestAccAssetEndpointProfile_complete_usernamePassword
Running setup steps to SSH into VM and create AIO cluster
Getting public IP address 'acctestpip-250327220155347867'
Connecting to the VM with IP Address: 52.191.190.38
Creating SSH session for stripping carriage return
Stripping carriage return from the setup script
Creating SSH session for enabling execution for setup script
Enabling execution for setup script
Creating SSH session for running setup script
Running setup script
Setup steps to SSH into VM and create AIO cluster completed
--- PASS: TestAccAssetEndpointProfile_complete_usernamePassword (2849.30s)
PASS
ok      github.com/hashicorp/terraform-provider-azurerm/internal/services/deviceregistry        2852.310s

$ make acctests SERVICE='deviceregistry' TESTARGS='-run=TestAccAssetEndpointProfile_complete_anonymous'
TF_ACC=1 go test -v ./internal/services/deviceregistry -run=TestAccAssetEndpointProfile_complete_anonymous -timeout 180m -ldflags="-X=github.com/hashicorp/terraform-provider-azurerm/version.ProviderVersion=acc"
=== RUN   TestAccAssetEndpointProfile_complete_anonymous
=== PAUSE TestAccAssetEndpointProfile_complete_anonymous
=== CONT  TestAccAssetEndpointProfile_complete_anonymous
Running setup steps to SSH into VM and create AIO cluster
Getting public IP address 'acctestpip-250327113428795954'
Connecting to the VM with IP Address: 52.148.176.114
Creating SSH session for stripping carriage return
Stripping carriage return from the setup script
Creating SSH session for enabling execution for setup script
Enabling execution for setup script
Creating SSH session for running setup script
Running setup script
Setup steps to SSH into VM and create AIO cluster completed
--- PASS: TestAccAssetEndpointProfile_complete_anonymous (2705.41s)
PASS
ok      github.com/hashicorp/terraform-provider-azurerm/internal/services/deviceregistry        2723.071s

$ make acctests SERVICE='deviceregistry' TESTARGS='-run=TestAccAssetEndpointProfile_requiresImport'
TF_ACC=1 go test -v ./internal/services/deviceregistry -run=TestAccAssetEndpointProfile_requiresImport -timeout 180m -ldflags="-X=github.com/hashicorp/terraform-provider-azurerm/version.ProviderVersion=acc"
=== RUN   TestAccAssetEndpointProfile_requiresImport
=== PAUSE TestAccAssetEndpointProfile_requiresImport
=== CONT  TestAccAssetEndpointProfile_requiresImport
Running setup steps to SSH into VM and create AIO cluster
Getting public IP address 'acctestpip-250327101031664339'
Connecting to the VM with IP Address: 4.155.66.141
Creating SSH session for stripping carriage return
Stripping carriage return from the setup script
Creating SSH session for enabling execution for setup script
Enabling execution for setup script
Creating SSH session for running setup script
Running setup script
Setup steps to SSH into VM and create AIO cluster completed
--- PASS: TestAccAssetEndpointProfile_requiresImport (3411.25s)
PASS
ok      github.com/hashicorp/terraform-provider-azurerm/internal/services/deviceregistry        3430.707s

$ make acctests SERVICE='deviceregistry' TESTARGS='-run=TestAccAssetEndpointProfile_update'
TF_ACC=1 go test -v ./internal/services/deviceregistry -run=TestAccAssetEndpointProfile_update -timeout 180m -ldflags="-X=github.com/hashicorp/terraform-provider-azurerm/version.ProviderVersion=acc"
=== RUN   TestAccAssetEndpointProfile_update
=== PAUSE TestAccAssetEndpointProfile_update
=== CONT  TestAccAssetEndpointProfile_update
Running setup steps to SSH into VM and create AIO cluster
Getting public IP address 'acctestpip-250327192441026174'
Connecting to the VM with IP Address: 52.156.135.133
Creating SSH session for stripping carriage return
Stripping carriage return from the setup script
Creating SSH session for enabling execution for setup script
Enabling execution for setup script
Creating SSH session for running setup script
Running setup script
Setup steps to SSH into VM and create AIO cluster completed
--- PASS: TestAccAssetEndpointProfile_update (2662.22s)
PASS
ok      github.com/hashicorp/terraform-provider-azurerm/internal/services/deviceregistry        2665.212s

ASSET TESTS

$ make acctests SERVICE='deviceregistry' TESTARGS='-run=TestAccAsset_basic'
TF_ACC=1 go test -v ./internal/services/deviceregistry -run=TestAccAsset_basic -timeout 180m -ldflags="-X=github.com/hashicorp/terraform-provider-azurerm/version.ProviderVersion=acc"
=== RUN   TestAccAsset_basic
=== PAUSE TestAccAsset_basic
=== CONT  TestAccAsset_basic
Running setup steps to SSH into VM and create AIO cluster
Getting public IP address 'acctestpip-250327153852197306'
Connecting to the VM with IP Address: 20.191.112.206
Creating SSH session for stripping carriage return
Stripping carriage return from the setup script
Creating SSH session for enabling execution for setup script
Enabling execution for setup script
Creating SSH session for running setup script
Running setup script
Setup steps to SSH into VM and create AIO cluster completed
--- PASS: TestAccAsset_basic (3440.37s)

$ make acctests SERVICE='deviceregistry' TESTARGS='-run=TestAccAsset_complete'
TF_ACC=1 go test -v ./internal/services/deviceregistry -run=TestAccAsset_complete -timeout 180m -ldflags="-X=github.com/hashicorp/terraform-provider-azurerm/version.ProviderVersion=acc"
=== RUN   TestAccAsset_complete
=== PAUSE TestAccAsset_complete
=== CONT  TestAccAsset_complete
Running setup steps to SSH into VM and create AIO cluster
Getting public IP address 'acctestpip-250327164354762168'
Connecting to the VM with IP Address: 20.191.125.95
Creating SSH session for stripping carriage return
Stripping carriage return from the setup script
Creating SSH session for enabling execution for setup script
Enabling execution for setup script
Creating SSH session for running setup script
Running setup script
Setup steps to SSH into VM and create AIO cluster completed
--- PASS: TestAccAsset_complete (2495.94s)
PASS
ok      github.com/hashicorp/terraform-provider-azurerm/internal/services/deviceregistry        2518.589s
PASS
ok      github.com/hashicorp/terraform-provider-azurerm/internal/services/deviceregistry        3462.382s

$ make acctests SERVICE='deviceregistry' TESTARGS='-run=TestAccAsset_requiresImport'
TF_ACC=1 go test -v ./internal/services/deviceregistry -run=TestAccAsset_requiresImport -timeout 180m -ldflags="-X=github.com/hashicorp/terraform-provider-azurerm/version.ProviderVersion=acc"
=== RUN   TestAccAsset_requiresImport
=== PAUSE TestAccAsset_requiresImport
=== CONT  TestAccAsset_requiresImport
Running setup steps to SSH into VM and create AIO cluster
Getting public IP address 'acctestpip-250327173108178724'
Connecting to the VM with IP Address: 52.233.75.241
Creating SSH session for stripping carriage return
Stripping carriage return from the setup script
Creating SSH session for enabling execution for setup script
Enabling execution for setup script
Creating SSH session for running setup script
Running setup script
Setup steps to SSH into VM and create AIO cluster completed
--- PASS: TestAccAsset_requiresImport (2720.53s)
PASS
ok      github.com/hashicorp/terraform-provider-azurerm/internal/services/deviceregistry        2732.127s

$ make acctests SERVICE='deviceregistry' TESTARGS='-run=TestAccAsset_update'
TF_ACC=1 go test -v ./internal/services/deviceregistry -run=TestAccAsset_update -timeout 180m -ldflags="-X=github.com/hashicorp/terraform-provider-azurerm/version.ProviderVersion=acc"
=== RUN   TestAccAsset_update
=== PAUSE TestAccAsset_update
=== CONT  TestAccAsset_update
Running setup steps to SSH into VM and create AIO cluster
Getting public IP address 'acctestpip-250327182101409542'
Connecting to the VM with IP Address: 52.151.30.229
Creating SSH session for stripping carriage return
Stripping carriage return from the setup script
Creating SSH session for enabling execution for setup script
Enabling execution for setup script
Creating SSH session for running setup script
Running setup script
Setup steps to SSH into VM and create AIO cluster completed
--- PASS: TestAccAsset_update (2904.45s)
PASS
ok      github.com/hashicorp/terraform-provider-azurerm/internal/services/deviceregistry        2907.559s

TESTS SKIPPED

$ make acctests SERVICE='deviceregistry'
TF_ACC=1 go test -v ./internal/services/deviceregistry  -timeout 180m -ldflags="-X=github.com/hashicorp/terraform-provider-azurerm/version.ProviderVersion=acc"
=== RUN   TestAccAsset_basic
    device_registry_asset_resource_test.go:726: Skipping test due to environment variable ARM_ENTRA_APP_OBJECT_ID not set. Required variables: ARM_CLIENT_ID, ARM_CLIENT_SECRET, ARM_SUBSCRIPTION_ID, ARM_ENTRA_APP_OBJECT_ID
--- SKIP: TestAccAsset_basic (0.00s)
=== RUN   TestAccAsset_complete
    device_registry_asset_resource_test.go:726: Skipping test due to environment variable ARM_ENTRA_APP_OBJECT_ID not set. Required variables: ARM_CLIENT_ID, ARM_CLIENT_SECRET, ARM_SUBSCRIPTION_ID, ARM_ENTRA_APP_OBJECT_ID
--- SKIP: TestAccAsset_complete (0.00s)
=== RUN   TestAccAsset_requiresImport
    device_registry_asset_resource_test.go:726: Skipping test due to environment variable ARM_ENTRA_APP_OBJECT_ID not set. Required variables: ARM_CLIENT_ID, ARM_CLIENT_SECRET, ARM_SUBSCRIPTION_ID, ARM_ENTRA_APP_OBJECT_ID
--- SKIP: TestAccAsset_requiresImport (0.00s)
=== RUN   TestAccAsset_update
    device_registry_asset_resource_test.go:726: Skipping test due to environment variable ARM_ENTRA_APP_OBJECT_ID not set. Required variables: ARM_CLIENT_ID, ARM_CLIENT_SECRET, ARM_SUBSCRIPTION_ID, ARM_ENTRA_APP_OBJECT_ID
--- SKIP: TestAccAsset_update (0.00s)
=== RUN   TestAccAssetEndpointProfile_basic
    device_registry_assetendpointprofile_resource_test.go:685: Skipping test due to environment variable ARM_ENTRA_APP_OBJECT_ID not set. Required variables: ARM_CLIENT_ID, ARM_CLIENT_SECRET, ARM_SUBSCRIPTION_ID, ARM_ENTRA_APP_OBJECT_ID
--- SKIP: TestAccAssetEndpointProfile_basic (0.00s)
=== RUN   TestAccAssetEndpointProfile_complete_certificate
    device_registry_assetendpointprofile_resource_test.go:685: Skipping test due to environment variable ARM_ENTRA_APP_OBJECT_ID not set. Required variables: ARM_CLIENT_ID, ARM_CLIENT_SECRET, ARM_SUBSCRIPTION_ID, ARM_ENTRA_APP_OBJECT_ID
--- SKIP: TestAccAssetEndpointProfile_complete_certificate (0.00s)
=== RUN   TestAccAssetEndpointProfile_complete_usernamePassword
    device_registry_assetendpointprofile_resource_test.go:685: Skipping test due to environment variable ARM_ENTRA_APP_OBJECT_ID not set. Required variables: ARM_CLIENT_ID, ARM_CLIENT_SECRET, ARM_SUBSCRIPTION_ID, ARM_ENTRA_APP_OBJECT_ID
--- SKIP: TestAccAssetEndpointProfile_complete_usernamePassword (0.00s)
=== RUN   TestAccAssetEndpointProfile_complete_anonymous
    device_registry_assetendpointprofile_resource_test.go:685: Skipping test due to environment variable ARM_ENTRA_APP_OBJECT_ID not set. Required variables: ARM_CLIENT_ID, ARM_CLIENT_SECRET, ARM_SUBSCRIPTION_ID, ARM_ENTRA_APP_OBJECT_ID
--- SKIP: TestAccAssetEndpointProfile_complete_anonymous (0.00s)
=== RUN   TestAccAssetEndpointProfile_requiresImport
    device_registry_assetendpointprofile_resource_test.go:685: Skipping test due to environment variable ARM_ENTRA_APP_OBJECT_ID not set. Required variables: ARM_CLIENT_ID, ARM_CLIENT_SECRET, ARM_SUBSCRIPTION_ID, ARM_ENTRA_APP_OBJECT_ID
--- SKIP: TestAccAssetEndpointProfile_requiresImport (0.00s)
=== RUN   TestAccAssetEndpointProfile_update
    device_registry_assetendpointprofile_resource_test.go:685: Skipping test due to environment variable ARM_ENTRA_APP_OBJECT_ID not set. Required variables: ARM_CLIENT_ID, ARM_CLIENT_SECRET, ARM_SUBSCRIPTION_ID, ARM_ENTRA_APP_OBJECT_ID
--- SKIP: TestAccAssetEndpointProfile_update (0.00s)
PASS
ok      github.com/hashicorp/terraform-provider-azurerm/internal/services/deviceregistry        2.945s

Change Log

Below please provide what should go into the changelog (if anything) conforming to the Changelog Format documented here.

  • new service DeviceRegistry - support for the device_registry service [GH-00000]
  • new resource azurerm_device_registry_asset [GH-00000]
  • new resource azurerm_device_registry_asset_endpoint_profile [GH-00000]

This is a (please select all that apply):

  • Bug Fix
  • New Feature (ie adding a service, resource, or data source)
  • Enhancement
  • Breaking Change

Related Issue(s)

Fixes #0000

Note

If this PR changes meaningfully during the course of review please update the title and description as required.

@mryanlo mryanlo changed the title New service: DeviceRegistry DO NOT REVIEW!!! New service: DeviceRegistry Dec 30, 2024
@mryanlo mryanlo marked this pull request as ready for review December 30, 2024 23:55
@mryanlo mryanlo requested a review from a team as a code owner December 30, 2024 23:55
@mryanlo mryanlo marked this pull request as draft January 24, 2025 01:32
@mryanlo
Copy link
Author

mryanlo commented May 15, 2025

Hi @mryanlo, I've taken a look over this PR. Just to provide a heads up, as this is a large PR, it will likely take multiple reviews to fully cover everything, I've left some comments inline on my first pass.

I've skipped the test configuration entirely for now, as we'll have to discuss this within the team since it deviates significantly from how we usually do our testing.

Hi @sreallymatt thank you for the initial review. I've been addressing your feedback. We have a few questions for you and the rest of the team:

  1. For adding all of the validation from the ARM spec, we'd like to ask why we must do this here in Terraform? None of our other client-tooling that CRUDs azure resources (sdks, CLIs, etc) do this and they all let the validation happen the RP-level and/or ARM specification. I understand this saves us an API call, but we have changed the validation at various times on the RP and ARM level as requirements came in. We would like to have a single point of validation and maintaining both validations across our own service/ARM and terraform will be tedious.
  2. the reason why this PR is so big is because i had to update the vendor folder to include all the go-azure-sdk APIs that the Terraform code would call (generated by running go mod vendor). Would it make more sense to separate the vendor folder changes and the service/resource changes into two separate PRs?

@sreallymatt
Copy link
Collaborator

sreallymatt commented May 16, 2025

Hi @sreallymatt thank you for the initial review. I've been addressing your feedback. We have a few questions for you and the rest of the team:

  1. For adding all of the validation from the ARM spec, we'd like to ask why we must do this here in Terraform? None of our other client-tooling that CRUDs azure resources (sdks, CLIs, etc) do this and they all let the validation happen the RP-level and/or ARM specification. I understand this saves us an API call, but we have changed the validation at various times on the RP and ARM level as requirements came in. We would like to have a single point of validation and maintaining both validations across our own service/ARM and terraform will be tedious.
  2. the reason why this PR is so big is because i had to update the vendor folder to include all the go-azure-sdk APIs that the Terraform code would call (generated by running go mod vendor). Would it make more sense to separate the vendor folder changes and the service/resource changes into two separate PRs?

Hi @mryanlo, to answer your questions:

  1. From a Terraform provider perspective, it would be a bad user experience to rely on the API to do all of the validation as any validation errors would surface during an apply operation, rather than during a plan. Ideally, once Terraform has planned the changes, and the user has approved them, all changes should be applied without any errors. There are exceptions to this, but generally we aim to validate the user's configuration prior to the apply stage.

  2. This is fine, the vendored dependencies are required

@mryanlo
Copy link
Author

mryanlo commented May 22, 2025

Hi @sreallymatt thank you for the initial review. I've been addressing your feedback. We have a few questions for you and the rest of the team:

  1. For adding all of the validation from the ARM spec, we'd like to ask why we must do this here in Terraform? None of our other client-tooling that CRUDs azure resources (sdks, CLIs, etc) do this and they all let the validation happen the RP-level and/or ARM specification. I understand this saves us an API call, but we have changed the validation at various times on the RP and ARM level as requirements came in. We would like to have a single point of validation and maintaining both validations across our own service/ARM and terraform will be tedious.
  2. the reason why this PR is so big is because i had to update the vendor folder to include all the go-azure-sdk APIs that the Terraform code would call (generated by running go mod vendor). Would it make more sense to separate the vendor folder changes and the service/resource changes into two separate PRs?

Hi @mryanlo, to answer your questions:

  1. From a Terraform provider perspective, it would be a bad user experience to rely on the API to do all of the validation as any validation errors would surface during an apply operation, rather than during a plan. Ideally, once Terraform has planned the changes, and the user has approved them, all changes should be applied without any errors. There are exceptions to this, but generally we aim to validate the user's configuration prior to the apply stage.
  2. This is fine, the vendored dependencies are required

Hi @sreallymatt thank you for your reply.

I discussed issue (1) with my team some more and, while we understand what you're saying and would prefer for the validation, we would all like to request if an exception can be made to not add the validation to both Terraform and the Azure cloud service (our API specification in ARM and our service's ResourceProvider/RP). Along with the aforementioned reasons i have provided, some of our validation is very complex and belongs in the cloud service only that cannot be done statically (e.g. validation of unique names of the DataPoints objects in property Dataset.#.DataPoints.#.Name, where we must loop through all the data points and validate they have unique names). This kind of logic is too complicated for us to perform on the client/Terraform side. Even if we excluded this complex validation logic from Terraform, it would be a hassle to keep track of the validations we perform on the cloud that are also included in Terraform or not, and maintenance will be difficult moving forward. We recognize that Terraform would prefer to not make the api call and fail during the planning phase, but given all of these requirements on our side, we want to make the call to keep validation at the swagger and RP level and just return the failure back.

@sreallymatt
Copy link
Collaborator

@mryanlo, after discussing this with the team we would still like to see the properties validated, at least where possible. This includes regexes for names, max/min values for integers, etc. We recognize this adds a bit of extra maintenance effort, but we do this for almost all other resources to provide a better UX.

The example mentioned (e.g. validation of unique names of the DataPoints objects in property Dataset.#.DataPoints.#.Name, where we must loop through all the data points and validate they have unique names), may actually be possible within a CustomizeDiff but it would be okay if that validation is left out. (Though, we should still add validation on the name field itself, to ensure it matches a regex if the service has naming restrictions)

@github-actions
Copy link
Contributor

github-actions bot commented Aug 4, 2025

This PR is being labeled as "stale" because it has not been updated for 30 or more days.

If this PR is still valid, please remove the "stale" label. If this PR is blocked, please add it to the "Blocked" milestone.

If you need some help completing this PR, please leave a comment letting us know. Thank you!

@github-actions github-actions bot added the stale label Aug 4, 2025
@mryanlo
Copy link
Author

mryanlo commented Aug 4, 2025

Hi @sreallymatt @stephybun, sorry for the delay in response. We have been really busy with other work on our end that this became less of a priority but still needed work. Do you think you can please remove the stale label? We would like to still get back to this work soon. thanks!

@github-actions
Copy link
Contributor

github-actions bot commented Sep 8, 2025

This PR is being labeled as "stale" because it has not been updated for 30 or more days.

If this PR is still valid, please remove the "stale" label. If this PR is blocked, please add it to the "Blocked" milestone.

If you need some help completing this PR, please leave a comment letting us know. Thank you!

@github-actions github-actions bot added the stale label Sep 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants