-
Notifications
You must be signed in to change notification settings - Fork 9.5k
[New Resources]aws_transfer_web_app
and aws_transfer_web_app_customization
#42708
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
Open
tabito-hara
wants to merge
17
commits into
hashicorp:main
Choose a base branch
from
tabito-hara:f-aws_transfer_web_app
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Community GuidelinesThis comment is added to every new Pull Request to provide quick reference to how the Terraform AWS Provider is maintained. Please review the information below, and thank you for contributing to the community that keeps the provider thriving! 🚀 Voting for Prioritization
Pull Request Authors
|
41c3e3a
to
f839655
Compare
f839655
to
8b3f48e
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
documentation
Introduces or discusses updates to documentation.
generators
Relates to code generators.
new-resource
Introduces a new resource.
service/transfer
Issues and PRs that pertain to the transfer service.
size/XL
Managed by automation to categorize the size of a PR.
sweeper
Pertains to changes to or issues with the sweeper.
tests
PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Rollback Plan
If a change needs to be reverted, we will publish an updated version of the library.
Changes to Security Controls
Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.
Description
aws_transfer_web_app
andaws_transfer_web_app_customization
.aws_transfer_web_app
IdentityProviderDetails
andWebUnits
are union types. Their expander and flattener are manually implemented.CreateWebApp
andUpdateWebApp
return only aWebAppId
. Other attributes are retrieved using a finder function and set in the Terraform state.aws_transfer_web_app_customization
UpdateWebAppCustomization
method in the AWS SDK for Go accepts raw bytes for the logo and favicon files and automatically encodes them as base64 strings. Since Terraform arguments must be strings, the input is expected to be base64-encoded strings. These are decoded in the manually implemented expander before being passed to the SDK method. In the flattener process, the SDK’s output is re-encoded as base64 strings to store in the Terraform state.favicon_file
is not specified, the existing file remains unchanged. Therefore, it is marked as bothOptional
andComputed
. The same applies tologo_file
.title
, an empty string (""
) must be passed to the API. However, when thetitle
is updated to an empty string, the response fromDescribeWebAppCustomization
omits theTitle
key. In Terraform, iftitle = ""
is specified, the resulting state afterapply
showstitle = null
, leading to a mismatch between the plan (""
) and the post-apply state (null
), which causes an error.title
with empty strings, but this approach did not work as expected. Specifically, if thetitle
argument itself isnull
, the plan containsnull
, while the flattener still outputs an empty string (""
) for the state, resulting in a new inconsistency.title
argument is not marked asComputed
, removing it from the configuration resets the title to an empty string. Based on this behavior, thetitle
argument must have a length between 1 and 100, meaning an empty string cannot be used.Acceptance Tests
Each acceptance test focuses on a single argument and verifies the following:
For logo and favicon files, product logos obtained from the [HashiCorp Website](https://brand.hashicorp.com/product_logos) are used.
Relations
Closes #40996
References
https://docs.aws.amazon.com/transfer/latest/APIReference/API_CreateWebApp.html
https://docs.aws.amazon.com/transfer/latest/APIReference/API_UpdateWebApp.html
https://docs.aws.amazon.com/transfer/latest/APIReference/API_DescribeWebApp.html
https://docs.aws.amazon.com/transfer/latest/APIReference/API_UpdateWebAppCustomization.html
https://docs.aws.amazon.com/transfer/latest/APIReference/API_DescribeWebAppCustomization.html
Output from Acceptance Testing