You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was wondering if you have any clue how to handle dynamic attributes, and in general all of the non-primitive types.
I have attached three files as shown below.
The main issue is within the GetTerraformType which parse the types.
With that being said I was able to catch list<string> which was inserted by a simple text string without any interpolation whatsoever. For instance in the .tf file machines = ["omer", "omer ,"etc"].
namespace SampleProvider
{
[MessagePackObject]
public class ResourceRavenCluster
{
[Key("id")]
[Computed]
[Description("Unique ID for this resource.")]
[MessagePackFormatter(typeof(ComputedValueFormatter))]
public string Id { get; set; }
[Key("machines")]
[Description("Machine Public Ips")]
public dynamic Machines { get; set; }
}
private static string GetTerraformType(Type t)
{
if (t == typeof(string))
{
return "\"string\"";
}
if (t == typeof(int))
{
return "\"number\"";
}
if (t == typeof(List<string>))
{
return "[\"list\",\"string\"]";
}
if (t == typeof(List<object>))
{
return "dynamic";
}
if (t == typeof(List<object>))
{
return "[\"list\",\"dynamic\"]";
}
throw new NotSupportedException();
}
}
The text was updated successfully, but these errors were encountered:
Hi Samuel,
I was wondering if you have any clue how to handle dynamic attributes, and in general all of the non-primitive types.
I have attached three files as shown below.
The main issue is within the GetTerraformType which parse the types.
With that being said I was able to catch
list<string>
which was inserted by a simple text string without any interpolation whatsoever. For instance in the.tf
file machines = ["omer", "omer ,"etc"].The text was updated successfully, but these errors were encountered: