Skip to content

Commit

Permalink
fixed liniting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
EC2 Default User committed Oct 30, 2023
1 parent ea3566e commit eb9c38d
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 26 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 7 additions & 12 deletions lib/resilience-backup-restore-aws-construct/backupstack.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
import * as cdk from 'aws-cdk-lib';
import { Construct } from 'constructs';
import { NestedStack, Stack, NestedStackProps } from 'aws-cdk-lib';
//import { NestedStack, Stack, NestedStackProps } from 'aws-cdk-lib';
import 'source-map-support/register';
import * as eks from 'aws-cdk-lib/aws-eks';
//import * as eks from 'aws-cdk-lib/aws-eks';
import * as blueprints from '@aws-quickstart/eks-blueprints';
import * as ec2 from 'aws-cdk-lib/aws-ec2';
//import * as ec2 from 'aws-cdk-lib/aws-ec2';
import * as backup from 'aws-cdk-lib/aws-backup';
import { Duration } from 'aws-cdk-lib';
import * as kms from 'aws-cdk-lib/aws-kms';
import * as iam from 'aws-cdk-lib/aws-iam';
//import * as iam from 'aws-cdk-lib/aws-iam';
import * as events from 'aws-cdk-lib/aws-events';
import * as utils from "@aws-quickstart/eks-blueprints/dist/utils";

Check warning on line 13 in lib/resilience-backup-restore-aws-construct/backupstack.ts

View workflow job for this annotation

GitHub Actions / build (18)

'utils' is defined but never used

Check warning on line 13 in lib/resilience-backup-restore-aws-construct/backupstack.ts

View workflow job for this annotation

GitHub Actions / build (18)

'utils' is defined but never used
import { drstack } from './drstack'
//import { drstack } from './drstack';


export interface backupStackProps extends cdk.StackProps {
/**
* Arn of the KMS Key on the Primary region used to create ReplicaKey
*/
primaryKeyArn: string,
drbackupVault: backup.IBackupVault
//drbackupVault: { "backupVaultArn": string, backupVaultName: string, env: {"account": string , region: string}}
Expand All @@ -27,12 +24,10 @@ export interface backupStackProps extends cdk.StackProps {
export class backupstack extends cdk.Stack {
constructor(scope: Construct, id: string, props: backupStackProps ) {

Check failure on line 25 in lib/resilience-backup-restore-aws-construct/backupstack.ts

View workflow job for this annotation

GitHub Actions / build (18)

Expected indentation of 4 spaces but found 2

Check failure on line 25 in lib/resilience-backup-restore-aws-construct/backupstack.ts

View workflow job for this annotation

GitHub Actions / build (18)

Expected indentation of 4 spaces but found 2
super(scope, id, props );

Check failure on line 26 in lib/resilience-backup-restore-aws-construct/backupstack.ts

View workflow job for this annotation

GitHub Actions / build (18)

Expected indentation of 8 spaces but found 4

Check failure on line 26 in lib/resilience-backup-restore-aws-construct/backupstack.ts

View workflow job for this annotation

GitHub Actions / build (18)

Expected indentation of 8 spaces but found 4
// Create a AWS Backup Vault in Primary Region
//const app = new cdk.App();
const account = process.env.CDK_DEFAULT_ACCOUNT!;

Check failure on line 27 in lib/resilience-backup-restore-aws-construct/backupstack.ts

View workflow job for this annotation

GitHub Actions / build (18)

Expected indentation of 8 spaces but found 4

Check failure on line 27 in lib/resilience-backup-restore-aws-construct/backupstack.ts

View workflow job for this annotation

GitHub Actions / build (18)

Expected indentation of 8 spaces but found 4
const region = blueprints.utils.valueFromContext(scope, "resilience-backup-restore-aws.primary.region", undefined);

Check failure on line 28 in lib/resilience-backup-restore-aws-construct/backupstack.ts

View workflow job for this annotation

GitHub Actions / build (18)

Expected indentation of 8 spaces but found 4

Check failure on line 28 in lib/resilience-backup-restore-aws-construct/backupstack.ts

View workflow job for this annotation

GitHub Actions / build (18)

Expected indentation of 8 spaces but found 4
const drregion = blueprints.utils.valueFromContext(scope, "resilience-backup-restore-aws.dr.region", undefined);
const kversion = blueprints.utils.valueFromContext(scope, "resilience-backup-restore-aws.kubernetes.version", undefined);
//const drregion = blueprints.utils.valueFromContext(scope, "resilience-backup-restore-aws.dr.region", undefined);

Check failure on line 29 in lib/resilience-backup-restore-aws-construct/backupstack.ts

View workflow job for this annotation

GitHub Actions / build (18)

Expected indentation of 8 spaces but found 4

Check failure on line 29 in lib/resilience-backup-restore-aws-construct/backupstack.ts

View workflow job for this annotation

GitHub Actions / build (18)

Expected indentation of 8 spaces but found 4
//const kversion = blueprints.utils.valueFromContext(scope, "resilience-backup-restore-aws.kubernetes.version", undefined);

Check failure on line 30 in lib/resilience-backup-restore-aws-construct/backupstack.ts

View workflow job for this annotation

GitHub Actions / build (18)

Expected indentation of 8 spaces but found 4

Check failure on line 30 in lib/resilience-backup-restore-aws-construct/backupstack.ts

View workflow job for this annotation

GitHub Actions / build (18)

Expected indentation of 8 spaces but found 4
const efsfsname = blueprints.utils.valueFromContext(scope, "resilience-backup-restore-aws.efs.fsname", "efs-file-system");

Check failure on line 31 in lib/resilience-backup-restore-aws-construct/backupstack.ts

View workflow job for this annotation

GitHub Actions / build (18)

Expected indentation of 8 spaces but found 4

Check failure on line 31 in lib/resilience-backup-restore-aws-construct/backupstack.ts

View workflow job for this annotation

GitHub Actions / build (18)

Expected indentation of 8 spaces but found 4
const efsfstag = 'eks-blueprint/' + efsfsname

Check failure on line 32 in lib/resilience-backup-restore-aws-construct/backupstack.ts

View workflow job for this annotation

GitHub Actions / build (18)

Expected indentation of 8 spaces but found 4

Check failure on line 32 in lib/resilience-backup-restore-aws-construct/backupstack.ts

View workflow job for this annotation

GitHub Actions / build (18)

Missing semicolon

Check failure on line 32 in lib/resilience-backup-restore-aws-construct/backupstack.ts

View workflow job for this annotation

GitHub Actions / build (18)

Expected indentation of 8 spaces but found 4

Check failure on line 32 in lib/resilience-backup-restore-aws-construct/backupstack.ts

View workflow job for this annotation

GitHub Actions / build (18)

Missing semicolon
const vaultname = blueprints.utils.valueFromContext(scope, "resilience-backup-restore-aws.backup.vaultname", "EKSBackupVault");

Check failure on line 33 in lib/resilience-backup-restore-aws-construct/backupstack.ts

View workflow job for this annotation

GitHub Actions / build (18)

Expected indentation of 8 spaces but found 4

Check failure on line 33 in lib/resilience-backup-restore-aws-construct/backupstack.ts

View workflow job for this annotation

GitHub Actions / build (18)

Expected indentation of 8 spaces but found 4
Expand Down
18 changes: 9 additions & 9 deletions lib/resilience-backup-restore-aws-construct/drstack.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import * as cdk from 'aws-cdk-lib';
import { Construct } from 'constructs';
import { NestedStack, Stack, NestedStackProps } from 'aws-cdk-lib';
//import { NestedStack, Stack, NestedStackProps } from 'aws-cdk-lib';
import 'source-map-support/register';
import * as eks from 'aws-cdk-lib/aws-eks';
//import * as eks from 'aws-cdk-lib/aws-eks';
import * as blueprints from '@aws-quickstart/eks-blueprints';
import * as ec2 from 'aws-cdk-lib/aws-ec2';
//import * as ec2 from 'aws-cdk-lib/aws-ec2';
import * as backup from 'aws-cdk-lib/aws-backup';
import { Duration } from 'aws-cdk-lib';
//import { Duration } from 'aws-cdk-lib';
import * as kms from 'aws-cdk-lib/aws-kms';
import * as iam from 'aws-cdk-lib/aws-iam';
import * as events from 'aws-cdk-lib/aws-events';
import * as utils from "@aws-quickstart/eks-blueprints/dist/utils";
import { backupstack,backupStackProps } from './backupstack';
//import * as events from 'aws-cdk-lib/aws-events';
//import * as utils from "@aws-quickstart/eks-blueprints/dist/utils";
import { backupstack } from './backupstack';

/**
* Defines properties for the AMG IAM setup.
Expand All @@ -31,9 +31,9 @@ export class drstack extends cdk.Stack {
const account = process.env.CDK_DEFAULT_ACCOUNT!;
const region = blueprints.utils.valueFromContext(scope, "resilience-backup-restore-aws.primary.region", undefined);
const drregion = blueprints.utils.valueFromContext(scope, "resilience-backup-restore-aws.dr.region", undefined);
const kversion = blueprints.utils.valueFromContext(scope, "resilience-backup-restore-aws.kubernetes.version", undefined);
//const kversion = blueprints.utils.valueFromContext(scope, "resilience-backup-restore-aws.kubernetes.version", undefined);
const efsfsname = blueprints.utils.valueFromContext(scope, "resilience-backup-restore-aws.efs.fsname", "efs-file-system");

Check warning on line 35 in lib/resilience-backup-restore-aws-construct/drstack.ts

View workflow job for this annotation

GitHub Actions / build (18)

'efsfsname' is assigned a value but never used

Check warning on line 35 in lib/resilience-backup-restore-aws-construct/drstack.ts

View workflow job for this annotation

GitHub Actions / build (18)

'efsfsname' is assigned a value but never used
const efsfstag = 'eks-blueprint/' + efsfsname
//const efsfstag = 'eks-blueprint/' + efsfsname
const vaultname = blueprints.utils.valueFromContext(scope, "resilience-backup-restore-aws.backup.vaultname", "EKSBackupVault");
//const keyPolicy = props.keyPolicy;
const primaryKeyArn = props.primaryKeyArn;
Expand Down
10 changes: 5 additions & 5 deletions lib/resilience-backup-restore-aws-construct/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import 'source-map-support/register';
import * as eks from 'aws-cdk-lib/aws-eks';
import * as blueprints from '@aws-quickstart/eks-blueprints';
import * as ec2 from 'aws-cdk-lib/aws-ec2';
import * as backup from 'aws-cdk-lib/aws-backup';
import { Duration } from 'aws-cdk-lib';
//import * as backup from 'aws-cdk-lib/aws-backup';
//import { Duration } from 'aws-cdk-lib';
import * as kms from 'aws-cdk-lib/aws-kms';
import * as iam from 'aws-cdk-lib/aws-iam';
import * as events from 'aws-cdk-lib/aws-events';
import * as utils from "@aws-quickstart/eks-blueprints/dist/utils";
import { drstack, drstackProps } from './drstack';
//import * as events from 'aws-cdk-lib/aws-events';
//import * as utils from "@aws-quickstart/eks-blueprints/dist/utils";
import { drstack } from './drstack';


export default class ResilienceBRAWSConstruct {
Expand Down

0 comments on commit eb9c38d

Please sign in to comment.