https://pulumi.com logo
#golang
Title
# golang
r

red-area-47037

08/29/2020, 3:31 PM
Can someone link me an Golang example of how to create a CRD instance using Pulumi? I want to create an instance of Argos Application CRD…
r

red-area-47037

08/29/2020, 3:53 PM
just found it, came pack to share it here 😉
hmm the generate golang code does not compile 😞
Copy code
v1alpha1/pulumiTypes.go:1035:115: impossible type assertion:
	ApplicationOperationSyncSyncStrategyPtrOutput does not implement pulumi.Output (wrong type for Apply method)
		have Apply() ApplicationOperationSyncSyncStrategyApplyPtrOutput
		want Apply(func(interface {}) (interface {}, error)) pulumi.AnyOutput
v1alpha1/pulumiTypes.go:1133:4: impossible type assertion:
	ApplicationOperationSyncSyncStrategyPtrOutput does not implement pulumi.Output (wrong type for Apply method)
		have Apply() ApplicationOperationSyncSyncStrategyApplyPtrOutput
		want Apply(func(interface {}) (interface {}, error)) pulumi.AnyOutput
v1alpha1/pulumiTypes.go:3285:43: impossible type assertion:
	ApplicationOperationSyncSyncStrategyOutput does not implement pulumi.Output (wrong type for Apply method)
		have Apply() ApplicationOperationSyncSyncStrategyApplyPtrOutput
		want Apply(func(interface {}) (interface {}, error)) pulumi.AnyOutput
v1alpha1/pulumiTypes.go:3293:43: impossible type assertion:
	ApplicationOperationSyncSyncStrategyOutput does not implement pulumi.Output (wrong type for Apply method)
		have Apply() ApplicationOperationSyncSyncStrategyApplyPtrOutput
		want Apply(func(interface {}) (interface {}, error)) pulumi.AnyOutput
v1alpha1/pulumiTypes.go:3326:43: impossible type assertion:
	ApplicationOperationSyncSyncStrategyPtrOutput does not implement pulumi.Output (wrong type for Apply method)
		have Apply() ApplicationOperationSyncSyncStrategyApplyPtrOutput
		want Apply(func(interface {}) (interface {}, error)) pulumi.AnyOutput
v1alpha1/pulumiTypes.go:3351:4: impossible type assertion:
	ApplicationOperationSyncSyncStrategyPtrOutput does not implement pulumi.Output (wrong type for Apply method)
		have Apply() ApplicationOperationSyncSyncStrategyApplyPtrOutput
		want Apply(func(interface {}) (interface {}, error)) pulumi.AnyOutput
v1alpha1/pulumiTypes.go:3381:115: impossible type assertion:
	ApplicationOperationSyncSyncStrategyOutput does not implement pulumi.Output (wrong type for Apply method)
		have Apply() ApplicationOperationSyncSyncStrategyApplyPtrOutput
		want Apply(func(interface {}) (interface {}, error)) pulumi.AnyOutput
v1alpha1/pulumiTypes.go:10836:4: impossible type assertion:
	ApplicationStatusOperationStateOperationSyncSyncStrategyPtrOutput does not implement pulumi.Output (wrong type for Apply method)
		have Apply() ApplicationStatusOperationStateOperationSyncSyncStrategyApplyPtrOutput
		want Apply(func(interface {}) (interface {}, error)) pulumi.AnyOutput
v1alpha1/pulumiTypes.go:10936:4: impossible type assertion:
	ApplicationStatusOperationStateOperationSyncSyncStrategyPtrOutput does not implement pulumi.Output (wrong type for Apply method)
		have Apply() ApplicationStatusOperationStateOperationSyncSyncStrategyApplyPtrOutput
		want Apply(func(interface {}) (interface {}, error)) pulumi.AnyOutput
v1alpha1/pulumiTypes.go:13120:43: impossible type assertion:
	ApplicationStatusOperationStateOperationSyncSyncStrategyOutput does not implement pulumi.Output (wrong type for Apply method)
		have Apply() ApplicationStatusOperationStateOperationSyncSyncStrategyApplyPtrOutput
		want Apply(func(interface {}) (interface {}, error)) pulumi.AnyOutput
v1alpha1/pulumiTypes.go:13120:43: too many errors
l

lemon-agent-27707

08/29/2020, 5:46 PM
Ah, this is a known issue in our go code generator. We're working on a fix. https://github.com/pulumi/pulumi/issues/5136 @worried-needle-99800 can comment more, but I believe this should work if you avoid fields in the CRD named
Apply
r

red-area-47037

08/29/2020, 5:49 PM
great, thanks
5 Views