Skip to content

Commit 5aa5f32

Browse files
authored
KUBE-766: bugfix: cast_service_account on read (#461)
* KUBE-766: bugfix: cast_service_account during read should not be rewritten
1 parent 83288cf commit 5aa5f32

File tree

3 files changed

+1
-5
lines changed

3 files changed

+1
-5
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ init-examples:
1212
GOOS=`go env GOOS`; \
1313
GOARCH=`go env GOARCH`; \
1414
git fetch --tags > /dev/null; \
15-
NEXT_MINOR=`git tag --list 'v*'|sort|tail -n 1| awk -F. -v OFS=. '{$$NF += 1 ; print}'`; \
15+
NEXT_MINOR=`git tag --list 'v*'|sort -V|tail -n 1| awk -F. -v OFS=. '{$$NF += 1 ; print}'`; \
1616
echo "using next possible minor version without 'v' prefix: $${NEXT_MINOR:1}"; \
1717
for examples in examples/eks examples/gke examples/aks ; do \
1818
for tfproject in $$examples/* ; do \

castai/resource_gke_cluster_id.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,6 @@ func resourceCastaiGKEClusterIdRead(ctx context.Context, data *schema.ResourceDa
172172
if err := data.Set(FieldGKEClientSA, toString(GKE.ClientServiceAccount)); err != nil {
173173
return diag.FromErr(fmt.Errorf("setting cluster client sa email: %w", err))
174174
}
175-
if err := data.Set(FieldGKECastSA, toString(GKE.CastServiceAccount)); err != nil {
176-
return diag.FromErr(fmt.Errorf("setting cluster cast sa email: %w", err))
177-
}
178175
}
179176
return nil
180177
}

castai/resource_gke_cluster_id_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ func TestGKEClusterIdResourceReadContext(t *testing.T) {
6969
r.Nil(result)
7070
r.False(result.HasError())
7171
r.Equal(`ID = b6bfc074-a267-400f-b8f1-db0850c36gke
72-
cast_service_account = cast-service-account
7372
client_service_account = client-service-account
7473
location = eu-central-1
7574
name = gke-cluster

0 commit comments

Comments
 (0)