我如何能够执行以下命令:
terraform apply
#=>
. . .
Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value:
Run Code Online (Sandbox Code Playgroud)
没有随后的交互式提示?
我遇到以下警告:
警告:您似乎无权访问项目 [$PROJECT] 或它不存在。
在本地运行以下命令后:
激活并设置服务帐户:
gcloud auth activate-service-account \
$SERVICE_ACCOUNT \
--key-file=key.json
#=>
Activated service account credentials for: [$SERVICE_ACCOUNT]
Run Code Online (Sandbox Code Playgroud)
选择$PROJECT作为上面的服务帐号:
gcloud config set project $PROJECT
#=>
Updated property [core/project].
WARNING: You do not appear to have access to project [$PROJECT] or it does not exist.
Run Code Online (Sandbox Code Playgroud)
我自己的 GCP 帐户与以下角色相关联:
为什么这个服务账户不能set $PROJECT?是否有我缺少的角色或权限?
SELECT *
FROM notifications
INNER JOIN COMMENT
ON COMMENT.id = notifications.source_id
WHERE idblog IN (SELECT blogs_id
FROM blogs
WHERE STATUS = "active")
INNER JOIN reportmsg
ON reportmsg.msgid = notifications.source_id
WHERE uid =: uid
ORDER BY notificationid DESC
LIMIT 20;
Run Code Online (Sandbox Code Playgroud)
在这里,我INNER JOIN荷兰国际集团notifications与comment和reportmsg; 然后过滤内容WHERE.
但我的问题是,第一INNER JOIN[即与comment],在加入之前notifications有comment,我想匹配notifications.idblog与blogs.blogs_id 和 SELECT只有那些行,其中blogs.status = "active".
为了更好地理解上面的代码:
这里,INNER JOIN与comment我想SELECT …
$GKE_CLUSTERGoogle Cloud Platform (GCP) 项目 ( $GCP_PROJECT)中的 Google Kubernetes Engine (GKE) 集群之一 ( )似乎无法pull从 Google Container Registry (GCR)获取Docker 映像:
kubectl config current-context
#=>
$GKE_CLUSTER
Run Code Online (Sandbox Code Playgroud)
和:
kubectl get pods --namespace=$NAMESPACE
#=>
NAME READY STATUS RESTARTS AGE
. . . . . . . . . . . . . . .
$SOME_POD 0/1 ImagePullBackOff 0 1m
. . . . . . . . . . . . . . .
Run Code Online (Sandbox Code Playgroud)
和:
kubectl get events \ …Run Code Online (Sandbox Code Playgroud) google-compute-engine google-cloud-platform google-kubernetes-engine google-container-registry google-iam
我想自定义输出:
kubectl get pod . . .
Run Code Online (Sandbox Code Playgroud)
用--output=go-template代替--output=yaml或--output=json。
get我的目的是使用一个命令获取除了默认列(例如,NAME、READY、STATUS 等..,.)之外的其他值(例如,容器端口) :
kubectl get pods --output=go-template --template=$GO_TEMPLATE
#=>
NAME READY STATUS RESTARTS AGE CONTAINER PORTS . . .
. . . . . . . . . . . . . . . . . . . . .
client-qfr4s 1/1 Running 0 14d 80,443 . . .
. . . . . . . . . . . . . . . . …Run Code Online (Sandbox Code Playgroud) 我正在寻找ruby-gmailgem中的一个实例方法,它允许我读取:
身体或
学科
的Gmail邮件.
在查看了这里找到的文档后,我找不到任何东西!?
.message在Gmail::Message类部分中找到了一个实例方法; 但是,由于缺乏一个更好的术语,它只会为身体发送电子邮件"mumbo-jumbo".
我的尝试:
#!/usr/local/bin/ruby
require 'gmail'
gmail = Gmail.connect('username', 'password')
emails = gmail.inbox.emails(:from => 'someone@mail.com')
emails.each do |email|
email.read
email.message
end
Run Code Online (Sandbox Code Playgroud)
现在:
email.read它不工作email.message 返回上面提到的"mumbo-jumbo" 有人在SO上提出这个问题,但没有得到答案.
我有 2 张桌子:
Category带主键ID和列NameEmployee带主键ID和列Category_id注意:现在可以正确Category_id显示ID
我想显示Name而不是ID来自 的输出Employee。
试图:
$categ = mysql_query("SELECT * FROM employee WHERE id = '" . $_GET['id'] . "'");
$rows = array();
while ($row = mysql_fetch_assoc($categ)) {
$website_cat = $row;
}
Run Code Online (Sandbox Code Playgroud)
Category桌子:
+----+----------------+
| ID | Name |
+----+----------------+
| 23 | Manager |
| 10 | Boss |
| 14 | Worker |
| 41 | Another …Run Code Online (Sandbox Code Playgroud) 在为远程 MySQL 数据库安装 Bridge 后,我决定使用另一种类型的连接。
我安装了这个 .pkg并运行了这个代码:
/usr/local/mode/bin/mode-bridge-config -init OGU2NGNmYWUxOWFmOjQxYmZhZDhmOWM5ZGRlNGE3Nzk1OTYyYUBodHRwczovL21vZGVhbmFseXRpY3MuY29tL2FwaS9kb21lZGlhL2JyaWRnZXMvc2V0dXA=
Run Code Online (Sandbox Code Playgroud)
从这个页面; 除非您拥有 Mode 帐户,否则不会加载。
现在我想完全删除.pkg由该代码安装的所有内容并撤消该代码所做的所有内容。
我已经rmdir .modeanalytics。我还应该做什么?
对任何 beta 参数定义的任何 Google Cloud Platform (GCP) 资源进行地形改造都需要提供google-beta程序。是否应该google-beta使用提供者来代替或与提供者一起使用google提供程序一起使用?
换句话说,假设$GKE_CLUSTER_NAMEGCP 项目中存在某个 Google Kubernetes Engine (GKE) 集群$GCP_PROJECT_NAME某个 Google Kubernetes Engine (GKE) 集群:
gcloud container clusters list \\\n--format="value(name)" \\\n--project=$GCP_PROJECT_NAME\n\n#=>\n\n. . .\n$GKE_CLUSTER_NAME\n. . .\nRun Code Online (Sandbox Code Playgroud)\n启用配置连接器后:
\ngcloud container clusters describe $GKE_CLUSTER_NAME \\\n--format=\xe2\x80\x9cvalue(addonsConfig.configConnectorConfig.enabled)\xe2\x80\x9d \\\n--zone=$GKE_CLUSTER_ZONE\n\n#=>\n\nTrue\nRun Code Online (Sandbox Code Playgroud)\nTerraforming$GKE_CLUSTER_NAME需要一个google_container_cluster资源定义,container_cluster.tf其中包括config_connector_config参数(在addons_config块内;更多信息请参见此处)和provider参数(官方参考文档中缺少):
resource "google_container_cluster" "test" {\n addons_config {\n config_connector_config {\n enabled …Run Code Online (Sandbox Code Playgroud) google-cloud-platform google-kubernetes-engine terraform terraform-provider-gcp infrastructure-as-code
mysql ×3
sql ×2
terraform ×2
bridge ×1
gcloud ×1
gmail ×1
go-templates ×1
google-iam ×1
inner-join ×1
kubectl ×1
kubernetes ×1
php ×1
ruby ×1
rubygems ×1