Skip to content

Commit

Permalink
Codeploy deployment group app_name instead of application_name.
Browse files Browse the repository at this point in the history
The corresponding resource is called aws_codeploy_app, so for consistency
we'll name the attribute app_name instead of application_name.
  • Loading branch information
apparentlymart committed Oct 21, 2015
1 parent 0952505 commit dd56b39
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func resourceAwsCodeDeployDeploymentGroup() *schema.Resource {
Delete: resourceAwsCodeDeployDeploymentGroupDelete,

Schema: map[string]*schema.Schema{
"application_name": &schema.Schema{
"app_name": &schema.Schema{
Type: schema.TypeString,
Required: true,
ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) {
Expand Down Expand Up @@ -132,7 +132,7 @@ func resourceAwsCodeDeployDeploymentGroup() *schema.Resource {
func resourceAwsCodeDeployDeploymentGroupCreate(d *schema.ResourceData, meta interface{}) error {
conn := meta.(*AWSClient).codedeployconn

application := d.Get("application_name").(string)
application := d.Get("app_name").(string)
deploymentGroup := d.Get("deployment_group_name").(string)

input := codedeploy.CreateDeploymentGroupInput{
Expand Down Expand Up @@ -189,14 +189,14 @@ func resourceAwsCodeDeployDeploymentGroupRead(d *schema.ResourceData, meta inter

log.Printf("[DEBUG] Reading CodeDeploy DeploymentGroup %s", d.Id())
resp, err := conn.GetDeploymentGroup(&codedeploy.GetDeploymentGroupInput{
ApplicationName: aws.String(d.Get("application_name").(string)),
ApplicationName: aws.String(d.Get("app_name").(string)),
DeploymentGroupName: aws.String(d.Get("deployment_group_name").(string)),
})
if err != nil {
return err
}

d.Set("application_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)
Expand All @@ -215,7 +215,7 @@ func resourceAwsCodeDeployDeploymentGroupUpdate(d *schema.ResourceData, meta int
conn := meta.(*AWSClient).codedeployconn

input := codedeploy.UpdateDeploymentGroupInput{
ApplicationName: aws.String(d.Get("application_name").(string)),
ApplicationName: aws.String(d.Get("app_name").(string)),
CurrentDeploymentGroupName: aws.String(d.Get("deployment_group_name").(string)),
}

Expand Down Expand Up @@ -258,7 +258,7 @@ func resourceAwsCodeDeployDeploymentGroupDelete(d *schema.ResourceData, meta int

log.Printf("[DEBUG] Deleting CodeDeploy DeploymentGroup %s", d.Id())
_, err := conn.DeleteDeploymentGroup(&codedeploy.DeleteDeploymentGroupInput{
ApplicationName: aws.String(d.Get("application_name").(string)),
ApplicationName: aws.String(d.Get("app_name").(string)),
DeploymentGroupName: aws.String(d.Get("deployment_group_name").(string)),
})
if err != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func testAccCheckAWSCodeDeployDeploymentGroupDestroy(s *terraform.State) error {
}

resp, err := conn.GetDeploymentGroup(&codedeploy.GetDeploymentGroupInput{
ApplicationName: aws.String(rs.Primary.Attributes["application_name"]),
ApplicationName: aws.String(rs.Primary.Attributes["app_name"]),
DeploymentGroupName: aws.String(rs.Primary.Attributes["deployment_group_name"]),
})

Expand Down Expand Up @@ -123,7 +123,7 @@ EOF
}
resource "aws_codedeploy_deployment_group" "foo" {
application_name = "${aws_codedeploy_app.foo_app.name}"
app_name = "${aws_codedeploy_app.foo_app.name}"
deployment_group_name = "foo"
service_role_arn = "${aws_iam_role.foo_role.arn}"
ec2_tag_filter {
Expand Down Expand Up @@ -188,7 +188,7 @@ EOF
}
resource "aws_codedeploy_deployment_group" "foo" {
application_name = "${aws_codedeploy_app.foo_app.name}"
app_name = "${aws_codedeploy_app.foo_app.name}"
deployment_group_name = "bar"
service_role_arn = "${aws_iam_role.foo_role.arn}"
ec2_tag_filter {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ EOF
}
resource "aws_codedeploy_deployment_group" "foo" {
application_name = "${aws_codedeploy_app.foo_app.name}"
app_name = "${aws_codedeploy_app.foo_app.name}"
deployment_group_name = "bar"
service_role_arn = "${aws_iam_role.foo_role.arn}"
ec2_tag_filter {
Expand All @@ -82,7 +82,7 @@ resource "aws_codedeploy_deployment_group" "foo" {

The following arguments are supported:

* `application_name` - (Required) The name of the application.
* `app_name` - (Required) The name of the application.
* `deployment_group_name` - (Required) The name of the deployment group.
* `service_role_arn` - (Required) The service role ARN that allows deployments.
* `autoscaling_groups` - (Optional) Autoscaling groups associated with the deployment group.
Expand All @@ -101,7 +101,7 @@ Both ec2_tag_filter and on_premises_tag_filter blocks support the following:
The following attributes are exported:

* `id` - The deployment group's ID.
* `application_name` - The group's assigned application.
* `app_name` - The group's assigned application.
* `deployment_group_name` - The group's name.
* `service_role_arn` - The group's service role ARN.
* `autoscaling_groups` - The autoscaling groups associated with the deployment group.
Expand Down

0 comments on commit dd56b39

Please sign in to comment.