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

Fix website support, remove awsutils depenencies #158

Merged
merged 4 commits into from
Sep 7, 2022
Merged

Conversation

Nuru
Copy link
Contributor

@Nuru Nuru commented Sep 5, 2022

Breaking changes

This release has what can be considered breaking changes, but mostly because it either reverts breaking changes introduced in v2.0.2 or fixes features that were previously broken and unusable.

  • If an IAM user and access key is created by this module, the AWS Access Key does not expire, restoring the behavior in and prior to v2.0.1. In v2.0.2 and v2.0.3, keys expired in 30 days.
  • The website_inputs input is replaced by website_configuration and website_redirect_all_requests_to. The cors_rule_inputs input is replaced by cors_configuration. Thanks to @jurgen-weber-deltatre for helping with this.

New Features

  • The breaking change introduced in v2.0.2 that required you to initialize the cloudposse/awsutils Terraform provider with the AWS region and been reverted. This module no longer uses that provider.
  • Support for S3 static websites is greatly improved. Configure with website_configuration and cors_configuration, or with website_redirect_all_requests_to. The website endpoint and base domain are now available as outputs.
  • You can now store the IAM user's access key in SSM via store_access_key_in_ssm. When stored in SSM, the secret key is not output by this module as a Terraform output, preventing it from being stored unencrypted in the Terraform state file.
  • You can now create a user but not create an access key by setting access_key_enabled = false. You can also use this feature to rotate an access key by setting it to false and applying to delete the key, then setting it to true and applying to create a new one.

Note that in general we now recommend against creating an IAM user, and recommend using AWS OIDC to create an authentication path for users and systems that do not have native IAM credentials. Also note that you can assign permissions to existing AWS users and roles via grants or privileged_principal_arns.

what && why

  • Update terraform-aws-s3-user to v1.0.0 and add inputs access_key_enabled, store_access_key_in_ssm, and ssm_base_path in order to
    • Make creating an IAM key for the S3 user optional
    • Enable saving the IAM key in SSM Parmeter store and omitting it from Terraform state
    • Remove dependency on cloudposse/awsutils Terraform provider. See terraform-aws-iam-system-user v1.0.0 Release Notes for further details and justification.
  • Replace input website_inputs (which never worked) with website_configuration and website_redirect_all_requests_to. See dynamically create website inputs with the new provider and its colli… #142 for further details and justification.
  • Replace input cors_rule_inputs with cors_configuration to match resource name.

references

@Nuru Nuru added the major Breaking changes (or first stable release) label Sep 5, 2022
@Nuru Nuru requested review from a team as code owners September 5, 2022 00:46
@Nuru
Copy link
Contributor Author

Nuru commented Sep 5, 2022

/test all

main.tf Outdated Show resolved Hide resolved
variables.tf Outdated Show resolved Hide resolved
Copy link
Member

@aknysh aknysh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please see comments

@Nuru
Copy link
Contributor Author

Nuru commented Sep 7, 2022

/test all

@Nuru Nuru requested a review from aknysh September 7, 2022 20:24
@Nuru
Copy link
Contributor Author

Nuru commented Sep 7, 2022

/test all

@Nuru Nuru merged commit 6837ed7 into master Sep 7, 2022
@Nuru Nuru deleted the remove-awsutils branch September 7, 2022 22:41
@jurgenweber
Copy link
Contributor

Cool! Thank you!

@jurgen-weber-deltatre
Copy link

argh, wrong user. Thanks! :P

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
major Breaking changes (or first stable release)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to use website inputs Enhancement: store iam user credentials in ssm parameter
5 participants