gcp.dns.create_record ​
Create a DNS record in Cloud DNS
Creates a DNS record in Google Cloud DNS.
Creates an A, AAAA, CNAME, or TXT record in the specified managed zone.
Inputs:
- zone_name: Name of the Cloud DNS managed zone (required).
- record_name: DNS record name (required, e.g., 'example.com' or 'sub.example.com').
- record_type: DNS record type (required, e.g., A, AAAA, CNAME, TXT).
- record_data: Record data/value(s) (required, list of strings).
- ttl: Time to live in seconds (optional, default: 300).
- connection_uuid: Cloud connection UUID for GCP credentials (required).
Outputs (terminal state_data):
- zone_name: str — managed zone name
- record_name: str — created record name
- record_type: str — record type
- record_data: list — record values
- ttl: int — TTL in seconds
Compensation: Use gcp.dns.delete_record to undo. Plugin required: context.get_plugin("gcp") must expose .get_dns_client() and .get_project_id_for_connection().
Overview ​
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | Base-gcp |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
zone_name | string | Yes | — | Cloud DNS managed zone name |
record_name | string | Yes | — | DNS record name |
record_type | string | Yes | — | Record type (A, AAAA, CNAME, TXT) |
record_data | list | Yes | — | Record data as list of strings |
ttl | integer | No | — | TTL in seconds (default: 300) |
connection_uuid | uuid | Yes | — | Cloud connection UUID for GCP credentials |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
record_data | list | No | — | — |
record_name | string | No | — | — |
record_type | string | No | — | — |
ttl | integer | No | — | — |
zone_name | string | No | — | — |
connection_uuid | uuid | No | — | — |
failure_reason | string | No | — | — |
failure_type | string | No | — | — |
failed_action | string | No | — | — |
failed_at_state | string | No | — | — |
failed_step | string | No | — | — |
failed_layer | string | No | — | — |
error | string | No | — | — |
error_type | string | No | — | — |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | execute | — |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
pending | execute | completed | — |
* (any state) | fail | failed | — |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "gcp.dns.create_record",
"initial_data": {
"zone_name": "value",
"record_name": "value",
"record_type": "value",
"record_data": "value"
}
}