Ubuntu 18.04 AMIs no longer work on aws/rce_web_app (/cloudgoat/scenarios/aws/rce_web_app/terraform/data_sources.tf)
Image filters on 18.04 no longer return images for aws/rce_web_app
Changed it to 20.04 temporarily to get it to work.
filter { name = "name" values = ["ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-*"] }
i did but still having the same error
Error: Your query returned no results. Please change your search criteria and try again. │ │ with data.aws_ami.ubuntu, │ on data_sources.tf line 4, in data "aws_ami" "ubuntu": │ 4: data "aws_ami" "ubuntu" { │ ╵
[cloudgoat] Error while running terraform plan.
exit code: 1
stdout:
stderr:
Error: No value for required variable
on variables.tf line 1: 1: variable "profile" {
The root module input variable "profile" is not set, and has no default value. Use a -var or -var-file command line argument to provide a value for this variable.
Error: No value for required variable
on variables.tf line 12: 12: variable "cgid" {
The root module input variable "cgid" is not set, and has no default value. Use a -var or -var-file command line argument to provide a value for this variable.
Error: No value for required variable
on variables.tf line 17: 17: variable "cg_whitelist" {
The root module input variable "cg_whitelist" is not set, and has no default value. Use a -var or -var-file command line argument to provide a value for this variable.
i did but still having the same error
Error: Your query returned no results. Please change your search criteria and try again. │ │ with data.aws_ami.ubuntu, │ on data_sources.tf line 4, in data "aws_ami" "ubuntu": │ 4: data "aws_ami" "ubuntu" { │ ╵
This means you probably changed a version of the data_sources.tf that is not the one cloudgoat is using. I ran into this issue. I did a pipx install and it installed everything within my ~/.local/pipx/venvs/cloudgoat/lib/python*/site-packages/cloudgoat directory. I had to change the scenario file in that directory to launch the level with the 20.04 Linux AMI
[cloudgoat] Error while running
terraform plan. exit code: 1 stdout: stderr: Error: No value for required variableon variables.tf line 1: 1: variable "profile" {
The root module input variable "profile" is not set, and has no default value. Use a -var or -var-file command line argument to provide a value for this variable.
Error: No value for required variable
on variables.tf line 12: 12: variable "cgid" {
The root module input variable "cgid" is not set, and has no default value. Use a -var or -var-file command line argument to provide a value for this variable.
Error: No value for required variable
on variables.tf line 17: 17: variable "cg_whitelist" {
The root module input variable "cg_whitelist" is not set, and has no default value. Use a -var or -var-file command line argument to provide a value for this variable.
These errors are a result of not having done the cloudgoat config aws and cloudgoat config whitelist commands appropriately. Note that the first one assumes you've already done an aws configure --profile <aws_profile_for_launching_cloud_goat> that is used for the first command.