Skip to content

Commit 9802b5d

Browse files
committed
make event_stream optional+computed
1 parent ec93099 commit 9802b5d

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

mmv1/third_party/terraform/services/storagetransfer/resource_storage_transfer_job.go.tmpl

+2-8
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,9 @@ func ResourceStorageTransferJob() *schema.Resource {
118118
"event_stream": {
119119
Type: schema.TypeList,
120120
Optional: true,
121+
Computed: true,
121122
MaxItems: 1,
122-
ConflictsWith: []string{"schedule"},
123-
DiffSuppressFunc: diffSuppressEventStream,
123+
ConflictsWith: []string{"schedule", "replication_spec"},
124124
Elem: &schema.Resource{
125125
Schema: map[string]*schema.Schema{
126126
"name": {
@@ -1426,12 +1426,6 @@ func flattenTransferJobNotificationConfig(notificationConfig *storagetransfer.No
14261426
return []map[string]interface{}{data}
14271427
}
14281428

1429-
func diffSuppressEventStream(k, old, new string, d *schema.ResourceData) bool {
1430-
// Check if it's a replication job.
1431-
_, is_replication := d.GetOk("replication_spec")
1432-
return is_replication
1433-
}
1434-
14351429
func expandReplicationSpecs(replicationSpecs []interface{}) *storagetransfer.ReplicationSpec {
14361430
if len(replicationSpecs) == 0 || replicationSpecs[0] == nil {
14371431
return nil

0 commit comments

Comments
 (0)