-
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
add azurerm_iotcentral_organization
#23132
add azurerm_iotcentral_organization
#23132
Conversation
azurerm_iotcentral_organization
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.
hey @KenSpur
Thanks for this PR / apologies for the delayed review here.
I've taken a look through and left some comments inline, but this is off to a good start - right now this is assuming we're connected to Azure Public at all times, which may not be the case. To resolve that we'll want to make a few changes to load the IoTCentral details from the current Azure Environment (to use the right subdomain, checking IoTCentral is available in that Environment etc), as such I've left a few comments to fix that, but if we can fix those up then we should be able to take another look 👍
thanks!
internal/services/iotcentral/iotcentral_organization_resource.go
Outdated
Show resolved
Hide resolved
internal/services/iotcentral/iotcentral_organization_resource.go
Outdated
Show resolved
Hide resolved
internal/services/iotcentral/iotcentral_organization_resource.go
Outdated
Show resolved
Hide resolved
internal/services/iotcentral/iotcentral_organization_resource.go
Outdated
Show resolved
Hide resolved
@tombuildsstuff do we maybe want to rename |
6769724
to
0c4a487
Compare
Co-authored-by: Tom Harvey <[email protected]>
0c4a487
to
ed40944
Compare
Hey @manicminer Just did a rebase on main to get the PR up to date. Would you prefer I implement the other resources to get this PR in a state of minimum viable usefullness, or keep the PR scoped to one resource at a time? |
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.
@KenSpur Thanks for making the suggested changes, this looks great to me and the tests are passing.
Since this is a useful resource by itself, we'll go ahead and merge this. Thanks for the contribution!
<Actions> <action id="f410411e63aff4bb73a81c2aec1d373cf8a903e63b30dee2006b0030d8a94cc8"> <h3>Bump Terraform `azurerm` provider version</h3> <details id="1d9343c012f5434ac9fe8a98135bae3667b399259be16d9b14302ea3bd424a24"> <summary>Update Terraform lock file</summary> <p>"hashicorp/azurerm" updated from "3.84.0" to "3.85.0" in file ".terraform.lock.hcl"</p> <details> <summary>3.85.0</summary> <pre>Changelog retrieved from:
	https://github.com/hashicorp/terraform-provider-azurerm/releases/tag/v3.85.0
FEATURES:

* New Data Source: `azurerm_locations` ([#23324](hashicorp/terraform-provider-azurerm#23324 New Resource: `azurerm_iotcentral_organization` ([#23132](https://github.com/hashicorp/terraform-provider-azurerm/issues/23132))

ENHANCEMENTS:

* provider: support for authenticating using Azure Kubernetes Service Workload Identity ([#23965](hashicorp/terraform-provider-azurerm#23965 dependencies: updating to `v0.65.0` of `github.com/hashicorp/go-azure-helpers` ([#24222](hashicorp/terraform-provider-azurerm#24222 dependencies: updating to `v0.20231214.1220802` of `github.com/hashicorp/go-azure-sdk` ([#24246](hashicorp/terraform-provider-azurerm#24246 dependencies: updating to version `v0.20231214.1160726` of `github.com/hashicorp/go-azure-sdk` ([#24241](hashicorp/terraform-provider-azurerm#24241 dependencies: update `security/automation` to use `hashicorp/go-azure-sdk` ([#24156](hashicorp/terraform-provider-azurerm#24156 `dataprotection`: updating to API Version `2023-05-01` ([#24143](hashicorp/terraform-provider-azurerm#24143 `kusto`: removing the remnants of the old Resource ID Parsers now this uses `hashicorp/go-azure-sdk` ([#24238](hashicorp/terraform-provider-azurerm#24238 Data Source: `azurerm_cognitive_account` - export the `identity` block ([#24214](hashicorp/terraform-provider-azurerm#24214 Data Source: `azurerm_monitor_workspace` - add support for the `default_data_collection_endpoint_id` and `default_data_collection_rule_id` properties ([#24153](hashicorp/terraform-provider-azurerm#24153 Data Source: `azurerm_shared_image_gallery` - add support for the `image_names` property ([#24176](hashicorp/terraform-provider-azurerm#24176 `azurerm_dns_txt_record` - allow up to `4096` characters for the property `record.value` ([#24169](hashicorp/terraform-provider-azurerm#24169 `azurerm_container_app` - support for the `workload_profile_name` property ([#24219](hashicorp/terraform-provider-azurerm#24219 `azurerm_container_app` - suppot for the `init_container` block ([#23955](hashicorp/terraform-provider-azurerm#23955 `azurerm_hpc_cache_blob_nfs_target` - support for the `verification_timer_in_seconds` and `write_back_timer_in_seconds` properties ([#24207](hashicorp/terraform-provider-azurerm#24207 `azurerm_hpc_cache_nfs_target` - support for the `verification_timer_in_seconds` and `write_back_timer_in_seconds` properties ([#24208](hashicorp/terraform-provider-azurerm#24208 `azurerm_linux_web_app` - make `client_secret_setting_name` optional and conflict with `client_secret_certificate_thumbprint` ([#21834](hashicorp/terraform-provider-azurerm#21834 `azurerm_linux_web_app_slot` - make `client_secret_setting_name` optional and conflict with `client_secret_certificate_thumbprint` ([#21834](hashicorp/terraform-provider-azurerm#21834 `azurerm_linux_web_app` - fix a bug in `app_settings` where settings could be lost ([#24221](hashicorp/terraform-provider-azurerm#24221 `azurerm_linux_web_app_slot` - fix a bug in `app_settings` where settings could be lost ([#24221](hashicorp/terraform-provider-azurerm#24221 `azurerm_log_analytics_workspace` - add support for the `immediate_data_purge_on_30_days_enabled` property ([#24015](hashicorp/terraform-provider-azurerm#24015 `azurerm_mssql_server` - support for other identity types for the key vault key ([#24236](hashicorp/terraform-provider-azurerm#24236 `azurerm_machine_learning_datastore_blobstorage` - resource now skips validation when being created ([#24078](hashicorp/terraform-provider-azurerm#24078 `azurerm_machine_learning_datastore_datalake_gen2` - resource now skips validation when being created ([#24078](hashicorp/terraform-provider-azurerm#24078 `azurerm_machine_learning_datastore_fileshare` - resource now skips validation when being created ([#24078](hashicorp/terraform-provider-azurerm#24078 `azurerm_monitor_workspace` - support for the `default_data_collection_endpoint_id` and `default_data_collection_rule_id` properties ([#24153](hashicorp/terraform-provider-azurerm#24153 `azurerm_redis_cache` - support for the `storage_account_subscription_id` property ([#24101](hashicorp/terraform-provider-azurerm#24101 `azurerm_storage_blob` - support for the `source_content` type `Page` ([#24177](hashicorp/terraform-provider-azurerm#24177 `azurerm_web_application_firewall_policy` - support new values to the `rule_group_name` property ([#24194](hashicorp/terraform-provider-azurerm#24194 `azurerm_windows_web_app` - make the `client_secret_setting_name` property optional and conflicts with the `client_secret_certificate_thumbprint` property ([#21834](hashicorp/terraform-provider-azurerm#21834 `azurerm_windows_web_app_slot` - make the `client_secret_setting_name` property optional and conflicts with the `client_secret_certificate_thumbprint` property ([#21834](hashicorp/terraform-provider-azurerm#21834 `azurerm_windows_web_app` - fix a bug in `app_settings` where settings could be lost ([#24221](hashicorp/terraform-provider-azurerm#24221 `azurerm_windows_web_app_slot` - fix a bug in `app_settings` where settings could be lost ([#24221](hashicorp/terraform-provider-azurerm#24221 `azurerm_cognitive_account` - add `ContentSafety` to the `kind` property validation ([#24205](https://github.com/hashicorp/terraform-provider-azurerm/issues/24205))

BUG FIXES:

* provider: fix an authentication issue with Azure Storage when running in Azure China cloud ([#24246](hashicorp/terraform-provider-azurerm#24246 Data Source: `azurerm_role_definition` - fix bug where `role_definition_id` and `scope` were being incorrectly set ([#24211](hashicorp/terraform-provider-azurerm#24211 `azurerm_batch_account` - fix bug where `UserAssigned, SystemAssigned` could be passed to the resource even though it isn't supported ([#24204](hashicorp/terraform-provider-azurerm#24204 `azurerm_batch_pool` - fix bug where `settings_json` and `protected_settings` were not being unmarshaled ([#24075](hashicorp/terraform-provider-azurerm#24075 `azurerm_bot_service_azure_bot` - fix bug where `public_network_access_enabled` was being set as the value for `LuisKey` ([#24164](hashicorp/terraform-provider-azurerm#24164 `azurerm_cognitive_account_customer_managed_key` - `identity_client_id` is no longer passed to the api when it is empty ([#24231](hashicorp/terraform-provider-azurerm#24231 `azurerm_linux_web_app_slot` - error when `service_plan_id` is identical to the parent `service_plan_id` ([#23403](hashicorp/terraform-provider-azurerm#23403 `azurerm_management_group_template_deployment` - fixing a bug where `template_spec_version_id` couldn't be updated ([#24072](hashicorp/terraform-provider-azurerm#24072 `azurerm_pim_active_role_assignment` - fix an importing issue by filtering available role assignments based on the provided `scope` ([#24077](hashicorp/terraform-provider-azurerm#24077 `azurerm_pim_eligible_role_assignment` - fix an importing issue by filtering available role assignments based on the provided `scope` ([#24077](hashicorp/terraform-provider-azurerm#24077 `azurerm_resource_group_template_deployment` - fixing a bug where `template_spec_version_id` couldn't be updated ([#24072](hashicorp/terraform-provider-azurerm#24072 `azurerm_security_center_setting` - fix the casing for the `setting_name` `Sentinel` ([#24210](hashicorp/terraform-provider-azurerm#24210 `azurerm_storage_account` - Fix crash when checking for `routingInputs.PublishInternetEndpoints` and `routingInputs.PublishMicrosoftEndpoints` ([#24228](hashicorp/terraform-provider-azurerm#24228 `azurerm_storage_share_file` - prevent panic when the file specified by `source` is empty ([#24179](hashicorp/terraform-provider-azurerm#24179 `azurerm_subscription_template_deployment` - fixing a bug where `template_spec_version_id` couldn't be updated ([#24072](hashicorp/terraform-provider-azurerm#24072 `azurerm_tenant_template_deployment` - fixing a bug where `template_spec_version_id` couldn't be updated ([#24072](hashicorp/terraform-provider-azurerm#24072 `azurerm_virtual_machine` - prevent a panic by nil checking the first element of `additional_capabilities` ([#24159](hashicorp/terraform-provider-azurerm#24159 `azurerm_windows_web_app_slot` - error when `service_plan_id` is identical to the parent `service_plan_id` ([#23403](https://github.com/hashicorp/terraform-provider-azurerm/issues/23403))


</pre> </details> </details> <a href="https://infra.ci.jenkins.io/job/terraform-jobs/job/azure/job/main/942/">Jenkins pipeline link</a> </action> </Actions> --- <table> <tr> <td width="77"> <img src="https://www.updatecli.io/images/updatecli.png" alt="Updatecli logo" width="50" height="50"> </td> <td> <p> Created automatically by <a href="https://www.updatecli.io/">Updatecli</a> </p> <details><summary>Options:</summary> <br /> <p>Most of Updatecli configuration is done via <a href="https://www.updatecli.io/docs/prologue/quick-start/">its manifest(s)</a>.</p> <ul> <li>If you close this pull request, Updatecli will automatically reopen it, the next time it runs.</li> <li>If you close this pull request and delete the base branch, Updatecli will automatically recreate it, erasing all previous commits made.</li> </ul> <p> Feel free to report any issues at <a href="https://github.com/updatecli/updatecli/issues">github.com/updatecli/updatecli</a>.<br /> If you find this tool useful, do not hesitate to star <a href="https://github.com/updatecli/updatecli/stargazers">our GitHub repository</a> as a sign of appreciation, and/or to tell us directly on our <a href="https://matrix.to/#/#Updatecli_community:gitter.im">chat</a>! </p> </details> </td> </tr> </table> Co-authored-by: Jenkins Infra Bot (updatecli) <[email protected]>
Hey @manicminer, @tombuildsstuff, it looks like this PR is still awaiting a required review. I'm looking forward to working on other resources that build upon this one. Just wanted to share my plans and see how things are progressing. Thanks! |
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.
Sorry @KenSpur - looks like this was missed over the holidays, i'll get this merged and released for you today !
<Actions> <action id="f410411e63aff4bb73a81c2aec1d373cf8a903e63b30dee2006b0030d8a94cc8"> <h3>Bump Terraform `azurerm` provider version</h3> <details id="1d9343c012f5434ac9fe8a98135bae3667b399259be16d9b14302ea3bd424a24"> <summary>Update Terraform lock file</summary> <p>changes detected:
	"hashicorp/azurerm" updated from "3.90.0" to "3.91.0" in file ".terraform.lock.hcl"</p> <details> <summary>3.91.0</summary> <pre>Changelog retrieved from:
	https://github.com/hashicorp/terraform-provider-azurerm/releases/tag/v3.91.0
FEATURES:

* **New Data Source**: `azurerm_databricks_access_connector` ([#24769](hashicorp/terraform-provider-azurerm#24769 **New Resource**: `azurerm_data_protection_backup_policy_kubernetes_cluster` ([#24718](hashicorp/terraform-provider-azurerm#24718 **New Resource**: `azurerm_chaos_studio_experiment` ([#24779](hashicorp/terraform-provider-azurerm#24779 **New Resource**: `azurerm_chaos_studio_capability` ([#24779](hashicorp/terraform-provider-azurerm#24779 **New Resource**: `azurerm_dev_center_gallery` ([#23760](hashicorp/terraform-provider-azurerm#23760 **New Resource:** `azurerm_kubernetes_fleet_member` ([#24792](hashicorp/terraform-provider-azurerm#24792 **New Resource:** `azurerm_iotcentral_organization` ([#23132](hashicorp/terraform-provider-azurerm#23132 **New Resource:** `azurerm_spring_cloud_app_dynamics_application_performance_monitoring` ([#24750](https://github.com/hashicorp/terraform-provider-azurerm/issues/24750))

ENHANCEMENTS:

* dependencies: updating to `v0.20240208.1095436` of `github.com/hashicorp/go-azure-sdk/resource-manager` ([#24819](hashicorp/terraform-provider-azurerm#24819 dependencies: updating to `v0.20240208.1095436` of `github.com/hashicorp/go-azure-sdk/sdk` ([#24819](hashicorp/terraform-provider-azurerm#24819 dependencies: refactor `azurerm_app_service_environment_v3` to use `go-azure-sdk` ([#24760](hashicorp/terraform-provider-azurerm#24760 dependencies: refactor `azurerm_role_definition` to use `go-azure-sdk` ([#24266](hashicorp/terraform-provider-azurerm#24266 `managedhsm`: updating to use the transport layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` ([#24761](hashicorp/terraform-provider-azurerm#24761 `hdinsight`: updating to API Version `2023-07-01` ([#24761](hashicorp/terraform-provider-azurerm#24761 `streamanalytics`: updating to use the transport layer from `hashicorp/go-azure-sdk` rather than `Azure/go-autorest` ([#24819](hashicorp/terraform-provider-azurerm#24819 `azurerm_app_service_environment_v3` - support for the `remote_debugging_enabled` property ([#24760](hashicorp/terraform-provider-azurerm#24760 `azurerm_storage_account` - support for the `local_user_enabled` property ([#24800](hashicorp/terraform-provider-azurerm#24800 `azurerm_log_analytics_workspace_table` - support for the `total_retention_in_days` property ([#24513](hashicorp/terraform-provider-azurerm#24513 `azurerm_maching_learning_workspace` - support for the `feature_store` and `kind` properties ([#24716](hashicorp/terraform-provider-azurerm#24716 `azurerm_traffic_manager_azure_endpoint` - support for the `always_serve_enabled` property ([#24573](hashicorp/terraform-provider-azurerm#24573 `azurerm_traffic_manager_external_endpoint` - support for the `always_serve_enabled` property ([#24573](https://github.com/hashicorp/terraform-provider-azurerm/issues/24573))

BUG FIXES:

* `azurerm_api_management` - the `virtual_network_configuration` property now updates correctly outside of `virtual_network_type` ([#24569](https://github.com/hashicorp/terraform-provider-azurerm/issues/24569))


</pre> </details> </details> <a href="https://infra.ci.jenkins.io/job/terraform-jobs/job/azure/job/main/1083/">Jenkins pipeline link</a> </action> </Actions> --- <table> <tr> <td width="77"> <img src="https://www.updatecli.io/images/updatecli.png" alt="Updatecli logo" width="50" height="50"> </td> <td> <p> Created automatically by <a href="https://www.updatecli.io/">Updatecli</a> </p> <details><summary>Options:</summary> <br /> <p>Most of Updatecli configuration is done via <a href="https://www.updatecli.io/docs/prologue/quick-start/">its manifest(s)</a>.</p> <ul> <li>If you close this pull request, Updatecli will automatically reopen it, the next time it runs.</li> <li>If you close this pull request and delete the base branch, Updatecli will automatically recreate it, erasing all previous commits made.</li> </ul> <p> Feel free to report any issues at <a href="https://github.com/updatecli/updatecli/issues">github.com/updatecli/updatecli</a>.<br /> If you find this tool useful, do not hesitate to star <a href="https://github.com/updatecli/updatecli/stargazers">our GitHub repository</a> as a sign of appreciation, and/or to tell us directly on our <a href="https://matrix.to/#/#Updatecli_community:gitter.im">chat</a>! </p> </details> </td> </tr> </table> Co-authored-by: Jenkins Infra Bot (updatecli) <[email protected]>
* add azurerm_iotcentral_organization * make terrafmt * make generate * fix import path in iotcentral_organization_resource.go * use environments.Api in iotcentral/client/client.go * refactor NestedItemId to OrganizationID * Update website/docs/r/iotcentral_organization.html.markdown Co-authored-by: Tom Harvey <[email protected]> * rename parent property to parent_organization_id & add ForceNew * expand organizationId validation * add regex patern in validateOrganizationId() error output * improve OrganizationID.String() description * refactor resourceId & make use of iotcentral_application_id --------- Co-authored-by: Tom Harvey <[email protected]> Co-authored-by: kt <[email protected]>
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. |
#22338