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

[#19966] - aws_elasticsearch_domain_saml_options subject_key default differs from AWS #20892

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
3 changes: 3 additions & 0 deletions .changelog/20892.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
resource/aws_elasticsearch_domain_saml_option: Fix difference caused by `subject_key` default not matching AWS default; old and new defaults are equivalent
```
2 changes: 1 addition & 1 deletion internal/service/elasticsearch/domain_saml_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func ResourceDomainSAMLOptions() *schema.Resource {
"subject_key": {
Type: schema.TypeString,
Optional: true,
Default: "NameID",
Default: "",
DiffSuppressFunc: elasticsearchDomainSamlOptionsDiffSupress,
},
},
Expand Down
10 changes: 5 additions & 5 deletions internal/service/elasticsearch/domain_saml_options_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"github.com/hashicorp/terraform-provider-aws/internal/tfresource"
)

func TestAccElasticsearchDomainSamlOptions_basic(t *testing.T) {
func TestAccElasticsearchDomainSAMLOptions_basic(t *testing.T) {
var domain elasticsearch.ElasticsearchDomainStatus

rName := sdkacctest.RandomWithPrefix("acc-test")
Expand Down Expand Up @@ -50,7 +50,7 @@ func TestAccElasticsearchDomainSamlOptions_basic(t *testing.T) {
})
}

func TestAccElasticsearchDomainSamlOptions_disappears(t *testing.T) {
func TestAccElasticsearchDomainSAMLOptions_disappears(t *testing.T) {
rName := sdkacctest.RandomWithPrefix("acc-test")
rUserName := sdkacctest.RandomWithPrefix("es-master-user")
idpEntityId := fmt.Sprintf("https://%s", acctest.RandomDomainName())
Expand All @@ -75,7 +75,7 @@ func TestAccElasticsearchDomainSamlOptions_disappears(t *testing.T) {
})
}

func TestAccElasticsearchDomainSamlOptions_disappears_Domain(t *testing.T) {
func TestAccElasticsearchDomainSAMLOptions_disappears_Domain(t *testing.T) {
rName := sdkacctest.RandomWithPrefix("acc-test")
rUserName := sdkacctest.RandomWithPrefix("es-master-user")
idpEntityId := fmt.Sprintf("https://%s", acctest.RandomDomainName())
Expand All @@ -101,7 +101,7 @@ func TestAccElasticsearchDomainSamlOptions_disappears_Domain(t *testing.T) {
})
}

func TestAccElasticsearchDomainSamlOptions_Update(t *testing.T) {
func TestAccElasticsearchDomainSAMLOptions_Update(t *testing.T) {
rName := sdkacctest.RandomWithPrefix("acc-test")
rUserName := sdkacctest.RandomWithPrefix("es-master-user")
idpEntityId := fmt.Sprintf("https://%s", acctest.RandomDomainName())
Expand Down Expand Up @@ -135,7 +135,7 @@ func TestAccElasticsearchDomainSamlOptions_Update(t *testing.T) {
})
}

func TestAccElasticsearchDomainSamlOptions_Disabled(t *testing.T) {
func TestAccElasticsearchDomainSAMLOptions_Disabled(t *testing.T) {
rName := sdkacctest.RandomWithPrefix("acc-test")
rUserName := sdkacctest.RandomWithPrefix("es-master-user")
idpEntityId := fmt.Sprintf("https://%s", acctest.RandomDomainName())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ The following arguments are optional:
* `master_user_name` - (Optional) This username from the SAML IdP receives full permissions to the cluster, equivalent to a new master user.
* `roles_key` - (Optional) Element of the SAML assertion to use for backend roles. Default is roles.
* `session_timeout_minutes` - (Optional) Duration of a session in minutes after a user logs in. Default is 60. Maximum value is 1,440.
* `subject_key` - (Optional) Element of the SAML assertion to use for username. Default is NameID.
* `subject_key` - (Optional) Custom SAML attribute to use for user names. Default is an empty string - `""`. This will cause Elasticsearch to use the `NameID` element of the `Subject`, which is the default location for name identifiers in the SAML specification.


#### idp
Expand Down