Skip to content

Commit f661c5b

Browse files
modular-magicianEdward Sun
and
Edward Sun
authored
add desc to schema for google_dataflow_job (#3644) (#6655)
Co-authored-by: Edward Sun <[email protected]> Signed-off-by: Modular Magician <[email protected]> Co-authored-by: Edward Sun <[email protected]>
1 parent 2838ee2 commit f661c5b

File tree

2 files changed

+45
-23
lines changed

2 files changed

+45
-23
lines changed

.changelog/3644.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:none
2+
3+
```

google/resource_dataflow_job.go

+42-23
Original file line numberDiff line numberDiff line change
@@ -58,113 +58,132 @@ func resourceDataflowJob() *schema.Resource {
5858
Type: schema.TypeString,
5959
Required: true,
6060
// ForceNew applies to both stream and batch jobs
61-
ForceNew: true,
61+
ForceNew: true,
62+
Description: `A unique name for the resource, required by Dataflow.`,
6263
},
6364

6465
"template_gcs_path": {
65-
Type: schema.TypeString,
66-
Required: true,
66+
Type: schema.TypeString,
67+
Required: true,
68+
Description: `The GCS path to the Dataflow job template.`,
6769
},
6870

6971
"temp_gcs_location": {
70-
Type: schema.TypeString,
71-
Required: true,
72+
Type: schema.TypeString,
73+
Required: true,
74+
Description: `A writeable location on GCS for the Dataflow job to dump its temporary data.`,
7275
},
7376

7477
"zone": {
7578
Type: schema.TypeString,
7679
Optional: true,
7780
// ForceNew applies to both stream and batch jobs
78-
ForceNew: true,
81+
ForceNew: true,
82+
Description: `The zone in which the created job should run. If it is not provided, the provider zone is used.`,
7983
},
8084

8185
"region": {
8286
Type: schema.TypeString,
8387
Optional: true,
8488
// ForceNew applies to both stream and batch jobs
85-
ForceNew: true,
89+
ForceNew: true,
90+
Description: `The region in which the created job should run.`,
8691
},
8792

8893
"max_workers": {
8994
Type: schema.TypeInt,
9095
Optional: true,
9196
// ForceNew applies to both stream and batch jobs
92-
ForceNew: true,
97+
ForceNew: true,
98+
Description: `The number of workers permitted to work on the job. More workers may improve processing speed at additional cost.`,
9399
},
94100

95101
"parameters": {
96-
Type: schema.TypeMap,
97-
Optional: true,
102+
Type: schema.TypeMap,
103+
Optional: true,
104+
Description: `Key/Value pairs to be passed to the Dataflow job (as used in the template).`,
98105
},
99106

100107
"labels": {
101108
Type: schema.TypeMap,
102109
Optional: true,
103110
DiffSuppressFunc: resourceDataflowJobLabelDiffSuppress,
111+
Description: `User labels to be specified for the job. Keys and values should follow the restrictions specified in the labeling restrictions page. NOTE: Google-provided Dataflow templates often provide default labels that begin with goog-dataflow-provided. Unless explicitly set in config, these labels will be ignored to prevent diffs on re-apply.`,
104112
},
105113

106114
"on_delete": {
107115
Type: schema.TypeString,
108116
ValidateFunc: validation.StringInSlice([]string{"cancel", "drain"}, false),
109117
Optional: true,
110118
Default: "drain",
119+
Description: `One of "drain" or "cancel". Specifies behavior of deletion during terraform destroy.`,
111120
},
112121

113122
"project": {
114123
Type: schema.TypeString,
115124
Optional: true,
116125
Computed: true,
117126
// ForceNew applies to both stream and batch jobs
118-
ForceNew: true,
127+
ForceNew: true,
128+
Description: `The project in which the resource belongs.`,
119129
},
120130

121131
"state": {
122-
Type: schema.TypeString,
123-
Computed: true,
132+
Type: schema.TypeString,
133+
Computed: true,
134+
Description: `The current state of the resource, selected from the JobState enum.`,
124135
},
125136
"type": {
126-
Type: schema.TypeString,
127-
Computed: true,
137+
Type: schema.TypeString,
138+
Computed: true,
139+
Description: `The type of this job, selected from the JobType enum.`,
128140
},
129141
"service_account_email": {
130-
Type: schema.TypeString,
131-
Optional: true,
142+
Type: schema.TypeString,
143+
Optional: true,
144+
Description: `The Service Account email used to create the job.`,
132145
},
133146

134147
"network": {
135148
Type: schema.TypeString,
136149
Optional: true,
137150
DiffSuppressFunc: compareSelfLinkOrResourceName,
151+
Description: `The network to which VMs will be assigned. If it is not provided, "default" will be used.`,
138152
},
139153

140154
"subnetwork": {
141155
Type: schema.TypeString,
142156
Optional: true,
143157
DiffSuppressFunc: compareSelfLinkOrResourceName,
158+
Description: `The subnetwork to which VMs will be assigned. Should be of the form "regions/REGION/subnetworks/SUBNETWORK".`,
144159
},
145160

146161
"machine_type": {
147-
Type: schema.TypeString,
148-
Optional: true,
162+
Type: schema.TypeString,
163+
Optional: true,
164+
Description: `The machine type to use for the job.`,
149165
},
150166

151167
"ip_configuration": {
152168
Type: schema.TypeString,
153169
Optional: true,
170+
Description: `The configuration for VM IPs. Options are "WORKER_IP_PUBLIC" or "WORKER_IP_PRIVATE".`,
154171
ValidateFunc: validation.StringInSlice([]string{"WORKER_IP_PUBLIC", "WORKER_IP_PRIVATE", ""}, false),
155172
},
156173

157174
"additional_experiments": {
158-
Type: schema.TypeSet,
159-
Optional: true,
175+
Type: schema.TypeSet,
176+
Optional: true,
177+
Description: `List of experiments that should be used by the job. An example value is ["enable_stackdriver_agent_metrics"].`,
160178
Elem: &schema.Schema{
161179
Type: schema.TypeString,
162180
},
163181
},
164182

165183
"job_id": {
166-
Type: schema.TypeString,
167-
Computed: true,
184+
Type: schema.TypeString,
185+
Computed: true,
186+
Description: `The unique ID of this job.`,
168187
},
169188
},
170189
}

0 commit comments

Comments
 (0)