From 77d8f873087febeb6a148196b9b2ade546f13d30 Mon Sep 17 00:00:00 2001 From: Clint Shryock Date: Tue, 6 Oct 2015 09:08:35 -0500 Subject: [PATCH] add publicly_accessible, update docs --- .../providers/aws/resource_aws_rds_cluster_instance.go | 10 ++++++++++ .../docs/providers/aws/r/rds_cluster.html.markdown | 1 - .../providers/aws/r/rds_cluster_instance.html.markdown | 6 ++++-- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/builtin/providers/aws/resource_aws_rds_cluster_instance.go b/builtin/providers/aws/resource_aws_rds_cluster_instance.go index 27a82b897..df4bc1f5f 100644 --- a/builtin/providers/aws/resource_aws_rds_cluster_instance.go +++ b/builtin/providers/aws/resource_aws_rds_cluster_instance.go @@ -54,6 +54,13 @@ func resourceAwsRDSClusterInstance() *schema.Resource { Computed: true, }, + "publicly_accessible": &schema.Schema{ + Type: schema.TypeBool, + Optional: true, + Default: false, + ForceNew: true, + }, + "instance_class": &schema.Schema{ Type: schema.TypeString, Required: true, @@ -73,6 +80,7 @@ func resourceAwsRDSClusterInstanceCreate(d *schema.ResourceData, meta interface{ DBInstanceClass: aws.String(d.Get("instance_class").(string)), DBClusterIdentifier: aws.String(d.Get("cluster_identifier").(string)), Engine: aws.String("aurora"), + PubliclyAccessible: aws.Bool(d.Get("publicly_accessible").(bool)), Tags: tags, } @@ -154,6 +162,8 @@ func resourceAwsRDSClusterInstanceRead(d *schema.ResourceData, meta interface{}) d.Set("port", db.Endpoint.Port) } + d.Set("publicly_accessible", db.PubliclyAccessible) + // Fetch and save tags arn, err := buildRDSARN(d, meta) if err != nil { diff --git a/website/source/docs/providers/aws/r/rds_cluster.html.markdown b/website/source/docs/providers/aws/r/rds_cluster.html.markdown index 2490e8529..64870b889 100644 --- a/website/source/docs/providers/aws/r/rds_cluster.html.markdown +++ b/website/source/docs/providers/aws/r/rds_cluster.html.markdown @@ -55,7 +55,6 @@ string. * `apply_immediately` - (Optional) Specifies whether any cluster modifications are applied immediately, or during the next maintenance window. Default is `false`. See [Amazon RDS Documentation for more information.](http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.DBInstance.Modifying.html) -* `vpc_security_group_ids` - (Optional) List of VPC security groups to associate. ## Attributes Reference diff --git a/website/source/docs/providers/aws/r/rds_cluster_instance.html.markdown b/website/source/docs/providers/aws/r/rds_cluster_instance.html.markdown index 49769a393..1571beab7 100644 --- a/website/source/docs/providers/aws/r/rds_cluster_instance.html.markdown +++ b/website/source/docs/providers/aws/r/rds_cluster_instance.html.markdown @@ -60,8 +60,9 @@ and memory, see [Scaling Aurora DB Instances][4]. Aurora currently - db.r3.2xlarge - db.r3.4xlarge - db.r3.8xlarge - -. +* `publicly_accessible` - (Optional) Bool to control if instance is publicly accessible. +Default `false`. See the documentation on [Creating DB Instances][6] for more +details on controlling this property. ## Attributes Reference @@ -85,3 +86,4 @@ this instance is a read replica [3]: /docs/providers/aws/r/rds_cluster.html [4]: http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Aurora.Managing.html [5]: /docs/configuration/resources.html#count +[6]: http://docs.aws.amazon.com/fr_fr/AmazonRDS/latest/APIReference/API_CreateDBInstance.html