Skip to content

Commit 2f1a606

Browse files
add connectionState to Apigee EndpointAttachment resource (#6459) (#12500)
Signed-off-by: Modular Magician <[email protected]> Signed-off-by: Modular Magician <[email protected]>
1 parent a0f1aaf commit 2f1a606

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

.changelog/6459.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:enhancement
2+
apigee: Added read-only field `connectionState` to `google_apigee_endpoint_attachment`
3+
```

google/resource_apigee_endpoint_attachment.go

+12
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ in the format 'organizations/{{org_name}}'.`,
6565
ForceNew: true,
6666
Description: `Format: projects/*/regions/*/serviceAttachments/*`,
6767
},
68+
"connection_state": {
69+
Type: schema.TypeString,
70+
Computed: true,
71+
Description: `State of the endpoint attachment connection to the service attachment.`,
72+
},
6873
"host": {
6974
Type: schema.TypeString,
7075
Computed: true,
@@ -191,6 +196,9 @@ func resourceApigeeEndpointAttachmentRead(d *schema.ResourceData, meta interface
191196
if err := d.Set("service_attachment", flattenApigeeEndpointAttachmentServiceAttachment(res["serviceAttachment"], d, config)); err != nil {
192197
return fmt.Errorf("Error reading EndpointAttachment: %s", err)
193198
}
199+
if err := d.Set("connection_state", flattenApigeeEndpointAttachmentConnectionState(res["connectionState"], d, config)); err != nil {
200+
return fmt.Errorf("Error reading EndpointAttachment: %s", err)
201+
}
194202

195203
return nil
196204
}
@@ -285,6 +293,10 @@ func flattenApigeeEndpointAttachmentServiceAttachment(v interface{}, d *schema.R
285293
return v
286294
}
287295

296+
func flattenApigeeEndpointAttachmentConnectionState(v interface{}, d *schema.ResourceData, config *Config) interface{} {
297+
return v
298+
}
299+
288300
func expandApigeeEndpointAttachmentLocation(v interface{}, d TerraformResourceData, config *Config) (interface{}, error) {
289301
return v, nil
290302
}

website/docs/r/apigee_endpoint_attachment.html.markdown

+3
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,9 @@ In addition to the arguments listed above, the following computed attributes are
108108
* `host` -
109109
Host that can be used in either HTTP Target Endpoint directly, or as the host in Target Server.
110110

111+
* `connection_state` -
112+
State of the endpoint attachment connection to the service attachment.
113+
111114

112115
## Timeouts
113116

0 commit comments

Comments
 (0)