@@ -1361,7 +1361,7 @@ func (s *mqlAwsEcsService) id() (string, error) {
13611361
13621362func (s * mqlAwsEcsService ) deploymentConfiguration () (* mqlAwsEcsServiceDeploymentConfiguration , error ) {
13631363 if ! s .DeploymentConfiguration .IsSet () {
1364- return nil , nil
1364+ return nil , errors . New ( "deploymentConfiguration not initialized" )
13651365 }
13661366 if s .DeploymentConfiguration .Error != nil {
13671367 return nil , s .DeploymentConfiguration .Error
@@ -1371,7 +1371,7 @@ func (s *mqlAwsEcsService) deploymentConfiguration() (*mqlAwsEcsServiceDeploymen
13711371
13721372func (s * mqlAwsEcsService ) networkConfiguration () (* mqlAwsEcsServiceNetworkConfiguration , error ) {
13731373 if ! s .NetworkConfiguration .IsSet () {
1374- return nil , nil
1374+ return nil , errors . New ( "networkConfiguration not initialized" )
13751375 }
13761376 if s .NetworkConfiguration .Error != nil {
13771377 return nil , s .NetworkConfiguration .Error
@@ -1381,7 +1381,7 @@ func (s *mqlAwsEcsService) networkConfiguration() (*mqlAwsEcsServiceNetworkConfi
13811381
13821382func (d * mqlAwsEcsServiceDeploymentConfiguration ) deploymentCircuitBreaker () (* mqlAwsEcsServiceDeploymentConfigurationDeploymentCircuitBreaker , error ) {
13831383 if ! d .DeploymentCircuitBreaker .IsSet () {
1384- return nil , nil
1384+ return nil , errors . New ( "deploymentCircuitBreaker not initialized" )
13851385 }
13861386 if d .DeploymentCircuitBreaker .Error != nil {
13871387 return nil , d .DeploymentCircuitBreaker .Error
@@ -1391,7 +1391,7 @@ func (d *mqlAwsEcsServiceDeploymentConfiguration) deploymentCircuitBreaker() (*m
13911391
13921392func (n * mqlAwsEcsServiceNetworkConfiguration ) awsvpcConfiguration () (* mqlAwsEcsServiceNetworkConfigurationAwsvpcConfiguration , error ) {
13931393 if ! n .AwsvpcConfiguration .IsSet () {
1394- return nil , nil
1394+ return nil , errors . New ( "awsvpcConfiguration not initialized" )
13951395 }
13961396 if n .AwsvpcConfiguration .Error != nil {
13971397 return nil , n .AwsvpcConfiguration .Error
@@ -1498,11 +1498,19 @@ func initAwsEcsService(runtime *plugin.Runtime, args map[string]*llx.RawData) (m
14981498 args ["runningCount" ] = llx .IntData (int64 (s .RunningCount ))
14991499 args ["taskDefinition" ] = llx .StringData (taskDefinition )
15001500 args ["launchType" ] = llx .StringData (launchType )
1501+ // Always set deploymentConfiguration - AWS services should always have this, but handle nil case
15011502 if deploymentConfigResource != nil {
15021503 args ["deploymentConfiguration" ] = llx .ResourceData (deploymentConfigResource .(plugin.Resource ), ResourceAwsEcsServiceDeploymentConfiguration )
1504+ } else {
1505+ // AWS should always return deploymentConfiguration, but if nil, set to nil explicitly
1506+ args ["deploymentConfiguration" ] = llx .NilData
15031507 }
1508+ // Always set networkConfiguration - AWS services should always have this, but handle nil case
15041509 if networkConfigResource != nil {
15051510 args ["networkConfiguration" ] = llx .ResourceData (networkConfigResource .(plugin.Resource ), ResourceAwsEcsServiceNetworkConfiguration )
1511+ } else {
1512+ // AWS should always return networkConfiguration, but if nil, set to nil explicitly
1513+ args ["networkConfiguration" ] = llx .NilData
15061514 }
15071515 args ["tags" ] = llx .MapData (ecsTagsToMap (s .Tags ), types .String )
15081516 args ["createdAt" ] = llx .TimeDataPtr (s .CreatedAt )
@@ -1571,8 +1579,11 @@ func createDeploymentConfigurationResource(runtime *plugin.Runtime, dc *ecstypes
15711579 "bakeTimeInMinutes" : llx .IntDataPtr (dc .BakeTimeInMinutes ),
15721580 "strategy" : llx .StringData (string (dc .Strategy )),
15731581 }
1582+ // Always set deploymentCircuitBreaker, even if nil
15741583 if circuitBreakerResource != nil {
15751584 args ["deploymentCircuitBreaker" ] = llx .ResourceData (circuitBreakerResource .(plugin.Resource ), ResourceAwsEcsServiceDeploymentConfigurationDeploymentCircuitBreaker )
1585+ } else {
1586+ args ["deploymentCircuitBreaker" ] = llx .NilData
15761587 }
15771588 if alarmsDict != nil {
15781589 args ["alarms" ] = llx .MapData (alarmsDict , types .String )
@@ -1619,8 +1630,11 @@ func createNetworkConfigurationResource(runtime *plugin.Runtime, nc *ecstypes.Ne
16191630 args := map [string ]* llx.RawData {
16201631 "__id" : llx .StringData (serviceArn + "/networkConfiguration" ),
16211632 }
1633+ // Always set awsvpcConfiguration, even if nil
16221634 if awsvpcResource != nil {
16231635 args ["awsvpcConfiguration" ] = llx .ResourceData (awsvpcResource .(plugin.Resource ), ResourceAwsEcsServiceNetworkConfigurationAwsvpcConfiguration )
1636+ } else {
1637+ args ["awsvpcConfiguration" ] = llx .NilData
16241638 }
16251639
16261640 return CreateResource (runtime , ResourceAwsEcsServiceNetworkConfiguration , args )
0 commit comments