Sha256: c346b09129f7279c329919c9e93ad9de9fe112408aebdc0a0b20657d8ec9953e

Contents?: true

Size: 654 Bytes

Versions: 28

Compression:

Stored size: 654 Bytes

Contents

# frozen_string_literal: true

require_relative '../value_equality'

module RubyTerraform
  module Models
    class UnknownValue
      include ValueEquality

      def initialize(sensitive: false)
        @sensitive = sensitive
      end

      def value
        nil
      end
      alias unbox value

      def known?
        false
      end

      def sensitive?
        @sensitive
      end

      def render(_ = {})
        '(known after apply)'
      end

      def state
        [@sensitive]
      end

      def inspect
        sensitive = sensitive? ? 'sensitive' : 'non-sensitive'
        "? (unknown, #{sensitive})"
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
ruby-terraform-1.9.0.pre.2 lib/ruby_terraform/models/unknown_value.rb
ruby-terraform-1.9.0.pre.1 lib/ruby_terraform/models/unknown_value.rb
ruby-terraform-1.8.0 lib/ruby_terraform/models/unknown_value.rb
ruby-terraform-1.8.0.pre.13 lib/ruby_terraform/models/unknown_value.rb
ruby-terraform-1.8.0.pre.12 lib/ruby_terraform/models/unknown_value.rb
ruby-terraform-1.8.0.pre.11 lib/ruby_terraform/models/unknown_value.rb
ruby-terraform-1.8.0.pre.10 lib/ruby_terraform/models/unknown_value.rb
ruby-terraform-1.8.0.pre.9 lib/ruby_terraform/models/unknown_value.rb
ruby-terraform-1.8.0.pre.8 lib/ruby_terraform/models/unknown_value.rb
ruby-terraform-1.8.0.pre.7 lib/ruby_terraform/models/unknown_value.rb
ruby-terraform-1.8.0.pre.6 lib/ruby_terraform/models/unknown_value.rb
ruby-terraform-1.8.0.pre.5 lib/ruby_terraform/models/unknown_value.rb
ruby-terraform-1.8.0.pre.4 lib/ruby_terraform/models/unknown_value.rb
ruby-terraform-1.8.0.pre.3 lib/ruby_terraform/models/unknown_value.rb
ruby-terraform-1.8.0.pre.2 lib/ruby_terraform/models/unknown_value.rb
ruby-terraform-1.8.0.pre.1 lib/ruby_terraform/models/unknown_value.rb
ruby-terraform-1.7.0 lib/ruby_terraform/models/unknown_value.rb
ruby-terraform-1.7.0.pre.19 lib/ruby_terraform/models/unknown_value.rb
ruby-terraform-1.7.0.pre.18 lib/ruby_terraform/models/unknown_value.rb
ruby-terraform-1.7.0.pre.17 lib/ruby_terraform/models/unknown_value.rb