Skip to content

Commit

Permalink
small adjustments to typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
Anton Shchederkin committed Dec 16, 2024
1 parent 841de6b commit 85a38f8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 0 additions & 2 deletions typescript/src/resources/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import exp from "constants";

export * as account from "./account";
export * as clusterPolicies from "./cluster-policies";
export * as clusters from "./clusters";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import { CustomResource } from "aws-cdk-lib";
import { Construct } from "constructs";

export interface ComplexValue {
// TODO: Add more fields according to the actual schema
value?: string,
}


export interface ServicePrincipalSettings {
active?: boolean
application_id?: string
Expand All @@ -15,11 +15,12 @@ export interface ServicePrincipalSettings {
groups?: ComplexValue[]
id?: string
roles?: ComplexValue[]
// TODO: Add support for a "schemas" field
}

export interface ServicePrincipalProperties {
workspace_url: string
service_principal: ServicePrincipalSettings
service_principal_settings: ServicePrincipalSettings
}

export interface ServicePrincipalProps extends ServicePrincipalProperties {
Expand All @@ -33,7 +34,7 @@ export class ServicePrincipal extends CustomResource {
properties: {
action: "service-principal",
workspace_url: props.workspace_url,
service_principal: props.service_principal,
service_principal: props.service_principal_settings,
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe("ServicePrincipal", () => {
const deployLambda = DatabricksDeployLambda.fromServiceToken(databricksStack, "DeployLambda", "some-arn");
const workspaceUrl = cdk.Fn.importValue("databricks-workspace-url");
new ServicePrincipal(databricksStack, "ServicePrincipal", {
service_principal: {
service_principal_settings: {
active: true,
application_id: "some_id",
display_name: "some_name",
Expand Down

0 comments on commit 85a38f8

Please sign in to comment.