Skip to content

Commit

Permalink
Added connection_string property to application-insights resource
Browse files Browse the repository at this point in the history
  • Loading branch information
sas-pemcne committed Sep 30, 2020
1 parent 47fb233 commit afe04d6
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ func dataSourceArmApplicationInsights() *schema.Resource {
Computed: true,
},

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

"location": {
Type: schema.TypeString,
Computed: true,
Expand Down Expand Up @@ -85,6 +90,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.
* `location` - The Azure location where the component exists.
* `retention_in_days` - The retention period in days.
* `tags` - Tags applied to the component.
Expand Down

0 comments on commit afe04d6

Please sign in to comment.