Skip to content

Commit 09a985d

Browse files
committed
avoid returning error when resource creation and deletion is in progress
1 parent 384c189 commit 09a985d

File tree

3 files changed

+384
-190
lines changed

3 files changed

+384
-190
lines changed

api/v1beta2/types.go

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,12 @@ var (
6363
// ServiceInstanceStateActive is the string representing a service instance in an active state.
6464
ServiceInstanceStateActive = ServiceInstanceState("active")
6565

66+
// ServiceInstanceStateProvisioning is the string representing a service instance in a provisioning state.
67+
ServiceInstanceStateProvisioning = ServiceInstanceState("provisioning")
68+
69+
// ServiceInstanceStateFailed is the string representing a service instance in a failed state.
70+
ServiceInstanceStateFailed = ServiceInstanceState("failed")
71+
6672
// ServiceInstanceStateRemoved is the string representing a service instance in a removed state.
6773
ServiceInstanceStateRemoved = ServiceInstanceState("removed")
6874
)
@@ -74,6 +80,12 @@ var (
7480
// TransitGatewayStateAvailable is the string representing a transit gateway in available state.
7581
TransitGatewayStateAvailable = TransitGatewayState("available")
7682

83+
// TransitGatewayStatePending is the string representing a transit gateway in pending state.
84+
TransitGatewayStatePending = TransitGatewayState("pending")
85+
86+
// TransitGatewayStateFailed is the string representing a transit gateway in failed state.
87+
TransitGatewayStateFailed = TransitGatewayState("failed")
88+
7789
// TransitGatewayStateDeletePending is the string representing a transit gateway in deleting state.
7890
TransitGatewayStateDeletePending = TransitGatewayState("deleting")
7991
)
@@ -84,6 +96,15 @@ type TransitGatewayConnectionState string
8496
var (
8597
// TransitGatewayConnectionStateAttached is the string representing a transit gateway connection in attached state.
8698
TransitGatewayConnectionStateAttached = TransitGatewayConnectionState("attached")
99+
100+
// TransitGatewayConnectionStateFailed is the string representing a transit gateway connection in failed state.
101+
TransitGatewayConnectionStateFailed = TransitGatewayConnectionState("failed")
102+
103+
// TransitGatewayConnectionStatePending is the string representing a transit gateway connection in pending state.
104+
TransitGatewayConnectionStatePending = TransitGatewayConnectionState("pending")
105+
106+
// TransitGatewayConnectionStateDeleting is the string representing a transit gateway connection in deleting state.
107+
TransitGatewayConnectionStateDeleting = TransitGatewayConnectionState("deleting")
87108
)
88109

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

99-
// VPCLoadBalancerStateDeletePending is the string representing the load balancer in a failed state.
120+
// VPCLoadBalancerStateDeletePending is the string representing the load balancer in deleting state.
100121
VPCLoadBalancerStateDeletePending = VPCLoadBalancerState("delete_pending")
101122
)
102123

124+
// VPCSubnetState describes the state of a VPC Subnet.
125+
type VPCSubnetState string
126+
127+
var (
128+
// VPCSubnetStateDeleting is the string representing a VPC subnet in deleting state.
129+
VPCSubnetStateDeleting = VPCSubnetState("deleting")
130+
)
131+
132+
// VPCState describes the state of a VPC.
133+
type VPCState string
134+
135+
var (
136+
// VPCStatePending is the string representing a VPC in pending state.
137+
VPCStatePending = VPCState("pending")
138+
139+
// VPCStateDeleting is the string representing a VPC in deleting state.
140+
VPCStateDeleting = VPCState("deleting")
141+
)
142+
103143
// DHCPServerState describes the state of the DHCP Server.
104144
type DHCPServerState string
105145

106146
var (
107147
// DHCPServerStateActive indicates the active state of DHCP server.
108148
DHCPServerStateActive = DHCPServerState("ACTIVE")
149+
150+
// DHCPServerStateBuild indicates the build state of DHCP server.
151+
DHCPServerStateBuild = DHCPServerState("BUILD")
152+
153+
// DHCPServerStateError indicates the error state of DHCP server.
154+
DHCPServerStateError = DHCPServerState("ERROR")
109155
)
110156

111157
// DeletePolicy defines the policy used to identify images to be preserved.

0 commit comments

Comments
 (0)