akamai / cli-terraform

Akamai CLI plugin Admin Support for multiple OpenAPI resource types

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DXE-2935 Akamai Terraform install Proxy windows

rahul8172q opened this issue · comments

Hi,

i am a novice and started to learm terrafrom on Akamai. I am on windows and when i am running “akamai terraform install” on my Windows, i am getting Proxy error. I can’t install any app or software as its restricted.

Appreciate any help.

commented

Hi @rahul8172q, thank you for opening the issue.

In order for us to help, we have to reproduce the issue on our side. Could please provide some more information, like terraform version, windows version you're using and most importantly, the output of an error you're encountering.

In order to run akamai terraform install you have to install Akamai CLI tool: https://github.com/akamai/cli. After that, you can use above command to install terraform module (cli-terraform). Cli-terraform is used to maintain existing Akamai infrastructure, while with akamai-terraform-provider: you can create it. Please refer to the documentation available at: https://techdocs.akamai.com/terraform/docs for configuration setup before using the provider.

With regards,
Dawid

Sure Dawid. Jut giving you some background as well, am trying to run a code for Akamai https://techdocs.akamai.com/terraform/docs/ras-ds-rule-upgrade-details

Terraform version:
Terraform v0.15.4
on windows_amd64
Windows Version:
Windows 10 Enterprise , 22H2

image

Any help here?

commented

We cannot reproduce this issue. What are you using to configure the proxy and how do you do it? Any additional information might be helpful, as currently it is impossible to determine the cause of the problem

With regards,
Dawid

I am on my corporate system. We have proxy in env and i ran set http proxy commands on my cli to set the proxies. Also, whatever i run , i get the error. Do you have any help on how do i troubleshoot this.

commented

The problem seems to exist in akamai-cli, rather than cli-terraform. May I ask you to use below command to gather logs that may help us with this issue:
AKAMAI_LOG=debug akamai install terraform
Please provide the output from this command.

For the proxy settings, have you used --proxy flag for setting it?

We will try to reproduce the issue on our side and come back with any findings.

Below is the output. i tried --proxy and proxy address but stil the same.Not sure, if the syntax is correct.

C:\Users\xxxx\Downloads\cli-master\cli-master>AKAMAI_LOG=debug akamai install terraform
'AKAMAI_LOG' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\xxxxx\Downloads\cli-master\cli-master>akamai install terraform AKAMAI_LOG=debug
Attempting to fetch command from https://github.com/akamai/cli-terraform.git... [FAIL]
ERROR[0021] Unable To Clone Repository: Get "Https://Github.Com/Akamai/Cli-Terraform.Git/Info/Refs?Service=Git-Upload-Pack": Dial Tcp 140.82.113.4:443: Connectex: A Connection Attempt Failed Because The Connected Party Did Not Properly Respond After A Period Of Time, Or Established Connection Failed Because Connected Host Has Failed To Respond. command=install
ERROR[0021] INSTALL ERROR: Unable to clone repository: Get "https://github.com/akamai/cli-terraform.git/info/refs?service=git-upload-pack": dial tcp 140.82.113.4:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. command=install
Unable to clone repository: Get "https://github.com/akamai/cli-terraform.git/info/refs?service=git-upload-pack": dial tcp 140.82.113.4:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.`

commented

Thank you for providing more information. We will try to reproduce the issue and come back with our findings.

With regards,
Dawid

commented

Could you please also provide all the commands you have executed before akamai install terraform? What variables are you setting (names, values)? What exactly have you set when using --proxy flag? Feel free to strip any data you consider sensitive.

With regards,
Dawid

Well i installed terraform. Installed Akamai CLI. C:\Users\xxxxx>akamai install terraform --proxy value http://xx.xx.xxx:8000 Attempting to fetch command from https://github.com/akamai/cli-terraform.git... [WARN] Package directory already exists (C:\Users\xxxxx\.akamai-cli\src\cli-terraform). To reinstall this package, first run 'akamai uninstall' command.

I need to run this https://techdocs.akamai.com/terraform/docs/ras-ds-rule-upgrade-details

Please uninstall existing terraform module using

akamai uninstall terraform

and then install using

akamai --proxy http://a.b.c.d:xxx install terraform

Please remember about filling valid IP and port for the proxy server.

C:\Users\xxxxxx>akamai uninstall

C:\Users\xxxxx>akamai -proxy http://xxx.xxx.xxxx:8000 install terraform
Attempting to fetch command from https://github.com/akamai/cli-terraform.git... [WARN]
Package directory already exists (C:\Users\xxxxx.akamai-cli\src\cli-terraform). To reinstall this package, first run 'akamai uninstall' command.

C:\Users\xxxxx>akamai uninstall terraform
ERROR[0000] command "terraform" not found. Try "akamai.exe help" command=uninstall
ERROR[0000] UNINSTALL ERROR: command "terraform" not found. Try "akamai.exe help" command=uninstall
←[31mcommand "terraform" not found. Try "akamai.exe help"←[0m`

Please run

akamai uninstall terraform
akamai --proxy http://http.proxy.fmr.com:8000 install terraform

C:\Users\xxxx>akamai uninstall terraform
ERROR[0000] command "terraform" not found. Try "akamai.exe help" command=uninstall
ERROR[0000] UNINSTALL ERROR: command "terraform" not found. Try "akamai.exe help" command=uninstall
←[31mcommand "terraform" not found. Try "akamai.exe help"←[0m

C:\Users\xxxxx>akamai --proxy http://xxx.xxx.xxxx:xxx install terraform Attempting to fetch command from https://github.com/akamai/cli-terraform.git... [WARN] Package directory already exists (C:\Users\xxxx\.akamai-cli\src\cli-terraform). To reinstall this package, first run 'akamai uninstall' command.

There seems to be a bug within akamai uninstall command. We will investigate it and come up with a solution for it, if possible.

In the meantime, to workaround this issue, I would suggest manually removing \cli-terraform directory with all its contents from $HOME\.akamai-cli\src\ directory, where $HOME is your home path. Then you can install the terraform module again, using akamai install terraform. If you want to use proxy flag, run: akamai --proxy <proxy_address:port> install terraform, where proxy_address is the address of the proxy and port is a port number of the proxy.

We don't have information what proxy you are using and what authentication methods it is using. Since this might be sensitive information I cannot ask for such data. From the error output you provided at the beginning, about Proxy Authentication Required - it suggest problem with proxy itself rather than Akamai CLI.

There are also other ways of installing cli-terraform. You can:

  • download the binary for your system (latest release 1.8.0)
  • clone the repository and compile it from source

For more information please refer to README.md