Can't get "make example" work #1457
Closed
securitymonster
started this conversation in
General
Replies: 1 comment 1 reply
-
Hi @securitymonster 👋🏼 Apologies, that section of the readme is outdated. For the current code you'd need to have this in
Please check in the docs how to configure ssh user and API token Let me know if you need any help with that. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I must be missing something. I'm following the instructions to run "make example". I have created the example/terraform.tfvars file as per the instructions.
If I run make example I get prompted to enter the API token:
`╷
│ Warning: Provider development overrides are in effect
│
│ The following provider development overrides are set in the CLI configuration:
│ - bpg/proxmox in ../build
│
│ Skip terraform init when using provider development overrides. It is not necessary and may error unexpectedly.
╵
Terraform has been successfully initialized!
You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.
If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.
export TF_CLI_CONFIG_FILE="/home/user01/tf-het/test/terraform-provider-proxmox/example.tfrc"
&& export TF_DISABLE_CHECKPOINT="true"
&& export TF_PLUGIN_CACHE_DIR="/home/user01/tf-het/test/terraform-provider-proxmox/cache/plugins"
&& cd ./example
&& terraform apply -auto-approve
╷
│ Warning: Provider development overrides are in effect
│
│ The following provider development overrides are set in the CLI configuration:
│ - bpg/proxmox in ../build
│
│ The behavior may therefore not match any released version of the provider and applying changes may cause the state to
│ become incompatible with published releases.
╵
var.virtual_environment_api_token
The API token for the Proxmox Virtual Environment API
Enter a value:
var.virtual_environment_ssh_username
The username for the Proxmox Virtual Environment API
`
The instructions don't mention these values. If I do not enter anything it will fail. I created an API token and connected it to the root user (who is admin group). But it outputs the plan, which looks ok, then this:
Warning: Value for undeclared variable │ │ The root module does not declare a variable named "virtual_environment_username" but a value was found in file │ "terraform.tfvars". If you meant to use this value, add a "variable" block to the configuration. │ │ To silence these warnings, use TF_VAR_... environment variables to provide certain "global" settings to all configurations │ in your organization. To reduce the verbosity of these warnings, use the -compact-warnings option. ╵ ╷ │ Warning: Value for undeclared variable │ │ The root module does not declare a variable named "virtual_environment_password" but a value was found in file │ "terraform.tfvars". If you meant to use this value, add a "variable" block to the configuration. │ │ To silence these warnings, use TF_VAR_... environment variables to provide certain "global" settings to all configurations │ in your organization. To reduce the verbosity of these warnings, use the -compact-warnings option. ╵ ╷ │ Error: Invalid Attribute Value Match │ │ with provider["registry.terraform.io/bpg/proxmox"], │ on main.tf line 3, in provider "proxmox": │ 3: api_token = var.virtual_environment_api_token │ │ Attribute api_token must be a valid API token, e.g. 'USER@REALM!TOKENID=UUID', got: asdfasdf ╵ ╷ │ Error: invalid value for api_token (Must be a valid API token, e.g. 'USER@REALM!TOKENID=UUID') │ │ with provider["registry.terraform.io/bpg/proxmox"], │ on main.tf line 3, in provider "proxmox": │ 3: api_token = var.virtual_environment_api_token │ ╵ make: *** [Makefile:46: example-apply] Error 1
What am I missing?
Beta Was this translation helpful? Give feedback.
All reactions