https://pulumi.com logo
#automation-api
Title
# automation-api
b

brash-solstice-49151

10/10/2023, 1:53 PM
Is there a reason why a stack on my 'personal' organization isn't showing Deploy under Settings? I'm attempting to use Automation API + Pulumi Deployments for remote deployment, but don't seem to be able to configure it ๐Ÿค” I checked in my company org stack, and can see the Deploy option:
Also, I'm attempting to use the REST API to attempt to get the deployment settings, as listed here: https://www.pulumi.com/docs/pulumi-cloud/deployments/api/#get-settings However I keep getting a 404 ๐Ÿ˜• I've triple checked the URL parameters and they are correct
l

lemon-agent-27707

10/10/2023, 3:08 PM
This is a regression, and I'm able to repro it. Sorry about this! We will get it fixed shortly.
b

brash-solstice-49151

10/10/2023, 3:09 PM
Thanks @lemon-agent-27707, I'm assuming this is in relation to my first comment about not seeing the Deploy tab?
l

lemon-agent-27707

10/10/2023, 5:03 PM
@brash-solstice-49151 both of these issues should be resolved now
b

brash-solstice-49151

10/11/2023, 7:54 AM
Hey @lemon-agent-27707 I can confirm that I can now see the Deploy tab from settings in the Pulumi UI which is great! However, still getting a 404 on the REST API ๐Ÿ˜• This is the endpoint I'm trying to hit:
<https://api.pulumi.com/api/preview/{org}/{project}/{stack}/deployment/settings>
And I just get this response
Copy code
{
  "code": 404,
  "message": "Not Found: stack '{project}/{stack}' not found"
}
Obviously with
project
and
stack
populated. Any ideas?
I've just tried to update the deployment settings to use a public GH repo, but getting this (cropped) error ๐Ÿ˜ž
m

microscopic-furniture-52860

10/11/2023, 12:43 PM
I thought we had the Pulumi GH app configured already, but donโ€™t seem to be able to select the repo under the
Settings -> Deployments
tab. Is there anything weโ€™re missing?
l

lemon-agent-27707

10/11/2023, 2:30 PM
@brash-solstice-49151 @microscopic-furniture-52860 Can you both share what you see under the:
Copy code
<https://app.pulumi.com/{}/settings/integrations>
page?
@brash-solstice-49151, what happens if you remove the
/preview/
from your API call?
m

microscopic-furniture-52860

10/11/2023, 2:33 PM
b

brash-solstice-49151

10/11/2023, 2:34 PM
@lemon-agent-27707 I still get a 404 without the
/preview/
path
l

lemon-agent-27707

10/11/2023, 2:40 PM
@microscopic-furniture-52860 that screen would indicate that we don't think github app is installed. Can you clarify what you see when you hit the
install the pulumi github app button
From your previous message, I think you might be trying to hit the wrong URL. Your message has:
Copy code
<https://api.pulumi.com/api/preview/{org}/{project}/{stack}/deployment/settings>
But you need to use:
Copy code
<https://api.pulumi.com/api/stacks/{org}/{project}/{stack}/deployment/settings>
I believe that matches what is in the docs here: https://www.pulumi.com/docs/pulumi-cloud/deployments/api/#get-settings
b

brash-solstice-49151

10/11/2023, 2:48 PM
Ah good spot. Also looks like I was missing an s from deployment*s*. Although, in saying that, I'm still getting a 404 ๐Ÿ˜… This is the URL I'm now using:
Copy code
<https://api.pulumi.com/api/stacks/{org}/{project}/{stack}/deployments/settings>
l

lemon-agent-27707

10/11/2023, 3:02 PM
Are you setting the access token when you're making the call?
b

brash-solstice-49151

10/11/2023, 3:03 PM
I am. I get a 401 without the access token
l

lemon-agent-27707

10/11/2023, 3:04 PM
Copy code
curl '<https://api.pulumi.com/api/stacks/{orgname}/{project}/{stacks}/deployments/settings>' \
  -H 'Authorization: token pul-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
  -H 'Content-Type: application/json' \
  --compressed
Does the stack exist?
b

brash-solstice-49151

10/11/2023, 3:04 PM
It definitely does ๐Ÿ˜„ I've been working against it all day
l

lemon-agent-27707

10/11/2023, 3:08 PM
Can you load up chrome, open the debugger, go to the network tab, navigate to the deployment settings page for the stack, find the request to the settings API and
copy as CURL
and run that? Do you still get a 404?
b

brash-solstice-49151

10/11/2023, 3:13 PM
Interestingly, I get a 404 from the Pulumi UI ๐Ÿ˜•
^ From the console window
Is this to be expected if nothing is configured in the Deploy tab? Which goes back to my earlier comment about not being able to configure it via the portal ๐Ÿ˜–
m

microscopic-furniture-52860

10/11/2023, 3:42 PM
When I hit install I end up at this page which shows weโ€™ve had the app installed a while
l

lemon-agent-27707

10/11/2023, 4:17 PM
@brash-solstice-49151 that API will 404 if you don't have deployment settings configured on a stack. Do you have deployment settings configured on that stack? Once you create deployment settings, this API should no longer 404. But a 404 is expected if your stack has no settings.
@microscopic-furniture-52860 can you try uninstalling and reinstalling the github app?
b

brash-solstice-49151

10/11/2023, 4:21 PM
m

microscopic-furniture-52860

10/11/2023, 4:39 PM
@lemon-agent-27707 Looks like a reinstalled worked:
l

lemon-agent-27707

10/11/2023, 4:51 PM
@brash-solstice-49151 - I pulled some logs and you are getting a 403 because you haven't verified your email. If you do that, you should be good to go. We'll get the error message and UI fixed so that this is more obvious. Sorry for the trouble.
b

brash-solstice-49151

10/12/2023, 8:48 AM
Aha that would do it! All sorted now @lemon-agent-27707 thanks very much for the help ๐Ÿ™‚
3 Views