使用 Terraform 创建 IAM 资源

Redis 云

您可以使用 HashiCorp Terraform 创建 Identity and Access Management (IAM) 资源,以支持 AWS 云账户对 Redis Cloud 订阅的访问。

以下示例使用terraform-aws-Redislabs-Cloud-Account-IAM-Resources模块,位于 Amazon S3 中:

  1. 创建一个main.tf如下所示(更新profile,regionpgp_key值)。

    请注意,pgp_key是必需的。有关详细信息,请参阅 Terraform 文档

    查看 terraformIAMTemplate.json
  2. Initialize Terraform with the module:

    Note: Terraform requires AWS credentials be supplied, but the source of the module is a public S3 bucket, so any valid credentials should work. Replace the XXXX fields below with your relevant values

    AWS_ACCESS_KEY_ID=XXXX AWS_SECRET_KEY=XXXX terraform init
    
  3. Build the resources:

    terraform apply
    

    This displays the required values. To access the sensitive data:

    • accessSecretKey: echo $(terraform output -raw accessSecretKey)

    • consolePassword:

      echo $(terraform output -raw consolePassword | base64 --decode | keybase pgp decrypt)

RATE THIS PAGE
Back to top ↑