Skip to content

Instantly share code, notes, and snippets.

@jaxxstorm
Last active March 30, 2022 19:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jaxxstorm/2b0ceeafebf875d0fae2b2f74c1b4386 to your computer and use it in GitHub Desktop.
Save jaxxstorm/2b0ceeafebf875d0fae2b2f74c1b4386 to your computer and use it in GitHub Desktop.
Pull from Pulumi API
library(httr)
library(jsonlite)
token = ""
org = ""
project = ""
stack = ""
r <- GET(paste("https://api.pulumi.com/api/stacks/", org, "/", project, "/", stack, "/export"),
add_headers(
"Content-Type"="application/json",
"Accept"="application/vnd.pulumi+8",
"Authorization"=paste("token", token))
)
jsonRespParsed<-content(r,as="parsed")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment