azurerm_dev_center - support new property for project_catalog_item_sync_enabled#29274
Conversation
…log_item_sync_enabled
|
|
||
| * `resource_group_name` - (Required) Specifies the name of the Resource Group within which this Dev Center should exist. Changing this forces a new Dev Center to be created. | ||
|
|
||
| * `dev_center_project_catalog_item_sync_enabled` - (Optional) Should project catalogs associated with projects in this Dev Center can be configured to sync catalog items? |
There was a problem hiding this comment.
the resource name is dev_center so this should be
| * `dev_center_project_catalog_item_sync_enabled` - (Optional) Should project catalogs associated with projects in this Dev Center can be configured to sync catalog items? | |
| * `project_catalog_item_sync_enabled` - (Optional) Should project catalogs associated with projects in this Dev Center can be configured to sync catalog items? |
?
azurerm_dev_center - support new property for dev_center_project_catalog_item_sync_enabledazurerm_dev_center - support new property for project_catalog_item_sync_enabled
|
@katbyte , thanks for the comments. I updated PR. Please take another look. Below is the latest test result what I just now triggered. --- PASS: TestAccDevCenter_complete (663.55s) |
sreallymatt
left a comment
There was a problem hiding this comment.
Thanks @neil-yechenwei, I've left just a few minor comments inline
| "tags": commonschema.Tags(), | ||
| "project_catalog_item_sync_enabled": { | ||
| Type: pluginsdk.TypeBool, | ||
| Optional: true, |
There was a problem hiding this comment.
Since we're defaulting the value for this to CatalogItemSyncEnableStatusDisabled, could you add an explicit default of false to this property here and in the docs?
| Optional: true, | |
| Optional: true, | |
| Default: false, |
| if v := input.Properties.ProjectCatalogSettings; v != nil && v.CatalogItemSyncEnableStatus != nil { | ||
| output.ProjectCatalogItemSyncEnabled = pointer.From(input.Properties.ProjectCatalogSettings.CatalogItemSyncEnableStatus) == devcenters.CatalogItemSyncEnableStatusEnabled | ||
| } |
There was a problem hiding this comment.
- Since we're assigning
input.Properties.ProjectCatalogSettingstovwe can justv.CatalogItemSyncEnableStatusinstead, minor but just a bit shorter - We can remove the nil check on
v.CatalogItemSyncEnableStatussince we're usingpointer.Fromwhich will handle that for us
| if v := input.Properties.ProjectCatalogSettings; v != nil && v.CatalogItemSyncEnableStatus != nil { | |
| output.ProjectCatalogItemSyncEnabled = pointer.From(input.Properties.ProjectCatalogSettings.CatalogItemSyncEnableStatus) == devcenters.CatalogItemSyncEnableStatusEnabled | |
| } | |
| if v := input.Properties.ProjectCatalogSettings; v != nil { | |
| output.ProjectCatalogItemSyncEnabled = pointer.From(v.CatalogItemSyncEnableStatus) == devcenters.CatalogItemSyncEnableStatusEnabled | |
| } |
|
|
||
| * `resource_group_name` - (Required) Specifies the name of the Resource Group within which this Dev Center should exist. Changing this forces a new Dev Center to be created. | ||
|
|
||
| * `project_catalog_item_sync_enabled` - (Optional) Should project catalogs associated with projects in this Dev Center can be configured to sync catalog items? |
There was a problem hiding this comment.
Could you update this to be a statement rather than a question?
| * `project_catalog_item_sync_enabled` - (Optional) Should project catalogs associated with projects in this Dev Center can be configured to sync catalog items? | |
| * `project_catalog_item_sync_enabled` - (Optional) Whether the project catalogs associated with projects in this Dev Center are allowed to sync catalog items. |
|
@sreallymatt , thanks for the comments. I updated PR. Please take another look. Below is the latest test result what I just now triggered. --- PASS: TestAccDevCenter_basic (599.15s) |
sreallymatt
left a comment
There was a problem hiding this comment.
Thanks @neil-yechenwei LGTM ✅
|
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. |
Community Note
Description
This PR is to support new property for
project_catalog_item_sync_enabled.PR Checklist
For example: “
resource_name_here- description of change e.g. adding propertynew_property_name_here”Changes to existing Resource / Data Source
Testing
--- PASS: TestAccDevCenter_complete (566.37s)
--- PASS: TestAccDevCenter_update (741.16s)
--- PASS: TestAccDevCenter_requiresImport (641.16s)
--- PASS: TestAccDevCenter_basic (541.16s)
Change Log
Below please provide what should go into the changelog (if anything) conforming to the Changelog Format documented here.
azurerm_dev_center- support new property fordev_center_project_catalog_item_sync_enabledThis is a (please select all that apply):
Related Issue(s)
Fixes #28361
Note
If this PR changes meaningfully during the course of review please update the title and description as required.