github.com/aspring/terraform@v0.8.2-0.20161216122603-6a8619a5db2e/website/source/docs/providers/postgresql/r/postgresql_schema.html.markdown (about)

     1  ---
     2  layout: "postgresql"
     3  page_title: "PostgreSQL: postgresql_schema"
     4  sidebar_current: "docs-postgresql-resource-postgresql_schema"
     5  description: |-
     6    Creates and manages a schema within a PostgreSQL database.
     7  ---
     8  
     9  # postgresql\_schema
    10  
    11  The ``postgresql_schema`` resource creates and manages a schema within a
    12  PostgreSQL database.
    13  
    14  
    15  ## Usage
    16  
    17  ```
    18  resource "postgresql_schema" "my_schema" {
    19    name = "my_schema"
    20  }
    21  ```
    22  
    23  ## Argument Reference
    24  
    25  * `name` - (Required) The name of the schema. Must be unique in the PostgreSQL
    26    database instance where it is configured.
    27  
    28  ## Import Example
    29  
    30  `postgresql_schema` supports importing resources.  Supposing the following
    31  Terraform:
    32  
    33  ```
    34  provider "postgresql" {
    35    alias = "admindb"
    36  }
    37  
    38  resource "postgresql_schema" "schema_foo" {
    39    provider = "postgresql.admindb"
    40  
    41    name = "my_schema"
    42  }
    43  ```
    44  
    45  It is possible to import a `postgresql_schema` resource with the following
    46  command:
    47  
    48  ```
    49  $ terraform import postgresql_schema.schema_foo my_schema
    50  ```
    51  
    52  Where `my_schema` is the name of the schema in the PostgreSQL database and
    53  `postgresql_schema.schema_foo` is the name of the resource whose state will be
    54  populated as a result of the command.