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

feat: add support for optional S3 secondary artifact #78

Merged
merged 9 commits into from
Mar 16, 2021

Conversation

jhosteny
Copy link
Contributor

Fixes #77.

what

  • Adds an optional secondary artifact deployment to S3

why

references

Closes #77

@jhosteny jhosteny requested review from a team as code owners January 28, 2021 19:00
@jhosteny jhosteny requested review from 3h4x and joe-niland and removed request for a team January 28, 2021 19:00
@jhosteny jhosteny force-pushed the feat/secondary-artifact branch from 150b0fd to 4cea1c8 Compare January 29, 2021 13:06
@jhosteny
Copy link
Contributor Author

jhosteny commented Feb 5, 2021

/test all

@Gowiem
Copy link
Member

Gowiem commented Feb 5, 2021

/rebuild-readme

@Gowiem
Copy link
Member

Gowiem commented Feb 9, 2021

/test all

Copy link
Member

@Gowiem Gowiem left a comment

Choose a reason for hiding this comment

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

👍 Handful of comments -- let me know if you have any questions

variables.tf Outdated Show resolved Hide resolved
variables.tf Outdated Show resolved Hide resolved
main.tf Show resolved Hide resolved
main.tf Outdated Show resolved Hide resolved
main.tf Outdated
type = "S3"
location = var.secondary_artifact_location
artifact_identifier = var.secondary_artifact_identifier
encryption_disabled = true
Copy link
Member

Choose a reason for hiding this comment

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

Can you add an additional variable for secondary_artifact_encryption_enabled, set the default to false, and use that var here? All Cloud Posse modules are trying to pass BridgeCrew security scanning and I'd bet this might fail in the future if the default / hardcoded value is false.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Gowiem just to clarify, do you want secondary_artifact_encryption_enabled, with it set to false, or secondary_artifact_encryption_disabled, with it set to false? I'm guessing you actually meant the latter?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I went ahead with that assumption that the variable name should be secondary_artifact_encryption_disabled, and set to false. I can fix if this is not what you intended.

Copy link
Member

@Gowiem Gowiem Feb 13, 2021

Choose a reason for hiding this comment

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

Ah sorry @jhosteny I did mean secondary_artifact_encryption_enabled. We have _enabled as a convention for any new bool vars. Please update if you don't mind.

See https://docs.cloudposse.com/reference/best-practices/terraform-best-practices/#use-positive-variable-names-to-avoid-double-negatives

@jhosteny
Copy link
Contributor Author

jhosteny commented Feb 9, 2021

/test all

@jhosteny
Copy link
Contributor Author

/test all

@jhosteny
Copy link
Contributor Author

@Gowiem this has been updated per your last comment. However, make readme seems to now swap the resources/s3_bucket and data-sources/s3_bucket resource entries on every run, preventing CI from totally passing. I am at the latest version of the build harness.

@Gowiem
Copy link
Member

Gowiem commented Feb 16, 2021

@jhosteny ah frustrating. Let's try building via ChatOps and see if it will pass after that...

@Gowiem
Copy link
Member

Gowiem commented Feb 16, 2021

/rebuild-readme

@Gowiem
Copy link
Member

Gowiem commented Feb 16, 2021

/test readme

@jhosteny
Copy link
Contributor Author

@Gowiem does this look okay now?

@mergify
Copy link

mergify bot commented Mar 9, 2021

This pull request is now in conflict. Could you fix it @jhosteny? 🙏

@jhosteny
Copy link
Contributor Author

/test all

@jhosteny
Copy link
Contributor Author

/test all

@mergify
Copy link

mergify bot commented Mar 16, 2021

This pull request is now in conflict. Could you fix it @jhosteny? 🙏

@jhosteny
Copy link
Contributor Author

/test all

@jamengual jamengual merged commit 3c23c4e into cloudposse:master Mar 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow optional secondary S3 artifact deploy
3 participants