I hereby claim:
- I am grantorchard on github.
- I am grantorchard (https://keybase.io/grantorchard) on keybase.
- I have a public key ASDFkZjlwyxcCAegyR-9aR5iu7a-mS-2AESM4U79BPdSOAo
To claim this, I am signing this object:
#!/bin/bash | |
# Login to 1Password. | |
# Assumes you have installed the OP CLI and performed the initial configuration | |
# For more details see https://support.1password.com/command-line-getting-started/ | |
eval $(op signin my) | |
# My setup uses a 1Password type of 'Password' and stores all records within a | |
# single section. The label is the key, and the value is the value. | |
ev=`op get item "Environment Variables"` |
formatVersion: 1 | |
inputs: | |
image: | |
type: string | |
title: Operating System | |
enum: | |
- ubuntu 16.04 | |
- ubuntu 18.04 | |
default: ubuntu 16.04 | |
count: |
formatVersion: 1 | |
inputs: {} | |
resources: | |
RDS_Cluster_1: | |
type: Cloud.Service.AWS.RDS.Cluster | |
dependsOn: | |
- Cloud_Network_1 | |
properties: | |
region: ap-southeast-2 | |
account: SDDC APJ AWS |
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "VisualEditor0", | |
"Effect": "Allow", | |
"Action": "s3:ListBucket", | |
"Resource": "arn:aws:s3:::*" | |
}, | |
{ |
formatVersion: 1 | |
resources: | |
Cloud_Machine_1: | |
type: Cloud.Machine | |
properties: | |
image: 'ubuntu' | |
flavor: 'small' | |
networks: | |
- name: '${resource.Cloud_Network_1.name}' | |
constraints: |
@classmethod | |
def login(self, key, baseurl='https://console-stg.cloud.vmware.com/csp/gateway'): | |
uri = '/am/api/auth/login/accounts/access-keys' | |
headers = {'Content-Type':'application/json'} | |
payload = json.dumps({'key': key}) | |
r = requests.post(f'{baseurl}{uri}', headers = headers, data = payload) | |
auth_header = r.json()['cspAuthToken'] | |
p = r.json() | |
return self(key, auth_header, baseurl) |
I hereby claim:
To claim this, I am signing this object: