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

fix(failure using ipv6 in tests): fix controller addresses resolution #649

Merged
merged 1 commit into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ endif

JUJU=juju
CONTROLLER=$(shell ${JUJU} whoami | yq .Controller)
CONTROLLER_ADDRESSES="$(shell ${JUJU} show-controller | yq '.${CONTROLLER}.details."api-endpoints"' | tr -d "[]' "|tr -d '"'|tr -d '\n')"
CONTROLLER_ADDRESSES="$(shell juju show-controller | yq .${CONTROLLER}.details.api-endpoints | yq -r '. | join(",")')"
USERNAME="$(shell cat ~/.local/share/juju/accounts.yaml | yq '.controllers.${CONTROLLER}.user'|tr -d '"')"
PASSWORD="$(shell cat ~/.local/share/juju/accounts.yaml | yq '.controllers.${CONTROLLER}.password'|tr -d '"')"
CA_CERT="$(shell ${JUJU} show-controller $(echo ${CONTROLLER}|tr -d '"')| yq '.${CONTROLLER}.details."ca-cert"'|tr -d '"'|sed 's/\\n/\n/g')"
Expand Down
6 changes: 3 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Define the Juju controller credentials in the provider definition in your terraf

``` terraform
provider "juju" {
controller_addresses = "10.225.205.241:17070,10.225.205.242:17070"
controller_addresses = "10.225.205.241:17070,10.225.205.242:17070,[fd42:791:fa5e:6834:216:3eff:fe7a:8e6a]:17070"
username = "jujuuser"
password = "password1"
ca_certificate = file("~/ca-cert.pem")
Expand All @@ -62,7 +62,7 @@ Define the client credentials in the provider definition in your terraform plan.

``` terraform
provider "juju" {
controller_addresses = "10.225.205.241:17070,10.225.205.242:17070"
controller_addresses = "10.225.205.241:17070,10.225.205.242:17070,[fd42:791:fa5e:6834:216:3eff:fe7a:8e6a]:17070"
client_id = "jujuclientid"
client_secret = "jujuclientsecret"
ca_certificate = file("~/ca-cert.pem")
Expand All @@ -75,7 +75,7 @@ Define the Juju controller credentials in the provider definition via environmen

```shell
export CONTROLLER=$(juju whoami | yq .Controller)
export JUJU_CONTROLLER_ADDRESSES="$(juju show-controller | yq '.[$CONTROLLER]'.details.\"api-endpoints\" | tr -d "[]' "|tr -d '"'|tr -d '\n')"
export JUJU_CONTROLLER_ADDRESSES=$(juju show-controller | yq .$CONTROLLER.details.api-endpoints | yq -r '. | join(",")')
export JUJU_USERNAME="$(cat ~/.local/share/juju/accounts.yaml | yq .controllers.$CONTROLLER.user|tr -d '"')"
export JUJU_PASSWORD="$(cat ~/.local/share/juju/accounts.yaml | yq .controllers.$CONTROLLER.password|tr -d '"')"
export JUJU_CA_CERT="$(juju show-controller $(echo $CONTROLLER|tr -d '"') | yq '.[$CONTROLLER]'.details.\"ca-cert\"|tr -d '"'|sed 's/\\n/\n/g')"
Expand Down
6 changes: 3 additions & 3 deletions templates/index.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Define the Juju controller credentials in the provider definition in your terraf

``` terraform
provider "juju" {
controller_addresses = "10.225.205.241:17070,10.225.205.242:17070"
controller_addresses = "10.225.205.241:17070,10.225.205.242:17070,[fd42:791:fa5e:6834:216:3eff:fe7a:8e6a]:17070"
username = "jujuuser"
password = "password1"
ca_certificate = file("~/ca-cert.pem")
Expand All @@ -62,7 +62,7 @@ Define the client credentials in the provider definition in your terraform plan.

``` terraform
provider "juju" {
controller_addresses = "10.225.205.241:17070,10.225.205.242:17070"
controller_addresses = "10.225.205.241:17070,10.225.205.242:17070,[fd42:791:fa5e:6834:216:3eff:fe7a:8e6a]:17070"
client_id = "jujuclientid"
client_secret = "jujuclientsecret"
ca_certificate = file("~/ca-cert.pem")
Expand All @@ -75,7 +75,7 @@ Define the Juju controller credentials in the provider definition via environmen

```shell
SimoneDutto marked this conversation as resolved.
Show resolved Hide resolved
export CONTROLLER=$(juju whoami | yq .Controller)
export JUJU_CONTROLLER_ADDRESSES="$(juju show-controller | yq '.[$CONTROLLER]'.details.\"api-endpoints\" | tr -d "[]' "|tr -d '"'|tr -d '\n')"
export JUJU_CONTROLLER_ADDRESSES=$(juju show-controller | yq .$CONTROLLER.details.api-endpoints | yq -r '. | join(",")')
export JUJU_USERNAME="$(cat ~/.local/share/juju/accounts.yaml | yq .controllers.$CONTROLLER.user|tr -d '"')"
export JUJU_PASSWORD="$(cat ~/.local/share/juju/accounts.yaml | yq .controllers.$CONTROLLER.password|tr -d '"')"
export JUJU_CA_CERT="$(juju show-controller $(echo $CONTROLLER|tr -d '"') | yq '.[$CONTROLLER]'.details.\"ca-cert\"|tr -d '"'|sed 's/\\n/\n/g')"
Expand Down
Loading