Skip to content

Support import for msgraph_resource_collection#97

Open
ms-henglu wants to merge 2 commits intomainfrom
support-import-resource-collection
Open

Support import for msgraph_resource_collection#97
ms-henglu wants to merge 2 commits intomainfrom
support-import-resource-collection

Conversation

@ms-henglu
Copy link
Collaborator

Summary

Implement ImportState for msgraph_resource_collection resource, allowing users to import existing $ref collections into Terraform state.

Import ID Format

The import ID is the collection URL ending with /$ref:

terraform import msgraph_resource_collection.group_members groups/{group-id}/members/$ref

An optional ?api-version=beta query parameter can specify the API version (defaults to v1.0):

terraform import msgraph_resource_collection.group_members 'groups/{group-id}/members/$ref?api-version=beta'

Changes

  • Added ImportState method to MSGraphResourceCollection
  • Added import example for documentation (examples/resources/msgraph_resource_collection/import.sh)
  • Regenerated docs to include the Import section
  • Added import tests (TestAcc_ResourceCollectionImport, TestAcc_ResourceCollectionImportWithApiVersion)
  • Added import steps to existing tests (TestAcc_ResourceCollectionBasic, TestAcc_ResourceCollectionUpdate)
  • Updated CHANGELOG.md with v0.4.0 entry

Fixes #88

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support import for msgraph_resource_collection

1 participant