@@ -539,12 +539,9 @@ func (r resourceIntegration) Create(ctx context.Context, req tfsdk.CreateResourc
539539 return
540540 }
541541 awsS3SpecPlan := plan .AwsS3Spec
542- s3TelemetrySpec := * openapiclient .NewS3TelemetryProviderSpec (awsS3SpecPlan .BucketName .Value , awsS3SpecPlan .Region .Value , awsS3SpecPlan .AccessKeyId .Value , awsS3SpecPlan .SecretAccessKey .Value )
542+ s3TelemetrySpec := * openapiclient .NewS3TelemetryProviderSpec (awsS3SpecPlan .BucketName .Value , awsS3SpecPlan .Region .Value , awsS3SpecPlan .AccessKeyId .Value , awsS3SpecPlan .SecretAccessKey .Value , awsS3SpecPlan . PathPrefix . Value )
543543
544544 // Set optional fields if provided
545- if ! awsS3SpecPlan .PathPrefix .Null && ! awsS3SpecPlan .PathPrefix .Unknown && awsS3SpecPlan .PathPrefix .Value != "" {
546- s3TelemetrySpec .SetPathPrefix (awsS3SpecPlan .PathPrefix .Value )
547- }
548545 if ! awsS3SpecPlan .FilePrefix .Null && ! awsS3SpecPlan .FilePrefix .Unknown && awsS3SpecPlan .FilePrefix .Value != "" {
549546 s3TelemetrySpec .SetFilePrefix (awsS3SpecPlan .FilePrefix .Value )
550547 }
@@ -744,12 +741,10 @@ func resourceTelemetryProviderRead(accountId string, projectId string, configID
744741 Region : types.String {Value : s3Spec .Region },
745742 AccessKeyId : userProvidedTpDetails .AwsS3Spec .AccessKeyId , // Use user-provided value (API returns masked)
746743 SecretAccessKey : userProvidedTpDetails .AwsS3Spec .SecretAccessKey , // Use user-provided value (API returns masked)
744+ PathPrefix : types.String {Value : s3Spec .GetPathPrefix ()},
747745 }
748746
749747 // Set optional fields from API response if they exist
750- if s3Spec .HasPathPrefix () {
751- tp .AwsS3Spec .PathPrefix = types.String {Value : s3Spec .GetPathPrefix ()}
752- }
753748 if s3Spec .HasFilePrefix () {
754749 tp .AwsS3Spec .FilePrefix = types.String {Value : s3Spec .GetFilePrefix ()}
755750 }
0 commit comments