How to use the @aws-cdk/cfnspec.resourceSpecification function in @aws-cdk/cfnspec

To help you get started, we’ve selected a few @aws-cdk/cfnspec examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github aws / aws-cdk / packages / @aws-cdk / cloudformation-diff / lib / diff / types.ts View on Github external
if (resourceChange.resourceTypeChanged) {
        // Treat as DELETE+ADD
        if (scrutinizableTypes.has(resourceChange.oldResourceType!)) {
          ret.push({
            ...commonProps,
            newProperties: undefined,
            resourceType: resourceChange.oldResourceType!,
            scrutinyType: cfnspec.resourceSpecification(resourceChange.oldResourceType!).ScrutinyType!,
          });
        }
        if (scrutinizableTypes.has(resourceChange.newResourceType!)) {
          ret.push({
            ...commonProps,
            oldProperties: undefined,
            resourceType: resourceChange.newResourceType!,
            scrutinyType: cfnspec.resourceSpecification(resourceChange.newResourceType!).ScrutinyType!,
          });
        }
      } else {
        if (scrutinizableTypes.has(resourceChange.resourceType)) {
          ret.push({
            ...commonProps,
            resourceType: resourceChange.resourceType,
            scrutinyType: cfnspec.resourceSpecification(resourceChange.resourceType).ScrutinyType!,
          });
        }
      }
    }

    return ret;
  }
}
github aws / aws-cdk / packages / @aws-cdk / cloudformation-diff / lib / diff / types.ts View on Github external
});
        }
        if (scrutinizableTypes.has(resourceChange.newResourceType!)) {
          ret.push({
            ...commonProps,
            oldProperties: undefined,
            resourceType: resourceChange.newResourceType!,
            scrutinyType: cfnspec.resourceSpecification(resourceChange.newResourceType!).ScrutinyType!,
          });
        }
      } else {
        if (scrutinizableTypes.has(resourceChange.resourceType)) {
          ret.push({
            ...commonProps,
            resourceType: resourceChange.resourceType,
            scrutinyType: cfnspec.resourceSpecification(resourceChange.resourceType).ScrutinyType!,
          });
        }
      }
    }

    return ret;
  }
}