This message was deleted.
# general
s
This message was deleted.
w
Can you share the script? The doc (https://www.pulumi.com/docs/reference/pkg/aws/ec2/spotfleetrequest/) is clear about this error.
b
To be clear, I'm not creating a new
SpotFleetRequest
I'm importing one using the
pulumi import
command. There's nothing I see in in the section on Importing a SpotFleetRequest that suggests additional arguments beyond the
name
id
and
type
are needed.
w
It may help to use the command line import command since that will generate the code for you. • Command line import overview: https://www.pulumi.com/docs/reference/cli/pulumi_import/ • Command line import for SpotFleetRequest: https://www.pulumi.com/docs/reference/pkg/aws/ec2/spotfleetrequest/#import
a
I’m also having an issue with importing when it involves a
oneOf
. This shows that data is correct and the validation is somehow incorrectly failing. Any ideas? Was this recently broken? I’m using
v2.17.1
gcp
4.7.0
Copy code
pulumi:pulumi:Stack        pipeline-dev   running.    
 =   └─ gcp:cloudbuild:Trigger  instant-api-3  import.     
I0114 18:48:09.226514   56214 provider_plugin.go:522] Provider[gcp, 0xc001321680].Check(urn:pulumi:dev::pipeline::gcp:cloudbuild/trigger:Trigger::my-project-api-3) executing (#olds=13,#news=0
I0114 18:48:09.226541   56214 rpc.go:72] Marshaling property for RPC[Provider[gcp, 0xc001321680].Check(urn:pulumi:dev::pipeline::gcp:cloudbuild/trigger:Trigger::my-project-api-3).olds]: __defaults={[]}
I0114 18:48:09.226551   56214 rpc.go:72] Marshaling property for RPC[Provider[gcp, 0xc001321680].Check(urn:pulumi:dev::pipeline::gcp:cloudbuild/trigger:Trigger::my-project-api-3).olds]: build={<nil>}
I0114 18:48:09.226556   56214 rpc.go:72] Marshaling property for RPC[Provider[gcp, 0xc001321680].Check(urn:pulumi:dev::pipeline::gcp:cloudbuild/trigger:Trigger::my-project-api-3).olds]: description={Push to any branch}
I0114 18:48:09.226560   56214 rpc.go:72] Marshaling property for RPC[Provider[gcp, 0xc001321680].Check(urn:pulumi:dev::pipeline::gcp:cloudbuild/trigger:Trigger::my-project-api-3).olds]: disabled={false}
I0114 18:48:09.226565   56214 rpc.go:72] Marshaling property for RPC[Provider[gcp, 0xc001321680].Check(urn:pulumi:dev::pipeline::gcp:cloudbuild/trigger:Trigger::my-project-api-3).olds]: filename={my-project-api/cloudbuild.yaml}
I0114 18:48:09.226624   56214 rpc.go:72] Marshaling property for RPC[Provider[gcp, 0xc001321680].Check(urn:pulumi:dev::pipeline::gcp:cloudbuild/trigger:Trigger::my-project-api-3).olds]: github={map[name:{my-project} owner:{gazeai} pullRequest:{<nil>} push:{map[branch:{.*} invertRegex:{false} tag:{}]}]}
I0114 18:48:09.226656   56214 rpc.go:72] Marshaling property for RPC[Provider[gcp, 0xc001321680].Check(urn:pulumi:dev::pipeline::gcp:cloudbuild/trigger:Trigger::my-project-api-3).olds]: name={my-project}
I0114 18:48:09.226665   56214 rpc.go:72] Marshaling property for RPC[Provider[gcp, 0xc001321680].Check(urn:pulumi:dev::pipeline::gcp:cloudbuild/trigger:Trigger::my-project-api-3).olds]: owner={gazeai}
I0114 18:48:09.226672   56214 rpc.go:72] Marshaling property for RPC[Provider[gcp, 0xc001321680].Check(urn:pulumi:dev::pipeline::gcp:cloudbuild/trigger:Trigger::my-project-api-3).olds]: pullRequest={<nil>}
I0114 18:48:09.226678   56214 rpc.go:72] Marshaling property for RPC[Provider[gcp, 0xc001321680].Check(urn:pulumi:dev::pipeline::gcp:cloudbuild/trigger:Trigger::my-project-api-3).olds]: push={map[branch:{.*} invertRegex:{false} tag:{}]}
I0114 18:48:09.226690   56214 rpc.go:72] Marshaling property for RPC[Provider[gcp, 0xc001321680].Check(urn:pulumi:dev::pipeline::gcp:cloudbuild/trigger:Trigger::my-project-api-3).olds]: branch={.*}
I0114 18:48:09.226699   56214 rpc.go:72] Marshaling property for RPC[Provider[gcp, 0xc001321680].Check(urn:pulumi:dev::pipeline::gcp:cloudbuild/trigger:Trigger::my-project-api-3).olds]: invertRegex={false}
I0114 18:48:09.226706   56214 rpc.go:72] Marshaling property for RPC[Provider[gcp, 0xc001321680].Check(urn:pulumi:dev::pipeline::gcp:cloudbuild/trigger:Trigger::my-project-api-3).olds]: tag={}
I0114 18:48:09.226901   56214 rpc.go:72] Marshaling property for RPC[Provider[gcp, 0xc001321680].Check(urn:pulumi:dev::pipeline::gcp:cloudbuild/trigger:Trigger::my-project-api-3).olds]: ignoredFiles={[]}
I0114 18:48:09.226912   56214 rpc.go:72] Marshaling property for RPC[Provider[gcp, 0xc001321680].Check(urn:pulumi:dev::pipeline::gcp:cloudbuild/trigger:Trigger::my-project-api-3).olds]: includedFiles={[{my-project-api/**}]}
I0114 18:48:09.226919   56214 rpc.go:72] Marshaling property for RPC[Provider[gcp, 0xc001321680].Check(urn:pulumi:dev::pipeline::gcp:cloudbuild/trigger:Trigger::my-project-api-3).olds]: name={my-project-api-pulumi-2}
I0114 18:48:09.226925   56214 rpc.go:72] Marshaling property for RPC[Provider[gcp, 0xc001321680].Check(urn:pulumi:dev::pipeline::gcp:cloudbuild/trigger:Trigger::my-project-api-3).olds]: project={my-project-dev-301406}
I0114 18:48:09.226929   56214 rpc.go:72] Marshaling property for RPC[Provider[gcp, 0xc001321680].Check(urn:pulumi:dev::pipeline::gcp:cloudbuild/trigger:Trigger::my-project-api-3).olds]: substitutions={map[]}
I0114 18:48:09.226936   56214 rpc.go:72] Marshaling property for RPC[Provider[gcp, 0xc001321680].Check(urn:pulumi:dev::pipeline::gcp:cloudbuild/trigger:Trigger::my-project-api-3).olds]: tags={[]}
I0114 18:48:09.226941   56214 rpc.go:72] Marshaling property for RPC[Provider[gcp, 0xc001321680].Check(urn:pulumi:dev::pipeline::gcp:cloudbuild/trigger:Trigger::my-project-api-3).olds]: triggerTemplate={<nil>}
I0114 18:48:09.228154   56214 rpc.go:247] Unmarshaling property for RPC[Provider[gcp, 0xc001321680].Check(urn:pulumi:dev::pipeline::gcp:cloudbuild/trigger:Trigger::my-project-api-3).inputs]: __defaults={[{name}]}
I0114 18:48:09.228185   56214 rpc.go:247] Unmarshaling property for RPC[Provider[gcp, 0xc001321680].Check(urn:pulumi:dev::pipeline::gcp:cloudbuild/trigger:Trigger::my-project-api-3).inputs]: name={my-project-api-3-1fd7356}
I0114 18:48:09.228195   56214 provider_plugin.go:594] Provider[gcp, 0xc001321680].Check(urn:pulumi:dev::pipeline::gcp:cloudbuild/trigger:Trigger::my-project-api-3) success: inputs=#2 failures=#3
I0114 18:48:09.228228   56214 eventsink.go:86] eventSink::Error(<{%reset%}>gcp:cloudbuild/trigger:Trigger resource 'my-project-api-3' has a problem: ExactlyOne: "build": one of `build,filename` must be specified<{%reset%}>)
I0114 18:48:09.228247   56214 eventsink.go:86] eventSink::Error(<{%reset%}>gcp:cloudbuild/trigger:Trigger resource 'my-project-api-3' has a problem: ExactlyOne: "filename": one of `build,filename` must be specified<{%reset%}>)
I0114 18:48:09.228261   56214 eventsink.go:86] eventSink::Error(<{%reset%}>gcp:cloudbuild/trigger:Trigger resource 'my-project-api-3' has a problem: ExactlyOne: "github": one of `github,trigger_template` must be specified<{%reset%}>)
Cleaned
Copy code
__defaults={[]}
build={<nil>}
description={Push to any branch}
disabled={false}
filename={my-project-api/cloudbuild.yaml}
github={map[name:{my-project} owner:{gazeai} pullRequest:{<nil>} push:{map[branch:{.*} invertRegex:{false} tag:{}]}]}
	name={my-project}
	owner={gazeai}
	pullRequest={<nil>}
	push={map[branch:{.*} invertRegex:{false} tag:{}]}
branch={.*}
invertRegex={false}
tag={}
ignoredFiles={[]}
includedFiles={[{my-project-api/**}]}
name={my-project-api-pulumi-2}
project={my-project-dev-301406}
substitutions={map[]}
tags={[]}
triggerTemplate={<nil>}
Error
Copy code
has a problem: ExactlyOne: "build": one of `build,filename` must be specified
has a problem: ExactlyOne: "filename": one of `build,filename` must be specified
has a problem: ExactlyOne: "github": one of `github,trigger_template` must be specified
Looking for some ideas of what to do next.
I decided to do
pulumi stack export
and then duplicate a similar resource with the proper id and was able to get it going using
pulumi stack import
. Obviously not ideal as I had to add the code myself. But the
details
views let you know what is missing in the code.
f
Hi Kevin, I am seeing a similar (the same) issue with import and I am using the same work around.