This repository has been archived by the owner on May 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: import of existing resources (#32)
* feat: import of existing resources * fix go generate * set EligibleAssignmentID after create
- Loading branch information
1 parent
e4976ea
commit 83873f6
Showing
9 changed files
with
126 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 0 additions & 22 deletions
22
examples/resources/group_eligible_assignment/.terraform.lock.hcl
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# The resource can be imported using the scope and principal: `{scope}||{principal_id}`. | ||
terraform import azurepim_group_eligible_assignment.example "00000000-0000-0000-0000-000000000000|00000000-0000-0000-0000-000000000000" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
terraform { | ||
required_providers { | ||
azurepim = { | ||
source = "telenornorway/azurepim" | ||
} | ||
azuread = { | ||
source = "hashicorp/azuread" | ||
version = "2.48.0" | ||
} | ||
} | ||
} | ||
|
||
provider "azurepim" {} | ||
|
||
data "azuread_client_config" "current" {} | ||
|
||
resource "azuread_group" "main" { | ||
display_name = "p-grp-1" | ||
owners = [data.azuread_client_config.current.object_id] | ||
security_enabled = true | ||
} | ||
|
||
resource "azuread_group" "pag" { | ||
display_name = "p-pag-1" | ||
owners = [data.azuread_client_config.current.object_id] | ||
security_enabled = true | ||
} | ||
|
||
resource "azurepim_group_eligible_assignment" "main" { | ||
role = "member" | ||
scope = azuread_group.pag.object_id | ||
justification = "this is a test" | ||
principal_id = azuread_group.main.object_id | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.