Skip to content

Instantly share code, notes, and snippets.

@denniswebb
Created September 12, 2017 16:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save denniswebb/d208b7abe86af30ee39e3baeadc621b0 to your computer and use it in GitHub Desktop.
Save denniswebb/d208b7abe86af30ee39e3baeadc621b0 to your computer and use it in GitHub Desktop.
data "aws_region" "current" {
current = true
}
module "aws_cli_install" {
source = "../aws_cli_install"
}
data "template_file" "main" {
template = <<EOF
${module.aws_cli_install.script}
"$WORKDIR"/aws/bin/aws --region=${data.aws_region.current.name} sns create-platform-application --name android_push --platform GCM --attributes PlatformCredential='${var.key}'
EOF
}
resource "null_resource" "main" {
provisioner "local-exec" {
command = "${data.template_file.main.rendered}"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment