Skip to content

Commit

Permalink
Tweaks.
Browse files Browse the repository at this point in the history
  • Loading branch information
ewbankkit committed Feb 20, 2024
1 parent 3985ca2 commit 9c039e9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
5 changes: 2 additions & 3 deletions internal/service/deploy/deployment_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ package deploy

import (
"context"
"fmt"
"log"

"github.com/aws/aws-sdk-go-v2/aws"
Expand Down Expand Up @@ -183,12 +182,12 @@ func resourceDeploymentConfigRead(ctx context.Context, d *schema.ResourceData, m
Service: "codedeploy",
Region: meta.(*conns.AWSClient).Region,
AccountID: meta.(*conns.AWSClient).AccountID,
Resource: fmt.Sprintf("deploymentconfig:%s", deploymentConfigName),
Resource: "deploymentconfig:" + deploymentConfigName,
}.String()
d.Set("arn", arn)
d.Set("compute_platform", deploymentConfig.ComputePlatform)
d.Set("deployment_config_id", deploymentConfig.DeploymentConfigId)
d.Set("deployment_config_name", deploymentConfig.DeploymentConfigName)
d.Set("deployment_config_name", deploymentConfigName)
if err := d.Set("minimum_healthy_hosts", flattenMinimumHealthHosts(deploymentConfig.MinimumHealthyHosts)); err != nil {
return sdkdiag.AppendErrorf(diags, "setting minimum_healthy_hosts: %s", err)
}
Expand Down
6 changes: 3 additions & 3 deletions internal/service/deploy/deployment_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (

func TestAccDeployDeploymentConfig_basic(t *testing.T) {
ctx := acctest.Context(t)
var config1 types.DeploymentConfigInfo
var config types.DeploymentConfigInfo
resourceName := "aws_codedeploy_deployment_config.test"
rName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix)

Expand All @@ -36,8 +36,8 @@ func TestAccDeployDeploymentConfig_basic(t *testing.T) {
{
Config: testAccDeploymentConfigConfig_fleet(rName, 75),
Check: resource.ComposeTestCheckFunc(
testAccCheckDeploymentConfigExists(ctx, resourceName, &config1),
acctest.CheckResourceAttrRegionalARN(resourceName, "arn", "codedeploy", fmt.Sprintf("deploymentconfig:%s", rName)),
testAccCheckDeploymentConfigExists(ctx, resourceName, &config),
resource.TestCheckResourceAttrSet(resourceName, "arn"),
resource.TestCheckResourceAttr(resourceName, "deployment_config_name", rName),
resource.TestCheckResourceAttr(resourceName, "compute_platform", "Server"),
resource.TestCheckResourceAttr(resourceName, "traffic_routing_config.#", "0"),
Expand Down

0 comments on commit 9c039e9

Please sign in to comment.