Getting started with terraform,

Hi all,

Just getting started with the tool, and trying to deploy a test VM in Azure. However I’m running into errors, many of which do not seem to have very helpful error messages. I’ve managed to work my way through a few myself, but I’m left with the following and I’m stuck, any ideas?

Error: Endpoint was not set!

on <empty> line 0:
(source code not available)

The script is here if anyone needs to review: https://pastebin.com/hKayC5qC

I’m running:
Terraform v0.12.3

  • provider.azurerm v1.31.0
  • provider.azurestack v0.8.0

Cheers

Nothing? no-one? I’m a little concerned about the lack of documentation and support out there for this tool. Googling can be threadbare.

Without seeing your code I will guess that this error is coming from the AzureStack provider config. Since AzureStack runs in the users environment not cloud you need to specify the endpoint for the AzureStack API.

This is set either through the provider block

provider "azurestack" {
  # NOTE: we recommend pinning the version of the Provider which should be used in the Provider block
  arm_endpoint = "https://mystack.mydomain"
}

Or the environment variable ARM_ENDPOINT, you will also need to ensure that you have set the credentials for both AzureStack and the AzureRM provider.

Thanks nic,

Unfortunately I’m using the azurerm provider. I think there is a link to the script in my original post. Annoying to be falling so hard at the first hurdle. I’ll give it another shot when I get a chance and see if anything new comes to mind. Thanks for the suggestion.