-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
Add missing transfer server security policy TransferSecurityPolicy-Restricted-2024-06 #39871
Add missing transfer server security policy TransferSecurityPolicy-Restricted-2024-06 #39871
Conversation
Community NoteVoting for Prioritization
For Submitters
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Welcome @itd-seb 👋
It looks like this is your first Pull Request submission to the Terraform AWS Provider! If you haven’t already done so please make sure you have checked out our CONTRIBUTOR guide and FAQ to make sure your contribution is adhering to best practice and has all the necessary elements in place for a successful approval.
Also take a look at our FAQ which details how we prioritize Pull Requests for inclusion.
Thanks again, and welcome to the community! 😃
% make testacc TESTARGS='-run=TestAccTransfer_serial/^Server$$/^SecurityPolicy$$' PKG=transfer
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.2 test ./internal/service/transfer/... -v -count 1 -parallel 20 -run=TestAccTransfer_serial/^Server$/^SecurityPolicy$ -timeout 360m
2024/10/24 10:33:26 Initializing Terraform AWS Provider...
=== RUN TestAccTransfer_serial
=== PAUSE TestAccTransfer_serial
=== CONT TestAccTransfer_serial
=== RUN TestAccTransfer_serial/Server
=== RUN TestAccTransfer_serial/Server/SecurityPolicy
server_test.go:221: Step 10/10 error: Error running apply: exit status 1
Error: updating Transfer Server (s-e400378fd7b144e49): operation error Transfer: UpdateServer, https response error StatusCode: 400, RequestID: 41d575ff-fa72-40c0-9b53-072c09a6368a, InvalidRequestException: Unknown SecurityPolicy
with aws_transfer_server.test,
on terraform_plugin_test.tf line 12, in resource "aws_transfer_server" "test":
12: resource "aws_transfer_server" "test" {
--- FAIL: TestAccTransfer_serial (242.46s)
--- FAIL: TestAccTransfer_serial/Server (242.46s)
--- FAIL: TestAccTransfer_serial/Server/SecurityPolicy (242.46s)
FAIL
FAIL github.com/hashicorp/terraform-provider-aws/internal/service/transfer 247.510s
FAIL
make: *** [testacc] Error 1 % aws transfer list-security-policies
{
"SecurityPolicyNames": [
"TransferSFTPConnectorSecurityPolicy-2023-07",
"TransferSFTPConnectorSecurityPolicy-2024-03",
"TransferSFTPConnectorSecurityPolicy-FIPS-2024-10",
"TransferSecurityPolicy-2018-11",
"TransferSecurityPolicy-2020-06",
"TransferSecurityPolicy-2022-03",
"TransferSecurityPolicy-2023-05",
"TransferSecurityPolicy-2024-01",
"TransferSecurityPolicy-FIPS-2020-06",
"TransferSecurityPolicy-FIPS-2023-05",
"TransferSecurityPolicy-FIPS-2024-01",
"TransferSecurityPolicy-FIPS-2024-05",
"TransferSecurityPolicy-PQ-SSH-Experimental-2023-04",
"TransferSecurityPolicy-PQ-SSH-FIPS-Experimental-2023-04",
"TransferSecurityPolicy-Restricted-2018-11",
"TransferSecurityPolicy-Restricted-2020-06"
]
} |
Thats strange, is it possible that the policy is only available in eu-central-1? |
Looks like it is only available to certain AWS accounts. I will talk to AWS then... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀.
% make testacc TESTARGS='-run=TestAccTransfer_serial/^Server$$/^SecurityPolicy$$' PKG=transfer
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.2 test ./internal/service/transfer/... -v -count 1 -parallel 20 -run=TestAccTransfer_serial/^Server$/^SecurityPolicy$ -timeout 360m
2024/10/25 08:35:23 Initializing Terraform AWS Provider...
=== RUN TestAccTransfer_serial
=== PAUSE TestAccTransfer_serial
=== CONT TestAccTransfer_serial
=== RUN TestAccTransfer_serial/Server
=== RUN TestAccTransfer_serial/Server/SecurityPolicy
--- PASS: TestAccTransfer_serial (239.32s)
--- PASS: TestAccTransfer_serial/Server (239.32s)
--- PASS: TestAccTransfer_serial/Server/SecurityPolicy (239.32s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/transfer 244.657s
Thanks for the changes, much appreciated! And sorry for the typo 😄 |
@itd-seb Thanks for the contribution 🎉 👏. |
This functionality has been released in v5.74.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
Description
This PR is to add support for the following security policies which are missing for the aws_transfer_server resource:
References
This security group is not yet mentioned on the AWS website, but you can check with
aws transfer list-security-policies
The policy adds support for the following ssh macs to TransferSecurityPolicy-2024-01: