# diagrid component create

Create a component

### Description

Create a new infrastructure component to use with the Catalyst APIs in a project

```
diagrid component create <component> [flags]
```

### Examples

```

  # Create new component using the interactive prompt (Recommended)
  # Runs automatically when no name and no flags are supplied; --interactive forces it.
  diagrid component create
  diagrid component create --interactive

  # Create new pub/sub component targeting Redis
  diagrid component create my-pubsub --type pubsub.redis --metadata redisHost=https://endpoint --metadata redisPassword=pwd --scopes app1,app2

  # Create new secret store component targeting Azure Key Vault
  diagrid component create my-keyvault --type secretstores.azure.keyvault --metadata vaultName=my-vault --metadata azureTenantId=tenant-id --metadata azureClientId=client-id --metadata azureClientSecret=client-secret --metadata azureEnvironment=AzurePublicCloud --scopes app1,app2

```

### Options

```
  -t, --type string            Component type supported: pubsub.xxxx , state.xxxx , bindings.xxxx , secretstores.xxxx , conversation.xxxx
      --metadata stringArray   Component metadata (e.g. --metadata host=localhost:3300 --metadata apiToken=foo )
      --scopes strings         Component scopes, list of ids which will have access to this component. Leave empty for giving access to all ids.
  -p, --project string         Name of existing project
  -w, --wait                   Wait for long-running resource creation to finish
      --interactive            Create new component using an interactive prompt (Recommended)
      --ignore-if-exists       Exit with success if the component already exists instead of returning an error
  -h, --help                   help for create
```

### Options inherited from parent commands

```
      --api-key string   Diagrid Cloud API key
```

### SEE ALSO

- [diagrid component](./component.md)	 - Manage components
