-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
azurerm_appplication_insights
- Add support for connection_string
#8699
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @sas-pemcne. This looks nearly there. Just a few quick fixes and we'll be good to go
@@ -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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll want to add this to the ## Attributes Reference
section in this file as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And we should add (Sensitive).
too
* `connection_string` - The connection string of the Application Insights component. | |
* `connection_string` - The connection string of the Application Insights component. (Sensitive). |
@@ -35,6 +35,11 @@ func dataSourceArmApplicationInsights() *schema.Resource { | |||
Computed: true, | |||
}, | |||
|
|||
"connection_string": { | |||
Type: schema.TypeString, | |||
Computed: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should mark this as sensitive here as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting.. I was copying the instrumentation_key property which is marked sensitive at the resource and not sensitive at the data source level. Did you want to be consistent with instrumentation_key or mark connection_string as sensitive?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's weird that it's marked as sensitive in one place and not the other with instrumentation_key
. I'm not sure why that's the case but let's keep it consistent with the resource and mark connection_string
as Sensitive.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good, I was guessing it was an oversight at some point. I'll get those changes pushed up.
afe04d6
to
87e45c8
Compare
azurerm_appplication_insights
- Add support for connection_string
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
This has been released in version 2.31.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example: provider "azurerm" {
version = "~> 2.31.0"
}
# ... other configuration ... |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks! |
I've added support for connection_string property to the application_insight resource. This fixes #8669 and #1303.
The connection string value is generated on the Azure side, this should just surface the value in the outputs for the resource. Tested this change with new, existing resources, and imported resources.
I've added the value into the documentation markup too but let me know if I missed any references.