Is there a reason why a stack on my 'personal' org...
# automation-api
b
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
This is a regression, and I'm able to repro it. Sorry about this! We will get it fixed shortly.
b
Thanks @lemon-agent-27707, I'm assuming this is in relation to my first comment about not seeing the Deploy tab?
l
@brash-solstice-49151 both of these issues should be resolved now
b
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
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
@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
b
@lemon-agent-27707 I still get a 404 without the
/preview/
path
l
@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
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
Are you setting the access token when you're making the call?
b
I am. I get a 401 without the access token
l
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
It definitely does ๐Ÿ˜„ I've been working against it all day
l
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
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
When I hit install I end up at this page which shows weโ€™ve had the app installed a while
l
@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
m
@lemon-agent-27707 Looks like a reinstalled worked:
l
@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
Aha that would do it! All sorted now @lemon-agent-27707 thanks very much for the help ๐Ÿ™‚