Skip to content

Instantly share code, notes, and snippets.

@stormcat24
stormcat24 / irsa.go
Last active June 8, 2023 15:06
How to build a configuration to enable IAM roles for service accounts (IRSA)
import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/credentials"
"github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds"
"github.com/aws/aws-sdk-go/aws/credentials/stscreds"
"github.com/aws/aws-sdk-go/aws/ec2metadata"
"github.com/aws/aws-sdk-go/aws/session"
)
func buildConfig() {
@colbyfayock
colbyfayock / github-context.json
Created May 31, 2020 18:05
Sample payload for Github Action `github` context
{
"token": "[token]",
"job": "notifySlack",
"ref": "refs/pull/4/merge",
"sha": "[shad]",
"repository": "colbyfayock/demo-github-actions",
"repository_owner": "colbyfayock",
"repositoryUrl": "git://github.com/colbyfayock/demo-github-actions.git",
"run_id": 120667610,
"run_number": "2",