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

Fixes deprecation of log_group_name -> log_destination #13

Merged
merged 14 commits into from
Feb 28, 2020

Conversation

slmingol
Copy link
Contributor

No description provided.

main.tf Show resolved Hide resolved
main.tf Show resolved Hide resolved
main.tf Show resolved Hide resolved
aknysh
aknysh previously requested changes Jan 22, 2020
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.

thanks @slmingol
please see comments.

Also, can you please update the outputs to use the splat+join syntax - our test throws the error Warning: output "log_group_arn": must use splat syntax to access aws_cloudwatch_log_group.default attribute "arn", because it has "count" set

also, please run terraform fmt and rebuild README by executing

make init
make readme/deps
make readme

thanks

@maximmi
Copy link

maximmi commented Feb 26, 2020

@slmingol could you address the comments, please?

@slmingol
Copy link
Contributor Author

slmingol commented Feb 27, 2020

Need more detailed steps on what you guys want me to do. Not really following and have tried to delve into your Makefile targets and got completely lost.

Keep in mind that not all of us are familiar w/ your CI/CD process 8-).

For e.g.:

$ terraform fmt
main.tf
outputs.tf

$ make init
exit 0
Removing existing build-harness
Cloning https://github.com/cloudposse/build-harness.git#master...
Cloning into 'build-harness'...
remote: Enumerating objects: 18, done.
remote: Counting objects: 100% (18/18), done.
remote: Compressing objects: 100% (16/16), done.
remote: Total 1245 (delta 4), reused 6 (delta 2), pack-reused 1227
Receiving objects: 100% (1245/1245), 304.62 KiB | 4.23 MiB/s, done.
Resolving deltas: 100% (659/659), done.

$ make readme/deps
curl --retry 3 --retry-delay 5 --fail -sSL -o /Users/smingolelli/projects/terraform-aws-cloudwatch-flow-logs/build-harness/vendor/gomplate https://github.com/hairyhenderson/gomplate/releases/download/v3.1.0/gomplate_darwin-amd64-slim && chmod +x /Users/smingolelli/projects/terraform-aws-cloudwatch-flow-logs/build-harness/vendor/gomplate

$ make readme
awk: cmd. line:1: warning: regexp escape sequence `\_' is not a known regexp operator
Package terraform-docs already installed
Generated README.md from /Users/smingolelli/projects/terraform-aws-cloudwatch-flow-logs/build-harness/templates/README.md.gotmpl using data from /Users/smingolelli/projects/terraform-aws-cloudwatch-flow-logs/build-harness/templates/README.yaml

@maximmi
Copy link

maximmi commented Feb 28, 2020

@slmingol may be you just forgot to commit your changes. you marked Andrew's comments as resolved, but there is no commit to address splat+join syntax. Leave readme as is, I could fix it if your repo have access to push changes

@slmingol
Copy link
Contributor Author

@maximmi - yeah I didn't understand what Andrew was asking me to do on the outputs. I hadn't resolved the comment - #13 (review) where he asked for them. Just wasn't sure what to do to satisfy what he was asking for for the splat+join and the other changes.

@slmingol
Copy link
Contributor Author

@maximmi so one issue I'm seeing is that on MacOS some of us will have gawk installed via brew. It adds both awk/gawk to your $PATH which results in this line in the file:

$ cat ./build-harness/Makefile.helpers
...
...
help/generate:
	@awk '/^[a-zA-Z\_0-9%:\\\/-]+:/ { \
	  helpMessage = match(lastLine, /^## (.*)/); \`

That first line to gawk/awk is complaining about the \_. I uninstalled gawk and brew instaled awk to workaround that issue.

@slmingol
Copy link
Contributor Author

@aknysh - can you explain what outputs to fix? The outputs.tf has the splat+join from what I can tell:

$ cat outputs.tf
output "log_group_arn" {
  value       = "${join("", aws_cloudwatch_log_group.default.*.arn)}"
  description = "ARN of the log group"
}

output "vpc_flow_id" {
  value       = "${join("", aws_flow_log.vpc.*.id)}"
  description = "VPC Flow Log ID"
}

output "subnet_flow_ids" {
  value       = "${join("", aws_flow_log.subnets.*.id)}"
  description = "Flow Log IDs of subnets"
}

output "eni_flow_ids" {
  value       = "${join("", aws_flow_log.eni.*.id)}"
  description = "Flow Log IDs of ENIs"
}

output "kinesis_id" {
  value       = "${join("", aws_kinesis_stream.default.*.id)}"
  description = "Kinesis Stream ID"
}

output "kinesis_name" {
  value       = "${join("", aws_kinesis_stream.default.*.name)}"
  description = "Kinesis Stream name"
}

output "kinesis_shard_count" {
  value       = "${join("", aws_kinesis_stream.default.*.shard_count)}"
  description = "Kinesis Stream Shard count"
}

output "kinesis_arn" {
  value       = "${join("", aws_kinesis_stream.default.*.arn)}"
  description = "Kinesis Stream ARN"
}

@aknysh
Copy link
Member

aknysh commented Feb 28, 2020

@slmingol
If all outputs have splat+join, then it's should be fine (sorry, don't remember why I asked to update them).
Please rebase (resolve conflicts)

@slmingol
Copy link
Contributor Author

@aknysh - OK resolved conflicts.

@slmingol
Copy link
Contributor Author

@aknysh sorry for being a noob, I now realize that you guys have Travis running at the bottom telling me what's failing, I've resolved the checks, lmk if you want all this squashed.

Copy link

@maximmi maximmi left a comment

Choose a reason for hiding this comment

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

thanks @slmingol

@maximmi maximmi dismissed aknysh’s stale review February 28, 2020 17:18

comments were addressed

@maximmi maximmi merged commit c57e824 into cloudposse:master Feb 28, 2020
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.

3 participants