From babc90d8100f1de149b4a01f17d3edaa046f78f7 Mon Sep 17 00:00:00 2001 From: Marcin Maciaszczyk Date: Mon, 22 Apr 2024 12:39:08 +0200 Subject: [PATCH] update attributes --- internal/resource/infrastructure_stack_model.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/internal/resource/infrastructure_stack_model.go b/internal/resource/infrastructure_stack_model.go index 874aae7..9b97c8b 100644 --- a/internal/resource/infrastructure_stack_model.go +++ b/internal/resource/infrastructure_stack_model.go @@ -33,7 +33,7 @@ func (is *infrastructureStack) Attributes(ctx context.Context, d diag.Diagnostic RepositoryID: is.Repository.Id.ValueString(), ClusterID: is.ClusterId.ValueString(), Git: is.Repository.Attributes(), - JobSpec: nil, + JobSpec: is.JobSpec.Attributes(), Configuration: is.Configuration.Attributes(), Approval: is.Approval.ValueBoolPointer(), ReadBindings: is.Bindings.ReadAttributes(ctx, d), @@ -179,6 +179,14 @@ type InfrastructureStackJobSpec struct { ServiceAccount types.String `tfsdk:"service_account"` } +func (isjs *InfrastructureStackJobSpec) Attributes() *gqlclient.GateJobAttributes { + if isjs == nil { + return nil + } + + return &gqlclient.GateJobAttributes{} // TODO +} + func (isjs *InfrastructureStackJobSpec) From(spec *gqlclient.JobGateSpecFragment) { if isjs == nil { return