Skip to content

Commit

Permalink
Proof of concept
Browse files Browse the repository at this point in the history
  • Loading branch information
alexwilcox9 committed Jul 13, 2023
1 parent debc250 commit f503ef9
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 7 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ require (
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320
github.com/hashicorp/go-uuid v1.0.3
github.com/hashicorp/terraform-plugin-sdk/v2 v2.26.1
github.com/manicminer/hamilton v0.61.0
github.com/manicminer/hamilton v0.61.1-0.20230713115124-6d866e722d27
golang.org/x/text v0.9.0
)

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,8 @@ github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k=
github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
github.com/manicminer/hamilton v0.61.0 h1:Hp25wOIkArXUJ9++U9J+jpVL+nXCzUtsvzVa/vE3Or4=
github.com/manicminer/hamilton v0.61.0/go.mod h1:va/X2sztcgQ5+BSxc2eU3FTHYIyxLnHvB4LudlPUZdE=
github.com/manicminer/hamilton v0.61.1-0.20230713115124-6d866e722d27 h1:hoh9SNMyt9/izaPym0cEXd1r7qvkPxDFJVi1glQt7T0=
github.com/manicminer/hamilton v0.61.1-0.20230713115124-6d866e722d27/go.mod h1:va/X2sztcgQ5+BSxc2eU3FTHYIyxLnHvB4LudlPUZdE=
github.com/matryer/is v1.2.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlWXA=
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,17 @@ func accessPackageResourcePackageAssociationResourceRead(ctx context.Context, d
}

func accessPackageResourcePackageAssociationResourceDelete(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
log.Printf("[WARN] azuread_access_package_resource_package_association with ID %q must be manually deleted as there is no valid API provided for this operation", d.Id())
client := meta.(*clients.Client).IdentityGovernance.AccessPackageResourceRoleScopeClient

id, err := parse.AccessPackageResourcePackageAssociationID(d.Id())
if err != nil {
return tf.ErrorDiagPathF(err, "id", "Failed to parse resource ID %q", d.Id())
}

status, err := client.Delete(ctx, id.AccessPackageId, id.ResourcePackageAssociationId)
if err != nil {
return tf.ErrorDiagPathF(err, "id", "Deleting access package resource association with object ID %q, got status %d", id.ResourcePackageAssociationId, status)
}

return nil
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ github.com/hashicorp/terraform-svchost
# github.com/hashicorp/yamux v0.0.0-20211028200310-0bc27b27de87
## explicit; go 1.15
github.com/hashicorp/yamux
# github.com/manicminer/hamilton v0.61.0
# github.com/manicminer/hamilton v0.61.1-0.20230713115124-6d866e722d27
## explicit; go 1.16
github.com/manicminer/hamilton/errors
github.com/manicminer/hamilton/internal/utils
Expand Down

0 comments on commit f503ef9

Please sign in to comment.