Skip to content

Commit

Permalink
update the lock
Browse files Browse the repository at this point in the history
  • Loading branch information
baoduy committed Apr 18, 2024
1 parent 39a967e commit 9fea81b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
11 changes: 5 additions & 6 deletions src/Core/Locker.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
import * as authorization from '@pulumi/azure-native/authorization';
import * as pulumi from '@pulumi/pulumi';
import { Input, Resource } from '@pulumi/pulumi';
import * as authorization from "@pulumi/azure-native/authorization";
import { CustomResource } from "@pulumi/pulumi";

interface Props {
name: string;
resource: Input<Resource>;
resource: CustomResource;
level?: authorization.LockLevel;
protect?: boolean;
}

/** Lock Delete from Resource group level.*/
export default ({
name,
resourceId,
resource,
level = authorization.LockLevel.CanNotDelete,
protect = true,
}: Props) => {
Expand All @@ -26,6 +25,6 @@ export default ({
scope: resource.id,
notes: `Lock ${name} from ${level}`,
},
{ dependsOn: resource, protect }
{ dependsOn: resource, protect },
);
};
4 changes: 2 additions & 2 deletions src/MySql/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export interface MySqlProps extends BasicResourceArgs {
endIpAddress: string;
}>;
};
lock?:boolean
lock?: boolean;
}

export default ({
Expand All @@ -61,7 +61,7 @@ export default ({
databases,
vaultInfo,
dependsOn,
lock:true,
lock = true,
}: MySqlProps) => {
name = getMySqlName(name);

Expand Down
2 changes: 1 addition & 1 deletion src/Postgresql/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export default ({
databases,
vaultInfo,
dependsOn,
lock:true,
lock = true,
}: PostgresProps) => {
name = getPostgresqlName(name);

Expand Down

0 comments on commit 9fea81b

Please sign in to comment.