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

azurerm_appplication_insights - Add support for connection_string #8699

Merged
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
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