refined-pilot-45584
12/27/2022, 10:04 AMcannot 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:
firewallArgs := &compute.FirewallArgs{
Network: gcpVPC.SelfLink,
Allows: fwAllowArray,
}
Where fwAllowArray is defined as :
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.