forked from elastic/terraform-provider-elasticstack
-
Notifications
You must be signed in to change notification settings - Fork 0
Add URL support to data_view field_formats #1
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* impl fw resource.agent_policy * impl fw resource/data_source integration * impl fw resource.fleet_server_host * update changelog * pull in sysMonitoring update * requested changes * fix *[] usage
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.7 to 4.2.0. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@692973e...d632683) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…stic#806) Bumps [github.com/oapi-codegen/oapi-codegen/v2](https://github.com/oapi-codegen/oapi-codegen) from 2.4.0 to 2.4.1. - [Release notes](https://github.com/oapi-codegen/oapi-codegen/releases) - [Commits](oapi-codegen/oapi-codegen@v2.4.0...v2.4.1) --- updated-dependencies: - dependency-name: github.com/oapi-codegen/oapi-codegen/v2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [github.com/oapi-codegen/oapi-codegen/v2](https://github.com/oapi-codegen/oapi-codegen) from 2.4.0 to 2.4.1. - [Release notes](https://github.com/oapi-codegen/oapi-codegen/releases) - [Commits](oapi-codegen/oapi-codegen@v2.4.0...v2.4.1) --- updated-dependencies: - dependency-name: github.com/oapi-codegen/oapi-codegen/v2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…15.2 (elastic#799) Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
…ker tag to v8.15.2 (elastic#798) Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
…astic#801) * fix: synthetics http monitor creations produced inconsistent result after apply for elastic#800 fix for the fileds: http.locations, http.proxy_url, http.ssl_supported_protocols, http.ssl_verification_mode, tcp.proxy_url, tcp.ssl_supported_protocols, tcp.ssl_verification_mode * make lint happy * update change log * cr comments - reuse utls
…stic#781) * fix(deps): update module github.com/go-resty/resty/v2 to v2.15.3 * go mod tidy --------- Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com> Co-authored-by: Toby Brain <[email protected]>
Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
kjwardy
added a commit
that referenced
this pull request
Oct 4, 2024
* Add URL support to data_view field_formats (#1) - Adds support for `urlTemplate` and `labelTemplate` to data_views.field_formats - Amends API request build process to account for when some/any data_views.field_formats.attributes aren't passed in * Update internal/kibana/data_view/schema.go Co-authored-by: Toby Brain <[email protected]> * Update internal/kibana/data_view/schema.go Co-authored-by: Toby Brain <[email protected]> * PR changes --------- Co-authored-by: Toby Brain <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds support for the
urlTemplateandlabelTemplateattributes when specifying a field in a Data View as type URL, as well as adding functionality to account for when somefield_formats.params.attributesdon't exist.In its current state, the first time
terraform applyis ran, the panic listed at the bottom of this description occurs - but the resource in the configuration is applied as desired. On subsequent applies, the resource is deemed tainted and is re-applied, resulting in the same panic. Unfortunately, I have not been able to identify why this panic occurs.I believe the additions in this PR to be extensible in allowing the remaining field format attributes - i.e. for the other custom field format types (colour, key/value, etc.) to be added much easier.
As an aside, I'm not sure that (#619 has fixed the bug as it was intended to. When the
idattribute of any field specified infield_formatsis set (in this case, url), the provider panic still as it did pre (#619. I noticed this when applying a resource that containsurltemplateandlabeltemplatebut notpattern, the following panic still happened.│ Error: Provider produced inconsistent result after apply │ │ When applying changes to elasticstack_kibana_data_view.ops-metrics-and-logs, provider │ "provider[\"registry.terraform.io/elastic/elasticstack\"]" produced an unexpected new value: │ .data_view.field_formats["user.id"].params: was │ cty.ObjectVal(map[string]cty.Value{"labeltemplate":cty.StringVal("{{value}}"), │ "pattern":cty.NullVal(cty.String), "urltemplate":cty.StringVal("https://somesite.com/user/{{value}}")}), but │ now null. │ │ This is a bug in the provider, which should be reported in the provider's own issue tracker.