### Bootstrap and Build Provider Source: https://github.com/xquik-dev/terraform-provider-x-twitter-scraper/blob/main/CONTRIBUTING.md Run these commands to install dependencies and build the Provider binary. ```sh ./scripts/bootstrap ./scripts/build ``` -------------------------------- ### Install the provider binary Source: https://github.com/xquik-dev/terraform-provider-x-twitter-scraper/blob/main/README.md Create the local plugin directory and move the compiled binary into it for Terraform to discover. ```sh mkdir -p ~/.terraform.d/plugins/xquik-dev/x-twitter-scraper/0.2.0/darwin_arm64 mv terraform-provider-x-twitter-scraper ~/.terraform.d/plugins/xquik-dev/x-twitter-scraper/0.2.0/darwin_arm64/ ``` -------------------------------- ### Build and Install Provider Locally Source: https://github.com/xquik-dev/terraform-provider-x-twitter-scraper/blob/main/docs/guides/quickstart.md Commands to build the provider and move the binary to the local Terraform plugins directory. ```sh ./scripts/build mkdir -p ~/.terraform.d/plugins/xquik-dev/x-twitter-scraper/0.2.0/darwin_arm64 mv terraform-provider-x-twitter-scraper ~/.terraform.d/plugins/xquik-dev/x-twitter-scraper/0.2.0/darwin_arm64/ ``` -------------------------------- ### Configure Local Provider Installation Source: https://github.com/xquik-dev/terraform-provider-x-twitter-scraper/blob/main/CONTRIBUTING.md Edit your `~/.terraformrc` file to point to a local build of the provider. This is useful for local development. ```hcl provider_installation { dev_overrides { "Xquik-dev/x-twitter-scraper" = "/local/path/to/this/repo" } direct {} } ``` -------------------------------- ### Validate Provider Installation Source: https://github.com/xquik-dev/terraform-provider-x-twitter-scraper/blob/main/docs/CONTEXT7.md Verify that Terraform recognizes the local provider configuration. ```sh terraform providers terraform validate ``` -------------------------------- ### Build the provider binary Source: https://github.com/xquik-dev/terraform-provider-x-twitter-scraper/blob/main/README.md Execute the build script to generate the provider binary locally. ```sh ./scripts/build ``` -------------------------------- ### Run Acceptance Tests Source: https://github.com/xquik-dev/terraform-provider-x-twitter-scraper/blob/main/CONTRIBUTING.md Enable and run acceptance tests by setting the `TF_ACC` environment variable. Be aware that these tests interact with real cloud resources and may incur fees. ```sh TF_ACC=1 ./scripts/test ``` -------------------------------- ### Run Schema and Unit Tests Source: https://github.com/xquik-dev/terraform-provider-x-twitter-scraper/blob/main/CONTRIBUTING.md Execute the schema and unit tests for the provider. ```sh ./scripts/test ``` -------------------------------- ### Create Monitor Resource Source: https://github.com/xquik-dev/terraform-provider-x-twitter-scraper/blob/main/docs/guides/quickstart.md Define a monitor to track new account activity for a specific username. ```hcl resource "x-twitter-scraper_monitor" "product_updates" { username = "xquik" event_types = ["tweet.new"] } ``` -------------------------------- ### Format Code Source: https://github.com/xquik-dev/terraform-provider-x-twitter-scraper/blob/main/CONTRIBUTING.md Use this command to format the code according to standard gofmt practices. ```sh ./scripts/format ``` -------------------------------- ### Configure X Twitter Scraper Provider Source: https://github.com/xquik-dev/terraform-provider-x-twitter-scraper/blob/main/docs/index.md Initializes the provider block. Authentication is preferably handled via environment variables X_TWITTER_SCRAPER_API_KEY or X_TWITTER_SCRAPER_BEARER_TOKEN. ```terraform provider "x-twitter-scraper" { # Prefer X_TWITTER_SCRAPER_API_KEY or X_TWITTER_SCRAPER_BEARER_TOKEN. } ``` -------------------------------- ### Configure Terraform CLI Development Override Source: https://github.com/xquik-dev/terraform-provider-x-twitter-scraper/blob/main/docs/guides/quickstart.md Add this block to ~/.terraformrc to point Terraform to the locally built provider binary. ```hcl provider_installation { dev_overrides { "Xquik-dev/x-twitter-scraper" = "/Users/you/.terraform.d/plugins/xquik-dev/x-twitter-scraper/0.2.0/darwin_arm64" } direct {} } ``` -------------------------------- ### Read Account Data Source Source: https://github.com/xquik-dev/terraform-provider-x-twitter-scraper/blob/main/docs/CONTEXT7.md Retrieve current account state and output specific attributes like the plan. ```hcl data "x-twitter-scraper_account" "current" {} output "xquik_plan" { value = data.x-twitter-scraper_account.current.plan } ``` -------------------------------- ### Set Authentication Environment Variable Source: https://github.com/xquik-dev/terraform-provider-x-twitter-scraper/blob/main/docs/guides/quickstart.md Export the API key as an environment variable for provider authentication. ```sh export X_TWITTER_SCRAPER_API_KEY="xqk_your_key" ``` -------------------------------- ### Create API Key Resource Source: https://github.com/xquik-dev/terraform-provider-x-twitter-scraper/blob/main/docs/guides/quickstart.md Define an API key for use in automation workloads. ```hcl resource "x-twitter-scraper_api_key" "automation" { name = "terraform-automation" } ``` -------------------------------- ### x-twitter-scraper_x_community_join Resource Source: https://github.com/xquik-dev/terraform-provider-x-twitter-scraper/blob/main/docs/resources/x_community_join.md The `x-twitter-scraper_x_community_join` resource is used to perform write actions on X, specifically for joining communities. It requires an X account and provides details about the community joined upon successful execution. ```APIDOC ## Schema ### Required - `account` (String) - X account (@username or account ID) ### Read-Only - `community_id` (String) - The ID of the community joined. - `community_name` (String) - The name of the community joined. - `id` (String) - The ID of this resource. - `success` (Boolean) - Indicates if the action was successful. ``` -------------------------------- ### Register Webhook Resource Source: https://github.com/xquik-dev/terraform-provider-x-twitter-scraper/blob/main/docs/guides/quickstart.md Define a webhook endpoint to receive monitor events. ```hcl resource "x-twitter-scraper_webhook" "events" { url = "https://example.com/xquik/webhook" event_types = ["tweet.new"] } ``` -------------------------------- ### Configure Provider in Terraform Source: https://github.com/xquik-dev/terraform-provider-x-twitter-scraper/blob/main/docs/guides/quickstart.md Define the required provider source and initialize the provider block. ```hcl terraform { required_providers { x-twitter-scraper = { source = "Xquik-dev/x-twitter-scraper" } } } provider "x-twitter-scraper" {} ``` -------------------------------- ### x-twitter-scraper_x_user_follow Resource Source: https://github.com/xquik-dev/terraform-provider-x-twitter-scraper/blob/main/docs/resources/x_user_follow.md The x-twitter-scraper_x_user_follow resource is used to perform follow actions on X. It requires the target X account and the user ID of the person to follow. The success of the operation is returned as a boolean. ```APIDOC ## x-twitter-scraper_x_user_follow (Resource) ### Description This resource manages the follow action on X. It allows users to specify the target X account and the user ID to follow. ### Schema #### Required - **account** (String) - The X account (@username or account ID) to perform the follow action on. - **user_id** (String) - The ID of the user to follow. #### Read-Only - **success** (Boolean) - Indicates whether the follow operation was successful. ``` -------------------------------- ### x-twitter-scraper_monitor Resource Schema Source: https://github.com/xquik-dev/terraform-provider-x-twitter-scraper/blob/main/docs/resources/monitor.md Schema definition for the x-twitter-scraper_monitor resource, detailing required, optional, and read-only attributes. ```APIDOC ## x-twitter-scraper_monitor (Resource) ### Description Real-time X account monitoring ### Schema #### Required - `event_types` (List of String) - `username` (String) X username (without @) #### Optional - `is_active` (Boolean) #### Read-Only - `created_at` (String) - `id` (String) The ID of this resource. - `x_user_id` (String) ``` -------------------------------- ### x-twitter-scraper_x_account Resource Source: https://github.com/xquik-dev/terraform-provider-x-twitter-scraper/blob/main/docs/resources/x_account.md This resource manages connected X accounts. It allows you to configure account credentials and optional proxy settings. Read-only attributes provide information about the account's status and creation details. ```APIDOC ## x-twitter-scraper_x_account Resource ### Description Manages connected X account credentials and settings. ### Schema #### Required - **email** (String) - Account email - **password** (String) - Account password - **username** (String) - X username #### Optional - **proxy_country** (String) - Proxy country code - **totp_secret** (String) - TOTP secret for 2FA #### Read-Only - **cookies_obtained_at** (String) - **created_at** (String) - **id** (String) - The ID of this resource. - **status** (String) - **updated_at** (String) - **x_user_id** (String) - **x_username** (String) ``` -------------------------------- ### x-twitter-scraper_draft Resource Source: https://github.com/xquik-dev/terraform-provider-x-twitter-scraper/blob/main/docs/resources/draft.md The x-twitter-scraper_draft resource allows users to create and manage tweet drafts. It supports specifying the text content, a goal for the tweet (e.g., engagement, followers), and a topic. Read-only attributes include creation and update timestamps, as well as a unique ID. ```APIDOC ## Schema ### Required - `text` (String) - The main content of the tweet. ### Optional - `goal` (String) - The objective of the tweet. Available values: "engagement", "followers", "authority", "conversation". - `topic` (String) - The subject or theme of the tweet. ### Read-Only - `created_at` (String) - The timestamp when the draft was created. - `id` (String) - The unique identifier for this resource. - `updated_at` (String) - The timestamp when the draft was last updated. ``` -------------------------------- ### Support Ticket Resource Source: https://github.com/xquik-dev/terraform-provider-x-twitter-scraper/blob/main/docs/resources/support_ticket.md This resource allows for the creation and management of support tickets. You can set the subject and body, and optionally the status. Read-only fields provide information about the ticket's lifecycle and messages. ```APIDOC ## x-twitter-scraper_support_ticket (Resource) ### Description Support ticket management. ### Schema #### Required - `body` (String) - The main content of the support ticket. - `subject` (String) - The subject line of the support ticket. #### Optional - `status` (String) - The current status of the ticket. Available values: "open", "resolved", "closed". #### Read-Only - `created_at` (String) - Timestamp when the ticket was created. - `id` (String) - The unique identifier for this resource. - `messages` (Attributes List) - A list of messages associated with the ticket. See nested schema below. - `public_id` (String) - A publicly visible identifier for the ticket. - `updated_at` (String) - Timestamp when the ticket was last updated. ### Nested Schema for `messages` #### Read-Only - `body` (String) - The content of the message. - `created_at` (String) - Timestamp when the message was created. - `sender` (String) - The identifier of the message sender. ``` -------------------------------- ### x-twitter-scraper_x_profile Source: https://github.com/xquik-dev/terraform-provider-x-twitter-scraper/blob/main/docs/resources/x_profile.md The x-twitter-scraper_x_profile resource manages X profile information. It allows users to set their bio, location, display name, and website URL. ```APIDOC ## x-twitter-scraper_x_profile (Resource) ### Description Manages X profile information, including bio, location, name, and URL. ### Schema #### Required - `account` (String) - X account (@username or account ID) #### Optional - `description` (String) - Bio description - `location` (String) - User's location - `name` (String) - Display name - `url` (String) - Website URL #### Read-Only - `success` (Boolean) - Indicates if the operation was successful ``` -------------------------------- ### x-twitter-scraper_x_tweet_like Resource Source: https://github.com/xquik-dev/terraform-provider-x-twitter-scraper/blob/main/docs/resources/x_tweet_like.md The x-twitter-scraper_x_tweet_like resource is used to perform the action of liking a tweet on X. It requires the X account and the tweet ID to operate. ```APIDOC ## x-twitter-scraper_x_tweet_like (Resource) ### Description This resource allows users to like a tweet on X. It requires the X account identifier and the specific tweet ID. ### Schema #### Required - **account** (String) - The X account username or ID (e.g., "@username" or "123456789"). - **tweet_id** (String) - The unique identifier of the tweet to be liked. #### Read-Only - **success** (Boolean) - Indicates whether the like action was successful. ``` -------------------------------- ### x-twitter-scraper_style Resource Schema Source: https://github.com/xquik-dev/terraform-provider-x-twitter-scraper/blob/main/docs/resources/style.md Schema definition for the x-twitter-scraper_style resource, including required and read-only attributes. ```APIDOC ## Schema ### Required - `label` (String) Display label for the style - `tweets` (Attributes List) Array of tweet objects (see [below for nested schema](#nestedatt--tweets)) - `username` (String) ### Read-Only - `fetched_at` (String) - `is_own_account` (Boolean) - `tweet_count` (Number) - `x_username` (String) ### Nested Schema for `tweets` Required: - `text` (String) ``` -------------------------------- ### x-twitter-scraper_subscribe Resource Schema Source: https://github.com/xquik-dev/terraform-provider-x-twitter-scraper/blob/main/docs/resources/subscribe.md This resource allows users to manage their subscriptions and view billing information. It provides read-only access to the subscription status and related details. ```APIDOC ## Schema ### Read-Only - `message` (String) - A message related to the subscription status. - `status` (String) - The current status of the subscription. Available values: "checkout_created", "already_subscribed", "payment_issue". - `url` (String) - A URL related to the subscription, potentially for checkout or more details. ``` -------------------------------- ### x-twitter-scraper_x_tweet Resource Schema Source: https://github.com/xquik-dev/terraform-provider-x-twitter-scraper/blob/main/docs/resources/x_tweet.md Defines the configurable attributes for the x-twitter-scraper_x_tweet resource. ```APIDOC ## Schema ### Required - `account` (String) X account (@username or account ID) - `text` (String) ### Optional - `attachment_url` (String) - `community_id` (String) - `is_note_tweet` (Boolean) - `media_ids` (List of String) - `reply_to_tweet_id` (String) - `tweet_id` (String) ### Read-Only - `author` (Attributes) (see [below for nested schema](#nestedatt--author)) - `success` (Boolean) - `tweet` (Attributes) (see [below for nested schema](#nestedatt--tweet)) ### Nested Schema for `author` Read-Only: - `followers` (Number) - `id` (String) - `profile_picture` (String) - `username` (String) - `verified` (Boolean) ### Nested Schema for `tweet` Read-Only: - `bookmark_count` (Number) - `created_at` (String) - `id` (String) - `like_count` (Number) - `quote_count` (Number) - `reply_count` (Number) - `retweet_count` (Number) - `text` (String) - `view_count` (Number) ``` -------------------------------- ### x-twitter-scraper_x_community Resource Schema Source: https://github.com/xquik-dev/terraform-provider-x-twitter-scraper/blob/main/docs/resources/x_community.md Defines the schema for the x-twitter-scraper_x_community resource, including required, optional, and read-only attributes. ```APIDOC ## Schema ### Required - `account` (String) - X account (@username or account ID) - `name` (String) - Community name ### Optional - `description` (String) - Community description ### Read-Only - `community_id` (String) - The ID of the community. - `community_name` (String) - The name of the community. - `id` (String) - The ID of this resource. - `success` (Boolean) - Indicates if the operation was successful. ``` -------------------------------- ### x-twitter-scraper_compose Resource Schema Source: https://github.com/xquik-dev/terraform-provider-x-twitter-scraper/blob/main/docs/resources/compose.md Schema definition for the x-twitter-scraper_compose resource, detailing required and optional fields for tweet composition and analysis. ```APIDOC ## Schema ### Required - `step` (String) Workflow step Available values: "compose", "refine", "score". ### Optional - `additional_context` (String) Extra context or URLs (refine) - `call_to_action` (String) Desired call to action (refine) - `draft` (String) Tweet draft text to evaluate (score) - `goal` (String) Optimization goal Available values: "engagement", "followers", "authority", "conversation". - `has_link` (Boolean) Whether a link is attached (score) - `has_media` (Boolean) Whether media is attached (score) - `media_type` (String) Media type (refine) Available values: "photo", "video", "none". - `style_username` (String) Cached style username for voice matching (compose) - `tone` (String) Desired tone (refine) - `topic` (String) Tweet topic (compose, refine) ``` -------------------------------- ### x-twitter-scraper_x_tweet_retweet Resource Schema Source: https://github.com/xquik-dev/terraform-provider-x-twitter-scraper/blob/main/docs/resources/x_tweet_retweet.md Defines the schema for the x-twitter-scraper_x_tweet_retweet resource, including required and read-only fields. ```APIDOC ## Schema ### Required - `account` (String) - X account (@username or account ID) - `tweet_id` (String) ### Read-Only - `success` (Boolean) ``` -------------------------------- ### Define the provider in Terraform Source: https://github.com/xquik-dev/terraform-provider-x-twitter-scraper/blob/main/README.md Register the provider in your Terraform project configuration. ```hcl terraform { required_providers { x-twitter-scraper = { source = "Xquik-dev/x-twitter-scraper" } } } provider "x-twitter-scraper" { # Prefer X_TWITTER_SCRAPER_API_KEY or X_TWITTER_SCRAPER_BEARER_TOKEN. } ``` -------------------------------- ### x-twitter-scraper_api_key Resource Schema Source: https://github.com/xquik-dev/terraform-provider-x-twitter-scraper/blob/main/docs/resources/api_key.md Defines the schema for the x-twitter-scraper_api_key resource, including optional and read-only fields. ```APIDOC ## Schema ### Optional - `name` (String) ### Read-Only - `created_at` (String) - `full_key` (String) - `id` (String) The ID of this resource. - `prefix` (String) ``` -------------------------------- ### x-twitter-scraper_x_user Source: https://github.com/xquik-dev/terraform-provider-x-twitter-scraper/blob/main/docs/data-sources/x_user.md Retrieves X user data based on the provided username. This data source requires a subscription to the X scraping service. ```APIDOC ## x-twitter-scraper_x_user (Data Source) ### Description Retrieves X user data based on the provided username. This data source requires a subscription to the X scraping service. ### Schema #### Required - **username** (String) - The username of the X user to look up. #### Read-Only - **created_at** (String) - The timestamp when the user account was created. - **description** (String) - The user's profile description. - **followers** (Number) - The number of followers the user has. - **following** (Number) - The number of users the user is following. - **id** (String) - The unique identifier of the X user. - **location** (String) - The user's specified location. - **name** (String) - The user's display name. - **profile_picture** (String) - The URL to the user's profile picture. - **statuses_count** (Number) - The total number of statuses (tweets) the user has posted. - **verified** (Boolean) - Indicates whether the user account is verified. ``` -------------------------------- ### x-twitter-scraper_x_tweet Data Source Schema Source: https://github.com/xquik-dev/terraform-provider-x-twitter-scraper/blob/main/docs/data-sources/x_tweet.md Defines the schema for the x-twitter-scraper_x_tweet data source, including required and read-only attributes. ```APIDOC ## Schema ### Required - `tweet_id` (String) - The ID of the tweet to retrieve. ### Read-Only - `author` (Attributes) - Information about the tweet's author. - `followers` (Number) - The number of followers the author has. - `id` (String) - The author's user ID. - `profile_picture` (String) - The URL of the author's profile picture. - `username` (String) - The author's username. - `verified` (Boolean) - Indicates if the author is verified. - `tweet` (Attributes) - Details about the tweet itself. - `bookmark_count` (Number) - The number of times the tweet has been bookmarked. - `created_at` (String) - The timestamp when the tweet was created. - `id` (String) - The ID of the tweet. - `like_count` (Number) - The number of likes the tweet has received. - `quote_count` (Number) - The number of quote tweets. - `reply_count` (Number) - The number of replies to the tweet. - `retweet_count` (Number) - The number of retweets. - `text` (String) - The content of the tweet. - `view_count` (Number) - The number of views the tweet has. ``` -------------------------------- ### x-twitter-scraper_webhook Resource Source: https://github.com/xquik-dev/terraform-provider-x-twitter-scraper/blob/main/docs/resources/webhook.md The x-twitter-scraper_webhook resource allows you to manage webhook endpoints for receiving notifications from X (Twitter). You can specify event types to subscribe to and the HTTPS URL for delivery. ```APIDOC ## x-twitter-scraper_webhook (Resource) ### Description Manages webhook endpoint creation, configuration, and deletion. ### Schema #### Required - `event_types` (List of String) - The types of events to receive notifications for. - `url` (String) - The HTTPS URL where webhook events will be delivered. #### Optional - `is_active` (Boolean) - Whether the webhook is currently active. Defaults to true if not specified. #### Read-Only - `created_at` (String) - The timestamp when the webhook was created. - `id` (String) - The unique identifier for the webhook resource. - `secret` (String) - A secret token used for verifying the authenticity of incoming webhook requests. ``` -------------------------------- ### x-twitter-scraper_style Data Source Source: https://github.com/xquik-dev/terraform-provider-x-twitter-scraper/blob/main/docs/data-sources/style.md The `x-twitter-scraper_style` data source retrieves details about a user's tweets, including composition, drafts, and writing styles. It requires a `username` and provides read-only attributes such as `fetched_at`, `is_own_account`, `tweet_count`, `x_username`, and a list of `tweets`. ```APIDOC ## x-twitter-scraper_style Data Source ### Description Retrieves details about a user's tweets, including composition, drafts, and writing styles. ### Schema #### Required - `username` (String) - The username of the Twitter account to fetch data for. #### Read-Only - `fetched_at` (String) - The timestamp when the data was fetched. - `is_own_account` (Boolean) - Indicates if the fetched account belongs to the authenticated user. - `tweet_count` (Number) - The total number of tweets fetched. - `tweets` (Attributes List) - A list of tweet objects, each containing: - `author_username` (String) - The username of the tweet's author. - `created_at` (String) - The timestamp when the tweet was created. - `id` (String) - The unique identifier of the tweet. - `text` (String) - The content of the tweet. ``` -------------------------------- ### x-twitter-scraper_draft Data Source Schema Source: https://github.com/xquik-dev/terraform-provider-x-twitter-scraper/blob/main/docs/data-sources/draft.md The schema defines the attributes available for the x-twitter-scraper_draft data source, including read-only fields like creation and update timestamps, goal, ID, text, and topic. ```APIDOC ## Schema ### Read-Only - `created_at` (String) - `goal` (String) - `id` (String) The ID of this resource. - `text` (String) - `topic` (String) - `updated_at` (String) ``` -------------------------------- ### x-twitter-scraper_extraction Data Source Schema Source: https://github.com/xquik-dev/terraform-provider-x-twitter-scraper/blob/main/docs/data-sources/extraction.md The schema defines the configurable and read-only attributes for the x-twitter-scraper_extraction data source. ```APIDOC ## Schema ### Optional - `after` (String) - Cursor for pagination - `limit` (Number) - The maximum number of results to return. ### Read-Only - `has_more` (Boolean) - Indicates if there are more results available. - `id` (String) - The ID of this resource. - `job` (Map of String) - Information about the extraction job. - `next_cursor` (String) - The cursor for the next page of results. - `results` (List of Map of String) - The extracted data. ``` -------------------------------- ### x-twitter-scraper_draw Data Source Schema Source: https://github.com/xquik-dev/terraform-provider-x-twitter-scraper/blob/main/docs/data-sources/draw.md The schema for the x-twitter-scraper_draw data source, detailing its read-only attributes and nested structures for draw and winner information. ```APIDOC ## Schema ### Read-Only - `draw` (Attributes) - Details of the giveaway draw. - `id` (String) - The ID of this resource. - `winners` (Attributes List) - Information about the winners of the draw. ### Nested Schema for `draw` Read-Only: - `created_at` (String) - Timestamp when the draw was created. - `drawn_at` (String) - Timestamp when the draw was conducted. - `id` (String) - Unique identifier for the draw. - `status` (String) - Current status of the draw (e.g., 'completed', 'pending'). - `total_entries` (Number) - Total number of valid entries for the draw. - `tweet_author_username` (String) - Username of the author of the tweet. - `tweet_id` (String) - The ID of the tweet associated with the draw. - `tweet_like_count` (Number) - Number of likes on the tweet. - `tweet_quote_count` (Number) - Number of quote tweets. - `tweet_reply_count` (Number) - Number of replies to the tweet. - `tweet_retweet_count` (Number) - Number of retweets. - `tweet_text` (String) - The content of the tweet. - `tweet_url` (String) - The URL of the tweet. - `valid_entries` (Number) - The number of entries that were considered valid for the draw. ### Nested Schema for `winners` Read-Only: - `author_username` (String) - Username of the winner. - `is_backup` (Boolean) - Indicates if the winner is a backup. - `position` (Number) - The position of the winner (e.g., 1st, 2nd). - `tweet_id` (String) - The ID of the tweet associated with the winner's entry. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.