티스토리 뷰
테라폼을 이용해서 오픈스택 리소스를 생성할 때 인증을 받는 방법은 여러가지가 있습니다. 키스톤에서 제공하는 인증을 설정 값에 추가하면 여러가지 인증을 이용할 수 있습니다. 그 중에서 아이디/암호, 크레덴셜 ID/시크릿, 토큰을 이용하는 방법은 오픈스택 rc 파일에 설정을 통해서 진행할 수 있습니다.
- 아이디/암호
- OS_AUTH_TYPE=v3password
- OS_USERNAME=username
- OS_PASSWORD=password
- 크레덴셜ID/시크릿
- OS_AUTH_TYPE=v3applicationcredential
- OS_APPLICATION_CREDENTIAL_ID=xxxxxxxxxxx
- OS_APPLICATION_CREDENTIAL_SECRET=xxxxxxxxxx
- 토큰
- OS_AUTH_TYPE=v3token
- OS_TOKEN=ggggggg
애플리케이션 크레덴셜 예제
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# COMMON OPENSTACK ENVS | |
export OS_INTERFACE=public | |
export OS_IDENTITY_API_VERSION=3 | |
export OS_COMPUTE_API_VERSION=2.26 | |
export OS_NO_CACHE=1 | |
export OS_AUTH_URL=https://identity.openstack.com/v3 | |
export OS_AUTH_VERSION=3 | |
export OS_AUTH_TYPE=v3applicationcredential | |
export OS_APPLICATION_CREDENTIAL_ID=AAAAAAAAAA | |
export OS_APPLICATION_CREDENTIAL_SECRET=BBBBBBBBBB |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
terraform { | |
required_version = ">= 0.14.0" # Takes into account Terraform versions from 0.14.0 | |
required_providers { | |
openstack = { | |
source = "terraform-provider-openstack/openstack" | |
version = "~> 1.43.0" | |
} | |
} | |
} | |
provider "openstack" { | |
auth_url = "https://identity.openstack.com/v3" | |
} | |
resource "openstack_compute_instance_v2" "test-server" { | |
# ... | |
} |
토큰
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# COMMON OPENSTACK ENVS | |
export OS_INTERFACE=public | |
export OS_IDENTITY_API_VERSION=3 | |
export OS_COMPUTE_API_VERSION=2.26 | |
export OS_NO_CACHE=1 | |
export OS_AUTH_URL=https://identity.openstack.com/v3 | |
export OS_AUTH_VERSION=3 | |
export OS_AUTH_TYPE=v3token |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
terraform { | |
required_version = ">= 0.14.0" # Takes into account Terraform versions from 0.14.0 | |
required_providers { | |
openstack = { | |
source = "terraform-provider-openstack/openstack" | |
version = "~> 1.43.0" | |
} | |
} | |
} | |
provider "openstack" { | |
allow_reauth = false | |
token = "xxxxxxxxxxxx" | |
} | |
resource "openstack_compute_instance_v2" "test-server" { | |
# ... | |
} |
참고
키스톤 인증 방식 플러그인
https://docs.openstack.org/keystoneauth/latest/plugin-options.html#available-plugins
Plugin Options — keystoneauth1 4.4.1.dev1 documentation
this page last updated: 2017-01-10 22:56:46
docs.openstack.org
테라폼 오픈스택 프로바이더
https://registry.terraform.io/providers/terraform-provider-openstack/openstack/latest/docs
Terraform Registry
registry.terraform.io
반응형
'프로그래밍 언어 > terraform' 카테고리의 다른 글
반응형
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- build
- airflow
- 다이나믹
- AWS
- 하둡
- bash
- 백준
- 알고리즘
- 하이브
- 파이썬
- HIVE
- 오류
- 정올
- java
- Tez
- SPARK
- mysql
- nodejs
- Hadoop
- S3
- hbase
- HDFS
- ubuntu
- emr
- oozie
- Linux
- SQL
- error
- yarn
- Python
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
글 보관함