我需要 terraform 来访问我的 S3 存储桶,但它无法在指定区域找到存储桶。
我的主要.tf:
provider "aws" {
region = "eu-west-2"
}
terraform {
backend "s3" {
bucket = "xyz-state-blog"
key = "dev/terraform"
region = "eu-west-2"
}
}
locals {
azs = ["eu-west-2a", "eu-west-2b", "eu-west-2c"]
environment = "dev"
kops_state_bucket_name = "${local.environment}-kops-state"
// Needs to be a FQDN
kubernetes_cluster_name = "k8s-dev0.domain.com"
ingress_ips = ["10.0.0.100/32", "10.0.0.101/32"]
vpc_name = "${local.environment}-vpc"
tags = {
environment = "${local.environment}"
terraform = true
}
}
data "aws_region" "current" {}
Run Code Online (Sandbox Code Playgroud)
以下是我收到terraform init
命令的错误:
Error inspecting states …
Run Code Online (Sandbox Code Playgroud) 安装rstan时出现以下错误:
Error in .shlib_internal(args) :
C++14 standard requested but CXX14 is not defined
Run Code Online (Sandbox Code Playgroud)
从研究中了解到 C++14 编译器应该可用。如何在配置 R 时安装相同的。使用以下命令配置 R
./configure --with-readline=no --with-x=no
Run Code Online (Sandbox Code Playgroud)
并安装
yum install -y devtoolset-6
Run Code Online (Sandbox Code Playgroud)
但仍然无法更新 C++14 并且 rstan 给出错误
Default C++ compiler: g++ -g -O2
C++98 compiler: g++ -g -O2
C++11 compiler: g++ -std=gnu++11 -g -O2
C++14 compiler: g++ -g -O2
C++17 compiler:
Fortran 90/95 compiler: gfortran -g -O2
Obj-C compiler:
Run Code Online (Sandbox Code Playgroud)
设置文件
yum -y update
yum install -y centos-release-scl
yum install -y devtoolset-6
yum install -y devtoolset-6-gcc-gfortran …
Run Code Online (Sandbox Code Playgroud)