Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add default description #6104

Merged
merged 1 commit into from
May 23, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion builtin/providers/aws/resource_aws_api_gateway_api_key.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ func resourceAwsApiGatewayApiKey() *schema.Resource {

"description": &schema.Schema{
Type: schema.TypeString,
Required: true,
Optional: true,
Default: "Managed by Terraform",
},

"enabled": &schema.Schema{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func TestAccAWSAPIGatewayApiKey_basic(t *testing.T) {
resource.TestCheckResourceAttr(
"aws_api_gateway_api_key.test", "name", "foo"),
resource.TestCheckResourceAttr(
"aws_api_gateway_api_key.test", "description", "bar"),
"aws_api_gateway_api_key.test", "description", "Managed by Terraform"),
),
},
},
Expand Down Expand Up @@ -165,7 +165,6 @@ resource "aws_api_gateway_deployment" "test" {

resource "aws_api_gateway_api_key" "test" {
name = "foo"
description = "bar"
enabled = true

stage_key {
Expand Down
3 changes: 2 additions & 1 deletion builtin/providers/aws/resource_aws_db_parameter_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ func resourceAwsDbParameterGroup() *schema.Resource {
},
"description": &schema.Schema{
Type: schema.TypeString,
Required: true,
Optional: true,
ForceNew: true,
Default: "Managed by Terraform",
},
"parameter": &schema.Schema{
Type: schema.TypeSet,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func TestAccAWSDBParameterGroup_basic(t *testing.T) {
resource.TestCheckResourceAttr(
"aws_db_parameter_group.bar", "family", "mysql5.6"),
resource.TestCheckResourceAttr(
"aws_db_parameter_group.bar", "description", "Test parameter group for terraform"),
"aws_db_parameter_group.bar", "description", "Managed by Terraform"),
resource.TestCheckResourceAttr(
"aws_db_parameter_group.bar", "parameter.1708034931.name", "character_set_results"),
resource.TestCheckResourceAttr(
Expand Down Expand Up @@ -108,8 +108,6 @@ func TestAccAWSDBParameterGroup_Only(t *testing.T) {
"aws_db_parameter_group.bar", "name", groupName),
resource.TestCheckResourceAttr(
"aws_db_parameter_group.bar", "family", "mysql5.6"),
resource.TestCheckResourceAttr(
"aws_db_parameter_group.bar", "description", "Test parameter group for terraform"),
),
},
},
Expand Down Expand Up @@ -258,7 +256,6 @@ func testAccAWSDBParameterGroupConfig(n string) string {
resource "aws_db_parameter_group" "bar" {
name = "%s"
family = "mysql5.6"
description = "Test parameter group for terraform"
parameter {
name = "character_set_server"
value = "utf8"
Expand Down
3 changes: 2 additions & 1 deletion builtin/providers/aws/resource_aws_db_security_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ func resourceAwsDbSecurityGroup() *schema.Resource {

"description": &schema.Schema{
Type: schema.TypeString,
Required: true,
Optional: true,
ForceNew: true,
Default: "Managed by Terraform",
},

"ingress": &schema.Schema{
Expand Down
7 changes: 1 addition & 6 deletions builtin/providers/aws/resource_aws_db_security_group_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func TestAccAWSDBSecurityGroup_basic(t *testing.T) {
resource.TestCheckResourceAttr(
"aws_db_security_group.bar", "name", "secgroup-terraform"),
resource.TestCheckResourceAttr(
"aws_db_security_group.bar", "description", "just cuz"),
"aws_db_security_group.bar", "description", "Managed by Terraform"),
resource.TestCheckResourceAttr(
"aws_db_security_group.bar", "ingress.3363517775.cidr", "10.0.0.1/24"),
resource.TestCheckResourceAttr(
Expand Down Expand Up @@ -97,10 +97,6 @@ func testAccCheckAWSDBSecurityGroupAttributes(group *rds.DBSecurityGroup) resour
return fmt.Errorf("bad name: %#v", *group.DBSecurityGroupName)
}

if *group.DBSecurityGroupDescription != "just cuz" {
return fmt.Errorf("bad description: %#v", *group.DBSecurityGroupDescription)
}

return nil
}
}
Expand Down Expand Up @@ -146,7 +142,6 @@ provider "aws" {

resource "aws_db_security_group" "bar" {
name = "secgroup-terraform"
description = "just cuz"

ingress {
cidr = "10.0.0.1/24"
Expand Down
3 changes: 2 additions & 1 deletion builtin/providers/aws/resource_aws_db_subnet_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ func resourceAwsDbSubnetGroup() *schema.Resource {

"description": &schema.Schema{
Type: schema.TypeString,
Required: true,
Optional: true,
Default: "Managed by Terraform",
},

"subnet_ids": &schema.Schema{
Expand Down
7 changes: 5 additions & 2 deletions builtin/providers/aws/resource_aws_db_subnet_group_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ func TestAccAWSDBSubnetGroup_basic(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
testAccCheckDBSubnetGroupExists(
"aws_db_subnet_group.foo", &v),
resource.TestCheckResourceAttr(
"aws_db_subnet_group.foo", "name", "foo"),
resource.TestCheckResourceAttr(
"aws_db_subnet_group.foo", "description", "Managed by Terraform"),
testCheck,
),
},
Expand Down Expand Up @@ -80,7 +84,7 @@ func TestAccAWSDBSubnetGroup_updateDescription(t *testing.T) {
testAccCheckDBSubnetGroupExists(
"aws_db_subnet_group.foo", &v),
resource.TestCheckResourceAttr(
"aws_db_subnet_group.foo", "description", "foo description"),
"aws_db_subnet_group.foo", "description", "Managed by Terraform"),
),
},

Expand Down Expand Up @@ -213,7 +217,6 @@ resource "aws_subnet" "bar" {

resource "aws_db_subnet_group" "foo" {
name = "foo"
description = "foo description"
subnet_ids = ["${aws_subnet.foo.id}", "${aws_subnet.bar.id}"]
tags {
Name = "tf-dbsubnet-group-test"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ func resourceAwsElasticacheParameterGroup() *schema.Resource {
},
"description": &schema.Schema{
Type: schema.TypeString,
Required: true,
Optional: true,
ForceNew: true,
Default: "Managed by Terraform",
},
"parameter": &schema.Schema{
Type: schema.TypeSet,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func TestAccAWSElasticacheParameterGroup_basic(t *testing.T) {
resource.TestCheckResourceAttr(
"aws_elasticache_parameter_group.bar", "family", "redis2.8"),
resource.TestCheckResourceAttr(
"aws_elasticache_parameter_group.bar", "description", "Test parameter group for terraform"),
"aws_elasticache_parameter_group.bar", "description", "Managed by Terraform"),
resource.TestCheckResourceAttr(
"aws_elasticache_parameter_group.bar", "parameter.283487565.name", "appendonly"),
resource.TestCheckResourceAttr(
Expand Down Expand Up @@ -78,8 +78,6 @@ func TestAccAWSElasticacheParameterGroupOnly(t *testing.T) {
"aws_elasticache_parameter_group.bar", "name", "parameter-group-test-terraform"),
resource.TestCheckResourceAttr(
"aws_elasticache_parameter_group.bar", "family", "redis2.8"),
resource.TestCheckResourceAttr(
"aws_elasticache_parameter_group.bar", "description", "Test parameter group for terraform"),
),
},
},
Expand Down Expand Up @@ -177,7 +175,6 @@ const testAccAWSElasticacheParameterGroupConfig = `
resource "aws_elasticache_parameter_group" "bar" {
name = "parameter-group-test-terraform"
family = "redis2.8"
description = "Test parameter group for terraform"
parameter {
name = "appendonly"
value = "yes"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ func resourceAwsElasticacheSecurityGroup() *schema.Resource {
Schema: map[string]*schema.Schema{
"description": &schema.Schema{
Type: schema.TypeString,
Required: true,
Optional: true,
ForceNew: true,
Default: "Managed by Terraform",
},
"name": &schema.Schema{
Type: schema.TypeString,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ func TestAccAWSElasticacheSecurityGroup_basic(t *testing.T) {
Config: testAccAWSElasticacheSecurityGroupConfig,
Check: resource.ComposeTestCheckFunc(
testAccCheckAWSElasticacheSecurityGroupExists("aws_elasticache_security_group.bar"),
resource.TestCheckResourceAttr(
"aws_elasticache_security_group.bar", "description", "Managed by Terraform"),
),
},
},
Expand Down Expand Up @@ -78,7 +80,6 @@ provider "aws" {
}
resource "aws_security_group" "bar" {
name = "tf-test-security-group-%03d"
description = "tf-test-security-group-descr"
ingress {
from_port = -1
to_port = -1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ func resourceAwsElasticacheSubnetGroup() *schema.Resource {
Schema: map[string]*schema.Schema{
"description": &schema.Schema{
Type: schema.TypeString,
Required: true,
Optional: true,
Default: "Managed by Terraform",
},
"name": &schema.Schema{
Type: schema.TypeString,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ func TestAccAWSElasticacheSubnetGroup_basic(t *testing.T) {
Config: config,
Check: resource.ComposeTestCheckFunc(
testAccCheckAWSElasticacheSubnetGroupExists("aws_elasticache_subnet_group.bar", &csg),
resource.TestCheckResourceAttr(
"aws_elasticache_subnet_group.bar", "description", "Managed by Terraform"),
),
},
},
Expand Down Expand Up @@ -160,7 +162,6 @@ resource "aws_elasticache_subnet_group" "bar" {
// that we correctly handle the fact that the API
// normalizes names to lowercase.
name = "tf-TEST-cache-subnet-%03d"
description = "tf-test-cache-subnet-group-descr"
subnet_ids = ["${aws_subnet.foo.id}"]
}
`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ func resourceAwsRDSClusterParameterGroup() *schema.Resource {
},
"description": &schema.Schema{
Type: schema.TypeString,
Required: true,
Optional: true,
ForceNew: true,
Default: "Managed by Terraform",
},
"parameter": &schema.Schema{
Type: schema.TypeSet,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func TestAccAWSDBClusterParameterGroupOnly(t *testing.T) {
resource.TestCheckResourceAttr(
"aws_rds_cluster_parameter_group.bar", "family", "aurora5.6"),
resource.TestCheckResourceAttr(
"aws_rds_cluster_parameter_group.bar", "description", "Test cluster parameter group for terraform"),
"aws_rds_cluster_parameter_group.bar", "description", "Managed by Terraform"),
),
},
},
Expand Down Expand Up @@ -216,10 +216,6 @@ func testAccCheckAWSDBClusterParameterGroupAttributes(v *rds.DBClusterParameterG
return fmt.Errorf("bad family: %#v", v.DBParameterGroupFamily)
}

if *v.Description != "Test cluster parameter group for terraform" {
return fmt.Errorf("bad description: %#v", v.Description)
}

return nil
}
}
Expand Down Expand Up @@ -355,6 +351,5 @@ const testAccAWSDBClusterParameterGroupOnlyConfig = `
resource "aws_rds_cluster_parameter_group" "bar" {
name = "cluster-parameter-group-test-terraform"
family = "aurora5.6"
description = "Test cluster parameter group for terraform"
}
`
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ func resourceAwsRedshiftParameterGroup() *schema.Resource {

"description": &schema.Schema{
Type: schema.TypeString,
Required: true,
Optional: true,
ForceNew: true,
Default: "Managed by Terraform",
},

"parameter": &schema.Schema{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func TestAccAWSRedshiftParameterGroup_withParameters(t *testing.T) {
resource.TestCheckResourceAttr(
"aws_redshift_parameter_group.bar", "family", "redshift-1.0"),
resource.TestCheckResourceAttr(
"aws_redshift_parameter_group.bar", "description", "Test parameter group for terraform"),
"aws_redshift_parameter_group.bar", "description", "Managed by Terraform"),
resource.TestCheckResourceAttr(
"aws_redshift_parameter_group.bar", "parameter.490804664.name", "require_ssl"),
resource.TestCheckResourceAttr(
Expand Down Expand Up @@ -190,7 +190,6 @@ const testAccAWSRedshiftParameterGroupConfig = `
resource "aws_redshift_parameter_group" "bar" {
name = "parameter-group-test-terraform"
family = "redshift-1.0"
description = "Test parameter group for terraform"
parameter {
name = "require_ssl"
value = "true"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ func resourceAwsRedshiftSecurityGroup() *schema.Resource {

"description": &schema.Schema{
Type: schema.TypeString,
Required: true,
Optional: true,
ForceNew: true,
Default: "Managed by Terraform",
},

"ingress": &schema.Schema{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func TestAccAWSRedshiftSecurityGroup_ingressCidr(t *testing.T) {
resource.TestCheckResourceAttr(
"aws_redshift_security_group.bar", "name", "redshift-sg-terraform"),
resource.TestCheckResourceAttr(
"aws_redshift_security_group.bar", "description", "this is a description"),
"aws_redshift_security_group.bar", "description", "Managed by Terraform"),
resource.TestCheckResourceAttr(
"aws_redshift_security_group.bar", "ingress.2735652665.cidr", "10.0.0.1/24"),
resource.TestCheckResourceAttr(
Expand Down Expand Up @@ -170,7 +170,6 @@ provider "aws" {

resource "aws_redshift_security_group" "bar" {
name = "redshift-sg-terraform"
description = "this is a description"

ingress {
cidr = "10.0.0.1/24"
Expand Down
3 changes: 2 additions & 1 deletion builtin/providers/aws/resource_aws_redshift_subnet_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ func resourceAwsRedshiftSubnetGroup() *schema.Resource {

"description": &schema.Schema{
Type: schema.TypeString,
Required: true,
Optional: true,
Default: "Managed by Terraform",
},

"subnet_ids": &schema.Schema{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ func TestAccAWSRedshiftSubnetGroup_basic(t *testing.T) {
testAccCheckRedshiftSubnetGroupExists("aws_redshift_subnet_group.foo", &v),
resource.TestCheckResourceAttr(
"aws_redshift_subnet_group.foo", "subnet_ids.#", "2"),
resource.TestCheckResourceAttr(
"aws_redshift_subnet_group.foo", "description", "Managed by Terraform"),
),
},
},
Expand Down Expand Up @@ -175,7 +177,6 @@ resource "aws_subnet" "bar" {

resource "aws_redshift_subnet_group" "foo" {
name = "foo"
description = "foo description"
subnet_ids = ["${aws_subnet.foo.id}", "${aws_subnet.bar.id}"]
}
`
Expand Down Expand Up @@ -214,7 +215,6 @@ resource "aws_subnet" "foobar" {

resource "aws_redshift_subnet_group" "foo" {
name = "foo"
description = "foo description"
subnet_ids = ["${aws_subnet.foo.id}", "${aws_subnet.bar.id}", "${aws_subnet.foobar.id}"]
}
`
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ Provides an API Gateway API Key.
```
resource "aws_api_gateway_rest_api" "MyDemoAPI" {
name = "MyDemoAPI"
description = "This is my API for demonstration purposes"
}

resource "aws_api_gateway_api_key" "MyDemoApiKey" {
Expand All @@ -38,7 +37,7 @@ resource "aws_api_gateway_deployment" "MyDemoDeployment" {
The following arguments are supported:

* `name` - (Required) The name of the API key
* `description` - (Required) The API key description
* `description` - (Optional) The API key description. Defaults to "Managed by Terraform".
* `enabled` - (Optional) Specifies whether the API key can be used by callers. Defaults to `true`.
* `stage_key` - (Optional) A list of stage keys associated with the API key - see below

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ Provides an RDS DB parameter group resource.
resource "aws_db_parameter_group" "default" {
name = "rds-pg"
family = "mysql5.6"
description = "RDS default parameter group"

parameter {
name = "character_set_server"
Expand All @@ -34,7 +33,7 @@ The following arguments are supported:

* `name` - (Required) The name of the DB parameter group.
* `family` - (Required) The family of the DB parameter group.
* `description` - (Required) The description of the DB parameter group.
* `description` - (Optional) The description of the DB parameter group. Defaults to "Managed by Terraform".
* `parameter` - (Optional) A list of DB parameters to apply.
* `tags` - (Optional) A mapping of tags to assign to the resource.

Expand Down
Loading