通常は「git push heroku master」のようにherokuのgit repoにpushする。
heroku_buildはURLにgithub上のtar.gzを指定することでデプロイできるようだ。
Error installing provider "aws": Error parsing netrc file at "/home/user01/.netrc": line 4: keyword expected; got method.
vim ~/.netrc -- machine api.heroku.com login <email> password <token> # method interactive --
resource "heroku_addon" "postgres14" {
app_id = heroku_app.main.id
plan = "heroku-postgresql:mini"
config = {
version = "14"
}
}email = "myname@example.com" api_key = "1111-2222-3333-4444-5555"
variable "email" {}
variable "api_key" {}
provider "heroku" {
email = "${var.email}"
api_key = "${var.api_key}"
}
resource "heroku_app" "my-heroku-app" {
name = "my-heroku-app-dev"
region = "us"
}{
"version": 1,
"serial": 0,
"modules": [
{
"path": [
"root"
],
"outputs": {},
"resources": {
"heroku_app.my-heroku-app": {
"type": "heroku_app",
"primary": {
"id": "my-heroku-app-dev",
"attributes": {
}
}
}
}
}
]
}terraform refresh
"heroku_addon.ssl": {
"type": "heroku_addon",
"depends_on": [
"heroku_app.my-app"
],
"primary": {
"id": "****-****-****-****-****",
"attributes": {
"app": "my-app",
}
}
},terraform refresh
cat terraform.tfstate \
| jq '.modules[].resources[].primary[]' \
| grep '"all_config_vars.' | grep -v '"all_config_vars.#' \
| perl -ane 'if(/"([^"]+)":\s*"([^"]+)"/){$k=$1;$v=$2;$k=~s/all_config_vars.//;print "$k = \"$v\"\n";}' \
| sort