Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run-consul script using non-existent instance metadata API version #38

Open
ausfestivus opened this issue Oct 28, 2019 · 0 comments
Open

Comments

@ausfestivus
Copy link

vaultadmin@vault000000:~$ curl --silent --show-error --header Metadata:true --location 'http://169.254.169.254/metadata/instance?api-version=2017-07-01'
{ "error": "Not found. Invalid version requested" }
vaultadmin@vault000000:~$

https://docs.microsoft.com/en-us/azure/virtual-machines/windows/instance-metadata-service

If you use a correct API version you get data:

vaultadmin@vault000000:~$ curl -H Metadata:true "http://169.254.169.254/metadata/instance?api-version=2017-08-01"
{"compute":{"location":"australiaeast","name":"vault-example_0","offer":"","osType":"Linux","placementGroupId":"6b8407bd-7367-45f9-ab5f-8fa8c0a694de","platformFaultDomain":"0","platformUpdateDomain":"0","publisher":"","resourceGroupName":"terraform-azurerm-vault-dev","sku":"","subscriptionId":"XXXXXXXXXXXXXXXX","tags":"scaleSetName:vault-example","version":"","vmId":"5c4bebd0-1f67-4c47-a006-50affae50bbf","vmSize":"Standard_A0"},"network":{"interface":[{"ipv4":{"ipAddress":[{"privateIpAddress":"10.0.10.11","publicIpAddress":""}],"subnet":[{"address":"10.0.10.0","prefix":"24"}]},"ipv6":{"ipAddress":[]},"macAddress":"000D3AD030AD"}]}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant