openstack_identity_application_credential_v3

Manages a V3 Application Credential resource within OpenStack Keystone.

Example Usage

Predefined secret

Application credential below will have only one swiftoperator role.

resource "openstack_identity_application_credential_v3" "swift" {
  name        = "swift"
  description = "Swift technical application credential"
  secret      = "supersecret"
  roles       = ["swiftoperator"]
  expires_at  = "2019-02-13T12:12:12Z"
}

Unrestricted with autogenerated secret and unlimited TTL

Application credential below will inherit all the current user's roles.

resource "openstack_identity_application_credential_v3" "unrestricted" {
  name         = "unrestricted"
  description  = "Unrestricted application credential"
  unrestricted = true
}

output "application_credential_secret" {
  value = openstack_identity_application_credential_v3.unrestricted.secret
}

Application credential with access rules

resource "openstack_identity_application_credential_v3" "monitoring" {
  name        = "monitoring"
  expires_at  = "2019-02-13T12:12:12Z"

  access_rules {
    path    = "/v2.0/metrics"
    service = "monitoring"
    method  = "GET"
  }

  access_rules {
    path    = "/v2.0/metrics"
    service = "monitoring"
    method  = "PUT"
  }
}

Argument Reference

The following arguments are supported:

The access_rules block supports:

Attributes Reference

The following attributes are exported:

Import

Application Credentials can be imported using the id, e.g.

$ terraform import openstack_identity_application_credential_v3.application_credential_1 c17304b7-0953-4738-abb0-67005882b0a0