Skip to content

Instantly share code, notes, and snippets.

View SamuelBagattin's full-sized avatar
🏠
Personal projects

Samuel Bagattin SamuelBagattin

🏠
Personal projects
View GitHub Profile
// Requesting temporary credentials
identity, err := initStsClient.AssumeRoleWithWebIdentity(
&sts.AssumeRoleWithWebIdentityInput{
RoleArn: aws.String(awsRoleArn),
RoleSessionName: aws.String("my-app"),
WebIdentityToken: aws.String(string(awsWebIdentityToken)),
DurationSeconds: aws.Int64(3600),
})
if err != nil {
panic(err)
2022/04/04 00:00:00 {
"Account": "999999999999",
"Arn": "arn:aws:sts::999999999999:assumed-role/my-pod-role/my-app",
"UserId": "IEHDGSBEHDISKGPCMXNSH:my-app"
}
2022/04/04 00:00:00 {
"Buckets": [
{
"CreationDate": "2022-04-04T00:00:00Z",
"Name": "my-bucket"
---
creation_rules:
- kms: 'arn:aws:kms:REGION:ACCOUNT:key/KEY_ID' # Change to the arn of your KMS CMK
encrypted_regex: '^secureJsonData$'
datasources:
datasources.yaml:
apiVersion: 1
datasources:
- name: GitHub
type: grafana-github-datasource
readOnly: false
secureJsonData:
accessToken: ghp_pl33iuze8hd9bbz55
server:
config:
helm.valuesFileSchemes: >-
secrets
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: grafana
spec:
project: default
source:
repoURL: https://github.com/my-org/my-repo.git
targetRevision: HEAD
helm:
datasources:
datasources.yaml:
apiVersion: 1
datasources:
- name: GitHub
type: grafana-github-datasource
readOnly: false
secureJsonData:
accessToken: ENC[AES256_GCM,data:ZK_/rtGO$539;2oc2w~~OVaMl$05y9686e7n4/l4Ot5Vl:~=ool:3@Vrrico2FCe8^c60ZFpPH68,tag:mpm1"39q&g%!xFV5^#cZ93C8==,type:str]
sops: