You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add support for solution field in elasticsearch_kibana_space resource and data source (#1210)
* Initial plan
* Add solution field support to Kibana space resource and data source
Co-authored-by: tobio <[email protected]>
* Update documentation and changelog for solution field support
Co-authored-by: tobio <[email protected]>
* Add version checking for solution field in Kibana space resource
Co-authored-by: tobio <[email protected]>
* Add version 8.18.3 to test matrix and SkipFunc for solution field tests
Co-authored-by: tobio <[email protected]>
* Add Computed: true to disabled_features and solution fields in resource and data source
Co-authored-by: tobio <[email protected]>
* Regenerate documentation using make docs-generate
Co-authored-by: tobio <[email protected]>
* Use make target for acc test services
---------
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: tobio <[email protected]>
Co-authored-by: Toby Brain <[email protected]>
Copy file name to clipboardExpand all lines: .github/workflows/copilot-setup-steps.yml
+3-56Lines changed: 3 additions & 56 deletions
Original file line number
Diff line number
Diff line change
@@ -21,62 +21,6 @@ jobs:
21
21
permissions:
22
22
# If you want to clone the repository as part of your setup steps, for example to install dependencies, you'll need the `contents: read` permission. If you don't clone the repository in your setup steps, Copilot will do this for you automatically after the steps complete.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,6 @@
1
1
## [Unreleased]
2
2
3
+
- Add support for `solution` field in `elasticstack_kibana_space` resource and data source ([#1102](https://github.com/elastic/terraform-provider-elasticstack/issues/1102))
3
4
- Add `slo_id` validation to `elasticstack_kibana_slo` ([#1221](https://github.com/elastic/terraform-provider-elasticstack/pull/1221))
4
5
- Add `ignore_missing_component_templates` to `elasticstack_elasticsearch_index_template` ([#1206](https://github.com/elastic/terraform-provider-elasticstack/pull/1206))
5
6
- Prevent provider panic when a script exists in state, but not in Elasticsearch ([#1218](https://github.com/elastic/terraform-provider-elasticstack/pull/1218))
Copy file name to clipboardExpand all lines: docs/data-sources/kibana_spaces.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,11 +41,12 @@ Required:
41
41
Optional:
42
42
43
43
-`description` (String) The description for the space.
44
-
-`disabled_features` (List of String) The list of disabled features for the space. To get a list of available feature IDs, use the Features API (https://www.elastic.co/guide/en/kibana/master/features-api-get.html).
45
44
-`image_url` (String) The data-URL encoded image to display in the space avatar.
46
45
47
46
Read-Only:
48
47
49
48
-`color` (String) The hexadecimal color code used in the space avatar. By default, the color is automatically generated from the space name.
49
+
-`disabled_features` (List of String) The list of disabled features for the space. To get a list of available feature IDs, use the Features API (https://www.elastic.co/guide/en/kibana/master/features-api-get.html).
50
50
-`id` (String) Internal identifier of the resource.
51
51
-`initials` (String) The initials shown in the space avatar. By default, the initials are automatically generated from the space name. Initials must be 1 or 2 characters.
52
+
-`solution` (String) The solution view for the space. Valid options are `security`, `oblt`, `es`, or `classic`.
-`disabled_features` (Set of String) The list of disabled features for the space. To get a list of available feature IDs, use the Features API (https://www.elastic.co/guide/en/kibana/master/features-api-get.html).
42
42
-`image_url` (String) The data-URL encoded image to display in the space avatar.
43
43
-`initials` (String) The initials shown in the space avatar. By default, the initials are automatically generated from the space name. Initials must be 1 or 2 characters.
44
+
-`solution` (String) The solution view for the space. Valid options are `security`, `oblt`, `es`, or `classic`.
Description: "The list of disabled features for the space. To get a list of available feature IDs, use the Features API (https://www.elastic.co/guide/en/kibana/master/features-api-get.html).",
returndiag.Errorf("solution field is not supported in this version of the Elastic Stack. Solution field requires %s or higher", SpaceSolutionMinVersion)
113
+
}
114
+
}
115
+
93
116
space:= kbapi.KibanaSpace{
94
117
ID: d.Get("space_id").(string),
95
118
Name: d.Get("name").(string),
@@ -120,6 +143,10 @@ func resourceSpaceUpsert(ctx context.Context, d *schema.ResourceData, meta inter
120
143
space.ImageURL=imageUrl.(string)
121
144
}
122
145
146
+
ifsolution, ok:=d.GetOk("solution"); ok {
147
+
space.Solution=solution.(string)
148
+
}
149
+
123
150
varspaceResponse*kbapi.KibanaSpace
124
151
125
152
ifd.IsNewResource() {
@@ -182,6 +209,9 @@ func resourceSpaceRead(ctx context.Context, d *schema.ResourceData, meta interfa
Description: "The list of disabled features for the space. To get a list of available feature IDs, use the Features API (https://www.elastic.co/guide/en/kibana/master/features-api-get.html).",
39
39
ElementType: types.StringType,
40
-
Optional: true,
40
+
Computed: true,
41
41
},
42
42
"initials": schema.StringAttribute{
43
43
Description: "The initials shown in the space avatar. By default, the initials are automatically generated from the space name. Initials must be 1 or 2 characters.",
0 commit comments