https://pulumi.com logo
Title
p

purple-train-14007

05/03/2021, 9:39 PM
Alright, after doing a few tests I have made the conclusion that pulumi doesnt seem to have the ability to create ExpressRoutes circuits. I used the documentation and found that it doesnt work even though if done via Bash, Powershell, Python and BICEP it does indeed work. Is there any built in way to debug pulumi itself?
t

tall-librarian-49374

05/03/2021, 9:43 PM
Do you have a link to ARM/Bicep that does what you need?
The
ExpressRouteCircuit
resource does sound to me like it would do it but I guess you ruled it out?
p

purple-train-14007

05/03/2021, 9:47 PM
Yeah thats what I was using to build the circuit
Here is the template.
I ran it through the pulumi arm to pulumi tool as well and noticed the pulumi tool has a problem converting the template. I did that as part of my testing too
t

tall-librarian-49374

05/03/2021, 9:50 PM
Microsoft.Network/expressRouteCircuits
is the same resource as https://www.pulumi.com/docs/reference/pkg/azure-native/network/expressroutecircuit/
p

purple-train-14007

05/03/2021, 9:50 PM
Yeah, I tried that one too
as an example as part of my testing
const expressRoutePortUSA = new azure_native.network.ExpressRoutePort(usCircuitname, {
  bandwidthInGbps: 100,
  encapsulation: "QinQ",
  expressRoutePortName: usCircuitname,
  location: "WestUS",
  peeringLocation: "Seattle",
  resourceGroupName: RG,
});
as well as
const USExpressRouteCircuit = new azure_native.network.ExpressRouteCircuit( usCircuitname, {
  allowClassicOperations: false,
  authorizations: [],
  circuitName: usCircuitname,
  location: "WestUS",
  peerings: [],
  resourceGroupName: RG,
  serviceProviderProperties: {
    bandwidthInMbps: 1000,
    peeringLocation: "Seattle",
    serviceProviderName: "Equinix",
  },
  sku: {
    family: "metered",
    name: "Standard",
    tier: "Standard",
  },
});
This is one error you get from Pulumi.
azure-native:network:ExpressRoutePort (USDomainServicesCircuit):
    error: Code="InvalidResourceType" Message="The resource type could not be found in the namespace 'Microsoft.Network' for api version '2020-08-01'."
t

tall-librarian-49374

05/03/2021, 9:58 PM
Huh, this error is coming from Azure. Try using the same version as your ARM template:
new azure_native.network.v20190201.ExpressRoutePort
p

purple-train-14007

05/03/2021, 9:58 PM
Oh you think it’s a versioning problem?
I’ll try that soon
t

tall-librarian-49374

05/03/2021, 9:59 PM
This is a service error and it says it doesn’t know the version even though the Azure API spec says it should be there
I will report this to Microsoft tomorrow
p

purple-train-14007

05/03/2021, 10:01 PM
Ah ok, thanks a lot Mikhail. I have to wait for my previous circuit to finish provisioning before I make another one but I’ll try what you proposed after that
Well Im getting a new error now but definitely progress. Looks like the issue now is malformed json. Here is the error incase youre interested.
error: Code="InvalidRequestFormat" Message="Cannot parse the request." Details=[{"code":"InvalidJson","message":"Error converting value \"Unlimited\" to type 'Microsoft.WindowsAzure.Networking.Nrp.Frontend.Contract.Csm.Public.ExpressRouteCircuitSkuFamily'. Path 'sku.family', line 1, position 241."},{"code":"InvalidJson","message":"Error converting value \"Premium\" to type 'Microsoft.WindowsAzure.Networking.Nrp.Frontend.Contract.Csm.Public.ExpressRouteCircuitSkuName'. Path 'sku.name', line 1, position 258."}]
t

tall-librarian-49374

05/04/2021, 3:30 PM
Looking at the specs, you may need to use “UnlimitedData” instead of “Unlimited”. And SKU name is something like “Premium_UnlimitedData”. I think you are close 🙂
Do you mind filing an issue for the previous problem of the latest version not working?
p

purple-train-14007

05/04/2021, 3:54 PM
Sure, Is this too much information to put in the issue?
Thats what I was using to debug ^
t

tall-librarian-49374

05/04/2021, 4:00 PM
Just the code snippet and the error message would be enough
p

purple-train-14007

05/04/2021, 4:02 PM
ok
Adding for the thread. Issue link: https://github.com/pulumi/pulumi/issues/6964