hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.84k stars 9.19k forks source link

Update apigatewayv2_domain_name.html.markdown #39479

Open Jyots6914 opened 1 month ago

Jyots6914 commented 1 month ago

Security Policy valid values are TLS_1_0 and TLS_1_2 , Updated the document with same.

issues fixed : https://github.com/hashicorp/terraform-provider-aws/issues/37869

Documentation Referred : https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-domainname-domainnameconfiguration.html#cfn-apigatewayv2-domainname-domainnameconfiguration-securitypolicy https://awscli.amazonaws.com/v2/documentation/api/2.8.7/reference/apigatewayv2/create-domain-name.html

github-actions[bot] commented 1 month ago

Community Note

Voting for Prioritization

For Submitters

github-actions[bot] commented 1 month ago

Hey @Jyots6914 :wave: Thank you very much for your contribution! At times, our maintainers need to make direct edits to pull requests in order to help get it ready to be merged. Your current settings do not allow maintainers to make such edits. To help facilitate this, update your pull request to allow such edits as described in GitHub's Allowing changes to a pull request branch created from a fork documentation. (If you're using a fork owned by an organization, your organization may not allow you to change this setting. If that is the case, let us know.)

jar-b commented 1 month ago

Resource schema validation also needs updated:

                        "security_policy": {
                            Type:         schema.TypeString,
                            Required:     true,
                            ValidateFunc: validation.StringInSlice(enum.Slice(awstypes.SecurityPolicyTls12), true),
                        },
Jyots6914 commented 1 month ago

@jar-b is this part of https://github.com/hashicorp/terraform-provider-aws/issues/37869 or its a different issue ?

jar-b commented 1 month ago

Same issue. As mentioned in this comment, the limitation to only certain security policies and endpoint types is intentional (provisioning fails otherwise).

Perhaps this is not true in all contexts and the provider should match the valid values permitted by AWS rather than hardcoding a subset, but the documentation is currently correct based on the provider-side schema validation that is in place. Do you have an example where domain name creation succeeds with the TLS_1_0 security_policy?

Jyots6914 commented 1 month ago

Hi @jar-b I tested sometime back let me recheck and share with you.

SHAHAB7505 commented 1 month ago

👍🏻