Skip to content

Instantly share code, notes, and snippets.

View Rud5G's full-sized avatar
🏡
Working remotely

Rudger Rud5G

🏡
Working remotely
View GitHub Profile
Be as direct and concise as possible. Prefer clarity over politeness. State conclusions plainly.
Before providing detailed, extensive, or action-oriented answers, ask the minimum number of clarifying questions required to avoid producing incorrect or misaligned work.
When information is missing, ask for it. Do not make assumptions unless explicitly instructed to do so.
If recommendations, decisions, alternatives, trade-offs, or meaningful options exist, explicitly present them instead of silently selecting one.
When presenting recommendations, decisions, alternatives, trade-offs, or options, always include:
Pros
Cons
When multiple options are available, present the relevant options and clearly compare them.
Explicitly identify assumptions when assumptions are unavoidable.
Prioritize accuracy over speed. If a critical detail is unclear, clarify first rather than proceeding with a potentially incorrect answer.
/**
* Default deletion override for Service linked role resources
*/
class IamServiceLinkedRoleAspect implements cdk.IAspect {
visit(node: IConstruct): void {
if (node instanceof cdk.CfnResource) {
if (node.cfnResourceType === 'AWS::IAM::ServiceLinkedRole') {
node.applyRemovalPolicy(cdk.RemovalPolicy.RETAIN);
}
}
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowAdminAccess",
"Effect": "Allow",
"Action": "*",
"Resource": "*"
},
{
Parameters:
QSConfigurationType:
Type: String
Description: (Required) QuickSetup Configuration type
Default: ''
OptInRegions:
Type: CommaDelimitedList
Default: ''
Description: Comma-separated list of opt-in regions
LocalAdministrationRoleName:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Service": "cloudformation.amazonaws.com"
},
"Action": "sts:AssumeRole",
"Condition": {
export interface AsffFile {
Findings: Finding[];
}
export interface Finding {
Action: FindingAction;
AwsAccountId: string;
AwsAccountName: string;
CompanyName: string;
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: MIT-0
exports.SUCCESS = "SUCCESS";
exports.FAILED = "FAILED";
exports.send = function(event, context, responseStatus, responseData, physicalResourceId, noEcho) {
return new Promise((resolve, reject) => {
var responseBody = JSON.stringify({
@Rud5G
Rud5G / auto-vpa-creation-policy.yaml
Created December 22, 2024 12:35 — forked from iyalang/auto-vpa-creation-policy.yaml
Kyverno policy for automated creation of Vertical Pod Autoscalers (VPAs)
---
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
name: auto-vpa-creation
annotations:
policies.kyverno.io/title: Add default VPA
policies.kyverno.io/category: Cost Optimization
policies.kyverno.io/subject: Vertical Pod Autoscaler
policies.kyverno.io/description: >-
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>Starter Template</title>
const commonBinaryMimeTypes = new Set([
"application/octet-stream",
// Docs
"application/epub+zip",
"application/msword",
"application/pdf",
"application/rtf",
"application/vnd.amazon.ebook",
"application/vnd.ms-excel",
"application/vnd.ms-powerpoint",