Skip to content

Commit

Permalink
azurerm_appplication_insights - Add support for connection_string #…
Browse files Browse the repository at this point in the history
  • Loading branch information
sas-pemcne authored Oct 2, 2020
1 parent a66681b commit 135e2fb
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ func dataSourceArmApplicationInsights() *schema.Resource {
Computed: true,
},

"connection_string": {
Type: schema.TypeString,
Computed: true,
Sensitive: true,
},

"location": {
Type: schema.TypeString,
Computed: true,
Expand Down Expand Up @@ -85,6 +91,7 @@ func dataSourceArmApplicationInsightsRead(d *schema.ResourceData, meta interface

d.SetId(*resp.ID)
d.Set("instrumentation_key", resp.InstrumentationKey)
d.Set("connection_string", resp.ConnectionString)
d.Set("location", resp.Location)
d.Set("app_id", resp.AppID)
d.Set("application_type", resp.ApplicationType)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,12 @@ func resourceArmApplicationInsights() *schema.Resource {
Computed: true,
Sensitive: true,
},

"connection_string": {
Type: schema.TypeString,
Computed: true,
Sensitive: true,
},
},
}
}
Expand Down Expand Up @@ -252,6 +258,7 @@ func resourceArmApplicationInsightsRead(d *schema.ResourceData, meta interface{}
d.Set("instrumentation_key", props.InstrumentationKey)
d.Set("sampling_percentage", props.SamplingPercentage)
d.Set("disable_ip_masking", props.DisableIPMasking)
d.Set("connection_string", props.ConnectionString)
if v := props.RetentionInDays; v != nil {
d.Set("retention_in_days", v)
}
Expand Down
1 change: 1 addition & 0 deletions website/docs/d/application_insights.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ output "application_insights_instrumentation_key" {
* `app_id` - The App ID associated with this Application Insights component.
* `application_type` - The type of the component.
* `instrumentation_key` - The instrumentation key of the Application Insights component.
* `connection_string` - The connection string of the Application Insights component. (Sensitive)
* `location` - The Azure location where the component exists.
* `retention_in_days` - The retention period in days.
* `tags` - Tags applied to the component.
Expand Down
2 changes: 2 additions & 0 deletions website/docs/r/application_insights.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ The following attributes are exported:

* `instrumentation_key` - The Instrumentation Key for this Application Insights component.

* `connection_string` - The Connection String for this Application Insights component. (Sensitive)

## Timeouts

The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/docs/configuration/resources.html#timeouts) for certain actions:
Expand Down

0 comments on commit 135e2fb

Please sign in to comment.