Json dependsOn ignored - json

Hi I have this code which deploys some vm's and a vpn solution, however it deploys the "vmRdsDeployment" before the vnet is deployed. I've tried several different variations of dependsOn but nothing seems to work
The error is:
New-AzureRmResourceGroupDeployment : 18:38:57 - Resource Microsoft.Network/loadBalancers 'ilb-m21-m21-m21-vpn-rds' failed with message '{
"error": {
"code": "InvalidResourceReference",
"message": "Resource /subscriptions/0309443f-e9d3-4974-9a9a-08a476b6ae2e/resourceGroups/RG-VPN-TEST/providers/Microsoft.Network/virtualNetworks/VNET-M21-M21-M21-VPN
referenced by resource /subscriptions/0309443f-e9d3-4974-9a9a-08a476b6ae2e/resourceGroups/rg-vpn-test/providers/Microsoft.Network/loadBalancers/ilb-m21-m21-m21-vpn-rds
was not found. Please make sure that the referenced resource exists, and that both resources are in the same region.",
"details": [
{
"code": "NotFound",
"message": "Resource
/subscriptions/0309443f-e9d3-4974-9a9a-08a476b6ae2e/resourceGroups/RG-VPN-TEST/providers/Microsoft.Network/virtualNetworks/VNET-M21-M21-M21-VPN not found."
}
]
Template: https://pastebin.com/rKRP5htc

In this case the error seems to be due to vnet being conditioned to not deploy with "condition": false, after changing to true everything worked as expected.

Related

Google Cloud Platform can't add URI that ends with .web.app to Oauth Client ID

I have an existing client-id (Web) with some working UIDs, I added a time ago. I now wanted to add one more and when I press the save button it just does not work (ProgressIndicator is spinning infinitely). I have a working internet connection and tried with several browsers (Safari,Chrome).
Has anyone seen this?
Edit:
I just tried again with it. I got this error in the web console:
{
"error": {
"code": 400,
"message": "The request failed because one of the field of the resource is invalid.",
"status": "INVALID_ARGUMENT",
"details": [
{
"#type": "type.googleapis.com/google.rpc.PreconditionFailure",
"violations": [
{
"type": "client_auth_config",
"subject": "?error_code=9&error_field_name=pending_domains&error_field_value=test-page.web.app"
}
]
}
]
}
}
When I added a domain that ended in .firebaseapp.com, everything worked. Since the domain I want to use ends in .web.app, I have a problem with this though.

Adding requests on aws-api-gateway to aws-sqs through an integration, failures even though "version" is specified

I've an AWS Api-Gateway resource that I tried configuring to add a message to AWS-SQS, however when I try sending a request to the api I get a response:
{
"Error": {
"Code": "MissingParameter",
"Message": "Version is missing.",
"Type": "Sender"
},
"RequestId": "the-multicharacter-request-id-blah-blah"
}
I have linked the two services in the integration taband the permissions policy is the below:
{
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"sqs:*"
],
"Effect": "Allow",
"Resource": "*"
}
]
}
I've tried adding in api-gateway permissions to the policy, adding a Version parameter in the header, starting the setup from scratch again.
Is there something I'm missing?
'Version' here specifies which version of 'SQS' service to use and should be specified as a query parameter and not the header e.g.:
?Version='2019-05-09'
'Version' specified in the policy refers to the version of the policy language.
This was a case of RTFM.
I ran into this due to a different root cause: make sure the "Action Type" is set to "Use path override" if you don't intent to use "action override"

Microsoft Custom Vision API: 404, Resource not found

I am trying to use Microsoft's Custom Vision API, but am running into nothing but 404 errors. How can I use the API?
I have tried copying and pasting and modifying the prediction sections of the Python and Javascript samples, such as the one found here: https://github.com/Azure-Samples/cognitive-services-node-sdk-samples/blob/master/Samples/customvision/customVisionImgClassify.js
Copying and pasting the prediction URL into my browser from the Perfomance page of Custom Vision, which is:
https://japaneast.api.cognitive.microsoft.com/customvision/v3.0/Prediction/999999999999999/classify/iterations/Iteration4/image
, yields the same 404 error:
{ "error":{ "statusCode": 404, "message": "Resource not found" }}
The closest I have gotten to successfully accessing the API is through an Azure Logic App, which uses an old version of Custom Vision:
/customvision/v1.0/Prediction/99999999999999999/image
This access method yields an "Unauthorized" error instead of a 404.
I tried modifying the JSON in the Azure Logic App to use the newer version of Custom Vision but am back to getting 404 errors. See below for the JSON (I replaced the keys and IDs with 9s):
"Predict_tags_from_image": {
"inputs": {
"body": "#triggerBody()",
"headers": {
"Content-Type": "application/octet-stream",
"Prediction-Key": "9999999999999"
},
"host": {
"connection": {
"name": "#parameters('$connections')['cognitiveservicescustomvision_1']['connectionId']"
}
},
"method": "post",
"path": "https://japaneast.api.cognitive.microsoft.com/customvision/v3.0/Prediction/9999999999999/classify/iterations/Iteration4/image"
},
"runAfter": {
"Create_file": [
"Succeeded"
]
},
"type": "ApiConnection"
}
Thank you in advance for any help with this!
I tried creating a request with the url you provided and couldn't reproduce the 404 issue. It's showing 401, as I do not have your project id or prediction key. But when I try with my own project and prediction key, everything works and it's returning 200 OK.
Could you please confirm the prediction url and prediction key header and try again?

FeathersJs authenticate returning NotAuthenticated: Invalid login

I am following the official guide of feathers js authenticate https://docs.feathersjs.com/guides/chat/authentication.html but it seems like even after following the guide step by step I am unable to generate tokens. Here is the body of my request to http://localhost:3030/authentication
{
"strategy": "local",
"email": "abc#foo.com",
"password": "12345678"
}
and here is the response I got
{
"name": "NotAuthenticated",
"message": "Invalid login",
"code": 401,
"className": "not-authenticated",
"data": {
"message": "Invalid login"
},
"errors": {}
}
I am using Sequilize with MySQL and I have tested my services using postman and they all are working fine (get/post data from the database)
I figured it out. It was not working because the verify method in authentication-local was verifying the password assuming that the password was hashed using their hashing utility method.
Starting the server with debug mode on have helped to figure out this issue

Can't create image from tar.gz file in bucket

I'm trying to create a custom image using Console or gcloud, i.e. (Note: URLs are masked with [naURL] to get around URL posting limitation.):
$ gcloud compute images create debian-9-1-v20170810-1 --source-uri=https:[naURL]//storage.googleapis.com/[my bucket]/compressed-image.tar.gz
The command runs for about half an hour (i.e. 1800s) and then gives the following error:
ERROR: (gcloud.compute.images.create) Could not fetch resource:
- Did not create the following resources within 1800s: https:[naURL]//www.googleapis.com/compute/v1/projects/spherical-proxy-175708/global/images/debian-9-1-v20170810-1. These operations may still be underway remotely and may still succeed; use gcloud list and describe commands or https:[naURL]//console.developers.google.com/ to check resource state
The corresponding REST record accessible via Console>Compute Engine>Operations for the item reads:
{
"kind": "compute#operation",
"id": "5371669110648613089",
"name": "operation-1502320142020-5565a2a676da1-06d76920-4c86568d",
"operationType": "insert",
"targetLink": "https:[naURL]//www.googleapis.com/compute/v1/projects/spherical-proxy-175708/global/images/debian-9-1-v20170810-1",
"targetId": "3098231522309056737",
"status": "DONE",
"user": "andree.leidenfrost#gmail.com",
"progress": 100,
"insertTime": "2017-08-09T16:09:02.501-07:00",
"startTime": "2017-08-09T16:09:03.136-07:00",
"endTime": "2017-08-09T16:59:29.128-07:00",
"error": {
"errors": [
{
"code": "INTERNAL_ERROR",
"message": "Code: '8625676013601614622'"
}
]
},
"httpErrorStatusCode": 503,
"httpErrorMessage": "SERVICE UNAVAILABLE",
"selfLink": "https:[naURL]//www.googleapis.com/compute/v1/projects/spherical-proxy-175708/global/operations/operation-1502320142020-5565a2a676da1-06d76920-4c86568d"
}
Because the HTTP error is 503 "SERVICE UNAVAILABLE" I've tried a few times over the last couple of days but the problem persists.
I'm trying to follow the instructions in document Importing Boot Disk Images to Compute Engine.
Any help or hints how to debug further would be greatly appreciated!