-
Notifications
You must be signed in to change notification settings - Fork 66
feat: Add ability to disable tenants #820
Conversation
| "id": GetIdResourceSchema(), | ||
| "name": GetNameResourceSchema(true), | ||
| "space_id": GetSpaceIdResourceSchema("tenant"), | ||
| "is_disabled": resourceSchema.BoolAttribute{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at the project resource schema the is_disabled schema has a boolplanmodifier.UseStateForUnknown() I think we need it here
UseStateForUnknown(): Copies a known prior state value into the planned value. Use this when it is known that an unconfigured value will remain the same after a resource update.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we update either the resource_tenant_migration_test.go or resource_tenant_test.go tests to update is_disabled and assert that is_disabled gets set. To run these locally you'll need to set some environment for testing_container_test.go or set the createSharedContainer flag to true. (Make sure your looking in the framework folder).
IsaacCalligeros95
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
domenicsim1
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, looks good!
Thanks for taking on this feature! 😄
Updates
octopusdeploy_tenant (Resource)andoctopusdeploy_tenants (Data Source)to includeis_disabled.#project-disabling-tenants
[sc-96619]