Also in addition I am curious about this… Still struggling with a couple of the Pulumi Types… I am a...
r
Also in addition I am curious about this… Still struggling with a couple of the Pulumi Types… I am also trying to build out a whole firewall structure using a series of conditions this requires me to construct firewall objects in isolation and then feed them back into the primary arguments of the create statement… I am trying to work around this error:
Copy code
cannot use fwDenyArray (variable of type *compute.FirewallDenyArgs) as type compute.FirewallDenyArrayInput in struct literal:
        *compute.FirewallDenyArgs does not implement compute.FirewallDenyArrayInput (missing ToFirewallDenyArrayOutput method)
How I am trying to achieve this is as follows:
Copy code
firewallArgs := &compute.FirewallArgs{
					Network:     gcpVPC.SelfLink,
					Allows:      fwAllowArray,
}
Where fwAllowArray is defined as :
Copy code
fwAllowArray := &compute.FirewallAllowArgs{}
for _, allowArgument := range firewallRule.Allow {
	fwAllowArgs := &compute.FirewallAllowArgs{}
    fwAllowArgs.Protocol = pulumi.String(allowArgument.Protocol)
 	var allowPorts pulumi.StringArray
	for _, allowPort := range allowArgument.Ports {
		append(allowPorts, pulumi.String(allowPort))
	}
	fwAllowArgs.Ports = allowPorts
}
I would appreciate any feedback. I would really like to resolve these two issues but simultaneously understand where any I have gone wrong… I am not quite sure whats happening under the hood between the types and maybe I am just abusing a process I am not aware of. Thanks.