This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @ts-ignore | |
import * as epsagon from '@epsagon/epsagon' | |
import * as pulumi from '@pulumi/pulumi' | |
import * as aws from '@pulumi/aws' | |
import * as serverless from '@pulumi/aws-serverless' | |
const config = new pulumi.Config('epsagon') | |
const epsToken = config.require('token') | |
const hello = new aws.serverless.Function('hello', { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2019/08/06 16:29:59 [INFO] Terraform version: 0.11.14 | |
2019/08/06 16:29:59 [INFO] Go runtime version: go1.12.5 | |
2019/08/06 16:29:59 [INFO] CLI args: []string{"/usr/local/Cellar/terraform@0.11/0.11.14/bin/terraform", "apply"} | |
2019/08/06 16:29:59 [DEBUG] Attempting to open CLI config file: /Users/thomas.schersach/.terraformrc | |
2019/08/06 16:29:59 Loading CLI configuration from /Users/thomas.schersach/.terraformrc | |
2019/08/06 16:29:59 [INFO] CLI command args: []string{"apply"} | |
2019/08/06 16:29:59 [INFO] command: empty terraform config, returning nil | |
2019/08/06 16:29:59 [DEBUG] command: no data state file found for backend config | |
2019/08/06 16:29:59 [DEBUG] New state was assigned lineage "aeefe1f5-f392-f499-52df-ffe0b22fafc2" | |
2019/08/06 16:29:59 [INFO] command: backend initialized: <nil> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2019/08/06 16:29:59 [INFO] Terraform version: 0.11.14 | |
2019/08/06 16:29:59 [INFO] Go runtime version: go1.12.5 | |
2019/08/06 16:29:59 [INFO] CLI args: []string{"/usr/local/Cellar/terraform@0.11/0.11.14/bin/terraform", "apply"} | |
2019/08/06 16:29:59 [DEBUG] Attempting to open CLI config file: /Users/thomas.schersach/.terraformrc | |
2019/08/06 16:29:59 Loading CLI configuration from /Users/thomas.schersach/.terraformrc | |
2019/08/06 16:29:59 [INFO] CLI command args: []string{"apply"} | |
2019/08/06 16:29:59 [INFO] command: empty terraform config, returning nil | |
2019/08/06 16:29:59 [DEBUG] command: no data state file found for backend config | |
2019/08/06 16:29:59 [DEBUG] New state was assigned lineage "aeefe1f5-f392-f499-52df-ffe0b22fafc2" | |
2019/08/06 16:29:59 [INFO] command: backend initialized: <nil> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2019/09/16 18:45:45 [INFO] Terraform version: 0.12.8 | |
2019/09/16 18:45:45 [INFO] Go runtime version: go1.12.9 | |
2019/09/16 18:45:45 [INFO] CLI args: []string{"/usr/local/Cellar/tfenv/1.0.1/versions/0.12.8/terraform", "plan"} | |
2019/09/16 18:45:45 [DEBUG] Attempting to open CLI config file: /Users/thomas.schersach/.terraformrc | |
2019/09/16 18:45:45 Loading CLI configuration from /Users/thomas.schersach/.terraformrc | |
2019/09/16 18:45:45 [INFO] CLI command args: []string{"plan"} | |
2019/09/16 18:45:45 [TRACE] Meta.Backend: built configuration for "s3" backend with hash value 3623474248 | |
2019/09/16 18:45:45 [TRACE] Preserving existing state lineage "431c9ce8-1a85-bf2e-0d95-326d914b3151" | |
2019/09/16 18:45:45 [TRACE] Preserving existing state lineage "431c9ce8-1a85-bf2e-0d95-326d914b3151" | |
2019/09/16 18:45:45 [TRACE] Meta.Backend: working directory was previously initialized for "s3" backend |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2019/09/16 18:45:45 [INFO] Terraform version: 0.12.8 | |
2019/09/16 18:45:45 [INFO] Go runtime version: go1.12.9 | |
2019/09/16 18:45:45 [INFO] CLI args: []string{"/usr/local/Cellar/tfenv/1.0.1/versions/0.12.8/terraform", "plan"} | |
2019/09/16 18:45:45 [DEBUG] Attempting to open CLI config file: /Users/thomas.schersach/.terraformrc | |
2019/09/16 18:45:45 Loading CLI configuration from /Users/thomas.schersach/.terraformrc | |
2019/09/16 18:45:45 [INFO] CLI command args: []string{"plan"} | |
2019/09/16 18:45:45 [TRACE] Meta.Backend: built configuration for "s3" backend with hash value 3623474248 | |
2019/09/16 18:45:45 [TRACE] Preserving existing state lineage "431c9ce8-1a85-bf2e-0d95-326d914b3151" | |
2019/09/16 18:45:45 [TRACE] Preserving existing state lineage "431c9ce8-1a85-bf2e-0d95-326d914b3151" | |
2019/09/16 18:45:45 [TRACE] Meta.Backend: working directory was previously initialized for "s3" backend |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as request from 'superagent'; | |
import { | |
Observable, | |
from, | |
throwError | |
} from 'rxjs'; | |
import { | |
SuperAgentStatic | |
} from "superagent"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Config<T> = | |
T extends { type: 'sftp' } ? { login: string, password: string } : | |
T extends { type: 'post' } ? { url: string, header: string } : {}; | |
const union: { type: 'post' | 'sftp' } = { type: 'post' } | |
const simple: { type: 'post' } = { type: 'post' } | |
const splitUnion: { type: 'post' } | { type: 'sftp' } = { type: 'post' } | |
type Instance = Config<typeof union> // ==> Instance is {} and not {url: string, header: string} | |
type InstanceOk = Config<typeof simple> // ==> Instance is { url: string, header: string } | |
type InstanceOk2 = Config<typeof splitUnion> // ==> Instance is { url: string, header: string } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Kinesis = require('aws-sdk/clients/kinesis') | |
const cli = new Kinesis({ region: 'eu-west-1' }) | |
cli.getShardIterator({ | |
StartingSequenceNumber: '49595535202406761165676766185764002510013872440053071874', | |
StreamName: 'test', | |
ShardId: 'shardId-000000000000', | |
ShardIteratorType: 'AT_SEQUENCE_NUMBER' | |
}).promise().then(async ({ ShardIterator }) => { | |
const rec = await cli.getRecords({ ShardIterator, Limit: 1 }).promise() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "aws_lambda_function" "lambda" { | |
... | |
publish = true // Publish a new version of the lambda when the code changes | |
} | |
resource "aws_lambda_alias" "lambda-alias" { | |
name = "latest" | |
description = "alias pointing to the latest published version of the lambda" | |
function_name = aws_lambda_function.lambda.function_name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "aws_lambda_alias" "lambda-alias" { | |
name = "latest" | |
description = "alias pointing to the latest published version of the lambda" | |
function_name = aws_lambda_function.lambda.function_name | |
function_version = aws_lambda_function.lambda.version | |
} | |
resource "aws_appautoscaling_target" "scale-warmer-target" { | |
max_capacity = 1 | |
min_capacity = 0 |
OlderNewer