Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add CLI support for Google Cloud integration #312

Merged
merged 4 commits into from
Aug 9, 2024
Merged

add CLI support for Google Cloud integration #312

merged 4 commits into from
Aug 9, 2024

Conversation

taimoorgit
Copy link
Contributor

@taimoorgit taimoorgit commented Aug 8, 2024

Issues

OpsLevel/opslevel-go#450

Relies on OpsLevel/opslevel-go#450

Changelog

  • Update create/delete integrations command to support googleCloud
  • Make a changie entry

Tophatting (ensure internal schema is enabled before trying)

Creation:

$ cat gcp_create.yaml
version: 1
kind: googleCloud
spec:
  name: "GCP New"
  ownershipTagKeys:
    - owner
    - team
  privateKey: "XXX_PRIVATE_KEY_XXX"
  clientEmail: "[email protected]"
  tagsOverrideOwnership: false
$ go run main.go create integration -f gcp_create.yaml
Created googleCloud integration 'GCP New' with id 'Z2lkOi8vb3BzbGV2ZWwvSW50ZWdyYXRpb25zOjpHb29nbGVDbG91ZEludGVncmF0aW9uLzQ'

Update:

$ cat gcp_update.yaml
version: 1
kind: googleCloud
spec:
  name: "GCP Updated"
  ownershipTagKeys:
    - opslevel_team
    - team
  privateKey: "XXX_NEW_PRIVATE_KEY_XXX"
$ go run main.go update integration Z2lkOi8vb3BzbGV2ZWwvSW50ZWdyYXRpb25zOjpHb29nbGVDbG91ZEludGVncmF0aW9uLzQ -f gcp_update.yaml
Updated googleCloud integration 'GCP Updated' with id 'Z2lkOi8vb3BzbGV2ZWwvSW50ZWdyYXRpb25zOjpHb29nbGVDbG91ZEludGVncmF0aW9uLzQ'

Listing:

$ go run main.go list integration
NAME            TYPE         ALIAS                    ID
SCIM            scim         scim-scim                Z2lkOi8vb3BzbGV2ZWwvSW50ZWdyYXRpb25zOjpTY2ltSW50ZWdyYXRpb24vMQ
Generic Deploy  deploy       deploy-generic-deploy    Z2lkOi8vb3BzbGV2ZWwvSW50ZWdyYXRpb25zOjpFdmVudHM6OkRlcGxveUludGVncmF0aW9uLzI
Paul SA 1       googleCloud  googlecloud-paul-sa-1    Z2lkOi8vb3BzbGV2ZWwvSW50ZWdyYXRpb25zOjpHb29nbGVDbG91ZEludGVncmF0aW9uLzM
GCP Updated     googleCloud  googlecloud-gcp-updated  Z2lkOi8vb3BzbGV2ZWwvSW50ZWdyYXRpb25zOjpHb29nbGVDbG91ZEludGVncmF0aW9uLzQ

(Integration deletion is not supported in the CLI.)

@taimoorgit taimoorgit self-assigned this Aug 8, 2024
Copy link
Contributor

@davidbloss davidbloss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🎉

@taimoorgit taimoorgit merged commit 2b1e239 into main Aug 9, 2024
4 checks passed
@taimoorgit taimoorgit deleted the ta/gcp-1 branch August 9, 2024 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants