diff --git a/resources/types/aws/database.go b/resources/types/aws/database.go index f96dde69..96eecdea 100644 --- a/resources/types/aws/database.go +++ b/resources/types/aws/database.go @@ -52,6 +52,7 @@ func (r AwsDatabase) FromState(state *output.TfState) (*resourcespb.DatabaseReso SubnetId: r.Args.SubnetId, Host: host, ConnectionUsername: r.Args.Username, + GcpOverride: r.Args.GcpOverride, }, nil } diff --git a/resources/types/azure/database.go b/resources/types/azure/database.go index 96573a3c..0c172f71 100644 --- a/resources/types/azure/database.go +++ b/resources/types/azure/database.go @@ -63,6 +63,7 @@ func (r AzureDatabase) FromState(state *output.TfState) (*resourcespb.DatabaseRe SubnetId: r.Args.SubnetId, Host: host, ConnectionUsername: fmt.Sprintf("%s@%s", r.Args.Username, host), + GcpOverride: r.Args.GcpOverride, }, nil } diff --git a/resources/types/gcp/database.go b/resources/types/gcp/database.go index 9ec5663e..c3b2b261 100644 --- a/resources/types/gcp/database.go +++ b/resources/types/gcp/database.go @@ -51,6 +51,7 @@ func (r GcpDatabase) FromState(state *output.TfState) (*resourcespb.DatabaseReso SubnetId: r.Args.SubnetId, Host: host, ConnectionUsername: r.Args.Username, + GcpOverride: r.Args.GcpOverride, }, nil } diff --git a/resources/types/gcp/kubernetes_cluster.go b/resources/types/gcp/kubernetes_cluster.go index 49661250..10195e37 100644 --- a/resources/types/gcp/kubernetes_cluster.go +++ b/resources/types/gcp/kubernetes_cluster.go @@ -153,7 +153,7 @@ func (r GcpKubernetesCluster) Translate(ctx resources.MultyContext) ([]output.Tf } func (r GcpKubernetesCluster) getServiceAccountId() string { - return common.UniqueId(r.Args.Name, "-sa-", common.LowercaseAlphanumericAndDashFormatFunc) + return common.UniqueId(fmt.Sprintf("%s-%s", r.Args.Name, r.ResourceId), "-sa-", common.LowercaseAlphanumericAndDashFormatFunc) } func (r GcpKubernetesCluster) GetMainResourceName() (string, error) { diff --git a/test/e2e/vault_secret_test.go b/test/e2e/vault_secret_test.go index f0c99770..143fbeb9 100644 --- a/test/e2e/vault_secret_test.go +++ b/test/e2e/vault_secret_test.go @@ -97,7 +97,7 @@ func testVaultSecret(t *testing.T, cloud commonpb.CloudProvider) { } func setupVmForVaultTest(t *testing.T, ctx context.Context, location commonpb.Location, cloud commonpb.CloudProvider, pubKey string) *resourcespb.VirtualMachineResource { - subnet, nsg := createNetworkWithInternetAccess(t, ctx, location, cloud, "vm") + subnet, nsg := createNetworkWithInternetAccess(t, ctx, location, cloud, "vault") createVmRequest := &resourcespb.CreateVirtualMachineRequest{Resource: &resourcespb.VirtualMachineArgs{ CommonParameters: &commonpb.ResourceCommonArgs{ Location: location,