provider/aws: Remove unsafe ptr dereferencing [A-C]* (#8519)

This commit is contained in:
Radek Simko 2016-08-28 19:25:30 +01:00 committed by GitHub
parent 29990eab0a
commit 302982c335
6 changed files with 19 additions and 19 deletions

View File

@ -76,7 +76,7 @@ func resourceAwsApiGatewayDomainNameCreate(d *schema.ResourceData, meta interfac
}
d.SetId(*domainName.DomainName)
d.Set("cloudfront_domain_name", *domainName.DistributionDomainName)
d.Set("cloudfront_domain_name", domainName.DistributionDomainName)
d.Set("cloudfront_zone_id", cloudFrontRoute53ZoneID)
return resourceAwsApiGatewayDomainNameRead(d, meta)

View File

@ -122,7 +122,7 @@ func resourceAwsCloudTrailCreate(d *schema.ResourceData, meta interface{}) error
log.Printf("[DEBUG] CloudTrail created: %s", t)
d.Set("arn", *t.TrailARN)
d.Set("arn", t.TrailARN)
d.SetId(*t.Name)
// AWS CloudTrail sets newly-created trails to false.

View File

@ -76,11 +76,11 @@ func resourceAwsCloudWatchLogGroupRead(d *schema.ResourceData, meta interface{})
log.Printf("[DEBUG] Found Log Group: %#v", *lg)
d.Set("arn", *lg.Arn)
d.Set("name", *lg.LogGroupName)
d.Set("arn", lg.Arn)
d.Set("name", lg.LogGroupName)
if lg.RetentionInDays != nil {
d.Set("retention_in_days", *lg.RetentionInDays)
d.Set("retention_in_days", lg.RetentionInDays)
}
return nil

View File

@ -93,10 +93,10 @@ func resourceAwsCodeCommitRepositoryCreate(d *schema.ResourceData, meta interfac
}
d.SetId(d.Get("repository_name").(string))
d.Set("repository_id", *out.RepositoryMetadata.RepositoryId)
d.Set("arn", *out.RepositoryMetadata.Arn)
d.Set("clone_url_http", *out.RepositoryMetadata.CloneUrlHttp)
d.Set("clone_url_ssh", *out.RepositoryMetadata.CloneUrlSsh)
d.Set("repository_id", out.RepositoryMetadata.RepositoryId)
d.Set("arn", out.RepositoryMetadata.Arn)
d.Set("clone_url_http", out.RepositoryMetadata.CloneUrlHttp)
d.Set("clone_url_ssh", out.RepositoryMetadata.CloneUrlSsh)
return resourceAwsCodeCommitRepositoryUpdate(d, meta)
}
@ -133,14 +133,14 @@ func resourceAwsCodeCommitRepositoryRead(d *schema.ResourceData, meta interface{
return fmt.Errorf("Error reading CodeCommit Repository: %s", err.Error())
}
d.Set("repository_id", *out.RepositoryMetadata.RepositoryId)
d.Set("arn", *out.RepositoryMetadata.Arn)
d.Set("clone_url_http", *out.RepositoryMetadata.CloneUrlHttp)
d.Set("clone_url_ssh", *out.RepositoryMetadata.CloneUrlSsh)
d.Set("repository_id", out.RepositoryMetadata.RepositoryId)
d.Set("arn", out.RepositoryMetadata.Arn)
d.Set("clone_url_http", out.RepositoryMetadata.CloneUrlHttp)
d.Set("clone_url_ssh", out.RepositoryMetadata.CloneUrlSsh)
if _, ok := d.GetOk("default_branch"); ok {
if out.RepositoryMetadata.DefaultBranch != nil {
d.Set("default_branch", *out.RepositoryMetadata.DefaultBranch)
d.Set("default_branch", out.RepositoryMetadata.DefaultBranch)
}
}

View File

@ -78,7 +78,7 @@ func resourceAwsCodeDeployAppRead(d *schema.ResourceData, meta interface{}) erro
}
}
d.Set("name", *resp.Application.ApplicationName)
d.Set("name", resp.Application.ApplicationName)
return nil
}

View File

@ -247,11 +247,11 @@ func resourceAwsCodeDeployDeploymentGroupRead(d *schema.ResourceData, meta inter
return err
}
d.Set("app_name", *resp.DeploymentGroupInfo.ApplicationName)
d.Set("app_name", resp.DeploymentGroupInfo.ApplicationName)
d.Set("autoscaling_groups", resp.DeploymentGroupInfo.AutoScalingGroups)
d.Set("deployment_config_name", *resp.DeploymentGroupInfo.DeploymentConfigName)
d.Set("deployment_group_name", *resp.DeploymentGroupInfo.DeploymentGroupName)
d.Set("service_role_arn", *resp.DeploymentGroupInfo.ServiceRoleArn)
d.Set("deployment_config_name", resp.DeploymentGroupInfo.DeploymentConfigName)
d.Set("deployment_group_name", resp.DeploymentGroupInfo.DeploymentGroupName)
d.Set("service_role_arn", resp.DeploymentGroupInfo.ServiceRoleArn)
if err := d.Set("ec2_tag_filter", ec2TagFiltersToMap(resp.DeploymentGroupInfo.Ec2TagFilters)); err != nil {
return err
}