0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

pulumiでリソース名にプレフィックスを付けない方法

0
Posted at

概要

社内のAzure使ったりするときにリソースの命名規則があるので、自動リソース名についてくるリソース名 + *******のようなプレフィックスを取っ払いたかった

解決方法(TypeScript)

リソースのプロパティでnameを指定してあげるだけでした。
公式のドキュメントにも書いてあるしちゃんと読めよ!って話ですね...

index.ts
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

//  rg-test******* のようにプレフィックスがついてくる
//  const testResourceGroup = new azure.core.ResourceGroup("rg-test");

//  こっちだと rg-test のままで作成される
const testResourceGroup = new azure.core.ResourceGroup("rg-test", {
  name: "rg-test"
});

まとめ

ドキュメントちゃんと読むようにします...

参考

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?