Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Conversation

@grace-rehn
Copy link
Collaborator

@grace-rehn grace-rehn commented Nov 20, 2024

Updates octopusdeploy_tenant (Resource) and octopusdeploy_tenants (Data Source) to include is_disabled.

#project-disabling-tenants

[sc-96619]

"id": GetIdResourceSchema(),
"name": GetNameResourceSchema(true),
"space_id": GetSpaceIdResourceSchema("tenant"),
"is_disabled": resourceSchema.BoolAttribute{
Copy link
Collaborator

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.

Copy link
Collaborator

@IsaacCalligeros95 IsaacCalligeros95 left a 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).

Copy link
Collaborator

@IsaacCalligeros95 IsaacCalligeros95 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@domenicsim1 domenicsim1 left a 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! 😄

@grace-rehn grace-rehn merged commit c9bab2c into main Nov 22, 2024
22 checks passed
@grace-rehn grace-rehn deleted the grace/add-ability-to-disable-tenants branch November 22, 2024 03:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants