nice-guitar-97142
03/05/2021, 2:47 PM@pulimi/azure
to @pulumi/auzre-nextgen
somewhere? I am trying to figure out how to get something similar to the @pulumi/azure/storage/account.primaryConnectionString
while using the @pulumi/azure-nexgen
providerworried-knife-31967
03/05/2021, 4:16 PMlittle-orange-65618
03/05/2021, 6:26 PMworried-knife-31967
03/06/2021, 6:42 PMnumerous-artist-1705
03/07/2021, 9:14 AMpowerful-football-81694
03/07/2021, 10:58 PMreturn new DeploymentArgs()
{
DeploymentName = "hostname-binding-template",
ResourceGroupName = resourceGroupName,
Location = location,
Properties = new DeploymentPropertiesArgs()
{
Mode = DeploymentMode.Incremental,
Parameters = new
{
webAppName = webAppName,
hostname = hostname,
sslState = sslState.ToString(),
thumbprint = thumbprint
},
Template = templateJson
}
};
This gets us an exception when running pulumi up
:
System.InvalidOperationException: <>f__AnonymousType0`4[[Pulumi.Input`1[[System.String, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], Pulumi, Version=2.21.2.0, Culture=neutral, PublicKeyToken=null],[Pulumi.Input`1[[System.String, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], Pulumi, Version=2.21.2.0, Culture=neutral, PublicKeyToken=null],[System.String, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[Pulumi.Input`1[[System.String, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], Pulumi, Version=2.21.2.0, Culture=neutral, PublicKeyToken=null]] is not a supported argument type.
So I checked the XML docs for the Parameters
property, which say:
// Summary:
// Name and value pairs that define the deployment parameters for the template.
// You use this element when you want to provide the parameter values directly in
// the request rather than link to an existing parameter file. Use either the parametersLink
// property or the parameters property, but not both. It can be a JObject or a well
// formed JSON string.
[Input("parameters", false, false)]
public Input<object>? Parameters { get; set; }
So I tried a JSON string instead, but then we get a different error:
error: azure-native:resources:Deployment resource 'hostname-binding-template' has a problem: 'properties.parameters' should be of type '' but got a string
Can someone tell me how I should pass the parameters now? With the old provider, the anonymous object approach worked fine.
The C# examples here don’t give any hint - they are even incorrect C# syntax (value for the Parameters
property is just missing from the code snippet:
https://www.pulumi.com/docs/reference/pkg/azure-native/resources/deployment/few-coat-22129
03/08/2021, 1:59 AM// SQLDB FIREWALL EXCEPTIONS
Output<List<FirewallRule>>? list = app.OutboundIpAddresses.Apply(
ips => ips.Split(",").Select(
ip => new FirewallRule($"{ip}", new FirewallRuleArgs
{
FirewallRuleName = SQLSVRFIREWALLRULENAME,
ResourceGroupName = resourceGroup.Name,
ServerName = DBSERVERNAME,
StartIpAddress = "0.0.0.0",
EndIpAddress = "0.0.0.0"
})
).ToList());
It sort of works but i think it's adding in more rules than what I need due to the select statement.
So my questions is:
Am I going about this the right way?
If so , how do I add a single Firewall Rule to implement System assigned MI?full-winter-70537
03/08/2021, 7:32 AMregistered twice (read and read)
. Does anyone know how to fix this?
Example code:
var stackNames = new List<string> { "stack1", "stack2" };
var backendPools = stackNames.Select(stack =>
{
var stackRef = new StackReference($"{stack}ref", new StackReferenceArgs { Name = $"company/project/{stack}" });
var output1 = stackRef.RequireOutput("output1").Apply(_ => _.ToString());
var output2 = stackRef.RequireOutput("output2").Apply(_ => _.ToString());
return GetBackendPoolArgs(..);
});
full-winter-70537
03/08/2021, 10:26 AMglobal
, you can't set any other region such as westus
in the examples
• Unlike the examples, you can't reference the rules engine unless it already exists. Leave it empty and new up a separate one, using the name of the front door you're creating + make the RulesEngine DependsOn
the Frontdoor
Some requests:
• Please get rid of all the circular referencing, this is very painful. I'm having to use convention-based names and I'd prefer to just use stack references.
• I'd like the ability to new up the RuleEngine(s) when creating a front door, as it is technically a child resource
• ^ Ditto for backends
• Also inside ForwardingConfigurationArgs
, why have a property that can only accept one value but make us set it? The comment on the odata
property reads "Expected value is '#Microsoft.Azure.FrontDoor.Models.FrontdoorForwardingConfiguration'.". Please either make it private or readonly.nice-guitar-97142
03/08/2021, 1:35 PMazure-native
using the StringAsset
and get the following exception : Error: Invalid asset encountered when unmarshaling resource property
nice-guitar-97142
03/08/2021, 1:37 PMcontentType
property? does a StringAsset
have to be an octet stream?worried-knife-31967
03/08/2021, 5:34 PMworried-knife-31967
03/08/2021, 7:35 PMOutput.Create(new Dictionary<string, ApiManagementService>() { { "uksouth", apim }}.ToImmutableDictionary());
worried-knife-31967
03/08/2021, 7:37 PMworried-knife-31967
03/08/2021, 8:45 PMbroad-dog-22463
03/08/2021, 9:10 PMworried-knife-31967
03/08/2021, 10:01 PMprotected readonly ImmutableDictionary<string, object>.Builder OutputBuilder = ImmutableDictionary.CreateBuilder<string, object>();
OutputBuilder.Add(location, Output.Create(ImmutableDictionary.CreateBuilder<string, object>()
.Append(new KeyValuePair<string, object>("GatewayUrl", apim.GatewayUrl))
.Append(new KeyValuePair<string, object>("ResourceGroup", resourceGroup.Name))
.Append(new KeyValuePair<string, object>("ServiceName", apim.Name))
.ToImmutableDictionary()));
then to consume it...
public static class OutputExtensions
{
public static Output<string> RequireSubDictionaryOutput(this StackReference stackReference, string outputName, string mainKey, string subKey)
{
return stackReference.RequireOutput(outputName).Apply<string>(_ => {
var mainArray = (ImmutableDictionary<string, object>)((ImmutableDictionary<string, object>)_)[mainKey];
return mainArray[subKey]?.ToString() ?? "";
});
}
}
Then used:
var apimResourceGroup = sharedStack.RequireSubDictionaryOutput("Gateways", location, "ResourceGroup");
var apimServiceName = sharedStack.RequireSubDictionaryOutput("Gateways", location, "ServiceName");
Like I said... very hacky...
The usecase is that the "shared" stack outputs multiple API-Management services, one for each region, then the service stacks need to add themselves to each of the regions. That requires them to know the RG and ServiceName of them.worried-knife-31967
03/08/2021, 10:07 PMworried-knife-31967
03/08/2021, 10:35 PMHealthProbeSettings
supposed to be an object that can be setup with another resource? I can't seem to see where it existsworried-knife-31967
03/08/2021, 10:45 PMbroad-dog-22463
03/08/2021, 10:46 PMworried-knife-31967
03/08/2021, 10:57 PMlimited-planet-95090
03/08/2021, 11:52 PMfull-winter-70537
03/09/2021, 3:45 AMAny
routing rule operator in Azure Frontdoor/Rules Engine? It complains about the RulesEngineMatchValue
.
If I don't supply a RulesEngineMatchValue
, I get
System.ArgumentNullException: [Input] Pulumi.AzureNative.Network.Inputs.RulesEngineMatchConditionArgs._rulesEngineMatchValue is required but was not given a value (Parameter '_rulesEngineMatchValue')
at Pulumi.InputArgs.ToDictionaryAsync()
at Pulumi.Serialization.Serializer.SerializeInputArgsAsync(String ctx, InputArgs args, Boolean keepResources)
at Pulumi.Serialization.Serializer.SerializeAsync(String ctx, Object prop, Boolean keepResources)
at Pulumi.Serialization.Serializer.SerializeListAsync(String ctx, IList list, Boolean keepResources)
at Pulumi.Serialization.Serializer.SerializeAsync(String ctx, Object prop, Boolean keepResources)
at Pulumi.Serialization.Serializer.SerializeAsync(String ctx, Object prop, Boolean keepResources)
at Pulumi.Serialization.Serializer.SerializeAsync(String ctx, Object prop, Boolean keepResources)
at Pulumi.Serialization.Serializer.SerializeDictionaryAsync(String ctx, IDictionary dictionary, Boolean keepResources)
at Pulumi.Serialization.Serializer.SerializeInputArgsAsync(String ctx, InputArgs args, Boolean keepResources)
at Pulumi.Serialization.Serializer.SerializeAsync(String ctx, Object prop, Boolean keepResources)
at Pulumi.Serialization.Serializer.SerializeListAsync(String ctx, IList list, Boolean keepResources)
at Pulumi.Serialization.Serializer.SerializeAsync(String ctx, Object prop, Boolean keepResources)
at Pulumi.Serialization.Serializer.SerializeAsync(String ctx, Object prop, Boolean keepResources)
at Pulumi.Serialization.Serializer.SerializeAsync(String ctx, Object prop, Boolean keepResources)
at Pulumi.Deployment.SerializeFilteredPropertiesAsync(String label, IDictionary`2 args, Predicate`1 acceptKey, Boolean keepResources)
at Pulumi.Deployment.PrepareResourceAsync(String label, Resource res, Boolean custom, ResourceArgs args, ResourceOptions options)
at Pulumi.Deployment.RegisterResourceAsync(Resource resource, Boolean remote, Func`2 newDependency, ResourceArgs args, ResourceOptions options)
at Pulumi.Deployment.ReadOrRegisterResourceAsync(Resource resource, Boolean remote, Func`2 newDependency, ResourceArgs args, ResourceOptions options)
at Pulumi.Deployment.CompleteResourceAsync(Resource resource, Boolean remote, Func`2 newDependency, ResourceArgs args, ResourceOptions options, ImmutableDictionary`2 completionSources)
at Pulumi.Deployment.Runner.<>c__DisplayClass9_0.<<WhileRunningAsync>g__HandleCompletion|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Pulumi.Deployment.Runner.WhileRunningAsync()
If I supply a value, I get
Rules Engines validation failed. More information: Match value(s) must not be provided for Operator 'Any'.
Damned if you do, damned if you don't!worried-knife-31967
03/09/2021, 9:54 AMpowerful-football-81694
03/09/2021, 2:32 PMworried-knife-31967
03/09/2021, 2:33 PMbrave-planet-10645
03/09/2021, 2:34 PMbrave-planet-10645
03/09/2021, 2:34 PMpowerful-football-81694
03/09/2021, 2:35 PMpowerful-football-81694
03/09/2021, 2:35 PMbrave-planet-10645
03/09/2021, 2:47 PM