sunbeam terraform apply fails behind proxy
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Snap |
New
|
Undecided
|
Unassigned |
Bug Description
I wanted to try the sunbeam setup for the first time, following [1]. It's a virtual machine behind a proxy, environment variables are set like this:
root@sunbeam:~# cat /etc/environment
PATH="/
HTTP_PROXY="http://<IP>:<PORT>"
HTTPS_PROXY="http://<IP>:<PORT>"
http_proxy="http://<IP>:<PORT>"
https_proxy="http://<IP>:<PORT>"
NO_PROXY=
no_proxy=
The initial steps (install openstack snap, prepare-
---snip---
root@sunbeam:~# sudo sunbeam cluster bootstrap --accept-defaults
terraform apply failed:
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
+ create
Terraform will perform the following actions:
# juju_applicatio
+ resource "juju_application" "sunbeam-machine" {
+ constraints = (known after apply)
+ id = (known after apply)
+ model = "controller"
+ name = "sunbeam-machine"
+ placement = (known after apply)
+ principal = (known after apply)
+ trust = false
+ units = 0
+ charm {
+ channel = "latest/edge"
+ name = "sunbeam-machine"
+ revision = (known after apply)
+ series = "jammy"
}
}
Plan: 1 to add, 0 to change, 0 to destroy.
juju_applicatio
juju_applicatio
juju_applicatio
juju_applicatio
Error: resolving with preferred channel: Post "https:/
with juju_applicatio
on main.tf line 29, in resource "juju_application" "sunbeam-machine":
29: resource "juju_application" "sunbeam-machine" {
Error: Command '['/snap/
---snip---
This error usually is related to a direct attempt to reach the URL instead of using the proxy. Is there something else missing to honor the proxy?
I also tried setting all the proxy variables in .local/ share/juju/ bootstrap- config. yaml (with and without "http://" prefix) but to no avail. Do I need to restart anything before that can work? I stopped and started juju (snap stop juju, snap start juju), doesn't make a difference.