Skip to content

Commit

Permalink
avoid returning error when resource creation and deletion is in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
Amulyam24 committed Mar 29, 2024
1 parent 384c189 commit 4151d0f
Show file tree
Hide file tree
Showing 3 changed files with 412 additions and 192 deletions.
48 changes: 47 additions & 1 deletion api/v1beta2/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ var (
// ServiceInstanceStateActive is the string representing a service instance in an active state.
ServiceInstanceStateActive = ServiceInstanceState("active")

// ServiceInstanceStateProvisioning is the string representing a service instance in a provisioning state.
ServiceInstanceStateProvisioning = ServiceInstanceState("provisioning")

// ServiceInstanceStateFailed is the string representing a service instance in a failed state.
ServiceInstanceStateFailed = ServiceInstanceState("failed")

// ServiceInstanceStateRemoved is the string representing a service instance in a removed state.
ServiceInstanceStateRemoved = ServiceInstanceState("removed")
)
Expand All @@ -74,6 +80,12 @@ var (
// TransitGatewayStateAvailable is the string representing a transit gateway in available state.
TransitGatewayStateAvailable = TransitGatewayState("available")

// TransitGatewayStatePending is the string representing a transit gateway in pending state.
TransitGatewayStatePending = TransitGatewayState("pending")

// TransitGatewayStateFailed is the string representing a transit gateway in failed state.
TransitGatewayStateFailed = TransitGatewayState("failed")

// TransitGatewayStateDeletePending is the string representing a transit gateway in deleting state.
TransitGatewayStateDeletePending = TransitGatewayState("deleting")
)
Expand All @@ -84,6 +96,15 @@ type TransitGatewayConnectionState string
var (
// TransitGatewayConnectionStateAttached is the string representing a transit gateway connection in attached state.
TransitGatewayConnectionStateAttached = TransitGatewayConnectionState("attached")

// TransitGatewayConnectionStateFailed is the string representing a transit gateway connection in failed state.
TransitGatewayConnectionStateFailed = TransitGatewayConnectionState("failed")

// TransitGatewayConnectionStatePending is the string representing a transit gateway connection in pending state.
TransitGatewayConnectionStatePending = TransitGatewayConnectionState("pending")

// TransitGatewayConnectionStateDeleting is the string representing a transit gateway connection in deleting state.
TransitGatewayConnectionStateDeleting = TransitGatewayConnectionState("deleting")
)

// VPCLoadBalancerState describes the state of the load balancer.
Expand All @@ -96,16 +117,41 @@ var (
// VPCLoadBalancerStateCreatePending is the string representing the load balancer in a queued state.
VPCLoadBalancerStateCreatePending = VPCLoadBalancerState("create_pending")

// VPCLoadBalancerStateDeletePending is the string representing the load balancer in a failed state.
// VPCLoadBalancerStateDeletePending is the string representing the load balancer in deleting state.
VPCLoadBalancerStateDeletePending = VPCLoadBalancerState("delete_pending")
)

// VPCSubnetState describes the state of a VPC Subnet.
type VPCSubnetState string

var (
// VPCSubnetStateDeleting is the string representing a VPC subnet in deleting state.
VPCSubnetStateDeleting = VPCSubnetState("deleting")
)

// VPCState describes the state of a VPC.
type VPCState string

var (
// VPCStatePending is the string representing a VPC in pending state.
VPCStatePending = VPCState("pending")

// VPCStateDeleting is the string representing a VPC in deleting state.
VPCStateDeleting = VPCState("deleting")
)

// DHCPServerState describes the state of the DHCP Server.
type DHCPServerState string

var (
// DHCPServerStateActive indicates the active state of DHCP server.
DHCPServerStateActive = DHCPServerState("ACTIVE")

// DHCPServerStateBuild indicates the build state of DHCP server.
DHCPServerStateBuild = DHCPServerState("BUILD")

// DHCPServerStateError indicates the error state of DHCP server.
DHCPServerStateError = DHCPServerState("ERROR")
)

// DeletePolicy defines the policy used to identify images to be preserved.
Expand Down
Loading

0 comments on commit 4151d0f

Please sign in to comment.