From e102caaee44cf328235f268d6981bd32aef45516 Mon Sep 17 00:00:00 2001 From: Mike Wilson Date: Wed, 18 Oct 2023 14:32:38 -0400 Subject: [PATCH] Ensure membership_requires and ownership_requires are optional. The membership_requires and ownership_requires fields are now optional. --- terraform/protoc-gen-terraform-accesslist.yaml | 2 -- terraform/reference.mdx | 4 ++-- terraform/tfschema/accesslist/v1/accesslist_terraform.go | 4 ++-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/terraform/protoc-gen-terraform-accesslist.yaml b/terraform/protoc-gen-terraform-accesslist.yaml index bb907536e..909aebb73 100644 --- a/terraform/protoc-gen-terraform-accesslist.yaml +++ b/terraform/protoc-gen-terraform-accesslist.yaml @@ -48,8 +48,6 @@ required_fields: - "Metadata.name" - "AccessList.spec.owners" - "AccessList.spec.grants" - - "AccessList.spec.membership_requires" - - "AccessList.spec.ownership_requires" plan_modifiers: # Force to recreate resource if it's name changes diff --git a/terraform/reference.mdx b/terraform/reference.mdx index de4f19f11..1df009fd5 100755 --- a/terraform/reference.mdx +++ b/terraform/reference.mdx @@ -124,9 +124,9 @@ spec is the specification for the access list. | audit | object | | audit describes the frequency that this access list must be audited. | | description | string | | description is an optional plaintext description of the access list. | | grants | object | * | grants describes the access granted by membership to this access list. | -| membership_requires | object | * | membership_requires describes the requirements for a user to be a member of the access list. For a membership to an access list to be effective, the user must meet the requirements of Membership_requires and must be in the members list. | +| membership_requires | object | | membership_requires describes the requirements for a user to be a member of the access list. For a membership to an access list to be effective, the user must meet the requirements of Membership_requires and must be in the members list. | | owners | object | * | owners is a list of owners of the access list. | -| ownership_requires | object | * | ownership_requires describes the requirements for a user to be an owner of the access list. For ownership of an access list to be effective, the user must meet the requirements of ownership_requires and must be in the owners list. | +| ownership_requires | object | | ownership_requires describes the requirements for a user to be an owner of the access list. For ownership of an access list to be effective, the user must meet the requirements of ownership_requires and must be in the owners list. | | title | string | | title is a plaintext short description of the access list. | #### spec.audit diff --git a/terraform/tfschema/accesslist/v1/accesslist_terraform.go b/terraform/tfschema/accesslist/v1/accesslist_terraform.go index 31371826f..60456cd03 100644 --- a/terraform/tfschema/accesslist/v1/accesslist_terraform.go +++ b/terraform/tfschema/accesslist/v1/accesslist_terraform.go @@ -190,7 +190,7 @@ func GenSchemaAccessList(ctx context.Context) (github_com_hashicorp_terraform_pl }, }), Description: "membership_requires describes the requirements for a user to be a member of the access list. For a membership to an access list to be effective, the user must meet the requirements of Membership_requires and must be in the members list.", - Required: true, + Optional: true, }, "owners": { Attributes: github_com_hashicorp_terraform_plugin_framework_tfsdk.ListNestedAttributes(map[string]github_com_hashicorp_terraform_plugin_framework_tfsdk.Attribute{ @@ -233,7 +233,7 @@ func GenSchemaAccessList(ctx context.Context) (github_com_hashicorp_terraform_pl }, }), Description: "ownership_requires describes the requirements for a user to be an owner of the access list. For ownership of an access list to be effective, the user must meet the requirements of ownership_requires and must be in the owners list.", - Required: true, + Optional: true, }, "title": { Description: "title is a plaintext short description of the access list.",