From 596837bc9d32f2a85e8aeeccc4b157ac2aa63b69 Mon Sep 17 00:00:00 2001 From: bodymindarts Date: Tue, 18 Jun 2024 11:32:23 +0200 Subject: [PATCH] fix: nexted account set ids are computed only --- Makefile | 2 +- docs/resources/balance_sheet.md | 2 +- examples/main.tf | 2 +- provider/resource_balance_sheet.go | 14 -------------- 4 files changed, 3 insertions(+), 17 deletions(-) diff --git a/Makefile b/Makefile index 03d08b6..52c8985 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ BIN_OUT_DIR := out BINARY := $(BIN_OUT_DIR)/terraform-provider-cala -version = 0.0.13 +version = 0.0.14 os_arch = $(shell go env GOOS)_$(shell go env GOARCH) provider_path = registry.terraform.io/galoymoney/cala/$(version)/$(os_arch)/ diff --git a/docs/resources/balance_sheet.md b/docs/resources/balance_sheet.md index cee355d..16f6385 100644 --- a/docs/resources/balance_sheet.md +++ b/docs/resources/balance_sheet.md @@ -32,7 +32,7 @@ resource "cala_balance_sheet" "balance_sheet" { - `id` (String) ID of the journal associated with the balance sheet. -### Optional +### Read-Only - `assets_account_set_id` (String) ID of the account set for assets. - `liabilities_account_set_id` (String) ID of the account set for liabilities. diff --git a/examples/main.tf b/examples/main.tf index dfac5b9..07d53c3 100644 --- a/examples/main.tf +++ b/examples/main.tf @@ -34,7 +34,7 @@ terraform { required_providers { cala = { source = "registry.terraform.io/galoymoney/cala" - version = "0.0.13" + version = "0.0.14" } } } diff --git a/provider/resource_balance_sheet.go b/provider/resource_balance_sheet.go index e63331d..c6d5afe 100644 --- a/provider/resource_balance_sheet.go +++ b/provider/resource_balance_sheet.go @@ -53,72 +53,58 @@ func (r *BalanceSheetResource) Schema(ctx context.Context, req resource.SchemaRe }, "assets_account_set_id": schema.StringAttribute{ MarkdownDescription: "ID of the account set for assets.", - Optional: true, Computed: true, }, "liabilities_account_set_id": schema.StringAttribute{ MarkdownDescription: "ID of the account set for liabilities.", - Optional: true, Computed: true, }, "schedule1_account_set_id": schema.StringAttribute{ MarkdownDescription: "ID of the account set for schedule 1.", - Optional: true, Computed: true, }, "schedule2_account_set_id": schema.StringAttribute{ MarkdownDescription: "ID of the account set for schedule 2.", - Optional: true, Computed: true, }, "schedule3_account_set_id": schema.StringAttribute{ MarkdownDescription: "ID of the account set for schedule 3.", - Optional: true, Computed: true, }, "schedule4_account_set_id": schema.StringAttribute{ MarkdownDescription: "ID of the account set for schedule 4.", - Optional: true, Computed: true, }, "schedule5_account_set_id": schema.StringAttribute{ MarkdownDescription: "ID of the account set for schedule 5.", - Optional: true, Computed: true, }, "schedule6_account_set_id": schema.StringAttribute{ MarkdownDescription: "ID of the account set for schedule 6.", - Optional: true, Computed: true, }, "schedule7_account_set_id": schema.StringAttribute{ MarkdownDescription: "ID of the account set for schedule 7.", - Optional: true, Computed: true, }, "schedule8_account_set_id": schema.StringAttribute{ MarkdownDescription: "ID of the account set for schedule 8.", - Optional: true, Computed: true, }, "schedule9_account_set_id": schema.StringAttribute{ MarkdownDescription: "ID of the account set for schedule 9.", - Optional: true, Computed: true, }, "schedule10_account_set_id": schema.StringAttribute{ MarkdownDescription: "ID of the account set for schedule 10.", - Optional: true, Computed: true, }, "schedule11_account_set_id": schema.StringAttribute{ MarkdownDescription: "ID of the account set for schedule 11.", - Optional: true, Computed: true, }, "schedule12_account_set_id": schema.StringAttribute{ MarkdownDescription: "ID of the account set for schedule 12.", - Optional: true, Computed: true, }, },