diff --git a/docker-compose.yml b/docker-compose.yml index c7bc0d8a..932625da 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -41,4 +41,3 @@ services: volumes: # Make the custom-user-federation-example extension available to Keycloak. The :z option is required and tells Docker that the volume content will be shared between containers. - ./custom-user-federation-example/build/libs/custom-user-federation-example.jar:/opt/jboss/keycloak/standalone/deployments/custom-user-federation-example.jar:z - diff --git a/makefile b/makefile index 8c35741c..2ad60584 100644 --- a/makefile +++ b/makefile @@ -4,8 +4,10 @@ GOARCH?=amd64 MAKEFLAGS += --silent +VERSION=$$(git describe --tags) + build: - go build -o terraform-provider-keycloak + CGO_ENABLED=0 go build -trimpath -ldflags "-s -w -X main.version=$(VERSION)" -o terraform-provider-keycloak_$(VERSION) build-example: build mkdir -p example/.terraform/plugins/terraform.local/mrparkers/keycloak/4.0.0/$(GOOS)_$(GOARCH) diff --git a/provider/resource_keycloak_openid_client_authorization_permission.go b/provider/resource_keycloak_openid_client_authorization_permission.go index 0a58d5ce..fc704667 100644 --- a/provider/resource_keycloak_openid_client_authorization_permission.go +++ b/provider/resource_keycloak_openid_client_authorization_permission.go @@ -195,7 +195,7 @@ func resourceKeycloakOpenidClientAuthorizationPermissionImport(_ context.Context } d.Set("realm_id", parts[0]) d.Set("resource_server_id", parts[1]) - d.SetId(parts[3]) + d.SetId(parts[2]) return []*schema.ResourceData{d}, nil } diff --git a/provider/resource_keycloak_openid_client_authorization_resource.go b/provider/resource_keycloak_openid_client_authorization_resource.go index b4c61733..150b45be 100644 --- a/provider/resource_keycloak_openid_client_authorization_resource.go +++ b/provider/resource_keycloak_openid_client_authorization_resource.go @@ -187,7 +187,7 @@ func resourceKeycloakOpenidClientAuthorizationResourceImport(_ context.Context, } d.Set("realm_id", parts[0]) d.Set("resource_server_id", parts[1]) - d.SetId(parts[3]) + d.SetId(parts[2]) return []*schema.ResourceData{d}, nil } diff --git a/provider/resource_keycloak_openid_client_authorization_scope.go b/provider/resource_keycloak_openid_client_authorization_scope.go index 1214ba42..4e50f4fc 100644 --- a/provider/resource_keycloak_openid_client_authorization_scope.go +++ b/provider/resource_keycloak_openid_client_authorization_scope.go @@ -130,7 +130,7 @@ func resourceKeycloakOpenidClientAuthorizationScopeImport(_ context.Context, d * } d.Set("realm_id", parts[0]) d.Set("resource_server_id", parts[1]) - d.SetId(parts[3]) + d.SetId(parts[2]) return []*schema.ResourceData{d}, nil }