Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add iamcredentialsbasepath support for plugin framework #11947

Conversation

BBBmau
Copy link
Collaborator

@BBBmau BBBmau commented Oct 8, 2024

This is temporary and will be resolved once the muxing issues are addressed.

Release Note Template for Downstream PRs (will be copied)


@BBBmau BBBmau requested a review from SarahFrench October 8, 2024 18:35
Copy link
Contributor

@SarahFrench SarahFrench left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's some initial feedback - I'll check the code locally on my next pass!

Currently there's an issue with generating the beta provider:

error parsing framework_config.go.tmpl for filepath /go/src/github.com/hashicorp/terraform-provider-google-beta/google-beta/fwtransport/framework_config.go template: framework_config.go.tmpl:526: function "version" not defined

@@ -520,6 +523,26 @@ func (p *FrameworkProviderConfig) SetupGrpcLogging() {
)
}

// Remove the `/{{version}}/` from a base path if present.
func RemoveBasePathVersion(url string) string {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we just import RemoveBasePathVersion from google/transport/config.go?

Copy link

@BBBmau, this PR is waiting for action from you. If no action is taken, this PR will be closed in 28 days.

Please address any comments or change requests, or re-request review from a core reviewer if no action is required.

Image showing the re-request review button

This notification can be disabled with the disable-automatic-closure label.

@BBBmau BBBmau force-pushed the IAMCredentialsBasePath-pfconfig branch 4 times, most recently from 7e15243 to 8cb4e72 Compare October 23, 2024 16:30
@BBBmau
Copy link
Collaborator Author

BBBmau commented Oct 23, 2024

Latest changes allow you to build successfully on both ga and beta providers.

The rebase from upstream/main was necessary in order to address some compute errors when attempting to build the provider:

└─(09:25:40 on main ✹ ✭)──> devbuild                                                                                                                                                          1 ↵ ──(Wed,Oct23)─┘
# github.com/hashicorp/terraform-provider-google/google/services/compute
google/services/compute/data_source_compute_secutity_policy.go:14:6: DataSourceGoogleComputeSecurityPolicy redeclared in this block
        google/services/compute/data_source_compute_security_policy.go:14:6: other declaration of DataSourceGoogleComputeSecurityPolicy

Wasn't sure if to rebase on the feature-branch or not so i just decided to do it on here. Let me know if that's fine, i can also rebase on the feature branch itself.

I also tried to manually test IAMCredentialsBasePath by testing with the poc ephemeral resource that uses it.

Unfortunately was running into the following error despite it being configured correctly. I can create the PR that includes the code that would add ephemeral google_service_account_access_token. I look into this more.

image

@BBBmau BBBmau requested a review from SarahFrench October 23, 2024 17:03
@BBBmau
Copy link
Collaborator Author

BBBmau commented Oct 23, 2024

resolved the previous comment. It was due to only running go get github.com/hashicorp/terraform-plugin-framework/ephemeral@627a49bf3060aa8d1c681847ff3c682681ea3cd2 which just focuses on the single framework/ephemeral package and not on the entire plugin-framework.

Currently running into issues where the p.providerConfig.UserAgent returns us "" which causes errors. Currently investigating how the userAgent is set on SDK and how we could replicate this on plugin-framework. A reproduction can be seen https://github.com/BBBmau/terraform-provider-google/tree/ephemeral-iamcredentialspath-test

My understanding is req.ProviderData in the Configure method is configured after the ConfigureProvider RPC has been called by Terraform. I would've expected the UserAgent be set in the configure of the FrameworkProvider. It's set here:

// Handle User Agent string
p.UserAgent = CompileUserAgentString(ctx, "terraform-provider-google{{- if ne $.TargetVersionName "ga" -}}-{{$.TargetVersionName}}{{- end }}", tfVersion, providerversion)
// opt in extension for adding to the User-Agent header
if ext := os.Getenv("GOOGLE_TERRAFORM_USERAGENT_EXTENSION"); ext != "" {
ua := p.UserAgent
p.UserAgent = fmt.Sprintf("%s %s", ua, ext)
}

Is their anything else I'm not setting up correctly? @SarahFrench

@SarahFrench
Copy link
Contributor

SarahFrench commented Oct 24, 2024

Wasn't sure if to rebase on the feature-branch or not so i just decided to do it on here. Let me know if that's fine, i can also rebase on the feature branch itself.

I think you should rebase onto the feature branch instead. If you have that "other declaration of DataSourceGoogleComputeSecurityPolicy" error locally it may be that you need to delete some files from the repo where you're generating the provider to. I had a similar issue at one point and it's because if you rename a file in your magic-modules repo and then generate the provider locally the destination directory that you're generating the provider to will have the old-named file still and then will have the new-named file also, causing errors like that. You'd need to delete the old-named file in that scenario, as the generation process doesn't delete files away.

Copy link
Contributor

@SarahFrench SarahFrench left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rebase this PR so it's based on the feature branch.

The PR that caused the problem you're seeing was merged to main only 3 days ago, whereas the last sync into the feature branch included only commits from Sept 26th and earlier, so shouldn't affect us? I believe the problem is with your local environment as described here: #11947 (comment)

@BBBmau BBBmau force-pushed the IAMCredentialsBasePath-pfconfig branch 2 times, most recently from 166e5c3 to e7104a8 Compare October 24, 2024 21:34
@BBBmau BBBmau force-pushed the IAMCredentialsBasePath-pfconfig branch from e7104a8 to 3b79b7f Compare October 24, 2024 21:36
@BBBmau
Copy link
Collaborator Author

BBBmau commented Oct 24, 2024

Please rebase this PR so it's based on the feature branch.

The PR that caused the problem you're seeing was merged to main only 3 days ago, whereas the last sync into the feature branch included only commits from Sept 26th and earlier, so shouldn't affect us? I believe the problem is with your local environment as described here: #11947 (comment)

rebased back to FEATURE-BRANCH-ephemeral-resource

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 2 files changed, 18 insertions(+))
google-beta provider: Diff ( 2 files changed, 18 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 4100
Passed tests: 3455
Skipped tests: 413
Affected tests: 232

Click here to see the affected service packages

All service packages are affected

Action taken

Found 232 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccAssuredWorkloadsWorkload_BasicHandWritten
  • TestAccBigQueryJob_bigqueryJobCopyExample
  • TestAccBigQueryJob_bigqueryJobCopyTableReferenceExample
  • TestAccBigqueryDatasetIamMember
  • TestAccBigqueryDatasetIamMember_afterDatasetCreation
  • TestAccBigqueryDatasetIamMember_iamMember
  • TestAccBigqueryDatasetIamMember_serviceAccount
  • TestAccCloudRunService_cloudRunServiceSqlExample
  • TestAccCloudRunV2Job_cloudrunv2JobSqlExample
  • TestAccCloudRunV2Service_cloudrunv2ServiceSqlExample
  • TestAccComposerEnvironment_withEncryptionConfigComposer1
  • TestAccComputeImageIamBindingGenerated
  • TestAccComputeImageIamBindingGenerated_withCondition
  • TestAccComputeImageIamMemberGenerated
  • TestAccComputeImageIamMemberGenerated_withCondition
  • TestAccComputeImageIamPolicyGenerated
  • TestAccComputeImageIamPolicyGenerated_withCondition
  • TestAccComputeImage_imageBasicExample
  • TestAccComputeImage_imageBasicStorageLocationExample
  • TestAccComputeImage_imageGuestOsExample
  • TestAccComputeImage_update
  • TestAccComputeInstanceTemplate_imageShorthand
  • TestAccComputeInstanceTemplate_nictype_update
  • TestAccComputeInstance_nictype_update
  • TestAccComputeNetworkFirewallPolicyRule_GlobalHandWritten
  • TestAccComputeNetworkFirewallPolicyRule_securityProfileGroup_update
  • TestAccComputeNetworkFirewallPolicyRule_update
  • TestAccComputeProjectMetadataItem_basic
  • TestAccComputeProjectMetadataItem_basicUpdate
  • TestAccComputeProjectMetadataItem_basicWithEmptyVal
  • TestAccComputeProjectMetadataItem_exists
  • TestAccComputeProjectMetadata_basic
  • TestAccComputeProjectMetadata_modify_1
  • TestAccComputeProjectMetadata_modify_2
  • TestAccComputeRegionInstanceTemplate_imageShorthand
  • TestAccComputeRegionInstanceTemplate_nictype_update
  • TestAccComputeRegionNetworkEndpointGroup_regionNetworkEndpointGroupAppengineExample
  • TestAccComputeRegionNetworkFirewallPolicyRule_RegionalHandWritten
  • TestAccComputeSubnetwork_subnetworkReservedSecondaryRangeExample
  • TestAccContainerAttachedCluster_containerAttachedClusterFullExample
  • TestAccContainerAttachedCluster_update
  • TestAccContainerCluster_autopilot_net_admin
  • TestAccContainerCluster_enableCiliumPolicies
  • TestAccContainerCluster_withLoggingConfig
  • TestAccContainerCluster_with_PodCIDROverprovisionDisabled
  • TestAccContainerNodePool_totalSize
  • TestAccContainerNodePool_withEnablePrivateNodesToggle
  • TestAccDataLossPreventionDiscoveryConfig_Update
  • TestAccDataSourceGooglePubsubSubscription_basic
  • TestAccDataSourceGooglePubsubSubscription_optionalProject
  • TestAccDataSourceGoogleSQLCaCerts_basic
  • TestAccDataSourceSecretManagerSecrets_basic
  • TestAccDataSourceSecretManagerSecrets_filter
  • TestAccDataSourceSqlDatabaseInstanceLatestRecoveryTime_basic
  • TestAccDataSourceSqlDatabaseInstance_basic
  • TestAccDataSourceSqlDatabaseInstances_basic
  • TestAccDataSourceSqlDatabaseInstances_databaseVersionFilter
  • TestAccDataSourceSqlDatabaseInstances_regionFilter
  • TestAccDataSourceSqlDatabaseInstances_tierFilter
  • TestAccDataSourceSqlDatabase_basic
  • TestAccDataSourceSqlDatabases_basic
  • TestAccDatabaseMigrationServiceConnectionProfile_databaseMigrationServiceConnectionProfileCloudsqlExample
  • TestAccDatabaseMigrationServiceConnectionProfile_databaseMigrationServiceConnectionProfileExistingMysqlExample
  • TestAccDatabaseMigrationServiceConnectionProfile_databaseMigrationServiceConnectionProfileExistingPostgresExample
  • TestAccDatabaseMigrationServiceConnectionProfile_databaseMigrationServiceConnectionProfilePostgresExample
  • TestAccDatabaseMigrationServiceMigrationJob_databaseMigrationServiceMigrationJobMysqlToMysqlExample
  • TestAccDatabaseMigrationServiceMigrationJob_databaseMigrationServiceMigrationJobPostgresToAlloydbExample
  • TestAccDatabaseMigrationServiceMigrationJob_databaseMigrationServiceMigrationJobPostgresToPostgresExample
  • TestAccDatabaseMigrationServiceMigrationJob_update
  • TestAccDataprocAutoscalingPolicyIamBindingGenerated
  • TestAccDataprocAutoscalingPolicyIamMemberGenerated
  • TestAccDataprocAutoscalingPolicyIamPolicyGenerated
  • TestAccDataprocAutoscalingPolicy_dataprocAutoscalingPolicyBasicExample
  • TestAccDataprocAutoscalingPolicy_dataprocAutoscalingPolicyExample
  • TestAccDataprocClusterIamBinding
  • TestAccDataprocClusterIamMember
  • TestAccDataprocClusterIamPolicy
  • TestAccDataprocCluster_KMS
  • TestAccDataprocCluster_nonPreemptibleSecondary
  • TestAccDataprocCluster_singleNodeCluster
  • TestAccDataprocCluster_spotSecondary
  • TestAccDataprocCluster_withAccelerators
  • TestAccDataprocCluster_withAutoscalingPolicy
  • TestAccDataprocCluster_withConfigOverrides
  • TestAccDataprocCluster_withDataprocMetricConfig
  • TestAccDataprocCluster_withEndpointConfig
  • TestAccDataprocCluster_withImageVersion
  • TestAccDataprocCluster_withInitAction
  • TestAccDataprocCluster_withKerberos
  • TestAccDataprocCluster_withLabels
  • TestAccDataprocCluster_withLifecycleConfigIdleDeleteTtl
  • TestAccDataprocCluster_withMetadataAndTags
  • TestAccDataprocCluster_withMinNumInstances
  • TestAccDataprocCluster_withNodeGroupAffinity
  • TestAccDataprocCluster_withOptionalComponents
  • TestAccDataprocCluster_withReservationAffinity
  • TestAccDataprocCluster_withServiceAcc
  • TestAccDataprocCluster_withStagingBucket
  • TestAccDataprocCluster_withTempBucket
  • TestAccDataprocJobIamBinding
  • TestAccDataprocJobIamMember
  • TestAccDataprocJobIamPolicy
  • TestAccDataprocJob_Hadoop
  • TestAccDataprocJob_Hive
  • TestAccDataprocJob_Pig
  • TestAccDataprocJob_Presto
  • TestAccDataprocJob_PySpark
  • TestAccDataprocJob_Spark
  • TestAccDataprocJob_SparkSql
  • TestAccDataprocJob_updatable
  • TestAccDataprocWorkflowTemplate_basic
  • TestAccDataprocWorkflowTemplate_withShieldedVMs
  • TestAccDialogflowCXAgent_dialogflowcxAgentFullExample
  • TestAccDialogflowCXAgent_update
  • TestAccDialogflowCXFlow_dialogflowcxFlowFullExample
  • TestAccDialogflowCXFlow_update
  • TestAccDiscoveryEngineChatEngine_discoveryengineChatengine_update
  • TestAccMemorystoreInstance_memorystoreInstanceFullExample
  • TestAccMonitoringAlertPolicy
  • TestAccNetappBackupPolicy_NetappBackupPolicyFullExample_update
  • TestAccNetappBackupVault_NetappBackupVaultExample_update
  • TestAccNetappBackup_NetappBackupFull_update
  • TestAccNetappVolume_NetappVolumeBasicExample_update
  • TestAccNetappVolume_autoTieredNetappVolume_update
  • TestAccNetworkServicesGateway_updateSwp
  • TestAccPubsubSubscriptionBigQuery_serviceAccount
  • TestAccPubsubSubscriptionBigQuery_update
  • TestAccPubsubSubscriptionCloudStorage_serviceAccount
  • TestAccPubsubSubscriptionCloudStorage_updateAvro
  • TestAccPubsubSubscriptionCloudStorage_updateText
  • TestAccPubsubSubscriptionIamBinding
  • TestAccPubsubSubscriptionIamMember
  • TestAccPubsubSubscriptionIamPolicy
  • TestAccPubsubSubscription_emptyTTL
  • TestAccPubsubSubscription_filter
  • TestAccPubsubSubscription_pollOnCreate
  • TestAccPubsubSubscription_pubsubSubscriptionDeadLetterExample
  • TestAccPubsubSubscription_pubsubSubscriptionPullFilterExample
  • TestAccPubsubSubscription_pubsubSubscriptionPushBqExample
  • TestAccPubsubSubscription_pubsubSubscriptionPushBqServiceAccountExample
  • TestAccPubsubSubscription_pubsubSubscriptionPushBqTableSchemaExample
  • TestAccPubsubSubscription_pubsubSubscriptionPushCloudstorageAvroExample
  • TestAccPubsubSubscription_pubsubSubscriptionPushCloudstorageExample
  • TestAccPubsubSubscription_pubsubSubscriptionPushCloudstorageServiceAccountExample
  • TestAccPubsubSubscription_pubsubSubscriptionPushExample
  • TestAccPubsubSubscription_push
  • TestAccPubsubSubscription_pushNoWrapper
  • TestAccPubsubSubscription_pushNoWrapperEmpty
  • TestAccRegionInstanceGroupManager_distributionPolicy
  • TestAccSQLDatabaseInstance_DenyMaintenancePeriod
  • TestAccSQLDatabase_sqlDatabaseBasicExample
  • TestAccSQLDatabase_sqlDatabaseDeletionPolicyExample
  • TestAccSpannerBackupSchedule_spannerBackupScheduleDailyIncrementalExample
  • TestAccSpannerInstance_basic
  • TestAccSpannerInstance_basicWithAutoscalingUsingNodeConfig
  • TestAccSpannerInstance_basicWithAutoscalingUsingNodeConfigUpdate
  • TestAccSpannerInstance_basicWithAutoscalingUsingProcessingUnitConfig
  • TestAccSpannerInstance_basicWithAutoscalingUsingProcessingUnitConfigUpdate
  • TestAccSqlClientCert_mysql
  • TestAccSqlClientCert_postgres
  • TestAccSqlDatabaseInstance_BackupRetention
  • TestAccSqlDatabaseInstance_Edition
  • TestAccSqlDatabaseInstance_EnableGoogleDataplexIntegration
  • TestAccSqlDatabaseInstance_EnableGoogleMlIntegration
  • TestAccSqlDatabaseInstance_Mysql_Edition_Upgrade
  • TestAccSqlDatabaseInstance_PointInTimeRecoveryEnabled
  • TestAccSqlDatabaseInstance_PointInTimeRecoveryEnabledForSqlServer
  • TestAccSqlDatabaseInstance_ReplicaPromoteFailedWithMasterInstanceNameAndReplicaConfigurationPresent
  • TestAccSqlDatabaseInstance_ReplicaPromoteFailedWithMasterInstanceNamePresent
  • TestAccSqlDatabaseInstance_ReplicaPromoteFailedWithReplicaConfigurationPresent
  • TestAccSqlDatabaseInstance_ReplicaPromoteSkippedWithNoMasterInstanceNameAndNoReplicaConfigurationPresent
  • TestAccSqlDatabaseInstance_ReplicaPromoteSuccessful
  • TestAccSqlDatabaseInstance_Smt
  • TestAccSqlDatabaseInstance_SqlServerAuditOptionalBucket
  • TestAccSqlDatabaseInstance_Timezone
  • TestAccSqlDatabaseInstance_activationPolicy
  • TestAccSqlDatabaseInstance_authNets
  • TestAccSqlDatabaseInstance_basicInstance_thenPSCEnabled
  • TestAccSqlDatabaseInstance_basicMSSQL
  • TestAccSqlDatabaseInstance_basicSecondGen
  • TestAccSqlDatabaseInstance_basic_with_user_labels
  • TestAccSqlDatabaseInstance_deleteDefaultUserBeforeSubsequentApiCalls
  • TestAccSqlDatabaseInstance_diskspecs
  • TestAccSqlDatabaseInstance_dontDeleteDefaultUserOnReplica
  • TestAccSqlDatabaseInstance_encryptionKey
  • TestAccSqlDatabaseInstance_encryptionKey_replicaInDifferentRegion
  • TestAccSqlDatabaseInstance_highAvailability
  • TestAccSqlDatabaseInstance_insights
  • TestAccSqlDatabaseInstance_maintenance
  • TestAccSqlDatabaseInstance_maintenanceVersion
  • TestAccSqlDatabaseInstance_maintenance_update_track_week5
  • TestAccSqlDatabaseInstance_multipleOperations
  • TestAccSqlDatabaseInstance_replica
  • TestAccSqlDatabaseInstance_rootPasswordShouldBeUpdatable
  • TestAccSqlDatabaseInstance_settingsDowngrade
  • TestAccSqlDatabaseInstance_settings_basic
  • TestAccSqlDatabaseInstance_settings_deletionProtection
  • TestAccSqlDatabaseInstance_settings_deletionProtectionEnabled
  • TestAccSqlDatabaseInstance_settings_secondary
  • TestAccSqlDatabaseInstance_settings_upgrade
  • TestAccSqlDatabaseInstance_slave
  • TestAccSqlDatabaseInstance_sqlMysqlInstancePvpExample
  • TestAccSqlDatabaseInstance_updateDifferentFlagOrder
  • TestAccSqlDatabaseInstance_updateReadReplicaWithBinaryLogEnabled
  • TestAccSqlDatabaseInstance_updateSslOptionsForPostgreSQL
  • TestAccSqlDatabaseInstance_useInternalCaByDefault
  • TestAccSqlDatabaseInstance_withPSCEnabled_thenAddAllowedConsumerProjects_thenRemoveAllowedConsumerProject
  • TestAccSqlDatabaseInstance_withPSCEnabled_withAllowedConsumerProjects
  • TestAccSqlDatabaseInstance_withPSCEnabled_withEmptyAllowedConsumerProjects
  • TestAccSqlDatabaseInstance_withPSCEnabled_withIpV4Enabled
  • TestAccSqlDatabaseInstance_withPSCEnabled_withoutAllowedConsumerProjects
  • TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRange
  • TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRangeClone
  • TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRangeReplica
  • TestAccSqlDatabaseInstance_withPrivateNetwork_withoutAllocatedIpRange
  • TestAccSqlDatabase_basic
  • TestAccSqlDatabase_update
  • TestAccSqlUser_postgres
  • TestAccSqlUser_postgresAbandon
  • TestAccSqlUser_postgresIAM
  • TestAccStorageTransferJob_eventStream
  • TestAccVertexAIDeploymentResourcePool_vertexAiDeploymentResourcePoolExample
  • TestAccVertexAIFeatureOnlineStoreFeatureview_vertexAiFeatureonlinestoreFeatureviewCrossProjectExample
  • TestAccWorkstationsWorkstationConfigIamBindingGenerated
  • TestAccWorkstationsWorkstationConfigIamMemberGenerated
  • TestAccWorkstationsWorkstationConfigIamPolicyGenerated
  • TestAccWorkstationsWorkstationConfig_displayName
  • TestAccWorkstationsWorkstationConfig_update
  • TestAccWorkstationsWorkstationConfig_updateHostDetails
  • TestAccWorkstationsWorkstationConfig_updatePersistentDirectorySourceSnapshot
  • TestAccWorkstationsWorkstationConfig_updateWorkingDir
  • TestAccWorkstationsWorkstationConfig_workstationConfigBasicExample

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccAssuredWorkloadsWorkload_BasicHandWritten[Debug log]
TestAccBigQueryJob_bigqueryJobCopyExample[Debug log]
TestAccBigQueryJob_bigqueryJobCopyTableReferenceExample[Debug log]
TestAccBigqueryDatasetIamMember[Debug log]
TestAccBigqueryDatasetIamMember_afterDatasetCreation[Debug log]
TestAccBigqueryDatasetIamMember_iamMember[Debug log]
TestAccBigqueryDatasetIamMember_serviceAccount[Debug log]
TestAccCloudRunService_cloudRunServiceSqlExample[Debug log]
TestAccCloudRunV2Job_cloudrunv2JobSqlExample[Debug log]
TestAccCloudRunV2Service_cloudrunv2ServiceSqlExample[Debug log]
TestAccComposerEnvironment_withEncryptionConfigComposer1[Debug log]
TestAccComputeNetworkFirewallPolicyRule_GlobalHandWritten[Debug log]
TestAccComputeNetworkFirewallPolicyRule_securityProfileGroup_update[Debug log]
TestAccComputeNetworkFirewallPolicyRule_update[Debug log]
TestAccComputeProjectMetadataItem_basic[Debug log]
TestAccComputeProjectMetadataItem_basicUpdate[Debug log]
TestAccComputeProjectMetadataItem_basicWithEmptyVal[Debug log]
TestAccComputeProjectMetadataItem_exists[Debug log]
TestAccComputeProjectMetadata_basic[Debug log]
TestAccComputeProjectMetadata_modify_1[Debug log]
TestAccComputeProjectMetadata_modify_2[Debug log]
TestAccComputeRegionNetworkEndpointGroup_regionNetworkEndpointGroupAppengineExample[Debug log]
TestAccComputeRegionNetworkFirewallPolicyRule_RegionalHandWritten[Debug log]
TestAccComputeSubnetwork_subnetworkReservedSecondaryRangeExample[Debug log]
TestAccContainerCluster_enableCiliumPolicies[Debug log]
TestAccContainerCluster_withLoggingConfig[Debug log]
TestAccDataLossPreventionDiscoveryConfig_Update[Debug log]
TestAccDataSourceGooglePubsubSubscription_basic[Debug log]
TestAccDataSourceGooglePubsubSubscription_optionalProject[Debug log]
TestAccDataSourceGoogleSQLCaCerts_basic[Debug log]
TestAccDataSourceSecretManagerSecrets_basic[Debug log]
TestAccDataSourceSecretManagerSecrets_filter[Debug log]
TestAccDataSourceSqlDatabaseInstanceLatestRecoveryTime_basic[Debug log]
TestAccDataSourceSqlDatabaseInstance_basic[Debug log]
TestAccDataSourceSqlDatabaseInstances_basic[Debug log]
TestAccDataSourceSqlDatabaseInstances_databaseVersionFilter[Debug log]
TestAccDataSourceSqlDatabaseInstances_regionFilter[Debug log]
TestAccDataSourceSqlDatabaseInstances_tierFilter[Debug log]
TestAccDataSourceSqlDatabase_basic[Debug log]
TestAccDataSourceSqlDatabases_basic[Debug log]
TestAccDatabaseMigrationServiceConnectionProfile_databaseMigrationServiceConnectionProfileCloudsqlExample[Debug log]
TestAccDatabaseMigrationServiceConnectionProfile_databaseMigrationServiceConnectionProfileExistingMysqlExample[Debug log]
TestAccDatabaseMigrationServiceConnectionProfile_databaseMigrationServiceConnectionProfileExistingPostgresExample[Debug log]
TestAccDatabaseMigrationServiceConnectionProfile_databaseMigrationServiceConnectionProfilePostgresExample[Debug log]
TestAccDatabaseMigrationServiceMigrationJob_databaseMigrationServiceMigrationJobMysqlToMysqlExample[Debug log]
TestAccDatabaseMigrationServiceMigrationJob_databaseMigrationServiceMigrationJobPostgresToAlloydbExample[Debug log]
TestAccDatabaseMigrationServiceMigrationJob_databaseMigrationServiceMigrationJobPostgresToPostgresExample[Debug log]
TestAccDatabaseMigrationServiceMigrationJob_update[Debug log]
TestAccDataprocAutoscalingPolicyIamBindingGenerated[Debug log]
TestAccDataprocAutoscalingPolicyIamMemberGenerated[Debug log]
TestAccDataprocAutoscalingPolicyIamPolicyGenerated[Debug log]
TestAccDataprocAutoscalingPolicy_dataprocAutoscalingPolicyBasicExample[Debug log]
TestAccDataprocAutoscalingPolicy_dataprocAutoscalingPolicyExample[Debug log]
TestAccDataprocCluster_withImageVersion[Debug log]
TestAccDataprocWorkflowTemplate_basic[Debug log]
TestAccDataprocWorkflowTemplate_withShieldedVMs[Debug log]
TestAccDialogflowCXAgent_dialogflowcxAgentFullExample[Debug log]
TestAccDialogflowCXAgent_update[Debug log]
TestAccDialogflowCXFlow_dialogflowcxFlowFullExample[Debug log]
TestAccDialogflowCXFlow_update[Debug log]
TestAccDiscoveryEngineChatEngine_discoveryengineChatengine_update[Debug log]
TestAccMemorystoreInstance_memorystoreInstanceFullExample[Debug log]
TestAccMonitoringAlertPolicy[Debug log]
TestAccNetappBackupPolicy_NetappBackupPolicyFullExample_update[Debug log]
TestAccNetappBackupVault_NetappBackupVaultExample_update[Debug log]
TestAccNetappVolume_NetappVolumeBasicExample_update[Debug log]
TestAccNetappVolume_autoTieredNetappVolume_update[Debug log]
TestAccNetworkServicesGateway_updateSwp[Debug log]
TestAccPubsubSubscriptionBigQuery_serviceAccount[Debug log]
TestAccPubsubSubscriptionBigQuery_update[Debug log]
TestAccPubsubSubscriptionCloudStorage_serviceAccount[Debug log]
TestAccPubsubSubscriptionCloudStorage_updateAvro[Debug log]
TestAccPubsubSubscriptionCloudStorage_updateText[Debug log]
TestAccPubsubSubscriptionIamBinding[Debug log]
TestAccPubsubSubscriptionIamMember[Debug log]
TestAccPubsubSubscriptionIamPolicy[Debug log]
TestAccPubsubSubscription_emptyTTL[Debug log]
TestAccPubsubSubscription_filter[Debug log]
TestAccPubsubSubscription_pollOnCreate[Debug log]
TestAccPubsubSubscription_pubsubSubscriptionDeadLetterExample[Debug log]
TestAccPubsubSubscription_pubsubSubscriptionPullFilterExample[Debug log]
TestAccPubsubSubscription_pubsubSubscriptionPushBqExample[Debug log]
TestAccPubsubSubscription_pubsubSubscriptionPushBqServiceAccountExample[Debug log]
TestAccPubsubSubscription_pubsubSubscriptionPushCloudstorageAvroExample[Debug log]
TestAccPubsubSubscription_pubsubSubscriptionPushCloudstorageExample[Debug log]
TestAccPubsubSubscription_pubsubSubscriptionPushCloudstorageServiceAccountExample[Debug log]
TestAccPubsubSubscription_pubsubSubscriptionPushExample[Debug log]
TestAccPubsubSubscription_push[Debug log]
TestAccPubsubSubscription_pushNoWrapper[Debug log]
TestAccPubsubSubscription_pushNoWrapperEmpty[Debug log]
TestAccRegionInstanceGroupManager_distributionPolicy[Debug log]
TestAccSQLDatabaseInstance_DenyMaintenancePeriod[Debug log]
TestAccSQLDatabase_sqlDatabaseBasicExample[Debug log]
TestAccSQLDatabase_sqlDatabaseDeletionPolicyExample[Debug log]
TestAccSpannerInstance_basic[Debug log]
TestAccSpannerInstance_basicWithAutoscalingUsingNodeConfig[Debug log]
TestAccSpannerInstance_basicWithAutoscalingUsingProcessingUnitConfig[Debug log]
TestAccSqlClientCert_mysql[Debug log]
TestAccSqlClientCert_postgres[Debug log]
TestAccSqlDatabaseInstance_BackupRetention[Debug log]
TestAccSqlDatabaseInstance_EnableGoogleDataplexIntegration[Debug log]
TestAccSqlDatabaseInstance_EnableGoogleMlIntegration[Debug log]
TestAccSqlDatabaseInstance_Mysql_Edition_Upgrade[Debug log]
TestAccSqlDatabaseInstance_PointInTimeRecoveryEnabled[Debug log]
TestAccSqlDatabaseInstance_PointInTimeRecoveryEnabledForSqlServer[Debug log]
TestAccSqlDatabaseInstance_ReplicaPromoteFailedWithMasterInstanceNameAndReplicaConfigurationPresent[Debug log]
TestAccSqlDatabaseInstance_ReplicaPromoteFailedWithMasterInstanceNamePresent[Debug log]
TestAccSqlDatabaseInstance_ReplicaPromoteFailedWithReplicaConfigurationPresent[Debug log]
TestAccSqlDatabaseInstance_ReplicaPromoteSkippedWithNoMasterInstanceNameAndNoReplicaConfigurationPresent[Debug log]
TestAccSqlDatabaseInstance_ReplicaPromoteSuccessful[Debug log]
TestAccSqlDatabaseInstance_Smt[Debug log]
TestAccSqlDatabaseInstance_SqlServerAuditOptionalBucket[Debug log]
TestAccSqlDatabaseInstance_Timezone[Debug log]
TestAccSqlDatabaseInstance_activationPolicy[Debug log]
TestAccSqlDatabaseInstance_authNets[Debug log]
TestAccSqlDatabaseInstance_basicInstance_thenPSCEnabled[Debug log]
TestAccSqlDatabaseInstance_basicMSSQL[Debug log]
TestAccSqlDatabaseInstance_basicSecondGen[Debug log]
TestAccSqlDatabaseInstance_basic_with_user_labels[Debug log]
TestAccSqlDatabaseInstance_deleteDefaultUserBeforeSubsequentApiCalls[Debug log]
TestAccSqlDatabaseInstance_diskspecs[Debug log]
TestAccSqlDatabaseInstance_dontDeleteDefaultUserOnReplica[Debug log]
TestAccSqlDatabaseInstance_encryptionKey[Debug log]
TestAccSqlDatabaseInstance_encryptionKey_replicaInDifferentRegion[Debug log]
TestAccSqlDatabaseInstance_highAvailability[Debug log]
TestAccSqlDatabaseInstance_insights[Debug log]
TestAccSqlDatabaseInstance_maintenance[Debug log]
TestAccSqlDatabaseInstance_maintenanceVersion[Debug log]
TestAccSqlDatabaseInstance_maintenance_update_track_week5[Debug log]
TestAccSqlDatabaseInstance_multipleOperations[Debug log]
TestAccSqlDatabaseInstance_replica[Debug log]
TestAccSqlDatabaseInstance_rootPasswordShouldBeUpdatable[Debug log]
TestAccSqlDatabaseInstance_settingsDowngrade[Debug log]
TestAccSqlDatabaseInstance_settings_basic[Debug log]
TestAccSqlDatabaseInstance_settings_deletionProtection[Debug log]
TestAccSqlDatabaseInstance_settings_deletionProtectionEnabled[Debug log]
TestAccSqlDatabaseInstance_settings_secondary[Debug log]
TestAccSqlDatabaseInstance_settings_upgrade[Debug log]
TestAccSqlDatabaseInstance_slave[Debug log]
TestAccSqlDatabaseInstance_sqlMysqlInstancePvpExample[Debug log]
TestAccSqlDatabaseInstance_updateDifferentFlagOrder[Debug log]
TestAccSqlDatabaseInstance_updateReadReplicaWithBinaryLogEnabled[Debug log]
TestAccSqlDatabaseInstance_updateSslOptionsForPostgreSQL[Debug log]
TestAccSqlDatabaseInstance_useInternalCaByDefault[Debug log]
TestAccSqlDatabaseInstance_withPSCEnabled_thenAddAllowedConsumerProjects_thenRemoveAllowedConsumerProject[Debug log]
TestAccSqlDatabaseInstance_withPSCEnabled_withAllowedConsumerProjects[Debug log]
TestAccSqlDatabaseInstance_withPSCEnabled_withEmptyAllowedConsumerProjects[Debug log]
TestAccSqlDatabaseInstance_withPSCEnabled_withIpV4Enabled[Debug log]
TestAccSqlDatabaseInstance_withPSCEnabled_withoutAllowedConsumerProjects[Debug log]
TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRangeClone[Debug log]
TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRangeReplica[Debug log]
TestAccSqlDatabaseInstance_withPrivateNetwork_withoutAllocatedIpRange[Debug log]
TestAccSqlDatabase_basic[Debug log]
TestAccSqlDatabase_update[Debug log]
TestAccSqlUser_postgres[Debug log]
TestAccSqlUser_postgresAbandon[Debug log]
TestAccSqlUser_postgresIAM[Debug log]
TestAccStorageTransferJob_eventStream[Debug log]
TestAccVertexAIFeatureOnlineStoreFeatureview_vertexAiFeatureonlinestoreFeatureviewCrossProjectExample[Debug log]
TestAccWorkstationsWorkstationConfigIamBindingGenerated[Debug log]
TestAccWorkstationsWorkstationConfigIamMemberGenerated[Debug log]
TestAccWorkstationsWorkstationConfigIamPolicyGenerated[Debug log]
TestAccWorkstationsWorkstationConfig_displayName[Debug log]
TestAccWorkstationsWorkstationConfig_update[Debug log]
TestAccWorkstationsWorkstationConfig_updateHostDetails[Debug log]
TestAccWorkstationsWorkstationConfig_updatePersistentDirectorySourceSnapshot[Debug log]
TestAccWorkstationsWorkstationConfig_updateWorkingDir[Debug log]
TestAccWorkstationsWorkstationConfig_workstationConfigBasicExample[Debug log]

$\textcolor{green}{\textsf{No issues found for passed tests after REPLAYING rerun.}}$


$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccComputeImageIamBindingGenerated[Error message] [Debug log]
TestAccComputeImageIamBindingGenerated_withCondition[Error message] [Debug log]
TestAccComputeImageIamMemberGenerated[Error message] [Debug log]
TestAccComputeImageIamMemberGenerated_withCondition[Error message] [Debug log]
TestAccComputeImageIamPolicyGenerated[Error message] [Debug log]
TestAccComputeImageIamPolicyGenerated_withCondition[Error message] [Debug log]
TestAccComputeImage_imageBasicExample[Error message] [Debug log]
TestAccComputeImage_imageBasicStorageLocationExample[Error message] [Debug log]
TestAccComputeImage_imageGuestOsExample[Error message] [Debug log]
TestAccComputeImage_update[Error message] [Debug log]
TestAccComputeInstanceTemplate_imageShorthand[Error message] [Debug log]
TestAccComputeInstanceTemplate_nictype_update[Error message] [Debug log]
TestAccComputeInstance_nictype_update[Error message] [Debug log]
TestAccComputeRegionInstanceTemplate_imageShorthand[Error message] [Debug log]
TestAccComputeRegionInstanceTemplate_nictype_update[Error message] [Debug log]
TestAccContainerAttachedCluster_containerAttachedClusterFullExample[Error message] [Debug log]
TestAccContainerAttachedCluster_update[Error message] [Debug log]
TestAccContainerCluster_autopilot_net_admin[Error message] [Debug log]
TestAccContainerCluster_with_PodCIDROverprovisionDisabled[Error message] [Debug log]
TestAccContainerNodePool_totalSize[Error message] [Debug log]
TestAccContainerNodePool_withEnablePrivateNodesToggle[Error message] [Debug log]
TestAccDataprocClusterIamBinding[Error message] [Debug log]
TestAccDataprocClusterIamMember[Error message] [Debug log]
TestAccDataprocClusterIamPolicy[Error message] [Debug log]
TestAccDataprocCluster_KMS[Error message] [Debug log]
TestAccDataprocCluster_nonPreemptibleSecondary[Error message] [Debug log]
TestAccDataprocCluster_singleNodeCluster[Error message] [Debug log]
TestAccDataprocCluster_spotSecondary[Error message] [Debug log]
TestAccDataprocCluster_withAccelerators[Error message] [Debug log]
TestAccDataprocCluster_withAutoscalingPolicy[Error message] [Debug log]
TestAccDataprocCluster_withConfigOverrides[Error message] [Debug log]
TestAccDataprocCluster_withDataprocMetricConfig[Error message] [Debug log]
TestAccDataprocCluster_withEndpointConfig[Error message] [Debug log]
TestAccDataprocCluster_withInitAction[Error message] [Debug log]
TestAccDataprocCluster_withKerberos[Error message] [Debug log]
TestAccDataprocCluster_withLabels[Error message] [Debug log]
TestAccDataprocCluster_withLifecycleConfigIdleDeleteTtl[Error message] [Debug log]
TestAccDataprocCluster_withMetadataAndTags[Error message] [Debug log]
TestAccDataprocCluster_withMinNumInstances[Error message] [Debug log]
TestAccDataprocCluster_withNodeGroupAffinity[Error message] [Debug log]
TestAccDataprocCluster_withOptionalComponents[Error message] [Debug log]
TestAccDataprocCluster_withReservationAffinity[Error message] [Debug log]
TestAccDataprocCluster_withServiceAcc[Error message] [Debug log]
TestAccDataprocCluster_withStagingBucket[Error message] [Debug log]
TestAccDataprocCluster_withTempBucket[Error message] [Debug log]
TestAccDataprocJobIamBinding[Error message] [Debug log]
TestAccDataprocJobIamMember[Error message] [Debug log]
TestAccDataprocJobIamPolicy[Error message] [Debug log]
TestAccDataprocJob_Hadoop[Error message] [Debug log]
TestAccDataprocJob_Hive[Error message] [Debug log]
TestAccDataprocJob_Pig[Error message] [Debug log]
TestAccDataprocJob_Presto[Error message] [Debug log]
TestAccDataprocJob_PySpark[Error message] [Debug log]
TestAccDataprocJob_Spark[Error message] [Debug log]
TestAccDataprocJob_SparkSql[Error message] [Debug log]
TestAccDataprocJob_updatable[Error message] [Debug log]
TestAccNetappBackup_NetappBackupFull_update[Error message] [Debug log]
TestAccPubsubSubscription_pubsubSubscriptionPushBqTableSchemaExample[Error message] [Debug log]
TestAccSpannerBackupSchedule_spannerBackupScheduleDailyIncrementalExample[Error message] [Debug log]
TestAccSpannerInstance_basicWithAutoscalingUsingNodeConfigUpdate[Error message] [Debug log]
TestAccSpannerInstance_basicWithAutoscalingUsingProcessingUnitConfigUpdate[Error message] [Debug log]
TestAccSqlDatabaseInstance_Edition[Error message] [Debug log]
TestAccSqlDatabaseInstance_withPrivateNetwork_withAllocatedIpRange[Error message] [Debug log]
TestAccVertexAIDeploymentResourcePool_vertexAiDeploymentResourcePoolExample[Error message] [Debug log]

$\textcolor{red}{\textsf{Errors occurred during RECORDING mode. Please fix them to complete your PR.}}$

View the build log or the debug log for each test

@SarahFrench
Copy link
Contributor

Thanks this makes review a lot easier!

In future what you can do is checkout FEATURE-BRANCH-ephemeral-resource in your local copy of the terraform-provider-google repo and then make magic-modules generated to that repo (i.e. set OUTPUT_PATH from the makefile to the terraform-provider-google where the downstream feature branch is checked out).

@SarahFrench
Copy link
Contributor

Currently running into issues where the p.providerConfig.UserAgent returns us "" which causes errors. Currently investigating how the userAgent is set on SDK and how we could replicate this on plugin-framework

This is where the User-Agent should get a value set during configuration of the PF-implemented provider:

	// Handle User Agent string
	p.UserAgent = CompileUserAgentString(ctx, "terraform-provider-google", tfVersion, providerversion)
	// opt in extension for adding to the User-Agent header
	if ext := os.Getenv("GOOGLE_TERRAFORM_USERAGENT_EXTENSION"); ext != "" {
		ua := p.UserAgent
		p.UserAgent = fmt.Sprintf("%s %s", ua, ext)
	}

I'm confused why you'd see that problem, so maybe for now we should review this PR and then tackle any bugs in a subsequent PR where we have an ephemeral resource implemented + some acceptance tests. We should be able to write acc tests and run them locally now that there's an alpha TF binary with the necessary stuff.

@SarahFrench
Copy link
Contributor

I used some of your reproduction info and I think there's a problem with provider configuration (i.e. the meta) being passed to the ephemeral resources, I'll follow up with you in Slack. I think that is a problem 'downstream' of this PR though so isn't a blocker for merging this

@SarahFrench SarahFrench self-requested a review October 25, 2024 20:04
Copy link
Contributor

@SarahFrench SarahFrench left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved - after we worked out what made our PoC demo not work I could see the new function was usable and didn't cause any obvious problems.

@BBBmau BBBmau merged commit df56ea7 into GoogleCloudPlatform:FEATURE-BRANCH-ephemeral-resource Oct 25, 2024
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants