Skip to content

Commit d880674

Browse files
committed
r/aws_opensearch_domain: 'aiml_options' is Optional+Computed.
1 parent 5d072d8 commit d880674

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

internal/service/opensearch/domain.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,18 +174,21 @@ func resourceDomain() *schema.Resource {
174174
"aiml_options": {
175175
Type: schema.TypeList,
176176
Optional: true,
177+
Computed: true,
177178
MaxItems: 1,
178179
Elem: &schema.Resource{
179180
Schema: map[string]*schema.Schema{
180181
"natural_language_query_generation_options": {
181182
Type: schema.TypeList,
182183
Optional: true,
184+
Computed: true,
183185
MaxItems: 1,
184186
Elem: &schema.Resource{
185187
Schema: map[string]*schema.Schema{
186188
"desired_state": {
187189
Type: schema.TypeString,
188190
Optional: true,
191+
Computed: true,
189192
ValidateDiagFunc: enum.Validate[awstypes.NaturalLanguageQueryGenerationDesiredState](),
190193
},
191194
},
@@ -194,11 +197,13 @@ func resourceDomain() *schema.Resource {
194197
"s3_vectors_engine": {
195198
Type: schema.TypeList,
196199
Optional: true,
200+
Computed: true,
197201
MaxItems: 1,
198202
Elem: &schema.Resource{
199203
Schema: map[string]*schema.Schema{
200204
names.AttrEnabled: {
201205
Type: schema.TypeBool,
206+
Computed: true,
202207
Optional: true,
203208
},
204209
},

internal/service/opensearch/domain_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ func TestAccOpenSearchDomain_basic(t *testing.T) {
155155
Config: testAccDomainConfig_basic(rName),
156156
Check: resource.ComposeTestCheckFunc(
157157
testAccCheckDomainExists(ctx, resourceName, &domain),
158-
resource.TestCheckResourceAttr(resourceName, "aiml_options.#", "0"),
158+
resource.TestCheckResourceAttr(resourceName, "aiml_options.#", "1"),
159159
resource.TestMatchResourceAttr(resourceName, "dashboard_endpoint", regexache.MustCompile(`.*(opensearch|es)\..*/_dashboards`)),
160160
resource.TestCheckResourceAttrSet(resourceName, names.AttrEngineVersion),
161161
resource.TestCheckResourceAttr(resourceName, "off_peak_window_options.#", "1"),

0 commit comments

Comments
 (0)