0
HI我嘗試以下terraform代碼運行terraform遠程執行不會找到AWS命令
provisioner "remote-exec" {
inline = [
"cd /home/ec2-user",
"curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py",
"sudo python get-pip.py",
"pip install --upgrade --user awscli",
"echo mokul",
"aws --version",
"echo mymsp",
"eval $(aws ecr get-login --no-include-email --region us-east-1)"
]
}
terraform可以安裝PIP和AWS,但無法找到AWS命令 成功安裝PyYAML 3.12 awscli-1.11.107 botocore-1.5.70 colorama-0.3.7 docutils-0.13.1 futures-3.1.1 jmespath-0.9.3 pyasn1-0.2.3 python-dateutil-2.6.0 rsa-3.4.2 s3transfer-0.1.10 six-1.10 .0
/tmp/terraform_760494262.sh: line 6: aws: command not found