@@ -201,21 +201,21 @@ func resourceAwsEcsServiceRead(d *schema.ResourceData, meta interface{}) error {
201
201
log .Printf ("[DEBUG] Received ECS service %s" , service )
202
202
203
203
d .SetId (* service .ServiceArn )
204
- d .Set ("name" , * service .ServiceName )
204
+ d .Set ("name" , service .ServiceName )
205
205
206
206
// Save task definition in the same format
207
207
if strings .HasPrefix (d .Get ("task_definition" ).(string ), "arn:aws:ecs:" ) {
208
- d .Set ("task_definition" , * service .TaskDefinition )
208
+ d .Set ("task_definition" , service .TaskDefinition )
209
209
} else {
210
210
taskDefinition := buildFamilyAndRevisionFromARN (* service .TaskDefinition )
211
211
d .Set ("task_definition" , taskDefinition )
212
212
}
213
213
214
- d .Set ("desired_count" , * service .DesiredCount )
214
+ d .Set ("desired_count" , service .DesiredCount )
215
215
216
216
// Save cluster in the same format
217
217
if strings .HasPrefix (d .Get ("cluster" ).(string ), "arn:aws:ecs:" ) {
218
- d .Set ("cluster" , * service .ClusterArn )
218
+ d .Set ("cluster" , service .ClusterArn )
219
219
} else {
220
220
clusterARN := getNameFromARN (* service .ClusterArn )
221
221
d .Set ("cluster" , clusterARN )
@@ -224,16 +224,16 @@ func resourceAwsEcsServiceRead(d *schema.ResourceData, meta interface{}) error {
224
224
// Save IAM role in the same format
225
225
if service .RoleArn != nil {
226
226
if strings .HasPrefix (d .Get ("iam_role" ).(string ), "arn:aws:iam:" ) {
227
- d .Set ("iam_role" , * service .RoleArn )
227
+ d .Set ("iam_role" , service .RoleArn )
228
228
} else {
229
229
roleARN := getNameFromARN (* service .RoleArn )
230
230
d .Set ("iam_role" , roleARN )
231
231
}
232
232
}
233
233
234
234
if service .DeploymentConfiguration != nil {
235
- d .Set ("deployment_maximum_percent" , * service .DeploymentConfiguration .MaximumPercent )
236
- d .Set ("deployment_minimum_healthy_percent" , * service .DeploymentConfiguration .MinimumHealthyPercent )
235
+ d .Set ("deployment_maximum_percent" , service .DeploymentConfiguration .MaximumPercent )
236
+ d .Set ("deployment_minimum_healthy_percent" , service .DeploymentConfiguration .MinimumHealthyPercent )
237
237
}
238
238
239
239
if service .LoadBalancers != nil {
0 commit comments